MotionView User's Guide

Outputs

Outputs

Previous topic Next topic Expand/collapse all hidden text  

Outputs

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

This topic describes the Output entity in MotionView and shows the various usage, creation, and editing methods.

Theory/Background

The Output entity creates a Result Output Request to the solver which writes out the requested data for plotting.  The main types of output requests are shown in the figure below:

output_type_diagram_mv

The main types of outputs that can be defined using Output requests are Displacement, Velocity, Acceleration, and Force.  In addition to these, more complex outputs can be extracted using the Expressions and User-defined (which use the Solver User-subroutine) output types.   The output request plays a very important role in post processing the results from a solver run.  Output requests also pave the way for signal processing of data that is generated by a Multi-body Simulation.

Outputs defined in MotionView are written to MotionSolve as a Post_Request statement and to Adams as a REQUEST statement.

Entity Data Members - Properties

Click on each Output type below to view the corresponding properties:

hmtoggle_plus1Displacement/Velocity/Acceleration

There are three main ways to define Displacement/Velocity/Acceleration outputs between any two bodies:

Using Two Points

The output can be measured between two points that belong to two different bodies.

Using an Entity

The output can be defined for an entity. The supported entities for this method of output are: Body, Joint, Beam, Bushing, Force, and Spring Damper.

Using an Entity Set

The output can be defined for all entities of a certain type that are currently present in the model. The supported entities for this method of output are: Body, Joint, Beam, Bushing, Force, and Spring Damper.

hmtoggle_plus1Force

There are two methods of defining a Force output:

Using an Entity

The output can be defined for an entity. The supported entities for this method of output request are: Body, Joint, Beam, Bushing, Force, and Spring Damper.

Using an Entity Set

The output can be defined for all entities of a certain type that are present in the model. The supported entities for this method of request are: Joint, Beam, Bushing, Force, and Spring Damper.

hmtoggle_plus1Expression

An Expression based output request has six components (labeled F2, F3, F4, F6, F7, and F8), each of which can have expressions (based on solver functions).  The MotionView Expression Builder is a useful tool for creating complex expression involving systems states and mathematical functions.

hmtoggle_plus1User-Defined

For more complex output requests, that cannot be defined using the methods described above, a User-subroutine REQSUB can be used.  From the Outputs panel, the following information needs to be provided in order to create a User-defined subroutine:

USER() Function Expression.
Choice to use Local Subroutine file.
Subroutine function type – DLL/SO, Python, or MATLAB formats.
Function name - REQSUB is the default.

Entity Definition and Editing

To learn how to add an "Entity" to a model, please see the Entity Manual topic.

hmtoggle_plus1To add an Output entity to a model:
1.An Output entity can be added to the model using two different methods:
-From the MotionView General MDL Entity toolbar, right-click the Outputs icon entityOutputs-24.

OR

-From the Project Browser, right-click on the Model label (or on any System/Analysis of your choice) and select Add > General MDL Entity > Output from the context menu.

The Add Output dialog is displayed.

2.In the Add Output dialog, double click the System collector button and select the desired system from the Select a System or Assembly or Analysis dialog.

Note - The selection of System collector for the entity can also be done after the entity has been added.

3.Enter the Label and Variable name, as well as any Note information related to the Output.
4.Click OK to add the output.

OR

-If several Outputs are to be added, click Apply.  This keeps the Add Output dialog box open for adding additional outputs.
5.Once an Output has been added to the model using any of the entity creation methods, the panel for the Output will be displayed in the panel area.

outputs

Outputs Panel - Properties Tab

hmtoggle_plus1To specify a Displacement, Velocity, or Acceleration Output:
1.From the Result Type drop-down menu, select the type of results that need to be extracted.  If the result type is specified as Displacement, Velocity, or Acceleration - the following three output methods will be available from the Output Method drop-down menu: Two Points, Entity, and Entity Set.

outputs_panel_with_callouts_mv

Through this method a displacement , velocity, or acceleration between two bodies can be measured relative to each other.

2.From the Output Method drop-down menu, select Two Points (the panel for a Two Points output request is as shown above).

The figure below lists the supported entities for a Two Points method of output request:

outputs_two_points_diagram_mv

Output - Two Points Properties Map

3.Double click the Body 1 collector body1_collector_mv and pick the first body for this output request.

The Body 2 collector will automatically become active (a collector is active when it is enclosed in a blue rectangle).

4.Pick the body for the Body 2 collector.

The Point collector button labeled Pt on Body 1: now becomes active.

5.Pick the point for the location on Body 1.

