Interfacing with MotionSolve

Overview of how the MotionView applications interface with the MotionSolve solver.

Guidelines for Exporting MDL Models to MotionSolve

MotionView MDL models can be exported to Altair’s multi-body dynamics solver MotionSolve. The format exported by MotionView and imported by MotionSolve is XML

Gravity, Units, and Solver Parameters

MotionView works with gravity, units, and solver parameters for MotionSolve.
Gravity is an implicit data set, meaning that its definition is created automatically by MotionView. The values for gravity can be accessed through the Forms panel while in the Misc system of a model. Default values for gravity are set in the std_inc.mdl file that is part of the MotionView installation.
Although MotionView is a "unitless" interface, it is often required that the units you are working with be communicated to the solver input deck. Similarly, it may be necessary to ensure that the units are consistent. Therefore, the definitions of mass, length, time, and force are automatically generated by MotionView. To access these, go to the Forms panel and select Units under the Misc system. Default values for units are set in the std_inc.mdl file used by MotionView.
Solver Parameters
MotionSolve requires solver parameters for each of the supported analysis types. These parameters can be accessed through the MotionView Run panel when the solvermode is set to MotionSolve. All parameters applicable to the requested simulation type will be exported to the MotionSolve xml input file, utilizing the Param_(name) statements.

MDL Statement Mapping

Overview of the mapping between MDL and the corresponding MotionSolve entities.
Note: All property data for these entities are set in corresponding *Set() statements.
MDL Statement MotionSolve Entity
*ActionOnlyForce() Force_Vector_OneBody
*ActionReactionForce() Force_Vector_TwoBody
*AtPointJoint() Constraint_Joint [Spherical]
*BallJoint() Constraint_Joint [Spherical]
*Beam() Force_Beam
*Body() Body_Rigid; Body_Flexible; Reference_FlexData
*Bush() Force_Bushing
*CoilSpring() Force_SpringDamper
*Contact() Force_Contact
*ControlSISO() Control_SISO
*Coupler() Constraint_Coupler
*Curve() Reference_XYCurve; Reference_ParamCurve
*CurveToCurveJoint() Constraint_CVCV
*CurveToSurfaceJoint() Constraint_CVSF
*CVJoint() Constraint_Joint [Constant_Velocity]
*CylJoint() Constraint_Joint [Cylindrical]
*Field() Force_Field
*FixedJoint() Constraint_Joint [Fixed]
*Gear() Constraint_Gear
*Graphic() Post_Graphic
*HookeJoint() Constraint_Joint [Universal]
*InlineJoint() Constraint_Joint [Inline]
*InplaneJoint() Constraint_Joint [Inplane]
*Marker() Reference_Marker
*Motion() Motion_Joint; Motion_Marker
*OrientJoint() Constraint_Joint [Orientation]
*Output() Post_Request
*ParallelAxisJoint() Constraint_Joint [Parallel_Axes]
*PerpAxisJoint() Constraint_Joint [Perpendicular]
*PlanarJoint() Constraint_Joint [Planar]
*PointmassBody() Body_Point
*PointToCurveJoint() Constraint_PTCV
*PointToSurfaceJoint() Constraint_PTSF
*Polybeam() Force_Beam
*RevJoint() Constraint_Joint [Revolute]
*SetFlexbodyComplaince() Body_Flexible
*Sensor() SensorEvaluate; SensorEvent
*SolverArray() Reference_Array; Control_PlantInput; Control_PlantOutput
*SolverDiffEquation() Control_Diff
*SolverString() Reference_String
*SolverVariable() Reference_Variable
*SurfaceToSurfaceJoint() Constraint_SFSF
*TorsionSpring() Force_SpringDamper
*TransJoint() Constraint_Joint [Translational]
*UniversalJoint() Constraint_Joint [Universal]
*UserConstraint() Constraint_UserConstr

MDL CommandSet Mapping

CommandSet statements map to the solver command file, which for MotionSolve is part of the solver input file. Unlike MDL statements, MDL CommandSets are order dependent. This means that the resulting mapping to the MotionSolve file is in the order that the corresponding commands occur in the CommandSet.

