*SolverArray()

Creates a solver array of type U, PLANT_INPUT, PLANT_OUTPUT, IC, X, or Y.

Syntax

*SolverArray(varname,"label", U|PLANT_INPUT|PLANT_OUTPUT|IC|X|Y| sv_1,sv_2,...sv_n)

Arguments

varname
The variable name for the solver array.
Data type: varname
"label"
The descriptive label for the solver array.
Data type: label
U|PLANT_INPUT| PLANT_OUTPUT|IC|X|Y|
The solver array type.
sv_1, sv_2, ...sv_n
The first, second, or nth value in the series of array values or the varname of the solver variable for types U, PLANT_INPUT, and PLANT_OUTPUT.
Data type: real or expression

Example

*BeginMDL(model, "Model 1")
 *Curve( crv_0, "Curve 0", 2D, CARTESIAN, WRITE, CURVE_POINTS, OPEN ) 
 *SolverArray( sa_x, "SolverArray 0", X )
 *SolverArray( sa_u, "SolverArray 1", U, sv_0, sv_1)
 *SolverArray( sa_y, "SolverArray 2", Y )
 *SolverArray( sa_ic, "SolverArray 3", IC )
 *SolverArray( sa_pi, "SolverArray 4", PLANT_INPUT, sv_0, sv_1)
 *SolverArray( sa_po, "SolverArray 5", PLANT_OUTPUT, sv_0, sv_1)
 *SolverVariable( sv_0, "SolverVariable 0" )
 *SolverVariable( sv_1, "SolverVariable 1" )
 *SolverVariable( sv_2, "SolverVariable 2" )
 *SetSolverArray(sa_u, sv_0)
 *SetCurve( crv_0, VALUE, 4
, 0, .1, .2, .3, VALUE, 4
, 1, 2, 3, 4 ) 
 *SetSolverArray( sa_ic, VALUE, 1, 4 )
 *SetSolverVariable(sv_0, EXPR, `SIN(TIME)`, OFF)
 *SetSolverVariable(sv_1, CRV, crv_0, , `time` , OFF)
 *SetSolverVariable(sv_2, LIN, 5, OFF)
*EndMDL()

Context

*BeginMdl()

*DefineAnalysis()

*DefineSystem()

Comments

For the ADAMS solver, a type IC solver array can be used as a general array in order to pass data into user subroutines. Arrays of type IC are also used to set the initial conditions for the GSE and LSE statements.

A type U solver array is used to group sets of variables.

A type X solver array is used as the state variable array for ADAMS systems modeling elements of LSE, GSE, and TFSISO.

For the ADAMS solver, a type Y solver array defines the output array for system modeling elements of LSE, GSE, and TFSISO.

PLANT_INPUT and PLANT_OUTPUT can be used to identify the inputs and outputs to the mechanical system for a controller.