*SetTorsionSpring() - single torsion spring with user subroutine
Sets the properties of a torsion spring with a user subroutine.
Syntax
*SetTorsionSpring(spr_name, SFORCE, `solver_expression`)
*Set(spr_name.use_local_dll, TRUE|FALSE)
*Set(spr.local_dll, "string")
Arguments
- spr_name
- The variable name of an existing torsion spring.
- SFORCE
- This argument indicates the type of user subroutine that is used to compute torsion spring properties.
- solver_expression
- A solver expression enclosed in back quotes to specify arguments for the user subroutine.
- spr_name.use_local_dll
- Specifies if a user subroutine DLL is specific to the instance of one coupler entity.
- spr_name.local_dll
- The path and filename for the user subroutine DLL to be used with an instance of the user defined coupler.
Example
*TorsionSpring( spr_tbar, "Torsion bar",
b_upr,
b_lwr,
p_upr,
p_lwr)
*Curve( crv_spr, "Rate")
*SetTorsionSpring(spr_tbar, SFORCE, `USER(1, { spr_tbar.i.id, %d },
{ spr_tbar.j.id, %d },
{ cr() }, `
`-{ crv_spr.id, %d })`)
Context
Comments
Torsion spring properties can be computed with user subroutines of type SFOSUB. A user executable must created when using these subroutines.
The solver expression specified follows Templex syntax where all the variables to be evaluated are enclosed in braces {} and the rest of the expression is treated as literal.