*SetContinuousStates()

Specifies the properties for continuous states of a general state equation.

Syntax

*SetContinuousStates( varname, num_states, static_hold)

Arguments

varname
The variable name of the general state equation.
Data type: varname
num_states
The number of continuous states in the state equation.
Data type: integer
static_hold
Valid value is STATIC_HOLD. Use to hold the user specified initial condition values for subsequent analysis after a static or quasi-static analysis during solver execution. See Comments below.
Data type: keyword

Example

 *SolverVariable( sv_1, "Input 1" )
 *SetSolverVariable( sv_1, EXPR, `VX(1, 2, 3)`, OFF )
 *SolverVariable( sv_2, "Input 2" )
 *SetSolverVariable( sv_2, EXPR, `STEP(TIME, 0, 1, 5, 200)`, OFF )
 *SolverVariable( sv_3, "Input 3" )
 *SetSolverVariable( sv_3, LIN, 1+1, OFF )
 *SolverArray( u_array, "Input Array", U, sv_1, sv_2, sv_3 )
 *SolverArray( ic_array, "IC Array", IC )
 *SetSolverArray( ic_array, VALUE, 4, 0.0, 
3.4, 
b_0.mass, 
b_0.Izz ) 
 *GeneralStateEquation( gse_0, "My Controller", 3, 
u_array, 
ic_array )
 *SetGeneralStateEquation(gse_0, USER, `USER(500, 
{frc_cont.i.idstring}, 
{frc_cont.j.idstring})`
)
 *SetContinuousStates( gse_0, 4, STATIC_HOLD )
 *SetLocalUserDLL( gse_0, "mygsesubdll", "dll_xx", 
"dll_xu", 
"dll_yx", 
"dll_yu" )
 *ActionReactionForce(frc_cont, "Control Force", LOA, 
b_0, 
B_Ground, 
p_cont, 
P_Global_Origin )
 *SetForce( frc_cont, EXPR, ARYVAL({gse_0.y_array.idstring}, 2)` )

Context

*BeginMdl()

*DefineAssembly()

*DefineSystem()

*DefineAnalysis()

*BeginContext()

Comments

The num_states argument is used to indicate the number of continuous states of a general state equation. Its value is written in the num_states argument of the Control_StateEqn statement for MotionSolve and the NS argument of the GSE statement in ADAMS.

MotionSolve and ADAMS find equilibrium values for time derivatives of the states. As a result, the initial conditions for a subsequent analysis could be different than those specified. If STATIC_HOLD is specified, the values of states are fixed as specified in the initial conditions during the static analysis at time = 0.0. The time derivatives are no longer zero and could result in transient results at the beginning periods of the subsequent analysis. If STATIC_HOLD is not specified, the initial conditions for the states are allowed to change during the static/quasi-static analysis and their time derivatives are set to zero. Refer to the Control_StateEqn MotionSolve statement for additional information.