The Point collector labeled Pt on Body 2: becomes active.

6.Select a point for the location on Body 2.

The Ref Marker collector reference_marker_collector_mv becomes active.

7.Pick a Reference Marker for the output.

The default marker is Global Frame.

8.From the Output Marker drop-down menu, select either I Marker, J Marker, or Both. Selecting I Marker results in defining the output for Body 1 relative to Body 2 only.  Selecting J Marker results in defining the output for Body 2 relative to Body 1 only.  Selecting Both defines both of these outputs.
-The syntax for an Output request using Two Points in the MDL format is explained in the example below:

Syntax:

*Output(out_name, "out_label", DISP|VEL|ACCL, point_1, body_1, point_2, body_2, [ref_marker])

Example:

*Output(o_disp_2pts, "Displacement Two Points", DISP, p_39, b_1, p_2, B_Ground, Global_Frame, BOTH_MARKERS)

Note - The points and bodies on which the output is requested cannot be pairs.

To understand the complete syntax of the MDL statement, please refer to the *Output() - output on two points topic (located in the MotionView MDL Reference Guide section of the HyperWorks Desktop Reference Guide).

-The syntax for creating an Output request using Tcl commands is explained in the example below:

Syntax:

mdlmodel_handle InterpretEntity new_handle keyword varname label

Example:

mdlmodel_handle InterpretEntity odisp2p Output o_disp_2pts "\"Displacement Two Points\" "DISP" p_39 b_1 p_2 B_Ground Global_Frame BOTH_MARKERS;

2.To create an output request using the Entity method, select Entity from the Output Method drop-down menu.  In this case, the output is generated with respect to the selected entity.

outputs_panel_entity_type_mv

The figure below lists the supported entities for an Entity method of output request:

output_entity_diagram_mv

Output - Entity Topology Map

3.Use the Entity collector drop-down menu entity_collector_output_example_mv to select the type of entity on to which the output request is required.
4.Click the "Entity" collector (Body, Joint, Beam, Bushing, Force, or SpringDamper) and pick the desired entity present in the model.
5.Click the Reference Marker collector reference_marker_collector_mv to select the desired reference marker.
6.From the drop-down menu (located next to the Ref Marker collector), select I Marker, J Marker, or Both.

Note - In case of MotionSolve and Adams, defining displacement, velocity, or acceleration using an Entity other than Body results in defining outputs relative to the markers of the respective entity.  For the Body entity, the output is measured at the CM marker with respect to the Reference marker.

-The syntax for an Output request using Entities in the MDL format is explained in the example below:

Syntax:

*Output(out_name, "out_label", DISP|VEL|ACCL|FORCE, ent_name, [ref_marker])

Example:

*Output(o_disp_ent, "Displacement Entity", DISP, JOINT, j_0, Global_Frame, BOTH_MARKERS)

-Another set of MDL statements are required to define a Force output request, where a reference frame will have to be defined:

Syntax:

*Output(out_name, "out_label", FORCE, ent_name, [ref_marker])

Example:

*Output(o_force_ent, "Force Entity", FORCE, BODY, b_3, LPRF)

To understand the complete syntax of the MDL statement, please refer to the *Output() - output on entities topic (located in the MotionView MDL Reference Guide section of the HyperWorks Desktop Reference Guide).

-The syntax for creating an Output request using Tcl commands is explained in the example below:

Syntax:

mdlmodel_handle InterpretEntity new_handle keyword varname label

Example:

mdlmodel_handle InterpretEntity odvaent Output o_disp_ent "\"Displacement Entity\"" DISP JOINT j_0 Global_Frame BOTH_MARKERS;

mdlmodel_handle InterpretEntity ofent Output o_force_ent "\"Force Entity\"" FORCE BODY b_3 LPRF;

2.To create an Output Request using the Entity Set method, select Entity Set from the Output Method drop-down menu.

The figure below lists the supported entities for an Entity Set method of output request:

output_entity_set_diagram_mv

Output - Entity Set Topology Map

3.From the Entity Set drop-down menu, select the desired type of Entity Set (Bodies, Joints, Beams, Bushings, Forces, or SpringDampers).

outputs_panel_entity_set_type_mv

Output Panel – Entity Set Type

4.Click the Reference Marker collector reference_marker_collector_mv to select the desired reference marker.

The default marker is Global Frame.

Note - Using this method, outputs on all entities of a particular type can be defined using their respective markers.

-The syntax for an Output request using Entity Set in the MDL format is explained in the example below:

Syntax:

