I have recently been applying Castigliano’s second theorem to FEA which has reveal as a powerful tool.
I have seen [Nobody-86] user asking about how to extract force and elongation of a spring.
Probably because I have it fresh, the idea came fast to my mind.
Just request the spring internal energy and read the ELSE value in the .dat file.

*EL PRINT, ELSET=Spring_of_interest
ELSE

Springs internal energy is strain energy =1/2Ke^2 (e= Spring elongation,K=Spring Constant)

Then, the desired values are direct to obtain no matter if there has been some rigid body move, if NLGEOM is active, large rotations are involved or how complex the internal forces have been distributed. .

e= sqrt(2ELSE/K)
Spring Force=Ksqrt(2*ELSE/K)

I’m convinced Castigliano could also be applied to nonlinear springs with elongation being the slope of ELSE(F).

Hey, that’s a very good approach, I wouldn’t have thought of it straight away. I’ve now played around with it a bit and would like to add the formula for non-linear springs.

For non-linear spring characteristics, the potential energy for a deflection x is calculated according to

$ESEL = \int_0^x F(e) \cdot de$

with the spring characteristic F(e) as force (F) over elongation (e). It is not generally possible to rearrange to solve for the force F or elongation e, so a numerical method must be used here.

BTW: is there any way to render LaTeX formulas in the post?

The formula is definitely valid for force-strain diagrams that have a starting point at (0,0). It is quite possible that negative forces/strains are not covered, I still have to investigate that. Especially because I mainly have compression forces in the springs.