This manual provides a detailed list and usage information regarding command statements, model statements, functions and
the Subroutine Interface available in MotionSolve.
To facilitate the creation of solver extensions, MotionSolve provides you with a well-defined interface and a well-defined methodology for
creating user subroutines.
Driver subroutines are user-written subroutines that allow you to create and execute your own types of analyses. These
analyses are typically composed of level analyses that are provided to you by MotionSolve.
Analysis control subroutines are built-in subroutines provided by MotionSolve that allow a user-written subroutine to perform various types of analysis, generate output and modify the model defined
in the XML input file.
Data Access subroutines are built-in subroutines provided by MotionSolve that allow a user-written subroutine to access model parameter or state information.
Utility/Data Access SubroutineUses a spline fitting method to return the interpolated value or 1st/2nd derivative of the interpolated value for
a Reference_Spline element.
Utility/Data Access SubroutineUses a spline fitting method to return the interpolated value or 1st/2nd derivative of the interpolated value for
a Reference_Spline element.
Utility/Data Access SubroutineThe CUSFNC utility subroutine obtains a scalar output from a custom defined function in MotionSolve. The custom function must already be defined using the MotionSolve custom mapping file.
Utility/Data Access SubroutineUses a spline fitting method to return the interpolated value or 1st/2nd derivative of the interpolated value for
a Reference_Spline element.
Utility/Data Access SubroutineSLSQP optimizer is a sequential least squares programming algorithm for nonlinear, constrained gradient-based optimization.
It supports both inequality and equality constraints.
Utility/GeneralEvaluates a Fourier Cosine. A Fourier Cosine series is a collapsed version of a Fourier series, where the factors
multiplying the SIN() terms are all zero.
Utility/GeneralEvaluates a Fourier Sine. A Fourier Sine series is a collapsed version of a Fourier series where the factors multiplying
the COS() terms are all zero.
Utility/Data Access SubroutineReturns the data from a full Reference_Matrix element. There is a separate function for the sparse Reference_Matrix element called GET_SPARSE_MATRIX_DATA.
Utility/Data Access SubroutineUses a spline fitting method to return the interpolated value or 1st/2nd derivative of the interpolated value for
a Reference_Spline element.
Utility/GeneralEvaluates a generic polynomial. A polynomial is a mathematical expression defined by the sum of the powers of a variable,
multiplied by coefficients.
Utility/Data Access SubroutineUses a spline fitting method to return the interpolated value or 1st/2nd derivative of the interpolated value for
a Reference_Spline element.
Utility/Data Access SubroutineRELOAD_MODEL is used to load a model defined in a MotionSolve XML input file into memory and make it the current model. This subroutine can only be called from a user-written
CONSUB.
Utility/Data Access SubroutineObtains various system states, for example, Displacement and Velocity, and makes them available to user-defined subroutines.
SYSARY should be called with the appropriate input arguments (listed below) and it returns the corresponding system
state.
Utility/Data Access SubroutineThe SYSFNC utility subroutine allows you to query MotionSolve for a single system state such as displacement, velocity, and force, inside a user subroutine. SYSFNC should be called with the appropriate input argument (listed below) and it returns the corresponding system
state.
This manual provides a detailed list and usage information regarding command statements, model statements, functions and
the Subroutine Interface available in MotionSolve.
To facilitate the creation of solver extensions, MotionSolve provides you with a well-defined interface and a well-defined methodology for
creating user subroutines.
Data Access subroutines are built-in subroutines provided by MotionSolve that allow a user-written subroutine to access model parameter or state information.
The ID of the contact force modeling element
(Force_Contact in the XML) for which the results are
desired.
I_GRA_ID
[integer]
The ID of the I body's graphic representation. If the body is flexible, this
attribute is ignored, and any integer value can be provided.
J_GRA_ID
[integer]
The ID of the J body's graphic representation. If the body is flexible, this
attribute is ignored, and any integer value can be provided.
TYPE
[string]
The type of contact result that is requested. Choose from:
Type
Description
"PD"
Penetration depth (scalar).
"PD_VEL"
Penetration rate, in other words, the first time derivative of
the penetration depth (scalar).
"SLIP_VEL"
Slip velocity (scalar).
"POS"
Position of the point of contact (vector).
"VEL"
Velocity of the point of contact (vector).
"NORMAL_FORCE"
Normal contact force (vector).
"TANGENTIAL_FORCE"
Tangential contact force (vector).
"TOTAL_FORCE"
Total contact force (vector).
"HAS_TRIA_ID"
A flag for determining whether the geometry in contact is
tessellated (scalar).
"TRIA_ID_I"
The ID of the triangle(s) or element(s) that is/are in contact
on the I body (scalar or list, based on the number of
triangles/elements in contact).
This type only makes sense if HAS_TRIA_ID is
true.
"TRIA_ID_J"
The ID of the triangle(s) or element(s) that is/are in contact
on the J body (scalar or list, based on the number of
triangles/elements in contact).
"INTERSECTION_ID"
An ID that is common between all the contact points that belong
to the same contact patch. This is useful for determining the
number of contact patches at the current time in the simulation.
See Comment 2 for a definition of contact
patch.
All the above quantities are represented in model units, wherever
applicable.
RM
[integer]
The ID of a reference marker that allows you to request contact states with
respect to a frame of reference of your choice. This frame of reference is
only applicable to the following types:
type = "POS"
type = "VEL"
type = "NORMAL_FORCE"
type = "TANGENTIAL_FORCE"
type = "TOTAL_FORCE"
INDEX
[integer]
There may be several locations where contact occurs between the I and J body
at a particular time in the simulation. The INDEX input
tells MotionSolve which contact the states are
being requested for. The INDEX is a 1-based index and can
have a maximum value of what is returned by the utility function
GET_NCONTACTS. Thus,
1 <=
INDEX <=
GET_NCONTACTS().
Output
RESULT
[double]
A scalar, vector, or a list of the values returned by
GET_CONTACT_POST.
NRESULTS
[integer]
The size of RESULT. This is not required while using the
Python utility function.
ERRFLG
[logical]
A value that is true if an error occurs during the call to
GET_CONTACT_POST.
Comments
The GET_CONTACT_POST utility function is
applicable to both mesh based and semi-analytical (for example, sphere-mesh) based
contact modeling. However, this utility function is not supported for legacy models
that make use of the old (OPCODE) collision engine.
A contact patch is defined as a collection of points of
contact between body I and J. If these points of contacts are not connected with one
another, then these are termed as separate contact patches.
Figure 1
shows two spur gears in contact with each other; two separate contact patches
are illustrated.
You may use the type = "INTERSECTION_ID" to keep track of
different contact patches at the given time in the simulation.
Note: The intersection ID may change across time steps.