*SetMotion() - asymmetric motion pair for command sets
Creates a set motion for a pair.
Syntax
*SetMotion(motion_pair, DISP/VEL/ACCL, `motion_expr_left`, `motion_expr_right`)
Arguments
- motion_pair
- The variable name of the set motion.
- disp/vel/accl
- This argument identifies whether a displacement, velocity, or acceleration is being specified.
- `motion_expr_left`, `motion_expr_right`
- A number or MDL expression for the motion.
Example
*BeginMDL(the_model, "Example model")
*Analysis(the_analysis, "The analysis", andef)
*DefineAnalysis(andef)
*MotionPair(crank_rot, "Crank rotation", j_crank_pivot)
*MotionPair( mtn_wc, "Wheel center motion", j_wc_trans)
*SetMotion(mtn1, VEL, ds.real1.value +
ds.real2.value, 30)
*SetMotion(crank_rot, , DISP,
`30xsin(2*P1*TIME)`,
`30xcos(2*P1*TIME)`)
*SetMotion(mtn_wc, , DISP, crv_wc_mtn.interp(AKIMA, `TIME`),
crv_wc_mtn.interp(AKIMA, `TIME`))
*SetMotion(mtn_wc, , DISP, `USER({ crv_wc_mtn.id, %d })`,
`USER({ crv_wc_mtn.id, %d })`)
*CommandSet(the_commandset, "Simple command set", evdef, frc_0, tpl_begin, tpl_end)
*Template(tpl_begin, "Begin template", USER, tpldef_commandset_begin)
*Template(tpl_end, "End template", USER, tpldef_commandset_end)
*Template(tpl_superfluous, "Should be ignored", ACF, tpldef_commandset_begin)
*EndDefine()
*DefineCommandSet(evdef, local_frc_0, local_tpl_begin, local_tpl_end)
*Write(local_tpl_begin)
*SetMotion(mtn1, VEL, ds.real1.value +
ds.real2.value, 20)
*SetMotion(crank_rot, , DISP,
`20xsin(2*P1*TIME)`,
`20xcos(2*P1*TIME)`)
*SetMotion(mtn_wc, , DISP, crv_wc_mtn.interp(AKIMA, `TIME`),
crv_wc_mtn.interp(AKIMA, `TIME`))
*SetMotion(mtn_wc, , DISP, `USER({ crv_wc_mtn.id, %d })`,
`USER({ crv_wc_mtn.id, %d })`)
*Write(local_tpl_end)
*EndDefine()
*DefineTemplate(tpldef_commandset_begin)
{AbsToRelative(Solver_File_basename.path, Solver_File_basename.value +
".adm")}
PREFERENCES/SIMFAIL=STOPCF
*EndDefine()
*DefineTemplate(tpldef_commandset_end)
STOP
*EndDefine()
*EndMDL()
Context
*BeginMDL()
*DefineCommandSet()
Comments
This statement is similar to the *SetMotion() statement for a model except that it sets the motion or motionpair contents within the solver command file.