Functions Module#
Functions#
- ACC(i, j=0, k=0, l=0)#
[Multiple Output Function]
Returns all six components of acceleration.
Arguments
i: The marker whose acceleration is to be computed. Must be specified.
j: The marker with respect to which the acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- ACCM(i, j=0, l=0)#
Computes the magnitude of the total relative translational acceleration between markers I and J.
Arguments
i: The marker whose acceleration is to be computed. Must be specified.
j: The marker with respect to which the acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to ACCM for an extensive description.
- ACCX(i, j=0, k=0, l=0)#
Computes the X-component of the relative translational acceleration of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose acceleration is to be computed. Must be specified.
j: The marker with respect to which the acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to ACCX for an extensive description.
- ACCY(i, j=0, k=0, l=0)#
Computes the Y-component of the relative translational acceleration of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose acceleration is to be computed. Must be specified.
j: The marker with respect to which the acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to ACCY for an extensive description.
- ACCZ(i, j=0, k=0, l=0)#
Computes the Z-component of the relative translational acceleration of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose acceleration is to be computed. Must be specified.
j: The marker with respect to which the acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to ACCZ for an extensive description.
- ARRAY(id, comp)#
[Multiple Output Function]
Returns direct value of a
Array
object.Arguments
id: The id of the reference array whose components are desired. Must be specified.
comp: An integer that specifies the desired component of the reference array. Must be specified.
- ARYVAL(id, comp)#
Returns the specified component of an
Array
.Arguments
id: The id of the reference array whose components are desired. Must be specified.
comp: An integer that specifies the desired component of the reference array. Must be specified.
Refer to ARYVAL for an extensive description.
- AX(i, j=0)#
Computes the relative rotational displacement of marker I with respect to marker J, about the X-axis of marker J. It returns the wrapped angle.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to AX for an extensive description.
- AXU(i, j=0)#
Computes the relative rotational displacement of marker I with respect to marker J, about the X-axis of marker J. It returns the unwrapped angle.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to AXU for an extensive description.
- AY(i, j=0)#
[Multiple Output Function]
Computes the relative rotational displacement of marker I with respect to marker J, about the Y-axis of marker J. It returns the wrapped angle.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to AY for an extensive description.
- AYU(i, j=0)#
Computes the relative rotational displacement of marker I with respect to marker J, about the Y-axis of marker J. It returns the unwrapped angle.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to AYU for an extensive description.
- AZ(i, j=0)#
Computes the relative rotational displacement of marker I with respect to marker J, about the Z-axis of marker J. It returns the wrapped angle.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to AZ for an extensive description.
- AZU(i, j=0)#
Computes the relative rotational displacement of marker I with respect to marker J, about the Z-axis of marker J. It returns the unwrapped angle.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to AZU for an extensive description.
- BEAM(id, jflag, comp, rm=0)#
Returns force component due to
Beam
element.Arguments
id: The id of the reference beam whose components are desired. Must be specified.
jflag: 0 returns force acting on beam I marker. 1 returns force acting on beam j marker.
comp: An integer that specifies the desired component of the reference beam.
rm: The reference frame in which components are reported.
Refer to BEAM for an extensive description.
- BISTOP(x, xd, x1, x2, k, e, cmax, d, iord=0)#
Evaluates a
Bistop
function and it can model a gap element.Arguments
x: The independent variable.
xd: The first time derivative of x.
x1: The lower bound value of x.
x2: The upper bound value of x.
k: The stiffness of the boundary surface interaction.
e: The exponent of the force deformation characteristic. A value greater than 1.0 corresponds to a stiffening spring.
cmax: The maximum damping coefficient.
d: The penetration at which the full damping coefficient is applied.
iord: Integer that specifies the order of the derivative that is returned. It can be 0, 1 or 2.
Refer to BISTOP for an extensive description.
- BUSH(id, jflag, comp, rm=0)#
Returns force component due to
Bushing
element.Arguments
id: The id of the reference bushing whose components are desired. Must be specified.
jflag: 0 returns force acting on bushing I marker. 1 returns force acting on bushing j marker.
comp: An integer that specifies the desired component of the reference bushing.
rm: The reference frame in which components are reported.
Refer to BUSH for an extensive description.
- CFORCE(id, jflag, comp)#
TBD
- CHEBY(x, x0, *args)#
Evaluates a Chebyshev polynomial at a specific value x.
Refer to CHEBY for an extensive description.
- CONTACT(*args)#
Returns a scalar result associated with a
Contact
element. There are two available definitions.Arguments
args: Variable list of input arguments. Depending on the definition, can be either (id, jflag, comp, rm) or (id, index, rm). The first form returns the force and torque components specified by comp, in the coordinate system specified by rm. The second form can be used to monitor maximum penetration depth, average point of contact, normal and friction force, and so on, based on the index.
Refer to CONTACT for an extensive description.
- COUPLER(id, jflag, comp, rm=0)#
Returns force component due to
Coupler
element.Arguments
id: The id of the reference coupler whose components are desired. Must be specified.
jflag: 0 returns force acting on coupler I marker. 1 returns force acting on coupler j marker.
comp: An integer that specifies the desired component of the reference coupler.
rm: The reference frame in which components are reported.
Refer to COUPLER for an extensive description.
- CVCV(id, jflag, comp, rm=0)#
Returns force component due to Curve-to-Curve (
Cvcv
) constraint.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to CVCV for an extensive description.
- CVSF(id, jflag, comp, rm=0)#
Returns force component due to Curve-to-Surface (
Cvsf
) constraint.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to CVSF for an extensive description.
- DC(i, k=0)#
[Multiple Output Function]
Returns direction cosines of the X, Y and Z axis of marker I in the coordinate system of marker K.
Arguments
i: The marker whose set of direction cosines is to be computed. Must be specified.
k: The resultant set of direction cosines is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- DIF(id)#
Returns the value of the state variable defined by a
Diff
element.Arguments
id: The id of the reference variable. Must be specified.
Refer to DIF for an extensive description.
- DIF1(id)#
Returns the time derivative of the state variable defined by a
Diff
element,Arguments
id: The id of the reference variable. Must be specified.
Refer to DIF1 for an extensive description.
- DISP(i, j=0, k=0)#
[Multiple Output Function]
Returns six components of displacements.
Arguments
i: The marker whose displacement is to be computed. Must be specified.
j: The marker with respect to which the displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant displacement is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- DM(i, j=0)#
Computes the magnitude of the total relative translational displacement between two markers.
Arguments
i: The marker whose displacement is to be computed. Must be specified.
j: The marker with respect to which the displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to DM for an extensive description.
- DSARY(id)#
TBD
- DSARY1(id)#
TBD
- DSVAL(rv, dv)#
TBD
- DSVAL1(rv, dv)#
TBD
- DVAL(id)#
TBD
- DX(i, j=0, k=0)#
Computes the X-component of the relative translational displacement of marker I with respect to marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose displacement is to be computed. Must be specified.
j: The marker with respect to which the displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant displacement is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to DX for an extensive description.
- DY(i, j=0, k=0)#
Computes the y-component of the relative translational displacement of marker I with respect to marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose displacement is to be computed. Must be specified.
j: The marker with respect to which the displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant displacement is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to DY for an extensive description.
- DZ(i, j=0, k=0)#
Computes the Z-component of the relative translational displacement of marker I with respect to marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose displacement is to be computed. Must be specified.
j: The marker with respect to which the displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant displacement is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to DZ for an extensive description.
- FIELD(id, jflag, comp, rm=0)#
Returns force component due to
Field
element.Arguments
id: The id of the reference element force whose components are desired. Must be specified.
jflag: 0 returns force acting on element force I marker. 1 returns force acting on element force j marker.
comp: An integer that specifies the desired component of the reference element force.
rm: The reference frame in which components are reported.
Refer to FIELD for an extensive description.
- FM(i, j=0)#
Computes the magnitude of the resultant translational force acting at marker I, due to all applied forces and constraints that act between marker I and marker J.
Arguments
i: The marker whose force is to be computed. Must be specified.
j: The marker with respect to which the force is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to FM for an extensive description.
- FORCE(i, j=0, k=0)#
[Multiple Output Function]
Returns all six components of force.
Arguments
i: The marker whose force is to be computed. Must be specified.
j: The marker with respect to which the force is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant force is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- FORCOS(x, x0, omega, a0, a1, *args)#
Evaluates a Fourier cosine series at a specific value x.
Arguments
x: The independent variable.
x0: The shift in the Fourier series.
omega: The fundamental frequency of the Fourier series. Specified in radians.
a0: The constant bias term.
a1: The coefficient for the linear term of the Fourier series.
args: Description for args.
Refer to FORCOS for an extensive description.
- FORSIN(x, x0, omega, c0, c1, *args)#
Evaluates a Fourier sine series at a specific value x.
Arguments
x: The independent variable.
x0: The shift in the Fourier series.
omega: The fundamental frequency of the Fourier series. Specified in radians.
c0: Description for c0.
c1: Description for c1.
args: Description for args.
Refer to FORSIN for an extensive description.
- FRICTION(id, comp, rm=0)#
Computes the output of a
Joint
element.Arguments
id: The id of the reference joint whose components are desired. Must be specified.
comp: An integer that specifies the desired component of the reference joint. Must be specified.
rm: Description for rm.
Refer to FRICTION for an extensive description.
- FX(i, j=0, k=0)#
Computes the X-component of the resultant translational force acting at marker I, due to all applied forces and constraints that act between marker I and marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose force is to be computed. Must be specified.
j: The marker with respect to which the force is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant force is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to FX for an extensive description.
- FY(i, j=0, k=0)#
Computes the y-component of the resultant translational force acting at marker I, due to all applied forces and constraints that act between marker I and marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose force is to be computed. Must be specified.
j: The marker with respect to which the force is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant force is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to FY for an extensive description.
- FZ(i, j=0, k=0)#
Computes the Z-component of the resultant translational force acting at marker I, due to all applied forces and constraints that act between marker I and marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose force is to be computed. Must be specified.
j: The marker with respect to which the force is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant force is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to FZ for an extensive description.
- GFORCE(id, jflag, comp, rm=0)#
Returns force component due to
Gforce
element.Arguments
id: The id of the reference element force whose components are desired. Must be specified.
jflag: 0 returns force acting on element force I marker. 1 returns force acting on element force j marker.
comp: An integer that specifies the desired component of the reference element force.
rm: The reference frame in which components are reported.
Refer to GFORCE for an extensive description.
- HAVSIN(*args)#
Given a specific x value, evaluates the y value of a Haversine function that smoothly transitions from x0,y0 to x1,y1.
Refer to HAVSIN for an extensive description.
- IF(value, expr1, expr2, expr3)#
Arithmetic IF function to conditionally evaluate an expression.
Arguments
value: The first expression checked against zero.
expr1: The second expression, whose value is returned, if value is less than zero.
expr2: The third expression, whose value is returned, if value is equal to zero.
expr3: The fourth expression, whose value is returned, if value is greater than zero.
Refer to IF for an extensive description.
- IMPACT(x, xd, x1, k, e, cmax, d, iord=0)#
Models impact forces acting on bodies during collision. The elastic properties of the boundary surface between the two bodies can be tuned as desired.
Arguments
x: The independent variable.
xd: The first time derivative of x.
x1: The lower bound value of x.
k: The stiffness of the boundary surface interaction.
e: The exponent of the force deformation characteristic. A value greater than 1.0 corresponds to a stiffening spring.
cmax: The maximum damping coefficient.
d: The penetration at which the full damping coefficient is applied.
iord: Integer that specifies the order of the derivative that is returned. It can be 0, 1 or 2.
Refer to IMPACT for an extensive description.
- INCANG(i, j, k)#
Returns the included angle defined using three markers: I, J and K. The angle between the line connecting I with J and the line connecting J with K is reported.
Arguments
i: The first marker.
j: The second marker.
k: The third marker.
Refer to INCANG for an extensive description.
- JOINT(id, jflag, comp, rm=0)#
Returns force component due to the force or torque applied by a
Joint
element.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to JOINT for an extensive description.
- JPRIM(id, jflag, comp, rm=0)#
Returns force component due to the force or torque applied by a
Jprim
element.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to JPRIM for an extensive description.
- KE(id)#
Returns the kinetic energy of a rigid or flexible body.
Arguments
id: The id of the reference body. Must be specified.
Refer to KE for an extensive description.
- MATE(id, jflag, comp, rm=0)#
Returns force component due to the force applied by a
Mate
element.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to MATE for an extensive description.
- MOTION(id, jflag, comp, rm=0)#
Returns force component due to the force or torque applied by a
Motion
element.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to MOTION for an extensive description.
- NFORCE(id, jflag, comp, rm=0)#
Returns force component due to
Nforce
element.Arguments
id: The id of the reference element force whose components are desired. Must be specified.
jflag: 0 returns force acting on element force I marker. 1 returns force acting on element force j marker.
comp: An integer that specifies the desired component of the reference element force.
rm: The reference frame in which components are reported.
Refer to NFORCE for an extensive description.
- PFORCE(id)#
TBD
- PHI(i, j=0)#
Computes the third angle, in radians, of a body-2 Euler angle rotation sequence (body-3, body-1, body-3) of marker I with respect to marker J.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to PHI for an extensive description.
- PINPUT(id, comp)#
[Multiple Output Function]
Returns direct value of a
Pinput
object.Arguments
id: The id of the reference variable whose components are desired. Must be specified.
comp: An integer that specifies the desired component of the reference variable. Must be specified.
- PINVAL(id, comp)#
Returns component of
Pinput
element.Arguments
id: The id of the reference Plant input whose components are desired. Must be specified.
comp: An integer that specifies the desired component of the reference Plant input. Must be specified.
Refer to PINVAL for an extensive description.
- PITCH(i, j=0)#
Computes the second angle, in radians, of a body-3 Yaw-Pitch-Roll rotation sequence.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to PITCH for an extensive description.
- POLY(x, x0, *args)#
Evaluates a standard polynomial at a specific value x.
Refer to POLY for an extensive description.
- POUTPUT(id, comp)#
[Multiple Output Function]
Returns direct value of a
Poutput
object.Arguments
id: The id of the reference variable whose components are desired. Must be specified.
comp: An integer that specifies the desired component of the reference variable. Must be specified.
- POUVAL(id, comp)#
Returns component of
Poutput
element.Arguments
id: The id of the reference Plant output whose components are desired. Must be specified.
comp: An integer that specifies the desired component of the reference Plant output. Must be specified.
Refer to POUVAL for an extensive description.
- PROXIMITY(id, comp)#
Returns the components of a
ProximitySensor
element.Arguments
id: The id of the reference displacement whose components are desired. Must be specified.
comp: An integer that specifies the desired component of the reference displacement. Must be specified.
Refer to PROXIMITY for an extensive description.
- PSI(i, j=0)#
Computes the first angle, in radians, of a body-2 Euler angle rotation sequence (body-3, body-1, body-3) of marker I with respect to marker J.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to PSI for an extensive description.
- PTCV(id, jflag, comp, rm=0)#
Returns force component due to Point-to-Curve (
Ptcv
) constraint.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to PTCV for an extensive description.
- PTSF(id, jflag, comp, rm=0)#
Returns force component due to Point-to-Surface (
Ptsf
) constraint.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to PTSF for an extensive description.
- Q(flex_id, mode_id)#
Returns the modal displacement for a specific mode for a
FlexBody
.Arguments
flex_id: The id of the flexible body.
mode_id: The mode id whose displacement is requested.
Refer to Q for an extensive description.
- QDDOT(flex_id, mode_id)#
Returns the model acceleration for a specific mode for a
FlexBody
.Arguments
flex_id: The id of the flexible body.
mode_id: The mode id whose acceleration is requested.
Refer to QDDOT for an extensive description.
- QDOT(flex_id, mode_id)#
Returns the modal velocity for a specific mode for a
FlexBody
.Arguments
flex_id: The id of the flexible body.
mode_id: The mode id whose velocity is requested.
Refer to QDOT for an extensive description.
- RACC(i, j=0, k=0, l=0)#
[Multiple Output Function]
Returns three rotational components of acceleration.
Arguments
i: The marker whose angular acceleration is to be computed. Must be specified.
j: The marker with respect to which the angular acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- RDISP(i, j=0, k=0)#
[Multiple Output Function]
Returns three Euler Body 3-1-3 rotations.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular displacement is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- RFORCE(i, j=0, k=0)#
[Multiple Output Function]
Returns three rotational components of force.
Arguments
i: The marker whose force is to be computed. Must be specified.
j: The marker with respect to which the force is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant force is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- ROLL(i, j=0)#
Computes the third angle, in radians, of a body-3 Yaw-Pitch-Roll rotation sequence.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to ROLL for an extensive description.
- RVAL(id)#
Returns the integral of the
Rv
.Arguments
id: The id of the reference response variable. Must be specified.
- RVAL1(id)#
Returns the the response variable for the
Rv
.Arguments
id: The id of the reference response variable. Must be specified.
- RVEL(i, j=0, k=0)#
[Multiple Output Function]
Returns three rotational components of velocity.
Arguments
i: The marker whose angular velocity is to be computed. Must be specified.
j: The marker with respect to which the angular velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- SENVAL(id)#
Returns the last stored value from a
Sensor
element.Arguments
id: The id of the reference sensor. Must be specified.
Refer to SENVAL for an extensive description.
- SFORCE(id, jflag, comp, rm=0)#
Returns force component due to
Sforce
element.Arguments
id: The id of the reference element force whose components are desired. Must be specified.
jflag: 0 returns force acting on element force I marker. 1 returns force acting on element force j marker.
comp: An integer that specifies the desired component of the reference element force.
rm: The reference frame in which components are reported.
Refer to SFORCE for an extensive description.
- SFSF(id, jflag, comp, rm=0)#
Returns force component due to Surface-to-Surface (
Sfsf
) constraint.Arguments
id: The id of the reference constraint force whose components are desired. Must be specified.
jflag: 0 returns force acting on constraint force I marker. 1 returns force acting on constraint force j marker.
comp: An integer that specifies the desired component of the reference constraint force.
rm: The reference frame in which components are reported.
Refer to SFSF for an extensive description.
- SHF(*args)#
Evaluates a simple harmonic function at a specific value x.
Refer to SHF for an extensive description.
- SPDP(id, jflag, comp, rm=0)#
Returns force component due to
SpringDamper
element.Arguments
id: The id of the reference element force whose components are desired. Must be specified.
jflag: 0 returns force acting on element force I marker. 1 returns force acting on element force j marker.
comp: An integer that specifies the desired component of the reference element force.
rm: The reference frame in which components are reported.
Refer to SPDP for an extensive description.
- STEP(x, x0, y0, x1, y1, iord=0)#
Evaluates a function that smoothly transitions from x0,y0 to x1,y1 with continuous first and second derivatives. It uses a cubic polynomial.
Arguments
x: The independent variable.
x0: The x value at which the function begins.
y0: The value of the function desired at x0.
x1: The x value at which the function ends.
y1: The value of the function desired at x1.
iord: Integer that specifies the order of the derivative that is returned. Can be 0, 1 or 2.
Refer to STEP for an extensive description.
- STEP5(x, x0, y0, x1, y1, iord=0)#
Evaluates a function that smoothly transitions from x0,y0 to x1,y1 with continuous first and second derivatives. It uses a quintic polynomial.
Arguments
x: The independent variable.
x0: The x value at which the function begins.
y0: The value of the function desired at x0.
x1: The x value at which the function ends.
y1: The value of the function desired at x1.
iord: Integer that specifies the order of the derivative that is returned. Can be 0, 1 or 2.
Refer to STEP5 for an extensive description.
- TACC(i, j=0, k=0, l=0)#
[Multiple Output Function]
Returns three translational components of acceleration.
Arguments
i: The marker whose acceleration is to be computed. Must be specified.
j: The marker with respect to which the acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- TDISP(i, j=0, k=0)#
[Multiple Output Function]
Returns three translational components of displacements.
Arguments
i: The marker whose displacement is to be computed. Must be specified.
j: The marker with respect to which the displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant displacement is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- TFORCE(i, j=0, k=0)#
[Multiple Output Function]
Returns three translational components of force.
Arguments
i: The marker whose force is to be computed. Must be specified.
j: The marker with respect to which the force is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant force is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- THETA(i, j=0)#
Computes the second angle, in radians, of a body-2 Euler angle rotation sequence (body-3, body-1, body-3) of marker I with respect to marker J.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to THETA for an extensive description.
- TM(i, j=0)#
Computes the magnitude of the resultant torque acting at marker I, due to all applied forces and constraints that act between marker I and marker J.
Arguments
i: The marker whose torque is to be computed. Must be specified.
j: The marker with respect to which the torque is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to TM for an extensive description.
- TRIM(x, x0, y0, x1, y1, x2, y2, radius, limit=0.5, iord=0)#
Smoothly interpolates between the slope m1 defined through the line segment given by x0, y0, x1, y1 and m2 defined through the line segment given by x1, y1, x2, y2.
Arguments
x: The independent variable.
x0: The x value of a point on line segment 1. x0 < x1 < x2.
y0: The y value of a point on line segment 1.
x1: The x value for the intersection point between line segment 1 and line segment 2.
y1: The y value for the intersection point between line segment 1 and line segment 2.
x2: The x value of a point on line segment 2.
y2: The y value of a point on line segment 2
radius: Specifies the radius around x1,*y1*, for which the function interpolates the slope.
limit: Limits the radius relative to the shorter line-segment’s length. Default is 0.5.
iord: Integer that specifies the order of the derivative that is returned. Can be 0, 1 or 2.
Refer to TRIM for an extensive description.
- TVEL(i, j=0, k=0, l=0)#
[Multiple Output Function]
Returns three translational components of velocity.
Arguments
i: The marker whose velocity is to be computed. Must be specified.
j: The marker with respect to which the velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- TX(i, j=0, k=0)#
Computes the X-component of the resultant torque acting at marker I, due to all applied forces and constraints that act between marker I and marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose torque is to be computed. Must be specified.
j: The marker with respect to which the torque is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant torque is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to TX for an extensive description.
- TY(i, j=0, k=0)#
Computes the y-component of the resultant torque acting at marker I, due to all applied forces and constraints that act between marker I and marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose torque is to be computed. Must be specified.
j: The marker with respect to which the torque is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant torque is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to TY for an extensive description.
- TZ(i, j=0, k=0)#
Computes the Z-component of the resultant torque acting at marker I, due to all applied forces and constraints that act between marker I and marker J, as resolved in the coordinate system of marker K.
Arguments
i: The marker whose torque is to be computed. Must be specified.
j: The marker with respect to which the torque is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant torque is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to TZ for an extensive description.
- UVX(i, k=0)#
[Multiple Output Function]
Returns direction cosines of the X-axis of marker I in the coordinate system of marker K.
Arguments
i: The marker whose set of direction cosines is to be computed. Must be specified.
k: The resultant set of direction cosines is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- UVY(i, k=0)#
[Multiple Output Function]
Returns direction cosines of the Y-axis of marker I in the coordinate system of marker K.
Arguments
i: The marker whose set of direction cosines is to be computed. Must be specified.
k: The resultant set of direction cosines is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- UVZ(i, k=0)#
[Multiple Output Function]
Returns direction cosines of the Z-axis of marker I in the coordinate system of marker K.
Arguments
i: The marker whose set of direction cosines is to be computed. Must be specified.
k: The resultant set of direction cosines is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- VARVAL(id)#
Returns current value of a reference
Variable
element.Arguments
id: The id of the reference variable. Must be specified.
Refer to VARVAL for an extensive description.
- VEL(i, j=0, k=0, l=0)#
[Multiple Output Function]
Returns all six components of velocity.
Arguments
i: The marker whose velocity is to be computed. Must be specified.
j: The marker with respect to which the velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
- VFORCE(id, jflag, comp, rm=0)#
Returns force component due to
Vforce
element.Arguments
id: The id of the reference element force whose components are desired. Must be specified.
jflag: 0 returns force acting on element force I marker. 1 returns force acting on element force j marker.
comp: An integer that specifies the desired component of the reference element force.
rm: The reference frame in which components are reported.
Refer to VFORCE for an extensive description.
- VM(i, j=0, l=0)#
Computes the magnitude of the total relative translational velocity between markers I and J.
Arguments
i: The marker whose velocity is to be computed. Must be specified.
j: The marker with respect to which the velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to VM for an extensive description.
- VR(i, j=0, l=0)#
Computes the relative velocity of marker I with respect to marker J.
Arguments
i: The marker whose velocity is to be computed. Must be specified.
j: The marker with respect to which the velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to VR for an extensive description.
- VTORQ(id, jflag, comp, rm=0)#
Returns torque component due to
Vtorque
element.Arguments
id: The id of the reference element force whose components are desired. Must be specified.
jflag: 0 returns force acting on element force I marker. 1 returns force acting on element force j marker.
comp: An integer that specifies the desired component of the reference element force.
rm: The reference frame in which components are reported.
Refer to VTORQ for an extensive description.
- VX(i, j=0, k=0, l=0)#
[Multiple Output Function]
Computes the X-component of the relative translational velocity of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose velocity is to be computed. Must be specified.
j: The marker with respect to which the velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to VX for an extensive description.
- VY(i, j=0, k=0, l=0)#
[Multiple Output Function]
Computes the Y-component of the relative translational velocity of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose velocity is to be computed. Must be specified.
j: The marker with respect to which the velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to VY for an extensive description.
- VZ(i, j=0, k=0, l=0)#
[Multiple Output Function]
Computes the Z-component of the relative translational velocity of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose velocity is to be computed. Must be specified.
j: The marker with respect to which the velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to VZ for an extensive description.
- WDTM(i, j=0, l=0)#
Computes the magnitude of the total relative rotational acceleration between markers I and J.
Arguments
i: The marker whose angular acceleration is to be computed. Must be specified.
j: The marker with respect to which the angular acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to WDTM for an extensive description.
- WDTX(i, j=0, k=0, l=0)#
Computes the X-component of the relative rotational acceleration of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose angular acceleration is to be computed. Must be specified.
j: The marker with respect to which the angular acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to WDTX for an extensive description.
- WDTY(i, j=0, k=0, l=0)#
Computes the Y-component of the relative rotational acceleration of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose angular acceleration is to be computed. Must be specified.
j: The marker with respect to which the angular acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to WDTY for an extensive description.
- WDTZ(i, j=0, k=0, l=0)#
Computes the Z-component of the relative rotational acceleration of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose angular acceleration is to be computed. Must be specified.
j: The marker with respect to which the angular acceleration is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular acceleration is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
l: Time derivatives are taken in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to WDTZ for an extensive description.
- WM(i, j=0)#
Computes the magnitude of the total relative rotational velocity between markers I and J.
Arguments
i: The marker whose angular velocity is to be computed. Must be specified.
j: The marker with respect to which the angular velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
- WX(i, j=0, k=0)#
Computes the X-component of the relative rotational velocity of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose angular velocity is to be computed. Must be specified.
j: The marker with respect to which the angular velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to WX for an extensive description.
- WY(i, j=0, k=0)#
Computes the Y-component of the relative rotational velocity of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose angular velocity is to be computed. Must be specified.
j: The marker with respect to which the angular velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to WY for an extensive description.
- WZ(i, j=0, k=0)#
Computes the Z-component of the relative rotational velocity of marker I with respect to marker J, resolved in the coordinate system of marker K
Arguments
i: The marker whose angular velocity is to be computed. Must be specified.
j: The marker with respect to which the angular velocity is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
k: The resultant angular velocity is resolved in the coordinate system of this marker. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to WZ for an extensive description.
- YAW(i, j=0)#
Computes the first angle, in radians, of a body-3 Yaw-Pitch-Roll rotation sequence.
Arguments
i: The marker whose angular displacement is to be computed. Must be specified.
j: The marker with respect to which the angular displacement is to be computed. This argument is optional. If omitted, it defaults to the ground coordinate system.
Refer to YAW for an extensive description.
- YFORCE(id, jflag, comp, rm=0)#
Returns force component due to
Yforce
element.Arguments
id: The id of the reference element force whose components are desired. Must be specified.
jflag: 0 returns force acting on element force I marker. 1 returns force acting on element force j marker.
comp: An integer that specifies the desired component of the reference element force.
rm: The reference frame in which components are reported.
Refer to YFORCE for an extensive description.
Data Access Subroutines#
- AKISPL(x, z, id, iord=0)#
Spline fitting method to return the interpolated value or 1st/2nd derivative of a
Spline
.Arguments
x: The first independent variable of a curve or surface at which the spline function is supposed to interpolate the output value.
z: The second independent variable of a surface at which the spline function is supposed to interpolate the output value. Set this value to 0 if only a curve interpolation is needed.
id: The id of the reference spline element.
iord: Integer that specifies the order of the derivative that is returned. Can be 0, 1 or 2.
Refer to AKISPL for an extensive description.
- CUBSPL(x, z, id, iord=0)#
Spline fitting method to return the interpolated value or 1st/2nd derivative of a
Spline
using a cubic (3rd order) polynomial.Arguments
x: The first independent variable of a curve or surface at which the spline function is supposed to interpolate the output value.
z: The second independent variable of a surface at which the spline function is supposed to interpolate the output value. Set this value to 0 if only a curve interpolation is needed.
id: The id of the reference spline element.
iord: Integer that specifies the order of the derivative that is returned. Can be 0, 1 or 2.
Refer to CUBSPL for an extensive description.
- CURVE(alpha, iord, comp, id)#
Evaluates a B-spline or a user-written
Curve
.Arguments
alpha: The independent parameter at which the curve is to be evaluated. For B-splines, must satisfy -1 <= alpha <= 1.
iord: Integer that specifies the order of the derivative that is returned. Can be 0, 1 or 2.
comp: An integer that specifies the desired component of the reference curve. Can be 1, 2 or 3.
id: The id of the reference curve.
Refer to CURVE for an extensive description.
- DELAY(val, dt, ic)#
Computes the value of a MotionSolve expression at a delayed time.
- LINSPL(x, z, id, iord)#
Spline fitting method to return the interpolated value or 1st/2nd derivative of the interpolated value for a
Spline
.Arguments
x: The first independent variable of a curve or surface at which the spline function is supposed to interpolate the output value.
z: The second independent variable of a surface at which the spline function is supposed to interpolate the output value. Set this value to 0 if only a curve interpolation is needed.
id: The id of the reference spline element.
iord: Integer that specifies the order of the derivative that is returned. Can be 0, 1 or 2.
Refer to LINSPL for an extensive description.
- GTCMAT(id)#
Calculates the compliance matrix between \(N\) Markers.
Refer to GTCMAT for an extensive description.
- QUISPL(x, z, id, iord)#
Spline fitting method to return the interpolated value or 1st/2nd derivative of a
Spline
using a 5th order polynomial interpolation.Arguments
x: The first independent variable of a curve or surface at which the spline function is supposed to interpolate the output value.
z: The second independent variable of a surface at which the spline function is supposed to interpolate the output value. Set this value to 0 if only a curve interpolation is needed.
id: The id of the reference spline element.
iord: Integer that specifies the order of the derivative that is returned. Can be 0, 1 or 2.
Refer to QUISPL for an extensive description.
Usage Information#
The Functions module contains the MotionSolve runtime functions and subroutines that are available in msolve. These objects can be used during simulation to obtain information regarding model parameters or system states.
It is important to note that the msolve implementation of those functions supports both id and object passing to the functions’ arguments.
Note
The msolve implementation of runtime functions is not employed when these are used in MotionSolve expressions. This means that you can no longer pass objects as arguments, only their respective id.
Example
The example below illustrates the usage of runtime functions in a simple free-falling body system. The example also emphasizes the distinction between using the runtime functions in MotionSolve expressions or standalone.
from msolve import *
model = Model(output='free_falling_ball')
Units(system="MKS")
Accgrav(kgrav=-10)
ground = Part(ground=True)
global_ref = Marker(part=ground)
ground.geometry = Box(cm=global_ref, x=20, y=20, z=5)
ball = Part(mass=1, ip=[1,1,1], cm=Marker(qp=[0,0,20]))
ball.geometry = Sphere(cm=ball.cm, radius=1, material_inside=True)
sensor = ProximitySensor(igeom=ball.geometry, jgeom=ground.geometry)
# Use the object id if the runtime function is used in a MotionSolve expression
sensor_output = Request(f2=f"PROXIMITY({sensor.id},2)")
event1 = SimulationEvent(type='TRANSIENT', end=1.0, dtout=0.01)
event2 = SimulationEvent(type='TRANSIENT', end=2.0, dtout=0.01)
run1 = event1()
# No need to use the object id as argument.
disp_z_1s = DZ(i=ball.cm, j=global_ref)
run2 = event2()
disp_z_2s = DZ(i=ball.cm, j=global_ref)