HyperWorks Solvers

Reference: Array

Reference: Array

Previous topic Next topic Expand/collapse all hidden text  

Reference: Array

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  
hmtoggle_plus1greyXML Format

Command Element

Description

Modifies an existing Reference_Array element.

Format

<Reference_Array

      id                  = "integer"

      type                = “IC | RESTART | PRINT”

      num_element         = "integer" >

!

! The data

!

real       real       real       real       real       real                                              

real       real       real       real       real       real

 

</Reference_Array>

Attributes

id        

Element identification number (integer>0).  This number is unique among all the Reference_Array elements.

type

The type of Reference_Array element.  Choose from IC, RESTART or PRINT. See Comment 2.

num_element

The number of elements being specified when the Reference_Array is of type IC, RESTART or PRINT.

Comments

1.The ID of the Reference_Array command element must match the ID of one of the Reference_Array elements that already exists in the model.
2.The Reference_Array command element can be of the following types:
IC: MotionSolve allows you to change the data defined in a Reference_Array of type IC only.  The num_element for the IC array cannot be changed and must match what is defined in the Model section.
RESTART: This is a special type of Reference_Array that tells MotionSolve to restart the integrator at the times defined in the data section. When the integrator is restarted, all time integration history is discarded. The number of time steps defined in the data section must match what is defined in the num_element attribute. Note: This array can only be defined in the Command section.
PRINT: This is a special type of Reference_Array that tells MotionSolve to write the output signals at the times defined in the data section.  Using this array, you can choose to have the output signals printed out at time steps that are not equally spaced.  The number of time steps defined in the data section must match what is defined in the num_element attribute. Note: This array can only be defined in the Command section

Example

1.The following example modifies the data for an IC array.

<Reference_Array

    id           = "102"

    type         = "IC"

    num_element  = "10">

    1.0000000E+00   2.0000000E+00
    3.0000000E+00   4.0000000E+00
    5.0000000E+00   6.0000000E+00
    7.0000000E+00   8.0000000E+00
    9.0000000E+00   1.0000000E+01

</Reference_Array>

2.The following example tells MotionSolve to restart the integrator at time t = 15, 24s.

<Reference_Array

    id            = "7957300"

    type          = "RESTART"

    num_element   = "2">

1.5000000E+01    2.4000000E+01

</Reference_Array>

3.The following example tells MotionSolve to write output signals at the specific times defined in the data section.

<Reference_Array

    id            = "7947300"

    type          = "PRINT"

    num_element   = "8">

   1.4000000E+01    1.4050000E+01    1.4100000E+01    1.4150000E+01    1.4200000E+01

   2.3888889E+01    2.3944444E+01    2.4000000E+01

</Reference_Array>

hmtoggle_plus1greyPython Format

Command Element

Description

Modifies an existing ARRAY element.

Declaration

def ARRAY(id, LABEL="", TYPE="", SIZE=0, VARIABLES=[], NUMBERS=[], FUNCTION="", ROUTINE="", SCRIPT=""):

Attributes

id

Element identification number (integer > 0).  This number is unique among all the ARRAY elements.

LABEL

Modifies the name of the ARRAY element.

TYPE

Modifies the type of the ARRAY being created.  Select one from the following:

X (state variables)
Y (output variables)
U (input variables)
IC (initial conditions)
RESTART
PRINT

SIZE

Modifies the number of input variables being specified when the ARRAY type is U, or elements being specified when the ARRAY is of type X (state), Y (output), IC (initial conditions), RESTART or PRINT.

VARIABLES

Modifies the list of IDs of the VARIABLES elements used to define the input array (U).

NUMBERS

Modifies the list of values when the ARRAY is of type IC (initial conditions).

FUNCTION

Modifies the list of parameters that are passed from the data file to the user defined subroutine, ARYSUB.  This attribute is common to all types of user subroutines and scripts.

ROUTINE

Modifies the alternative name for the user subroutine ARYSUB

SCRIPT

Modifies the path and name of the user written script that contains the routine.

Comments

See Reference_Array

Example

The following example modifies the data of an IC array.

ARRAY(102, TYPE="IC", SIZE=10, NUMBERS=[1,2,3,4,5,6,7,8,9,10])

The following example tells MotionSolve to restart the integrator at time t = 15, 24s.

ARRAY(7957300, TYPE="RESTART", SIZE=2, NUMBERS=[15,24])

The following example tells MotionSolve to write output signals at the specific times defined in the data section.

ARRAY(7947300, TYPE="PRINT", SIZE=8,NUMBERS=[1.4000000E+01,1.4050000E+01,1.4100000E+01,1.4150000E+01,1.4200000E+01,2.3888889 E+01,2.3944444E+01,2.4000000E+01])

See Also:

Control_StateEqn

Control_SISO

Control_PlantInput

Control_PlantOutput

Command Statements

Model Statements

Functions

Notation and Syntax