User Subroutines in MotionSolve

User-defined subroutines enable you to define your own modeling entities.

For example, you may define a new constraint type using the UCOSUB user subroutine, or a new general force element using the GFOSUB user subroutine. User subroutines can be written in FORTRAN or C/C++. A compiler is necessary to compile and link the user subroutines into a DLL (dynamically linked library). MotionSolve calls the DLL as necessary during the simulation process.

User subroutines provide the following key benefits:
  • Significantly faster simulation than expressions.
  • Hides proprietary knowledge by compiling it into a DLL.
  • Complete access to all solver functions.
  • The full power of the programming language.

User subroutines have been used to model varied and complex elements like tires, hydrodynamic bearing pressures, aerodynamic forces, amplitude, and frequency dependent bushing models and friction models.

The table below summarizes the user subroutines that are currently available in MotionSolve.
User Defined Subroutines
CONSUB, COUSUB, COUXX, COUXX2, CURSUB, DIFSUB, DMPSUB, FIESUB, GFOSUB, GSESUB, GSEXU, GSEXX, MOTSUB, REQSUB, SENSUB, SEVSUB, SFOSUB, SURSUB, UCOSUB, VARSUB, VFOSUB, VTOSUB, SPLINE_READ
To allow access to solver run-time information for the user subroutines, a variety of utility functions are available. The table below summarizes the utility functions available in MoionSolve.
Execution Control Subroutines
DATOUT, MODIFY
Data Access Subroutines
AKISPL, CUBSPL, ERRMES, GETCPU, GETINM, GETINT, GETMOD, GETSLV, GETSTM, GETVER, GTARAY, GTCURV, GTSTRG, GTUNTS, MODINF, NMODES, SYSARY, SYSFNC, TIMGET, USRMES, GET_MATRIX_INFO, GET_SPARSE_MATRIX_DATA, GET_FULL_MATRIX_DATA
Setup Subroutines
PUT_SPLINE, UCOMAR, UCOVAR
General Subroutines
BISTOP, CHEBY, FORCOS, FORSIN, HAVSIN, IMPACT, ISTRNG, POLY, RCNVRT, RSTRNG, SHF, STEP, STEP5, SWEEP, TCNVRT

For detailed information, refer to Types of User-Written Subroutines in the XML Format help.