Solver Arrays
Use the Arrays tool to create solver arrays and set solver array data. Solver array types include X array, Y array, U array, IC array, Plant Input array, and Plant Output array.
Create Solver Arrays
- From the Model Browser, select the system to which the solver array is to be added.
-
Right-click on a system in the Model Browser and select from the context menu.
ORRight-click on a solver differential equation folder in the Model Browser and select Add Solver Array from the context menu.ORFrom the Model ribbon, click the arrow next to the References tool set name, then select Arrays icon.The Add Solver Array dialog is displayed.
-
Specify a label for the solver array.
The label can be changed at any time.
-
Specify a variable name for the solver array.
By default, variables names of entities in MotionView follow a certain convention. For example, all solver array entities have a variable name starting with “sa_”. This is the recommended convention to follow when building models in MotionView since it has many advantages in model editing and model manipulation.
-
Click OK to close the window or
Apply to continue creating entities.
Once a solver array entity has been added to the model, the panel for the array will automatically be displayed in the panel area.
Edit Solver Arrays
Use the Solver Arrays panel to edit the type of array and any array values.
There are six types of solver arrays:
Type | Description |
---|---|
X | Used as the state variable array for systems modeling elements of Control_StateEqn (MotionSolve), GSE and LSE (ADAMS), and TFSISO. See notes below. |
Y | A type Y solver array defines the output array for system modeling elements of LSE, GSE, and TFSISO. See notes below. |
Plant Input | Describes the signals that the mechanical system receives from the controller. |
Plant Output | Describes the signals that the mechanical system sends to the controller. |
U | Groups sets of variables. Generally used as an Input Array for Control_StateEqn (MotionSolve)/GSE (ADAMS). |
IC | 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 Control_StateEqn (MotionSolve)/GSE (ADAMS) and LSE statements. |
Note:
- Control_StateEqn for MotionSolve or GSE for ADAMS can now be modeled using the Control State Equation entity.
- This entity implicitly creates the X and Y solver arrays. There is no need to define these arrays separately if using the Control State Equation entity.
Define the Properties of Solver Arrays
From the Properties tab, you can select the array type.
-
If the Solver Arrays panel is not currently displayed, select the desired
solver array by clicking on it in the Model Browser or in
the modeling window.
The Solver Arrays panel is automatically displayed.
-
Select an option from the Array type drop-down menu.
If you select the X, Y, or IC, you do not need to enter any additional information. However, if you select the U, Plant Input, or Plant Output, additional options are available.
- Double-click the SolverVariable collector and select the solver variable assigned to the array from the Model Tree.
-
Add additional arrays by entering a number in the Append text box and click
Append.
Clicking Append adds a new array to the bottom of the list.Tip:
- Select the check box next to any of the solver variables and click Insert to add an array directly above the selected entity.
- To delete an array, select any array from the list and click Delete.
- Use the SolverVariable collector to define any added arrays.
-
For array types of Plant Input and Plant Output, define the additional options
provided.
Define the Values of Solver Arrays
The Values tab only becomes available if you select IC as the array type in the Properties tab.
From the drop-down menu on the Values tab, select File,
Math, or Values as the data
source for the IC solver array type.
If File is chosen:
If Math is chosen, enter a math or Templex expression
to define the array mathematically.
If Values is chosen, enter data values for each IC
array.
Note: Activating the check box in the upper right corner of the panel
will allow you to insert, cut, copy, and paste data point values to the
table.
Tip: Click to
view the Data Values dialog containing all data
points.
Use User-Defined Properties for a Solver Array
If desired, define the solver array using the User-Defined tab, which will allow you to specify the properties of the array using user subroutines.
Note: This option is only available for array types of Plant Input and Plant
Output.
- From the Properties tab, click the User-defined properties check box.
- Click the newly added User-Defined tab.
-
Define the user subroutine.