*SetSpringPreloadOption() - single coil/torsion spring

Sets the preload control option for the spring.


*SetSpringPreloadOption(spr_name, coil_preload_option)


The variable name of an existing coil/torsion spring.
Data type: varname
Preload option to be used.
Data type: Option
Valid choices:

Coil Spring Example

*Body(b_lca, "LCA", p_lca_cm)
*Body(b_frame, "Frame", p_frame_cm)
*Point(p_spr_upr, "Spring @ frame")
*Point(p_spr_lwr, "Spring @ lca")
*CoilSpring(spring_uca, "Coil Spring", b_lca, b_frame, p_spr_upr, p_spr_lwr)
*SetCoilSpring(spring_uca, LIN, 10, LIN, 0, 500, mag(spring_uca.p1.data - spring_uca.p2.data)+20 ) //Preload is specified as force of 500 and length 20 more than the modeled length
*SetSpringPreloadOption(spring_uca,  FORCE ) //Sets preload option to use force only, for example 500
*SetSpringPreloadOption(spring_uca,  LENGTH) //Sets preload option to use length only, for example 200(10*20)
*SetSpringPreloadOption(spring_uca,  FORCE_LENGTH ) //Sets preload option to use both force and length, for example 500 + 10*20
*SetSpringPreloadOption(spring_uca,  OFF ) //Sets preload option to OFF (0)

Torsion Spring Example

*Body(b_lever, "Lever", p_lever)
*Point(p_spr, "Spring Origin")
*TorsionSpring(spring, "Torsion Spring", b_lever, B_Ground, p_spr, VECTOR, V_Global_Z)
*SetTorsionSpring(spring, LIN, 100.0, LIN, , 200, 5 ) //Preload is specified as torque of 200 and angle 5
*SetSpringPreloadOption(spring,  TORQUE ) //Sets preload option to use torque only, for example 200
*SetSpringPreloadOption(spring,  ANGLE) //Sets preload option to use angle only, for example 100*5
*SetSpringPreloadOption(spring,  TORQUE_ANGLE ) //Sets preload option to use both torque and angle, for example 200 + 100*5
*SetSpringPreloadOption(spring,  OFF ) //Sets preload option to OFF (0)







This statement can be used to set which option is to be used for preload application when values for force and length are specified for the spring using *SetCoilSpring().
Option Effect on Total Preload
OFF Preload is turned off.
FORCE Only the force value of preload is active.
LENGTH Only the length-based preload is active.
FORCE_LENGTH Use both the Force and Length method to specify preload.

A similar set of options are available for a torsion spring which involves TORQUE and ANGLE. Refer to examples above.