*SetMotion() - single motion for command sets

Creates a set motion.

Syntax

*SetMotion(motion, DISP|VEL|ACCL, motion_expr)

Arguments

motion
The variable name of the set motion.
Type: Varname
DISP|VEL|ACCL
Identifies whether a displacement, velocity, or acceleration is being specified.
Type: Argument
motion_expr
A number or expression for the motion.
Type: Argument

Example

*BeginMDL(the_model, "Example model")
*Analysis(the_analysis, "The analysis", andef)
*DefineAnalysis(andef)
  *Motion(crank_rot, 	"Crank rotation", j_crank_piv)
  *Motion(mounting, 	"Mounting", 	j_crank_piv)
  *Motion( mtn_stwheel, "Steering motion", j_stwheel)
  *SetMotion(crank_rot, DISP, `360D*TIME`)
  *SetMotion(mtn1, VEL, ds.real1.value + ds.real2.value)
  *SetMotion(mtn_stwheel, DISP, crv_mtn.interp(AKIMA, `TIME`))
  *SetMotion(mtn_stwheel, DISP, `USER({ crv_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(crank_rot, DISP, `380D*TIME`)
  *SetMotion(mtn1, VEL, ds.real1.value + ds.real3.value)
  *SetMotion(mtn_stwheel, DISP, crv_mtn.interp(AKIMA, `TIME`))
  *SetMotion(mtn_stwheel, DISP, `USER({ crv_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.