*Output(out_name, "out_label", DISP|VEL|ACCL|FORCE, BODIES|JOINTS|BEAMS|BUSHINGS|FORCES,[ref_marker])

Example:

*Output(o_disp_ent_set, "Displacement Entity Set", DISP, JOINTS, Global_Frame)

-Another set of MDL statements are required to define a Force output request, where a reference frame will have to be defined:

Syntax:

*Output(out_name, "out_label", FORCE, BODIES|JOINTS|BEAMS|BUSHINGS|FORCES, [ref_marker])

Example:

*Output(o_ent_set, "Force  Entity Set", FORCE, BEAMS, Global_Frame)

Note - A Force output using Entity Sets cannot be requested on bodies.  If the optional argument for ref_marker is not specified, a global inertial frame is used as the reference marker for specifying force components.

To understand the complete syntax of the MDL statement, please refer to the *Output() - output on entity sets topic (located in the MotionView MDL Reference Guide section of the HyperWorks Desktop Reference Guide).

-The syntax for creating an Output request using Tcl commands is explained in the example below:

Syntax:

mdlmodel_handle InterpretEntity new_handle keyword varname label

Example:

mdlmodel_handle InterpretEntity odvaset Output o_disp_ent_set "\"Displacement Entity Set\"" DISP JOINTS Global_Frame;

mdlmodel_handle InterpretEntity ofset Output o_ent_set "\"Force  Entity Set\"" FORCE BEAMS Global_Frame;

hmtoggle_plus1To specify a Force Output result type:
1.From the Result Type drop-down menu, select Force.

The Output methods applicable for the Force result type are: Entity and Entity Set.

2.To define an output request using the Entity type method, select the same from the Output Method drop-down menu.

A force output can be defined on a Body, Joint, Beam, Bushing, Force, or Spring Damper.

When the Entity type selected is Body, the Force output is calculated for every connection (Joints, Bushings, Forces, etc.) on the body.

output_entity_force_diagram_mv

Force Output – Entity Topology Map

3.From the Entity drop-down menu, select the type of entity for which a force output is to be defined.

The selected entity collector becomes active.

4.Select the particular entity.

The Ref Marker collector reference_marker_collector_mv becomes active.

5.Pick the reference frame (marker) for the output.
6.(a) For an entity other than Body, select I Marker, J Marker, or Both from the Output drop-down menu. Selecting I Marker results in defining the output for Body 1 relative to Body 2 only.  Selecting J Marker results in defining the output for Body 2 relative to Body 1 only.  Selecting Both defines both of these outputs.

OR

6.(b) For a Body entity, select General reference frame from the Reference Type drop-down menu (in order to manually select a Reference Frame for the Output).

outputs_panel_force_type_mv

Force Output - Entity Method – General Reference Frame

-Click the Ref Marker collector reference_marker_collector_mv and pick the desired marker for the Reference Marker.

OR

From the Reference Type drop-down menu, change the option to Predefined reference frame for selecting a pre-defined marker for the Output.

-Use the Predefined Marker drop-down menu to select Lprf, Global, or Local.

outputs_panel_force_entity_predefined_ref_frame_type_mv

Force Output - Entity Method – Predefined Reference Frame

Lprf

Calculates outputs with respect to the Local Part Reference Frame (or Body Center of Mass Marker) of the Body.

Global

Calculates outputs with respect to the Global Reference Frame of the Model.

Local

Calculates outputs with respect to marker of the individual connecting entity. (for example, an output on a joint connecting the body will have its marker (I or J ) as its reference frame).

To create a Force output request for all the entities of a certain type, use the Entity Set output method.

2.From the Output Method drop-down menu, select Entity Set.

Using an Entity Set, the output can be measured for all entities of a certain type that are currently present in the model.  The supported entities for this method of request are: Joint, Beam, Bushing, Force, and Spring Damper.

3.From the Entity Set drop-down menu, select the desired entity type (Bodies, Joints, Beams, Bushings, Forces, or SpringDampers).

outputs_panel_force_entity_set_type_mv

Force Output – Entity Set Method

4.Click the Ref Marker collector reference_marker_collector_mv and select a reference marker for the outputs.
hmtoggle_plus1To specify an Expression Output result type:
1.From the Result Type drop-down menu, select Expressions for creating an Expression based output request.

outputs_panel_expressions_type_mv

Outputs Panel - Properties Tab - Expressions Output Request

