Several entities use the User Subroutine to define their properties as shown in the table below. If a User Subroutine is not used in any entities, the Motion solver treats it for measurement. These subroutines will be calculated only at reporting time. The other subroutines are simultaneously calculated with other entities in each solution process.
Figure 8.45: Entities using a User Subroutine
The user subroutines have the required number of return value and results as shown in the table below.
Figure 8.46: The number of return values and their definition in a User Subroutine
Entity | Number of Return Values | Definition |
Revolute Joint | 1 | Rotation angle in radian |
Translational Joint | 1 | Translational displacement |
Rotational Motion Formulas | 1 | Rotation angle in radian |
Translational Motion Formulas | 1 | Translational displacement |
Matrix | 6 | Force and torque |
Translational Scalar | 1 | Force |
Rotational Scalar | 1 | Torque |
Vector | 6 | Force and torque |
Concentrated Load | 6 | Force and torque |
Pressure Load | 1 | Pressure |
Variable Equations | 1 | Variable |
First Order Differential Equations | 1 | First derivative of variable |
Second Order Differential Equations | 1 | Second derivative of variable |
General Contact | 2 | Normal and friction force |
Rigid to Rigid 3D Contact (RTR3D Contact) | 2 | Normal and friction force |
Flex to Rigid 3D Contact (FTR3D Contact) | 2 | Normal and friction force |
Flex to Flex 3D Contact (FTF3D Contact) | 2 | Normal and friction force |
Measurement | N > 0 | N/A |
As shown in the figure and table below, you can use a user subroutines in other entities by following several steps.
Figure 8.48: Steps to use a User Subroutine in an entity
Step | Operation |
1st step | Open the entity dialog to set a user subroutine and then change the motion or force type to the User Subroutine as shown in Figure 8.47: How to use a User Subroutine in other entities. |
2nd step | As shown in Figure 8.47: How to use a User Subroutine in other entities, click the button to open the User Subroutine list. |
3rd step | Select one of the user subroutines as shown in Figure 8.47: How to use a User Subroutine in other entities. The input parameters and name which are defined in the selected subroutine will be shown in the user parameter window and the User Subroutine Name field, respectively. If the value of an input parameter is modified in the user parameter window, the value of corresponding parameter in the User Subroutine will be changed simultaneously. |
4th step | Click the User Subroutine to the entity. | button of to apply the