Array
Model ElementThe Array model statement specifies a list of variables (which are used by other MotionSolve modeling elements) or constants.
Class Name
Array
Description
- X: This type is used to store the state vector corresponding to the GSE and TFSISO elements.
- Y: This type is used to store the output vector corresponding to the GSE and TFSISO.
- U: This type is used to store the input vector corresponding to the GSE, TFSISO and PINPUT elements. The data stored in this type is a list of IDs for VARIABLE elements that specify the inputs to the modeling elements.
- IC: This type is used to store a set of numbers primarily to specify initial conditions for GSE and TFSISO elements. You may also use this type to define a set of numbers in the model file and access them from a user-written subroutine.
Attribute Summary
Name | Property | Modifiable by Command? | Designable? |
---|---|---|---|
id | Int() | NO | |
label | Str() | Yes | |
type | Enum("Y X IC U") | ||
size | Int() | ||
numbers | Double(count=0) | Yes | FD Only |
variables | Reference("Variable",count=0) | Yes | |
function | Function | ||
routine | Routine | ||
script | Script | ||
active | Bool() | Yes |
Usage
# Array of type X
Array (type="X", optional_attributes)
# Array of type Y
Array (type="Y", optional_attributes)
# Array of type U
Array (type="U", variables=list, optional_attributes)
# Array of type IC
Array (type="IC", numbers=list, optional_attributes)
Attributes
- type
- String
- type
- String
- type
- String
- variables
- List of references to existing Variables.
- type
- String
- numbers
- List of numeric values
- id
- Integer
- label
- String
- size
- Integer
Example
XML | Python interface |
---|---|
<Reference_Array id="101"
type="X"
num_element="4" /> |
x = Array (type="X") |
<Reference_Array id="101"
type="Y"
num_element="1" /> |
y = Array (type="Y") |
<Reference_Array id="103"
type="U"
num_element="4" variable_id="8, 2, 9, 11" /> |
varlist = [var8, var2, var9, var11] u = Array (type="U", variables=varlist) |
<Reference_Array type="IC"
num_element="4"> 0.0 0.0 0.0 0.0</Reference_Array> |
numlist=[0,0,0,0]
ic = Array (type="IC", numbers=numlist) |
Comments
- See Properties for an explanation about what properties are, why they are used, and how you can extend these.
- For a more detailed explanation about Array, see the Comments in Reference: Array.