2.The Expression output request can have six components.  Click inside the F2: text box and enter the expression that needs to be printed to the result files.
3.The Expression Builder is a graphical tool available in MotionView for creating complex expressions.  To use the Expression Builder, select the F(x) button, fx_button, from the trio of buttons at the top of the panel, expr_bldr_icons after clicking inside the desired expression text box.

The Expression Builder provides access to all the solver function data members in the model, as well as the many math and signal processing functions available in HyperGraph.

-The syntax for an Output request using Expressions in the MDL format is explained in the example below:

Syntax:

*Output(out_name, "out_label", EXPR, expr1, expr2, expr3, expr4, expr5, expr6, [TITLE], [title1], [title2],...[title6])

Example:

*Output(o_expr, "Expression Output", EXPR, `AZ({j_balljoint.i.idstring},{j_balljoint.j.idstring})`, `TZ({b_0.cm.idstring}, {Global_Frame.idstring})`, `0`, `0`, `0`, `0`)

Note - This form of the Output statement can be used to request values of up to six solver expressions from the solver.

To understand the complete syntax of the MDL statement, please refer to the *Output() - output expressions topic (located in the MotionView MDL Reference Guide section of the HyperWorks Desktop Reference Guide).

-The syntax for creating an Output request using Tcl commands is explained in the example below:

Syntax:

mdlmodel_handle InterpretEntity new_handle keyword varname label

Example:

mdlmodel_handle InterpretEntity oexpr Output o_expr "\"Expression Output\"" EXPR "\`AZ({j_balljoint.i.idstring},{j_balljoint.j.idstring})\`" "\`TZ({b_0.cm.idstring}, {Global_Frame.idstring})\`" "\`0\`" "\`0\`" "\`0\`" "\`0\`";

hmtoggle_plus1To specify a User-Defined Output result type:

User Defined output requests are used for creating complex output requests which needs external programming.

1.Select Result Type drop-down menu, select the User Defined option.

outputs_panel_user_defined_type_mv

Outputs Panel - Properties Tab - User-Defined Output Request

2.Enter the user subroutine function expression in the in the User expr: text box.
3.Activate the Use local file and function name check box, if the use of a local subroutine file is necessary.
4.Select the subroutine file in the local system, by clicking on the Local File: folder icon .
5.From the Function Type drop-down menu, select the type of the subroutine file: DLL/SO, Python, or MATLAB.
6.Enter the function name in the Function Name: text box.

Note - The standard function name for the User-Defined output request is REQSUB.

-The syntax for an Output request using User Defined in the MDL format is explained in the example below:

Syntax:

*Output(out_name, "out_label", USER, `usr_expr`, [TITLE], [title1], [title2],... [title6])

Example:

*Output(o_udef, "User Defined Output", USER, `USER(803, {b_1.cm.idstring}, 200)`)

To understand the complete syntax of the MDL statement, please refer to the *Output() - user-defined output topic (located in the MotionView MDL Reference Guide section of the HyperWorks Desktop Reference Guide).

-The syntax for creating an Output request using Tcl commands is explained in the example below:

Syntax:

mdlmodel_handle InterpretEntity new_handle keyword varname label

Example:

mdlmodel_handle InterpretEntity oudef Output o_udef "\"User Defined Output\"" USER "\`USER(803, {b_1.cm.idstring}, 200)\`";

To understand the complete syntax of the MDL statements used for Outputs, please refer to the various *Output topics (located in the MotionView MDL Reference Guide).

Note - To learn how to create a complete model using MDL statements please refer to the MotionView tutorial MV-1060: Introduction to MDL.

hmtoggle_plus1To edit an Output Request:
1.From the Project Browser, click on the desired Output.

Note - You can use the Filter Using Toolbar and Show "Entity" Only Context-Sensitive Menu options to filter and display only the Output entities in the Project Browser.

2.From the Output panel, change the properties of the Output Request.

Creating and Editing Outputs using Tcl

In MotionView, Tcl can be used to add any MDL entities to the model.  There are two Tcl commands that can be used to add an Output:

hmtoggle_arrow1InterpretEntity

Syntax:

mdlmodel_handle InterpretEntity new_handle keyword varname label

In case of the Output the statement will look as shown below:

mdlmodel_handleInterpretEntity Output out_name “\”out_label\”” DISP|VEL|ACCL point_1 body_1 point_2 body_2 [ref_marker];

hmtoggle_arrow1InterpretSet

This command is not applicable for Outputs, as there are no set statements associated with it.

The InterpretEntity command is used to add entities to the model and the InterpretSet command is used to set the entity properties.  An Output is a request being applied onto an entity, therefore initial conditions and other properties are not applicable.  To understand the complete usage and syntax of these commands, please refer to the following HyperWorks Desktop Reference Guide/Programming with Tcl/Tk Commands topics: InterpretEntity and InterpretSet.

