MotionView User's Guide

SolverMode

SolverMode

Previous topic Next topic No expanding text in this topic  

SolverMode

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

MotionView contains an implicit variable called SolverMode.  In MDL, SolverMode can be used in an "if" context to define topology (include Templex templates).  MotionView retains the "if" result for both cases so that when you toggle the solver type, the associated text becomes active within the user interface.

The example below shows how a gravity template is constructed through the model library:

*if( SolverMode == "ABAQUS" )

*Template(tpl_gravity_unit_aba, "Gravity & units",SOLVER_INPUT,

tpldef_misc_model_aba, ds_gravity)

*elseif( SolverMode == "ADAMS" )

*Template(tpl_gravity_unit_adm, "Gravity",SOLVER_INPUT,

tpldef_misc_model_adm, ds_gravity)

*endif(  )

When an MDL model containing the previous text is loaded into MotionView (or also through std_inc), the following template is displayed when the solver mode is selected as ADAMS in MotionView:

{ if grav.op_gravity.value == "On" }

!Gravity

ACCGRAV/IGRAV={ grav.igrav.value   }

,JGRAV={ grav.jgrav.value          }

,KGRAV={ grav.kgrav.value          }

{ endif                            }

SolverMode can be used to put "if" logic around any MDL topology.