MotionView supports the following commands:
Motion_Joint; Motion_Marker
Activate; Deactivate

Templex Templates and Solvermode

Templex templates can be used to export syntax directly to the solver input deck, including parametric substitution if required.

One MDL model can be used to export to more than one solver. In this case, create the instance of the Templex template using the solvermode reserved keyword. This can be done in two ways.
  • For example, an MDL model containing:
    if( solvermode == "MotionSolve" )
    Results in the entire template 1 being used when MotionSolve is selected from the Solvers menu. When another solver is selected, template 2 is used. When a template is used, it means that it is displayed in the interface on the Templates panel and is recognized when saving the solver input deck.
  • The second method is to put the if inside a Templex template. This will result in only the applicable contents under an if condition to be recognized.
    *DefineTemplate( tp_1, "Template 1", …)
       if( solvermode == "MotionSolve" )
        id                  = "30101"
        type                = "ForceOnly"
        marker_id           = "30101011"
        body_id             = "30101"
        ref_marker_id       = "30101010"
        ref_body_id         = "30101"
        fx                  = "30."
        fy                  = "0."
        fz                  = "0."
    VFORCE/30101                                      !Force 0
    , I= 30101011, JFLOAT= 30101013, RM= 30101010
    , FX= 30 \
    , FY= 0 \
    , FZ= 0  
Template Types
A Templex template can have several destinations as well as a unique default behavior.
  • A USER template does not get exported into any solver file but can be useful for getting parametrically based text into another file (by using the Templex Open and Close commands) or for text targeted for the GUI only.
  • A SOLVER_INPUT template results in the template text being exported to the solver input deck of the current solver mode. In this case it will export to the MotionSolve xml file, into the model statements portion of the file.
  • A SOLVER_COMMAND template results in the template text being exported to the solver input deck of the current solver mode. In this case it will export to the MotionSolve xml file, into the command portion of the file.
  • The following templates do not apply to MotionSolve:
    • ADAMS
    • ACF


CommandSets are MDL entities that map to the command file of a solver. In the case of MotionSolve, CommandSets map to the command portion of the same .xml file that contains the model statements.

The *Write() statement in an MDL CommandSet causes a Templex template to be exported to the MotionSolve input file, into the command section.

Function Expressions

MotionView supports function expressions for many of its entities. These expressions can be a function of time and state variables. You can create function expressions that are exported directly as part of a corresponding solver entity. MotionSolve supports all expressions that are covered within MDL.


MotionView allows you to represent an MDL body as a flexbody. Before implementing the flexbody into an MDL model, you have to create an h3d flexbody file using OptiStruct or Nastran. The body in MotionView can then refer to this h3d flexbody file for graphics as well as the functional representation of the flexbody.
MotionSolve creates an animation file of type h3d which can be loaded directly into the animation window. The H3DOutput command provides several choices for the contents of this file.
MotionSolve also creates a multi-body results file (.mrf), an Altair binary format (.abf) file and an Altair plot file (.plt) that can be used for plotting. The .plt file can also be used with the MotionView Load Export utility to create OptiStruct or Nastran load cards.
For a simulation which contains one or more Linear analyses, a combination of a MDL animation file (.maf file created by MotionView) as the model and the .mrf file for results will provide the ability to animate modal results. MotionSolve will create one .mrf file for each Eigen frequency.
All of these files can be specified with the ResOutput.

User Subroutines

Many solvers, including MotionSolve, allow you to create your own modified entities through the creation of user subroutines that link to the solver. In MotionView, there are several locations where user subroutines can be used. In these cases, you only need to fill in the syntax required for the call to the user subroutine. Many MDL entities also allow you to use an entity level dll.

The string used for calling a user subroutine can be parametric in MotionView and can be constructed using the Expression Builder.

Launching Solvers from MotionView

MotionView automatically registers the script required to launch the solver. The MotionSolve script will launch MotionSolve when clicking Run in the Run Solver panel.