Q: I have defined a connector as compression only. I have defined stiffness in the z direction. Why do I get both tension and compression in the results?
REV 7.00
A: It is because you defined the element incorrectly. You have defined it with:
$
$****************************************
$
&instate -loc 0 0 2 0 0 0
medit
~cccc gspr compression z 100
connector e ~cccc *1
end
The &instate command sets the initial distance between the nodes to 2 units. The "business" direction of a GSPR is the element X direction; i.e. the special features such as the -X_PY spring and tension/compression flags work only in the X direction. Your element has stiffness only in the Z direction so it will work in both tension and compression. To fix this you should change the "business" direction to be in the body -Z direction:
~cccc gspr compression x 100
connector e ~cccc -euler -z *1