SIMPACK
Expression Expre ssions s Catal Catalogue ogue SIMPACK
Release 8.6
24th September 2003/SIMDOC v8.607
c COPYRIGHT COPYRIG HT 2003
VII–EXPR:2 -2
Kinematic Functions
VII– EXPR:2
Kine Ki nema mati ticc Fun unct ctio ions ns
DX - Displacement in X Purpose: Access function of type kinematic measurement of translational displacements for SIMPACK.
Definition: Calculates Calcul ates the tran transla slatio tional nal x-d x-disp isplac lacemen ementt of mark marker er i rela relativ tivee to marker j in the coordinates of marker k.
Usage: res = DX(I, J, K)
Input Parameters: integer integer integer
I: ID of I marker J: ID ID of of J m ma arker, i if f 0 defaults to to Is Isys K: ID ID of of re reference ma marker K, K, if if 0 de defaults to to Is Isys
DY - displacement in Y Purpose: Access function of type kinematic measurement of translational displacements for SIMPACK.
Definition: Calculates Calcul ates the tran transla slatio tional nal y-d y-disp isplac lacemen ementt of mark marker er i rela relativ tivee to marker j in the coordinates of marker k.
Usage: res = DY(I, J, K)
Input Parameters: integer integer integer
I: J: K:
ID of I marker ID of J marker, if 0 defaults to Isys ID of of re reference ma marker K, K, if if 0 defaults to to Is Isys
VII–EXPR:2 -2
Kinematic Functions
VII– EXPR:2
Kine Ki nema mati ticc Fun unct ctio ions ns
DX - Displacement in X Purpose: Access function of type kinematic measurement of translational displacements for SIMPACK.
Definition: Calculates Calcul ates the tran transla slatio tional nal x-d x-disp isplac lacemen ementt of mark marker er i rela relativ tivee to marker j in the coordinates of marker k.
Usage: res = DX(I, J, K)
Input Parameters: integer integer integer
I: ID of I marker J: ID ID of of J m ma arker, i if f 0 defaults to to Is Isys K: ID ID of of re reference ma marker K, K, if if 0 de defaults to to Is Isys
DY - displacement in Y Purpose: Access function of type kinematic measurement of translational displacements for SIMPACK.
Definition: Calculates Calcul ates the tran transla slatio tional nal y-d y-disp isplac lacemen ementt of mark marker er i rela relativ tivee to marker j in the coordinates of marker k.
Usage: res = DY(I, J, K)
Input Parameters: integer integer integer
I: J: K:
ID of I marker ID of J marker, if 0 defaults to Isys ID of of re reference ma marker K, K, if if 0 defaults to to Is Isys
VII–EXPR:2 -3
Kinematic Functions
DZ - Displacement in Z Purpose: Access function of type kinematic measurement of translational displacements for SIMPACK.
Definition: Calculates Calcul ates the tran transla slation tional al z-d z-disp isplace lacemen mentt of mark marker er i rel relativ ativee to marker j in the coordinates of marker k.
Usage: res = DZ(I, J, K)
Input Parameters: integer integer integer
I: J: K:
ID of I marker ID of J marker, if 0 defaults to Isys ID of of re reference ma marker K, K, if if 0 defaults to to Is Isys
DM - Magnitude of Displacement Purpose: Accesss fun Acces functi ction on of ty type pe ki kinem nemati aticc me meas asure ureme ment nt of tra trans nsla lati tiona onall displacements for SIMPACK.
Definition: Calculates the positiv Calculates positivee magnitu magnitude de of the translational displacement displacement between marker i and marker j.
Usage: res = DM(I, J)
Input Parameters: integer integer
I: J:
ID of I marker ID of J marker, if 0 defaults to Isys
VII–EXPR:2 -4
Kinematic Functions
VX - Velocity in X Purpose: Access function of type kinematic measurement of translational velocities for SIMPACK.
Definition: Calculates the x-component of the difference of velocities of marker i in reference to marker j in the x-component of marker l. The measurments of the position markers are in the co-ordinates of marker k.
Usage: res = VX(I, J, K, L)
Input Parameters: integer integer integer integer
I: J: K: L:
ID ID ID ID
of of of of
I marker whose velocity is measured J marker, if 0 defaults to Isys reference marker K, if 0 defaults to Isys L marker, if 0 defaults to Isys
VY - Velocity in Y Purpose: Access function of type kinematic measurement of translational velocities for SIMPACK.
Definition: Calculates the y-component of the difference of velocities of marker i in reference to marker j in the y-component of marker l. The measurments of the position markers are in the co-ordinates of marker k.
Usage: res = VY(I, J, K, L)
Input Parameters: integer integer
I: J:
ID of I marker whose velocity is measured ID of J marker, if 0 defaults to Isys
VII–EXPR:2 -5
Kinematic Functions
integer integer
K: L:
ID of reference marker K, if 0 defaults to Isys ID of L marker, if 0 defaults to Isys
VZ - Velocity in Z Purpose: Access function of type kinematic measurement of translational velocities for SIMPACK.
Definition: Calculates the z-component of the difference of velocities of marker i in reference to marker j in the z-component of marker l. The measurments of the position markers are in the co-ordinates of marker k.
Usage: res = VZ(I, J, K, L)
Input Parameters: integer integer integer integer
I: J: K: L:
ID ID ID ID
of of of of
I marker whose velocity is measured J marker, if 0 defaults to Isys reference marker K, if 0 defaults to Isys L marker, if 0 defaults to Isys
VM - Magnitude of Velocity Purpose: Access function of type kinematic measurement of translational velocities for SIMPACK.
Definition: Calculates the magnitude of the difference in speed (scalar quantity) of marker i and marker j in co-ordinates of marker l.
Usage: res = VM(I, J, L)
VII–EXPR:2 -6
Kinematic Functions
Input Parameters: integer integer integer
I: J: L:
ID of I marker ID of J marker, if 0 defaults to Isys ID of reference marker L, if 0 defaults to Isys
VR - Relative Velocity Purpose: Access function of type kinematic measurement of translational velocities for SIMPACK.
Definition: Calculates the relative point to point velocity (vector quantity) of marker i in respect to marker j in co-ordinates of marker l. n.b. VR is negative when the markers are approaching each other.
Usage: res = VR(I, J, L)
Input Parameters: integer integer integer
I: J: L:
ID of I marker ID of J marker, if 0 defaults to Isys ID of reference marker L, if 0 defaults to Isys
ACCX - Acceleration in X Purpose: Access function of type kinematic measurement of translational accelerations for SIMPACK.
Definition: Calculates the X-component of the acceleration of Marker i wrt Marker j, calculated in marker l, given in the co-ordinates of marker k.
Usage: res = ACCX(I, J, K, L)
VII–EXPR:2 -7
Kinematic Functions
Input Parameters: integer integer
I: J:
integer
K:
integer
L:
ID of I marker whose acceleration is measured ID of J marker that acceleration is wrt, if 0 defaults to Isys ID of reference marker K for presentation, if 0 defaults to Isys ID of L marker for co-ordinate system for calculation, if 0 defaults to Isys
ACCY - Acceleration in Y Purpose: Access function of type kinematic measurement of translational accelerations for SIMPACK.
Definition: Calculates the Y-component of the acceleration of Marker i wrt Marker j, calculated in marker l, given in the co-ordinates of marker k.
Usage: res = ACCY(I, J, K, L)
Input Parameters: integer integer integer integer
I: ID of I marker whose acceleration is measured J: ID of J marker which acceleration is wrt, if 0 defaults to Isys K: ID of reference marker K for presentation, if 0 defaults to Isys L: ID of L marker which is co-ordinate system for calculation, if 0 defaults to Isys
ACCZ - Acceleration in Z Purpose: Access function of type kinematic measurement of translational accelerations for SIMPACK.
VII–EXPR:2 -8
Kinematic Functions
Definition: Calculates the Z-component of the acceleration of Marker i wrt Marker j, calculated in marker l, given in the co-ordinates of marker k.
Usage: res = ACCZ(I, J, K, L)
Input Parameters: integer integer integer integer
I: J: K: L:
ID ID ID ID
of of of of
I marker whose acceleration is measured J marker, if 0 defaults to Isys reference marker K, if 0 defaults to Isys L marker, if 0 defaults to Isys
ACCM - Magnitude of Acceleration Purpose: Access function of type kinematic measurement of translational accelerations for SIMPACK expressions.
Definition: Calculates the positive magnitude of the acceleration of Marker i wrt Marker j given in the co-ordinates of Marker k
Usage: res = ACCM(I, J, L)
Input Parameters: integer integer
I: J:
integer
L:
ID ID if ID if
of I marker whose acceleration is measured of J marker that acceleration is wrt, 0 defaults to Isys of L marker for co-ordinate system for calculation 0 defaults to Isys
Restrictions: The determination of the acceleration on line during time integration is only possible as an additional algebraic q-state.
VII–EXPR:2 -9
Kinematic Functions
AX - First Projected Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the angular displacement of marker i about the x-axis of marker j.
Usage: res = AX(I, J)
Input Parameters: integer
I:
integer
J:
ID of I marker whose angular displacement is measured ID of reference marker J, if 0 defaults to Isys
Additional Information: The angle is calculated as follows: AX = atan2(yi × zj,yi × yj ). with yi, yj being the y axes of marker I and J respectively and zj being the z axis of marker J.
AY - Second Projected Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the angular displacement of marker i about the y-axis of marker j.
Usage: res = AY(I, J)
Input Parameters: integer
I:
ID of I marker whose angular displacement
VII–EXPR:2 -10
Kinematic Functions
integer
J:
is measured ID of J marker, if 0 defaults to Isys
Additional Information: The angle is calculated as follows: AY = atan2(zi × xj, zi × zj ). with zi, zj being the z axes of markers I and J respectively and xj being the x axis of marker J.
AZ - Third Projected Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the angular displacement of marker i about the z-axis of marker j.
Usage: res = AZ(I, J)
Input Parameters: integer
I:
integer
J:
ID of I marker whose angular displacement is measured ID of J marker, if 0 defaults to Isys
Additional Information: The angle is calculated as follows: AZ = atan2(xi × yj,xi × xj ) with xi, xj being the x axes of marker I and j respectively and yj being the y axis of marker J.
YAW - Yaw angle between two markers Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
VII–EXPR:2 -11
Kinematic Functions
Definition: Calculates the first rotation of marker i with respect to marker j in 3-2-1 Euler Angles.
Usage: res = YAW(I, J)
Input Parameters: integer integer
I: ID of I marker whose velocity is measured J: ID of J marker, if 0 defaults to Isys
PITCH - Pitch Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the second rotation of marker i with respect to marker j in 3-2-1 Euler Angles.
Usage: res = PITCH(I, J)
Input Parameters: integer I: integer J:
ID of I marker whose velocity is measured ID of J marker, if 0 defaults to Isys
ROLL - Third Euler Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
VII–EXPR:2 -12
Kinematic Functions
Definition: Calculates the third rotation of marker i with respect to marker j in 3-2-1 Euler Angles.
Usage: res = ROLL(I, J)
PSI - First Euler Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the first rotation of marker i with respect to marker j in 3-1-3 Euler Angles.
Usage: res = PSI(I, J)
Input Parameters: integer integer
I: ID of I marker whose velocity is measured J: ID of J marker, if 0 defaults to Isys
THETA - Second Euler Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the second rotation of marker i with respect to marker j in 3-1-3 Euler Angles.
VII–EXPR:2 -13
Kinematic Functions
Usage: res = THETA(I, J)
Input Parameters: integer integer
I: J:
ID of I marker whose velocity is measured ID of J marker, if 0 defaults to Isys
PHI - Third Euler Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the third rotation of marker i with respect to marker j in 3-1-3 Euler Angles.
Usage: res = PHI(I, J)
Input Parameters: integer integer
I: J:
ID of I marker whose velocity is measured ID of J marker, if 0 defaults to Isys
ALPHA - First Karden Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the first angle alpha of the Kardan sequence 1-2-3 of marker I wrt marker J.
VII–EXPR:2 -14
Kinematic Functions
Usage: res = ALPHA(I, J)
Input Parameters: integer
I:
integer
J:
ID of I marker whose angular displacement is measured ID of refernce marker J, if 0 defaults to Isys
BETA - Second Karden Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the second angle beta of the Kardan sequence 1-2-3 of marker I wrt marker J.
Usage: res = BETA(I, J)
GAMMA - Third Karden Angle Purpose: Access function of type kinematic measurement of rotational displacements for SIMPACK.
Definition: Calculates the third angle gamma of the Kardan sequence 1-2-3 of marker I wrt marker J.
Usage: res = GAMMA(I, J)
VII–EXPR:2 -15
Kinematic Functions
WX - Angular Velocity about X Purpose: Access function of type kinematic measurement of angular velocities for SIMPACK user routines.
Definition: Calculates the rotation about X, α, of the difference in the angular velocity vectors of marker i and marker j calculated in Isys, expressed in marker k.
Usage: res = WX(I, J, K)
Input Parameters: integer integer integer
I: J: K:
ID of I marker whose velocity is measured ID of J marker, if 0 defaults to Isys ID of reference marker K, if 0 defaults to Isys
WY - Angular Velocity about Y Purpose: Access function of type kinematic measurement of angular velocities for SIMPACK.
Definition: Calculates the y-component of the difference of the angular velocity vectors of marker i and marker j calculated in the global reference frame, expressed in marker k.
Usage: res = WY(I, J, K)
Input Parameters: integer integer integer
I: J: K:
ID of I marker whose velocity is measured ID of J marker, if 0 defaults to Isys ID of reference marker K, if 0 defaults to Isys
VII–EXPR:2 -16
Kinematic Functions
WZ - Angular Velocity about Z Purpose: Access function of type kinematic measurement of angular velocities for SIMPACK.
Definition: Calculates the z-component of the difference of the angular velocity vectors of marker i and marker j calculated in the global reference frame, expressed in marker k.
Usage: res = WZ(I, J, K)
Input Parameters: integer integer integer
I: ID of I marker whose velocity is measured J: ID of J marker, if 0 defaults to Isys K: ID of reference marker K, if 0 defaults to Isys
WM - Magnitude of Angular Velocity Purpose: Access function of type kinematic measurement of angular velocities for SIMPACK user routines.
Definition: Calculates the positive magnitude of the difference of the angular velocity vectors of marker i and marker j calculated in the global reference frame.
Usage: res = WM(I, J)
Input Parameters: integer integer
I: J:
ID of I marker whose velocity is measured ID of J marker, if 0 defaults to Isys
VII–EXPR:2 -17
Kinematic Functions
WDX - Angular Acceleration about X Purpose: Access function of type kinematic measurement of angular accelerations for SIMPACK.
Definition: Calculates the x co-ordinate given with respect to marker l, of the angular acceleration of marker i in reference to marker j given in marker k co-ordinate system.
Usage: res = WDX(I, J, K, L)
Input Parameters: integer integer integer integer
I: J: K: L:
ID ID ID ID
of of of of
I marker whose acceleration is measured J marker, if 0 defaults to Isys reference marker K, if 0 defaults to Isys L marker, if 0 defaults to Isys
Additional Information: The angular accelerations are calculated as derivatives of the angular velocities ω . While the system in which the derivatives for the accelerations are calculated can be specified through marker l, the angular velocity ωx is always taken in the global reference frame.
WDY - Angular Acceleration about Y Purpose: Access function of type kinematic measurement of angular accelerations for SIMPACK.
Definition: Calculates the y co-ordinate given with respect to marker l, of the angular acceleration of marker i in reference to marker j given in marker k co-ordinate system.
VII–EXPR:2 -18
Kinematic Functions
Usage: res = WDY(I, J, K, L)
Input Parameters: integer integer integer integer
I: ID of I marker whose acceleration is measured J: ID of J marker, if 0 defaults to Isys K: ID of reference marker K, if 0 defaults to Isys L: ID of L marker, if 0 defaults to Isys
Additional Information: The angular accelerations are calculated as derivatives of the angular velocities ω . While the system in which the derivatives for the accelerations are calculated can be specified through marker L, the angular velocity ωy is always taken in the global reference frame.
WDZ - Angular acceleration about X Purpose: Access function of type kinematic measurement of angular accelerations for SIMPACK.
Definition: Calculates the z co-ordinate given with respect to marker l, of the angular acceleration of marker i in reference to marker j given in marker k co-ordinate system.
Usage: res = WDZ(I, J, K, L)
Input Parameters: integer integer integer integer
I:
ID of I marker whose acceleration is measured J: ID of J marker, if 0 defaults to Isys K: ID of reference marker K, if 0 defaults to Isys L: ID of L marker, if 0 defaults to Isys
VII–EXPR:1 -19
Maths Functions
Additional Information: The angular accelerations are calculated as derivatives of the angular velocities ω . While the system in which the derivatives for the accelerations are calculated can be specified through marker l, the angular velocity ωz is always taken in the global reference frame.
WDM - Magnitude of Angular acceleration Purpose: Access function of type kinematic measurement of angular accelerations for SIMPACK.
Definition: Calculates the magnitude of the angular acceleration of marker i in reference to marker j in co-ordinates of marker l.
Usage: res = WDM(I, J, L)
Input Parameters: integer integer integer
I: J: L:
ID of I marker whose acceleration is measured ID of J marker, if 0 defaults to Isys ID of L marker, if 0 defaults to Isys
Additional Information: The angular accelerations are calculated as derivatives of the angular velocities ω . While the system in which the derivatives for the accelerations are calculated can be specified through marker l, the angular velocity ω is always taken in the global reference frame.
VII– EXPR:1
Maths Functions
SIN - Sine Definition: Calculates the sine of the formula or value entered in the brackets.
Usage: res = SIN(inp)
VII–EXPR:1 -20
Maths Functions
inp is the string or value (radians)
ASIN - Inverse Sine Definition: Calculates the arcus sine of the formula or value entered in the brackets. Angle is expressed in radians.
Usage: res = ASIN(inp) inp is the string or value
SINH - Hyperbolic Sine Definition: Calculates the hyperbolic sine of the formula or value entered in the brackets.
Usage: res = SINH(inp) inp is the string or value
ASINH - Inverse Hyperbolic Sine Definition: Calculates the inverse hyperbolic sine of the formula or value entered in the brackets.
Usage: res = ASINH(inp) inp is the string or value
COS - Cosine Definition: Calculates the cosine of the formula or value entered in the brackets.
Usage: res = COS(inp) inp is the string or value (radians)
ACOS - Inverse Cosine Definition: Calculates the arcus cosine of the formula or value entered in the brackets. Angle is expressed in radians.
VII–EXPR:1 -21
Maths Functions
Usage: res = ACOS(inp) inp is the string or value
COSH - Hyperbolic Cosine Definition: Calculates the hyperbolic cosine of the formula or value entered in the brackets.
Usage: res = COSH(inp) inp is the string or value
ACOSH - Inverse Hyperbolic Cosine Definition: Calculates the inverse hyperbolic cosine of the formula or value entered in the brackets.
Usage: res = ACOSH(inp) inp is the string or value
TAN - Tangent Definition: Calculates the tangent of the formula or value entered in the brackets.
Usage: res = TAN(inp) inp is the string or value (radians)
ATAN - Inverse Tangent Definition: Calculates the arcus tangent of the formula or value entered in the brackets. Angle is expressed in radians.
Usage: res = ATAN(inp) inp is the string or value
VII–EXPR:1 -22
Maths Functions
TANH - Hyperbolic Tangent Definition: Calculates the hyperbolic tangent of the formula or value entered in the brackets.
Usage: res = TANH(inp) inp is the string or value
ATANH - Inverse Hyperbolic Tangent Definition: Calculates the inverse hyperbolic tangent of the formula or value entered in the brackets.
Usage: res = ATANH(inp) inp is the string or value
EXP - Exponential Function Definition: This function calculates the exponential function. The value entered is the power to which e is raised.
Usage: res = EXP(inp) inp is the value entered
ATAN2 - Inverse Tangent (2 arguments) Definition: Calculates the arcus tangent of the two variables. The result is returned in radians between −π and π .
Usage: res = ATAN2(inp1,inp2) inp1 is the y variable inp2 is the x variable
LOG - Natural Logarithm Definition: Calculates the natural logarithm of the variable entered
VII–EXPR:1 -23
Maths Functions
Usage: res = LOG(inp) inp is the variable, which must be 0 or greater
LOG10 - Logarithm to base 10 Definition: Calculates the logarithm to base 10 of the variable entered
Usage: res = LOG10(inp) inp is the variable, which must be 0 or greater
POW - Power Function Definition: This function raises the first input to the power defined by the second input.
Usage: res = pow(inp1, inp2) inp1 is the first input inp2 is the second input to which the first input is raised
SQRT - Square Root Function Definition: The function calculates the square root of the function
Usage: res = SQRT(inp) inp is the variable
MAX - Maximum Value Definition: Returns the greater value of the two variables.
Usage: res = MAX(inp1,inp2) inp1 is the first variable inp2 is the second variable
VII–EXPR:1 -24
Maths Functions
MIN - Minimum Value Definition: Returns the smaller value of the two variables.
Usage: res = MIN(inp1,inp2) inp1 is the first variable inp2 is the second variable
AINT - Nearest Integer Definition: This function returns the nearest integer, whose magnitude is no greater than the value entered. If the value 2.99 is entered then the function will return the value 2.
Usage: res = AINT(inp) inp is the value entered
ANINT - Next Integer Definition: The function returns the nearest whole number to the value entered.
Usage: res = ANINT(inp) inp is the value entered
DIM - Positive difference Definition: This function calculates the positive difference between the two variables.
Usage: res = DIM(inp1,inp2) inp1 is the first variable inp2 is the second variable The function equals zero if inp2 is greater than or equal to inp 1
MOD - Modulo Function Definition: The function divides the first input by the second input and returns the remainder.
VII–EXPR:1 -25
Maths Functions
An example of the output for various different inputs to the function is shown: MOD(7.0, 5.0) returns 2.0 MOD(21, 2) returns 1 MOD(-13, 5) returns -3
Usage: res = MOD(inp1,inp2) inp1 is the first variable inp2 is the second variable
% - Modulo Function Definition: This is the same function as the Modulo function, however the input in the expression is slightly different. An example of the output for various different inputs to the function is shown: MOD(7.0, 5.0) returns 2.0 MOD(21, 2) returns 1 MOD(-13, 5) returns -3
Usage: res = inp1%inp2 inp1 is the first variable inp2 is the second variable
ABS - Absolute Value Definition: Returns the absolute value of the string or value entered in the brackets.
Usage: res = ABS(inp) Where, inp is the string or value
SIGN - Signum Function Definition: The signum function returns the absolute value of the first argument multiplied by the sign of the second argument
Usage: res = SIGN(inp1, inp2) inp1 is the first argument inp2 is the second argument
VII–EXPR:3 -26
Access Functions
IF - Arithmetic IF Definition: The expression returns either the first second or third input dependent upon whether the defining function is greater than, less than or equal to zero.
Usage: res = IF(deffunc:inp1,inp2,inp3) deffunc is the defining function inp1 is the first output variable inp2 is the second output variable inp3 is the third output variable If the defining function is:
• < 0 → inp1 is returned • = 0 → inp2 is returned • > 0 → inp3 is returned
VII– EXPR:3
Access Functions
FORCEAF - Force by Applied Force Purpose: Access function of type force element force access for SIMPACK.
Definition: Returns the component COMP of the force ID in the coordinates of the Marker REFSYS, which defaults to the global reference frame if set to zero.
Usage: res = FORCEAF( id, mflag, comp, refsys )
Input Parameters: integer integer
id: mflag:
integer
comp:
integer
refsys:
ID of the force element to be investigated Flags if force value in I (=0) or J (=1) marker should be returned Component of the force to be returned 1 = Magnitude of the force 2 = x component of the force 3 = y component of the force 4 = z component of the force 5 = Magnitude of the torque 6 = x component of the torque 7 = y component of the torque 8 = z component of the torque ID of reference marker in which the force should
VII–EXPR:3 -27
Access Functions
be expressed, if 0 defaults to Isys
FORCEST - Force States Purpose: Access function of type force element force access for SIMPACK expressions.
Definition: Returns the force state of the component COMP and the force ID.
Usage: res = FORCEST( id, comp, iord )
Input Parameters: integer
id:
integer
comp:
integer
iord:
ID of the force element to be investigated. Range = {1,2,...,Mbs.Force.nmax}. Component of the force state. Range = {1,2,...,number_of_joint_states}. The order of the derivative to be returned, if zero, the value itself is returned. Range = {0,1}.
FORCEOV - Force Output Values Purpose: Access function of type force element force access for SIMPACK expressions.
Definition: Returns the force output value of the component COMP and the force ID.
Usage: res = FORCEOV( id, comp )
Input Parameters: integer
id:
ID of the force element to be investigated. Range = {1,2,...,Mbs.Force.nmax}.
VII–EXPR:3 -28
Access Functions
integer
comp:
Component of the force state. Range = {1,2,...,Mbs.Force.Ov.nmax}.
JOINTCF - Joint Constraining forces Purpose: Access function of type constrained forces of joints access for SIMPACK.
Definition: Returns the component COMP of constrained force of the joint ID in the coordinates of the Marker REFSYS, which defaults to the global reference frame if set to zero. k jointcf = T kT · (cf j )In T k = Gk · GM k →
Usage: res = JOINTCF( id, mflag, comp, refsys )
Input Parameters: integer integer
id: mflag:
integer
comp:
integer
refsys:
ID of the joint to be investigated Flags if force value in I (=0) or J (=1) marker should be returned Component of the force to be returned 1 = Magnitude of the force 2 = x component of the force 3 = y component of the force 4 = z component of the force 5 = Magnitude of the torque 6 = x component of the torque 7 = y component of the torque 8 = z component of the torque ID of reference marker in which the force should be expressed, if 0 defaults to Isys
JOINTST - Joint States Purpose: Access function of type joint element of joints access for SIMPACK.
VII–EXPR:3 -29
Access Functions
Definition: Returns the joint state of the component COMP and the joint ID.
Usage: res = JOINTST( id, comp, iord )
Input Parameters: integer
id:
integer
comp:
integer
iord:
ID of the joint element to be investigated. Range = {1,2,...,Mbs.Joint.nmax}. Component of the joint state. Range = {1,2,...,number_of_joint_states}. The order of the derivative to be returned, if zero, the value itself is returned. Range = {0,1,2}.
CONSTRCF - Constraint Constraining Forces Purpose: Access function of type constrained forces of constraints access for SIMPACK.
Definition: Returns the component COMP of constrained force of the constraint ID in the coordinates of the Marker REFSYS, which defaults to the global reference frame if set to zero. k
→
constrcf = T kT · (constrcf )In T k = Gk · GM k
Usage: res = CONSTRCF( id, mflag, comp, refsys )
Input Parameters: integer integer
id: mflag:
integer
comp:
ID of the constraint to be investigated Flags if force value in I (=0) or J (=1) marker should be returned Component of the force to be returned 1 = Magnitude of the force 2 = x component of the force 3 = y component of the force 4 = z component of the force 5 = Magnitude of the torque 6 = x component of the torque 7 = y component of the torque
VII–EXPR:4 -30
Functions
integer
refsys:
8 = z component of the torque ID of reference marker in which the force should be expressed, if 0 defaults to Isys
CONSTRST - Constraint State Purpose: Access function of type constraint element of constraints access for SIMPACK.
Definition: Returns the constraint state of the component COMP and the constraint ID.
Usage: res = CONST( id, comp, iord )
Input Parameters:
VII– EXPR:4
integer
id:
integer
comp:
integer
iord:
ID of the constraint element to be investigated. Range = {1,2,...,Mbs.Constr.nmax}. Component of the constraint state. Range = {1,2,...,number\_of\_constr\_states}. The order of the derivative to be returned, if zero, the value itself is returned. Range = {0}.
Functions
IFCTN - Input Function Purpose: Access function of type function evaluation of one dimensional input function.
Definition: Evaluates the function value of an input function or its , 1. - 3.derivative The function value may be a:
• step interpolation (kind spl = 0), • cubic spline evaluation (kind spl = 1),
VII–EXPR:4 -31
Functions
• linear interpolation (kind spl = 2), • Akima spline (kind spl = 3). In case of spline evaluation the derivatives until 3. order are determined for the parameter xinp. Beyond the defined value range for 1. parameter xinp the function evaluation in case of splines may be further spline evaluation or linear interpolation with a smooth transition from spline interpolation to linear interpolation ( the 2. and 3. derivative become 0 after a transition range) When in case of spline evaluation the input value xinp exceeds the defined range, a warning is printed the first time in Default mode (WPAR(45) = 0). WPAR(45) = 1 prevents the warning.
Usage: res = IFCTN( xinp, id ifctn, kind deriv , kind spl, kind extr , range extr )
Input Parameters: double integer integer
integer
integer
double
xinp: id_ifctn: kind_deriv:
Input value of first parameter ID-number of input function Index of derivative (0 - 3) = 0 : evaluation of function = 1 : 1st derivative of function evaluation = 2 : 2nd derivative of function evaluation = 3 : 3rd derivative of function evaluation kind_spl: kind of interpolation: = -1 : use interpolation defined by GUI = 0 : step interpolation = 1 : cubic spline evaluation = 2 : linear interpolation = 3 : Akima spline kind_extr: kind of extrapolation beyond the defined range incase of splines = -1 : use option defined by GUI = 0 : spline evaluation beyond the table values = 1 : transition from spline evaluation to linear evaluation range_extr: range of extrapolation beyond the defined set of table values ( kind_extr = 1 (transition to linear ) )
VII–EXPR:4 -32
Functions
IFARRAY - Input Function Array Purpose: Access function of type function evaluation of a 2D-array.
Definition: Evaluates the function value of a 2D-array: The function value may be a:
• step interpolation (kind spl = 0), • cubic spline evaluation (kind spl = 1), • linear interpolation (kind spl = 2), • Akima spline evaluation (kind spl = 3). In case of spline evaluation the derivatives (until 3rd order) are determined for the parameter xinp, while for the second parameter yinp only the 1st derivative is evaluated. Beyond the defined value range for 1st parameter xinp the function is evaluated in case of splines may be further spline evaluation or linear interpolated with a smooth transition from spline interpolation to linear interpolation (the 2nd and 3rd derivative become 0 after the transition range)
Usage: res = IFARRAY( xinp, yinp, ID ifarray, kind deriv , kind spl, kind extr, range extr )
Input Parameters: double double integer integer
xinp: yinp: id_ifarray: kind_deriv:
integer
kind_spl:
integer
kind_extr:
input value of first parameter. input value of second parameter. ID-number of 2D-array. kind of interpolation: = -3 : Third Derivative of Y = -2 : Second Derivative of Y = -1 : First Derivative of Y = 0 : The Actual Value is returned = 1 : First Derivative of X = 2 : Second Derivative of X = 3 : Third Derivative of X kind of interpolation: = -1 : use interpolation defined by GUI = 0 : step interpolation = 1 : cubic spline evaluation = 2 : linear interpolation = 3 : Akima spline kind of extrapolation beyond the defined range in case of splines = -1 : use option defined by GUI = 0 : spline evaluation beyond the table values
VII–EXPR:4 -33
Functions
=
double
range_extr:
1 : transition from spline evaluation to linear evaluation range of extrapolation beyond the defined set of table values. ( kind_extr = 1 (transition to linear ) )
HAVSIN - Haversine function Purpose: Access function of type Haversine Step access for SIMPACK.
Definition: Returns the value calculated due to Haversin Step function evaluation with the given parameters.
Usage: res = HAVSIN(x, x0, h0, x1, h1, iord) Let x0 < x1 . f :=SPCK UF HAVSIN is defined as:
( ) :=
f x
Input Parameters:
double double double double double integer
h0 x ≤ x0 1 2
(h1 − h0
x: x0: h0: x1: h1: iord:
) 1 − cos
π xx
−x0
1 −x0
+
h0 x0 < x < x1 h1 x1 ≤ x
The independent varible for the Haversine Step function. The x-value specifying the begin of the step. The value of the function before the step (x < x0 ) The x-value specifying the end of the step. The value of the function after the step (x > x1 ) The order of the derative to be returned, if zero, the value itself is returned. Range 0 <= iord <= 2.
=0: no error
STEP - Heaviside Step Function Purpose: Access function of type Step access for SIMPACK.
VII–EXPR:4 -34
Functions
Definition: Returns the cubic approximation of the Heaviside step function with the given parameters.
Usage: res = STEP(x, x0, x1, h0, h1) Let x0 < x1 . Within the range x0 < x < x1 solve f :=SPCK UF STEP the cubic approximation: 3
with: ( ) = ( ( ) := ( )= ( ( )= 3−2 + ( − ) f x0 f x1
an xn
f x
n=0
⇒
f x
Input Parameters:
h1
double
x:
double double double double integer
x0: h0: x1: h1: iord:
h0
x−x0
x1 −x0
2
h0 , f x0) = 0, h1 , f x1) = 0.
x−x0
x1 −x0
h0 x ≤ x0 h0 x0 < x < x1 h1 x1 ≤ x
The independent varible for the Heaviside Step function The x-value specifying the begin of the step. The value of the function before the step (x < x0 ) The x-value specifying the end of the step. The value of the function after the step (x > x1 ) The order of the derivative to be returned, if zero, the value itself is returned. Range 0 <= iord <= 2.
STEP5 - Heaviside STEP5 Function Purpose: Access function of type Step access for SIMPACK.
Definition: Returns the approximation of the Heaviside step function through a polynomial of fifth order with the given parameters.
Usage: res = STEP5(x, x0, x1, h0, h1) Let x0 < x1 . Within the range x0 < x < x1 solve f :=SPCK UF Step5 the polynom approximation of fifth order: 5
( ) :=
f x
n=0
an x
n
f (x0) = h0 , f (x0 ) = 0, f (x0 ) = 0, with: f (x1) = h1 , f (x1 ) = 0, f (x1 ) = 0.
VII–EXPR:4 -35
Functions
⇒
Input Parameters:
( )= (
h0 x ≤ x0
h1 − h0
f x
double
x:
double double double double integer
x0: h0: x1: h1: iord:
) 10 − 15 3
x−x0
x1 −x0
x−x0 x1 −x0
+6 + x−x0
x1 −x0
2
h0 x0 < x < x1 h1 x1 ≤ x
The independent variable for the Haversine Step function. The x-value specifying the begin of the step. The value of the function before the step (x < x0 ) The x-value specifying the end of the step. The value of the function after the step (x > x1 ) The order of the derative to be returned, if zero, the value itself is returned. Range 0 <= iord <= 2.
FORSIN - Fourier Sine Purpose: Access function of type Fourier access for SIMPACK.
Definition: Returns the value calculated due to Fourier Sine evaluation with the given parameters.
Usage: res = FORSIN(x, x_0, omega, b_0, ..., b_N)
SIMPACK provides the Fourier sine series form shown below N
FORSIN(x, x0 , ω, a) := b0
+
bn sin(nω (x − x0 ))
n=1
where x, x0 , ω ∈ {0, . . . , 31} .
R
with ω > 0 and b := (b0 , . . . , bN ) with N ∈
Input Parameters: double
x:
double
x_0:
double double
omega: b_0, ..., b_31:
The independent varibale for the Fourier Sine. Specifies an offset in the Fourier Sine. The fundamental frequence in the The arguments used by the function. From 0 up to 31 different arguments can be defined.
VII–EXPR:4 -36
Functions
FORCOS - Fourier Cosine Purpose: Access function of type Fourier access for SIMPACK.
Definition: Returns the value calculated due to Fourier Cosine evaluation with the given parameters.
Usage: res = FORCOS(x, x_0, omega, a_0, ..., a_N)
SIMPACK provides the Fourier cosine series form shown below N
FORCOS(x, x0 , ω, a) := a0
+
an cos(nω (x − x0 ))
n=1
where x, x0 , ω ∈ {0, . . . , 31} .
R
with ω > 0 and a := (a0 , . . . , aN ) with N ∈
Input Parameters: double
x:
double
x_0:
double double
omega: a_0, ..., a_31:
The independent variable for the Fourier Cosine. Specifies an offset in the Fourier Cosine. The fundamental frequence in the The arguments used by the function. From 0 up to 31 different arguments can be defined.
POLY - Polynomial evaluation Purpose: Access function of type polynomial access for SIMPACK.
Definition: Returns the value calculated for the polynomial with the given parameters.
Usage: res = POLY(x, x_0, p_0, ..., p_N)
VII–EXPR:4 -37
Functions
SIMPACK provides the polynomial function form shown below N
POLY(x, x0 , p) := p0
+
pn (x − x0 )
n
n=1
where x, x0 ∈ R and p := ( p0 , . . . , pN ) with N ∈ {0, . . . , 31} .
Input Parameters: double
x:
double double
x_0: p_0, ..., p_31:
The independent varible for the polynomial. Specifies an offset in the polynomial The arguments used by the function. From 0 up to 31 different arguments can be defined.
CHEBY - Chebyshev polynomial evaluation Purpose: Access function of type Chebyshev access for SIMPACK.
Definition: Returns the value calculated for the Chebyshev polynomial with the given parameters.
Usage: res = CHEBY(x, x_0, p_0, ..., p_N)
SIMPACK provides the Chebyshev polynomial function form shown below N
CHEBY(x, x0 , p) := p0
+
pn T n (x − x0 )
n=1
where x, x0 ∈ R, p := ( p0 , . . . , pN ) with N ∈ {0, . . . , 31} and the n-th Chebyshev polynomial T n ().
Input Parameters: double
x:
double
x_0:
double
p_0, ..., p_31:
The independent varibale for the polynomial. Specifies an offset in the Chebyshev polynomial. The arguments used by the function. From 0 up to 31 different arguments can be defined.
VII–EXPR:4 -38
Functions
SHF - Simple Harmonic Function Purpose: Access function of type simple harmonic function for SIMPACK.
Definition: Returns the value calculated for simple harmonic function with the given parameters. x = a ∗ sin(ω (x − x0 ) − φ) + b
Usage: res = SHF(x, x0, a, w, phi, b, iord)
Input Parameters: double double double double double double integer
x: x0: a: w: phi: b: iord:
The independent variable for the shf Specifies an offset in x of the shf The amplitude of the sine function The frequency of the shf A phase shift in the shf The mean value of the shf The order of the derivative to be returned, if zero, the value itself is returned. Range 0 <= iord <= 2.
TIME - Current solver time Purpose: Access function of type time access for SIMPACK.
Definition: Returns the current simulation time.
Usage: res = TIME
Remarks: This function has no arguments