*SetSolverVariable() - single solver variable
Sets the value of the solver variable.
Syntax
*SetSolverVariable(sv_name, TYPE, TOKEN,
[ic]
[implicit], static_hold, [autobalance, penalty, penalty1]))
Arguments
- varname
- The variable name of the solver variable.
- value
- The value or function expression describing the solver variable. This variable can be used to create algebraic based variables that can be used in additional function expressions.
- ic
- Optional argument which gives the value of the solver variable at the time when the solver runs an initial conditions analysis. The value of the argument can be set to OFF if initial conditions are not to be specified.
- curve_name, AKIMA|CUBIC| LINEAR|QUINTIC, `indep_variable`
- When using curve data, a curve, an interpolation method, and an independent variable must be specified, where curve_name is the variable name of an existing curve that would represent the force versus displacement/velocity in the solver variable. The interpolation method can be set to AKIMA, CUBIC, LINEAR, or QUINTIC. indep_variable is the independent variable representing either the displacement (in stiffness tokens) or velocity (in damping tokens) and is specified in Templex syntax.
- spl3d_name, AKIMA|CUBIC|LINEAR| QUINTIC, `indep_var1` 'indep_var2'
- When using spline3d, a Spline3D entity, an interpolation method, and two independent variables must be specified, where spl3d_name is the variable name of an existing Spline3D entity that would represent the force/torque v/s two independent variables. The interpolation method can be set to AKIMA, CUBIC, LINEAR, or QUINTIC. indep_var1 is the solver expression for the first independent variable. indep_var2 is the solver expression that represents the second independent variable.
- `expression`
- An expression for the solver variable.
- implicit
- This option is only valid in the MotionSolve solver mode. Valid values are True or False.
- static_hold
- Valid values are True or False. This option is applicable if initial conditions are specified.
- autobalance
- Valid values are Default, Unconditional, Disabled and Penalty. This option is used when implicit is set to true. See comments for more about this option.
- Penalty
- The value of penalty. This data works in conjunction with the autobalance option set to Penalty.
- penalty1
- The value of penalty1. This data works in conjunction with the autobalance option set to Penalty.
Example
*SolverVariable(sv_solvervariable, "Solver Variable" )
*SetSolverVariable(sv_solvervariable,
`7*DZ(marker1.id, marker2.id, marker2.id)`)
Context
Comments
The solver variable is generally used to define a variable that is an algebraic function of solver parameters. This solver variable can then be referenced by other solver variables or passed into a user subroutine.
To specify non-linear properties, a solver expression or curve data can be used to compare
the solver variable. When using a solver expression, Templex
syntax is used and all variables are enclosed in braces {} and the rest is treated as
literal. To use curve data a curve interpolation method and an independent variable must be
specified. For example:
CRV, curve_name, AKIMA, `{DX}`
where curve_name is the variable name of an existing curve, interpolation method can be set to AKIMA, CUBIC, LINEAR,or QUINTIC and the independent variable is specified in Templex syntax.