Note - When using the InterpretEntity and InterpretSet commands, it is important to also use the Evaluate command in order for the changes to take effect immediately.

To learn how to create a complete model using Tcl commands, please refer to tutorial MV-1040: Model Building Using Tcl.

Output in XML Format

The Output when exported to the MotionSolve XML format is defined as a Post_Request statement:

hmtoggle_plus1Post_Request

Syntax:

<Post_Request

    id                 = "integer"

    comment            = "string"

{   type               = "MARKER_DISPLACEMENT"

    i_marker_id        = "integer"

    j_marker_id        = "integer"

    ref_marker_id      = "integer"

  | type               = "MARKER_ VELOCITY"

    i_marker_id        = "integer"

    j_marker_id        = "integer"

    ref_marker_id      = "integer"

  | type               = "MARKER_ACCELERATION"

    i_marker_id        = "integer"

    j_marker_id        = "integer"

    ref_marker_id      = "integer"

  | type               = "MARKER_FORCE"

    i_marker_id        = "integer"

    j_marker_id        = "integer"

    ref_marker_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"

  | type                = "USERSUB"

    usrsub_dll_name     = "valid_path_name"

    usrsub_param_string = "USER( [[par_1][,...][,par_n]] )"

    usrsub_fnc_name     = "custom_fnc_name" >

  | type                  = "USERSUB"

    script_name         = valid_path_name

    interpreter         = "PYTHON" | "MATLAB"

    usrsub_param_string = "USER( [[par_1 [, ...][,par_n]] )"

    usrsub_fnc_name     = "custom_fnc_name" >

}

/>

An example of such a statement is shown below:

<Post_Request

   id                  = "70000012"

   comment             = "Expression Output"

   type                = "EXPRESSION"

   expr1               = "NULL"

   expr2               = "AZ(30102020,30101020)"

   expr3               = "TZ(30102400,30101010)"

   expr4               = "NULL"

   expr5               = "NULL"

   expr6               = "NULL"

   expr7               = "NULL"

   expr8               = "NULL"

/>

Example Model

The following example shows the various Output types that are used in MotionView:

hmtoggle_plus1Outputs.mdl

*BeginMDL( the_model, "Model", "12.0.0.71" )

 

 *StandardInclude(FILE)

 *SetCurrentSolverMode(MotionSolve)

 *Point( p_a, "Point A" )

 *Point( p_b, "Point B" )

 *SetPoint( p_b,                        20.0, 0.0, 0.0 )

 *Body( b_a, "Body A", p_a, , , ,  )

 *Body( b_b, "Body B", p_b, , , ,  )

 *Set( b_a.usecm, true )

 *Set( b_b.usecm, true )

 *Marker( m_A, "Marker_A", b_a, p_a )

 *Marker( m_B, "Marker_b", b_b, p_b )

 

#An example for Output request using Two Point.

 *Output( o_two_points, "Output_TwoPoints", DISP, p_a, b_a, p_b, b_b, Global_Frame, BOTH_MARKERS )

 

#An example for Output request using an Entity.

 *Output( o_entity, "Output_Entity", DISP, BODY, b_a, Global_Frame, BOTH_MARKERS )

 

#An example for Output request using an Entity Set.

 *Output( o_entity_set, "Output_EntitySet", DISP, BODIES, Global_Frame )

 

#An example for Output request for a Force.

 *Output( o_force, "Output_Force", FORCE, BODY, b_a, Global_Frame, BOTH_MARKERS )

 

#An example for Output request using Expressions.

 *Output( o_expr, "Output_Expressions", EXPR, `DX({m_A.idstring},{m_B.idstring},{m_B.idstring}]`, `DY({m_A.idstring},{m_B.idstring},{m_B.idstring}]`, `DZ({m_A.idstring},{m_B.idstring},{m_B.idstring}]`, `0`, `0`, `0` )

*EndMDL()

See Also:

Outputs Panel

Adding and Removing Entities

*Output() - output expressions (MDL Model Statement)

*Output() - output on entities (MDL Model Statement)

*Output() - output on entity sets (MDL Model Statement)

*Output() - output on two points (MDL Model Statement)

*Output() - user-defined output (MDL Model Statement)

Post_Request (MotionSolve XML Format Model Statement)

mdlIObject InterpretEntity (Tcl Command)

mdlIObject InterpretSet (Tcl Command)