Functions Module#
Functions#
- ACC(i, j=0, k=0, l=0)#
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.
[Multiple Output Function]
Returns all six components of acceleration.
- ACCM(i, j=0, l=0)#
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)#
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)#
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)#
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.
- AX(i, j=0)#
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)#
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)#
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)#
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)#
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)#
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.
- CFORCE(id, jflag, comp)#
TBD
- DC(i, j=0)#
[Multiple Output Function]
Returns direction cosines of the X, Y and Z axis of the I marker in the coordinate system of the J marker.
- DISP(i, j=0, k=0)#
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.
[Multiple Output Function]
Returns six components of displacements.
- DM(i, j=0)#
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)#
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)#
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)#
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.
- FM(i, j=0)#
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)#
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.
[Multiple Output Function]
Returns all six components of force.
- FX(i, j=0, k=0)#
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.
- FZ(i, j=0, k=0)#
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.
- INCANG(i, j, k)#
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.
Refer to INCANG for an extensive description.
- PFORCE(id)#
TBD
- PHI(i, j=0)#
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.
- PITCH(i, j=0)#
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.
- PSI(i, j=0)#
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.
- Q(flex_id, mode_id)#
Returns the modal displacement for a specific mode for a
FlexBody
.Refer to Q for an extensive description.
- RACC(i, j=0, k=0, l=0)#
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.
[Multiple Output Function]
Returns three rotational components of acceleration.
- RDISP(i, j=0, k=0)#
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.
[Multiple Output Function]
Returns three Euler Body 3-1-3 rotations.
- RFORCE(i, j=0, k=0)#
[Multiple Output Function]
Returns three rotational components of force.
- ROLL(i, j=0)#
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)#
TBD
- RVAL1(id)#
TBD
- RVEL(i, j=0, k=0)#
[Multiple Output Function]
Returns three rotational components of velocity.
- TACC(i, j=0, k=0, l=0)#
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.
[Multiple Output Function]
Returns three translational components of acceleration.
- TDISP(i, j=0, k=0)#
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.
[Multiple Output Function]
Returns three translational components of displacements.
- TFORCE(i, j=0, k=0)#
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.
[Multiple Output Function]
Returns three translational components of force.
- THETA(i, j=0)#
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)#
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.
- TVEL(i, j=0, k=0, l=0)#
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.
[Multiple Output Function]
Returns three translational components of velocity.
- TX(i, j=0, k=0)#
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)#
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)#
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 the I marker in the coordinate system of the J marker.
- UVY(i, k=0)#
[Multiple Output Function]
Returns direction cosines of the Y axis of the I marker in the coordinate system of the J marker.
- UVZ(i, k=0)#
[Multiple Output Function]
Returns direction cosines of the Z axis of the I marker in the coordinate system of the J marker.
- VEL(i, j=0, k=0, l=0)#
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.
[Multiple Output Function]
Returns all six components of velocity.
- VM(i, j=0, l=0)#
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)#
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.
- VX(i, j=0, k=0, l=0)#
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)#
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)#
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)#
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)#
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)#
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)#
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)#
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)#
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)#
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)#
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)#
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.
Data Access Subroutines#
- AKISPL(x, z, id, iord=0)#
Spline fitting method to return the interpolated value or 1st/2nd derivative of a
Spline
.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.Refer to CUBSPL for an extensive description.
- CURVE(alpha, iord, comp, id)#
Evaluates a B-spline or a user-written
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, n)#
Spline fitting method to return the interpolated value or 1st/2nd derivative of the interpolated value for a
Spline
.Refer to LINSPL 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)