8.6.3. Entities Using a User Subroutine

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.


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

EntityNumber of Return ValuesDefinition
Revolute Joint 1Rotation angle in radian
Translational Joint 1Translational displacement
Rotational Motion Formulas 1Rotation angle in radian
Translational Motion Formulas 1Translational displacement
Matrix 6Force and torque
Translational Scalar 1Force
Rotational Scalar 1Torque
Vector 6Force and torque
Concentrated Load 6Force and torque
Pressure Load 1Pressure
Variable Equations 1Variable
First Order Differential Equations 1First derivative of variable
Second Order Differential Equations 1Second derivative of variable
General Contact 2Normal and friction force
Rigid to Rigid 3D Contact (RTR3D Contact) 2Normal and friction force
Flex to Rigid 3D Contact (FTR3D Contact) 2Normal and friction force
Flex to Flex 3D Contact (FTF3D Contact) 2Normal and friction force
MeasurementN > 0N/A

As shown in the figure and table below, you can use a user subroutines in other entities by following several steps.

Figure 8.47: How to use a User Subroutine in other entities

How to use a User Subroutine in other entities

Figure 8.48: Steps to use a User Subroutine in an entity

StepOperation
1st stepOpen 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 stepAs shown in Figure 8.47: How to use a User Subroutine in other entities, click the Steps to use a User Subroutine in an entity  button to open the User Subroutine list.
3rd stepSelect 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 stepClick the Apply button of to apply the User Subroutine to the entity.