Model Element |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
POST_REQUEST defines an output request entity in MotionSolve. POST_REQUESTs are written to MotionSolve output files so that they may be used for plotting and signal processing by HyperGraph and HyperGraph 3D. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Format |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
POST_REQUEST has five variations:
For the sake of clarity, the formats for these five variations are shown separately below.Built-in marker based functions<Post_Request id = "integer" type = "MARKER_DISPLACEMENT" | "MARKER_VELOCITY" | "MARKER_ACCELERATION" | "MARKER_FORCE" i_marker_id = "integer" [[ j_marker_id = "integer" ref_marker_id = "integer" label = "string" comment = "string" ]] /> Built-in element force based functions<Post_Request id = "integer" type = "ELEMENTAL_FORCE" elem_type = "string" jflag = "integer" [[ ref_marker_id = "integer" label = "string" comment = "string" ]] /> As a set of expressions based on the MotionSolve run-time expression language<Post_Request id = "integer" type = "EXPRESSION"
[[ expr1 = "motionsolve_expression" expr2 = "motionsolve_expression" expr3 = "motionsolve_expression" expr4 = "motionsolve_expression" expr5 = "motionsolve_expression" expr6 = "motionsolve_expression" expr7 = "motionsolve_expression" expr8 = "motionsolve_expression"
label = "string" comment = "string" ]] /> As a user subroutine written in a compiled language Fortran, C or C++<Post_Request id = "integer" [[ label = "string" comment = "string" ]] type = "USERSUB" usrsub_dll_name = "valid_path_name" usrsub_param_string = "USER(par_1, ..., par_n)" usrsub_fnc_name = "custom_fnc_name" /> As a Python or MATLAB script<Post_Request id = "integer" [[ label = "string" comment = "string" ]] type = "USERSUB" script_name = "valid_path_name" interpreter = "PYTHON" | "MATLAB" usrsub_param_string = "USER(par_1, ..., par_n)" usrsub_fnc_name = "custom_fnc_name" /> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Attributes |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
id |
Element identification number (integer>0). This number is unique among all Post_Request elements. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
label |
The name of the Post_Request element. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
comments |
A character string that describes the signals being measured. The string can be of any length. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
type |
Specifies the type of Post_Request element. Select from MARKER_DISPLACEMENT, MARKER_VELOCITY, MARKER_ACCELERATION, MARKER_FORCE, EXPRESSION, ELEMENTAL_FORCE and USERSUB. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
i_marker_id |
Specifies the Reference_Marker ID at which the information is being calculated. Use only when type is MARKER_DISPLACEMENT, MARKER_VELOCITY, MARKER_ACCELERATION, or MARKER_FORCE. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
j_marker_id |
Specifies the Reference_Marker ID from which the information is being calculated. The information is typically some vector relating to IM_ID and JM_ID, such as displacement, velocity, acceleration or force. Use only when type is MARKER_DISPLACEMENT, MARKER_VELOCITY, MARKER_ACCELERATION, or MARKER_FORCE. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
ref_marker_id |
Specifies the coordinate system in which the components of the vector between IM_ID and JM_ID are expressed. Use only when type is MARKER_DISPLACEMENT, MARKER_VELOCITY, MARKER_ACCELERATION, or MARKER_FORCE. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
expr1, expr2,…., expr8 |
Specify the eight signals that are calculated with function expressions. Use only when type is EXPRESSION. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
elem_type |
Specifies the type of the element for which force is requested. Select from BEAM, BUSH, CONTACT, COUPLER, FIELD, FORCE, GFORCE, JOINT, JPRIM, MATE, MOTION, SFORCE, SPDP, VFORCE, VTORQUE and YFORCE. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
elem_id |
The ID of the element for which force is requested. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
jflag |
An integer that specifies whether force acting on the I or the J marker is requested. jflag = 0 returns force acting on the I marker and jflag = 1 returns force acting on the J marker. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
usrsub_param_string |
The list of parameters that are passed from the data file to the user-defined REQSUB. Use this keyword only when type = USERSUB is selected. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
usrsub_dll_name |
Specifies the path and name of the DLL or shared library containing user subroutine. MotionSolve uses this information to load the user subroutine REQSUB in the DLL at run time. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
usrsub_fnc_name |
Specifies an alternative name for the user subroutine REQSUB. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
script_name |
Specifies the path and name of the user-written script that contains the routine specified by usrsub_fnc_name. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
interpreter |
Specifies the interpreted language that the user script is written in. Valid choices are MATLAB or PYTHON. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comments |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
This generality allows almost any information of interest to be computed during a simulation and written to an output file for future review
This request computes the translational and rotational displacement of one Reference_Marker (IM) with respect to a second Reference_Marker (JM). The results are calculated in the coordinate system of a third Reference_Marker (RM). The following eight components are returned:
This request computes the velocity of one Reference_Marker (IM) with respect to a second Reference_Marker (JM). The results are calculated in the coordinate system of a third Reference_Marker (RM). The time derivative is always taken in the ground reference frame. This is a quick way of specifying the following eight function expressions:
This request computes the acceleration of one Reference_Marker (IM) with respect to a second Reference_Marker (JM). The results are calculated in the coordinate system of a third Reference_Marker (RM). All time derivatives are taken in the ground reference frame. This is a quick way of specifying the following eight function expressions:
This request computes the sum total of the forces acting at a Reference_Marker (IM) due to all applied and reaction forces and torques between IM and a second Reference_Marker (JM). The results are calculated in the coordinate system of a third Reference_Marker (RM). This is a quick way of specifying the following eight function expressions:
This request generates eight channels of information that contain the force magnitude, X, Y, and Z forces, torque magnitude, and the X, Y and Z torque values in each channel for the element ID that is specified. The results are calculated in the coordinate system of the reference marker that is specified (RM). The forces are reported on the I or J body depending on what is specified in the j flag (JFLAG). This is a quick way of specifying the following eight function expressions (for a spring as an example):
This type of request allows you to compute eight channels of information. The quantities to be calculated are defined as MotionSolve expressions that are evaluated at run-time. See the Functions topic for more information about function expressions and how to use them.
This type of request allows you to compute eight channels of information using a user-defined subroutine REQSUB. You may write the REQSUB in C/C++/FORTRAN and create a DLL from it. Alternatively, you may use a script to do the same in Python. MotionSolve loads the DLL/script automatically and calls REQSUB as needed to get the information it needs.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
In 1996, STS-75, a tethered satellite, was launched from the space shuttle Columbia. The satellite was extended 19.7 kilometers from the shuttle when the tether broke near the boom. The satellite and tether drifted away from the orbiter and were lost. A MotionSolve simulation is to be performed to understand the cause of the failure. As a part of the simulation, the satellite trajectory, angular momentum and the tether force time histories are to be calculated. The satellite is roughly spherical, with a radius of 2 meters. Its mass properties are as follows: mass = 300Kg, The center of mass of the satellite is identified as Reference_Marker 1101. Reference_Marker 1102 specifies the tether attachment point on the satellite; the attachment point on the spaceship by Reference_Marker1972. The image below illustrates the system during deployment. STS-75, a tethered satellite being deployed The first example shows how the time history of the satellite trajectory is calculated. Note the use of zero IDs to indicate that the global coordinate system is to be used for JM_ID and RM_ID. <Post_Request id = "1" comment = "Satellite trajectory time history" type = "MARKER_DISPLACEMENT" i_marker_id = "1101" j_marker_id = "0" ref_marker_id = "0" /> The second example shows how the time history of the satellite angular momentum is calculated. Note that the angular momentum is calculated about the center of mass of the satellite in the satellite coordinate system. 20, 22, and 25 are the moments of inertia of the satellite. <Post_Request id = "2" comment = "Satellite trajectory angular momentum" type = "EXPRESSION" expr1 = "0" expr2 = "20*WX(1101,0,1101)" expr3 = "22*WY(1101,0,1101)" expr4 = "25*WZ(1101,0,1101)" expr5 = "0" expr6 = "0" expr7 = "0" expr8 = "0" /> The last example shows how you may calculate the time history of the tether forces. The tether force components are calculated in the coordinate system of Reference_Marker 1972. <Post_Request id = "1" comment = "Tether force time history" type = "MARKER_FORCE" i_marker_id = "1102" j_marker_id = "1972" ref_marker_id = "1972" /> |
Model Element |
|
Description |
|
REQUEST defines an output request entity in MotionSolve. REQUESTs are written to MotionSolve output files so that they may be used for plotting and signal processing by HyperGraph and HyperGraph 3D.REQUEST is available in four types:• As a built-in marker-based functions.• As a set of expressions based on the MotionSolve run-time expression language.• As a user subroutine written in a compiled language Fortran, C or C++.• As a Python or MATLAB script. |
|
Declaration |
|
def REQUEST(ID, LABEL="", TYPE="", I=0, J=0, RM=0, COMMENT="", F1="", F2="", F3="", F4="", F5="", F6="", F7="", F8="", FUNCTION="", CNAMES=[""], CUNITS=[""], ROUTINE="",SCRIPT=""): |
|
Attributes |
|
id |
Element identification number (integer>0). This number is unique among all the REQUEST elements. |
LABEL |
The name of the REQUEST element. |
TYPE |
Specifies the type of REQUEST element. Select from DISPLACEMENT, VELOCITY, ACCELERATION, or FORCE. |
I |
Specifies the marker ID at which the information is being calculated. Use only when type is DISPLACEMENT, VELOCITY, ACCELERATION, or FORCE. |
J |
Specifies the marker ID from which the information is being calculated. The information is typically some vector relating to I and J, such as displacement, velocity, acceleration or force. Use only when type is DISPLACEMENT, VELOCITY, ACCELERATION, or FORCE. |
RM |
Specifies the ID of the marker whose coordinate system is used to define the components of the vector between I and J are expressed. Use only when type is DISPLACEMENT, VELOCITY, ACCELERATION, or FORCE. |
COMMENT |
A character string that gives a general description of signals being measured. The string can be of any length. |
F1,F2,F3,F4,F5,F6,F7,F8 |
Specify the eight signals that are calculated with function expressions. Use only when type is EXPRESSION. |
FUNCTION |
The list of parameters that are passed from the data file to the user defined subroutine, SFOSUB. This attribute is common to all types of user subroutines and scripts. |
CNAMES |
Specifies eight component names for each of the eight signals. |
CUNITS |
Specifies the components units such as mass, time, force, and so on. |
ROUTINE |
Specifies an alternative name for the user subroutine REQSUB. |
SCRIPT |
Specifies the path and name of the user written script that contains the routine. |
CommentsSee Post_Request |
|
ExampleThe first example shows how a define displacement in a REQUEST.REQUEST(1,TYPE="DISPLACEMENT",I=1101,J=0,RM=0,COMMENT="Satellite trajectory time history")
The second example shows how a define angular momentum in a REQUEST.REQUEST(2,F2="20*WX(1101,0,1101)",F3="20*WY(1101,0,1101)",F4="20*WZ(1101,0,1101)",F6="0",F7="0",F8="0",COMMENT=" Satellite trajectory angular momentum ")
The third example shows how a define force in a REQUEST.REQUEST(1,TYPE="FORCE",I=1102,J=1972,RM=1972,COMMENT="Tether force time history)") |
The following MDL Model statements:
*Output() - output expressions
*Output() - output on entities
*Output() - output on entity sets