Altair MotionView 11.0 Tutorials

Altair MotionView 11.0 Tutorials
A Platform for Innovation
MotionView 11.0
Tutorials
HyperWorks is a division of
TM
Altair Engineering Contact Information
Web site
www.altair.com
FTP site
Address: ftp.altair.com or ftp2.altair.com or http://ftp.altair.com/ftp
Login: ftp
Password: <your e-mail address>
Location
Telephone
e-mail
North America
248.614.2425
[email protected]
China
86.21.6117.1666
[email protected]
France
33.1.4133.0992
[email protected]
Germany
49.7031.6208.22
[email protected]
India
91.80.6629.4500
1800.425.0234 (toll
free)
[email protected]
Italy
39.800.905.595
[email protected]
Japan
81.3.5396.2881
[email protected]
Korea
82.31.716.4321
[email protected]
Scandinavia
46.46.286.2052
[email protected]
United Kingdom
44.1926.468.600
[email protected]
Brazil
55.11.3884.0414
[email protected]
Australia
64.9.413.7981
[email protected]
New Zealand
64.9.413.7981
[email protected]
The following countries have distributors for Altair Engineering:
Asia Pacific: Indonesia, Malaysia, Singapore, Taiwan, Thailand
Europe: Czech Republic, Hungary, Poland, Romania, Spain, Turkey.
© 2011 Altair Engineering, Inc. All rights reserved. No part of this publication may be reproduced, transmitted,
transcribed, stored in a retrieval system, or translated to another language without the written permission of Altair
Engineering, Inc. To obtain this permission, write to the attention Altair Engineering legal department at: 1820 E. Big
Beaver, Troy, Michigan, USA, or call +1-248-614-2400.
®
HyperWorks 11.0 Release Notes
Trademark and Registered Trademark Acknowledgments
Listed below are Altair® HyperWorks® applications. Copyright© Altair Engineering Inc., All Rights Reserved for:
HyperMesh® 1990-2011; HyperView® 1999-2011; OptiStruct® 1996-2011; RADIOSS® 1986-2011; HyperCrash™
®
®
®
®
2001-2011; HyperStudy 1999-2011; HyperGraph 1995-2011; MotionView 1993-2011; MotionSolve 2002-2011;
®
®
TextView™ 1996-2011; MediaView™ 1999-2011; HyperForm 1998-2011; HyperXtrude 1999-2011; HyperView
Player® 2001-2009; Process Manager™ 2003-2009; Data Manager™ 2005-2009; Assembler™ 2005-2009;
FEModel™ 2004-2011; BatchMesher™ 2003-2011; Templex™ 1990-2011; Manufacturing Solutions™ 2005-2011;
HyperDieDynamics™ 2007-2011; HyperMath™ 2007-2011; ScriptView™ 2007-2011.
In addition to HyperWorks® trademarks noted above, GridWorks™, PBS™ Gridworks®, PBS™ Professional®,
PBS™ and Portable Batch System® are trademarks of ALTAIR ENGINEERING INC., as is patent # 6,859,792. All
are protected under U.S. and international laws and treaties. All other marks are the property of their respective
owners.
Portions of the FLEXnet® documentation in this installation manual are reproduced with permission of
Acresso Corporation.
MotionView Tutorials
Introduction
...................................................................................................................................................4
MV-100: Introduction
to the MotionView Environment
...............................................................................................................................................................................................5
Interactive
...................................................................................................................................................12
MV-1000:...............................................................................................................................................................................................13
Interactive Model Building and Simulation
MV-1010:...............................................................................................................................................................................................32
Contact Simulation using MotionSolve
MV-1011:...............................................................................................................................................................................................37
Extension and Retraction Analysis of the Main Landing Gear of an Aircraft
MV-1024:...............................................................................................................................................................................................46
Using User Subroutines in MotionSolve Models
MV-1025:...............................................................................................................................................................................................53
Modeling Point-to-Curve (PTCV) Higher-Pair Constraint
MV-1026:...............................................................................................................................................................................................69
Modeling Curve-to-Curve (CVCV) Higher-Pair Constraint
MV-1027:...............................................................................................................................................................................................87
Modeling Point-to-Deformable-Curve (PTdCV) Higher-Pair Constraint
MV-1028:...............................................................................................................................................................................................96
Modeling Point-to-Deformable-Surface (PTdSF) Higher-Pair Constraint
MV-1029:
Modeling Point-to-Deformable-Surface Force (PTdSF) Higher-Pair Constraint
...............................................................................................................................................................................................104
Automated
...................................................................................................................................................112
MV-1030:
Model Building and Simulation using Wizards
...............................................................................................................................................................................................113
MV-1035:
Importing CAD or FE into MotionView
...............................................................................................................................................................................................129
MV-1040:
Model Building using Tcl
...............................................................................................................................................................................................138
MV-1050:
Automation Using TCL
...............................................................................................................................................................................................147
MV-1051:
Understanding Sequential Simulation
...............................................................................................................................................................................................150
Model
Definition Language
...................................................................................................................................................157
MV-1060:
Introduction to MDL
...............................................................................................................................................................................................158
MV-1070:
Creating a Simple Pendulum System using MDL
...............................................................................................................................................................................................170
MV-1080:
Creating an Analysis using MDL
...............................................................................................................................................................................................184
MV-1090:
Creating a Dataset using MDL
...............................................................................................................................................................................................191
Flexible
Body Modeling and Simulation using MotionView and MotionSolve
...................................................................................................................................................195
MV-2000:
Introduction to Flexible Bodies
...............................................................................................................................................................................................196
MV-2010:
Flexbody Generation using Flex Prep and Radioss
...............................................................................................................................................................................................200
MV-2020:
Use of Flexbody in MBD Models
...............................................................................................................................................................................................217
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
i
MV-2021:
Simulating an Automotive Door Closure Event
...............................................................................................................................................................................................226
MV-2035:
Solving Flexbody ADM/ACF in MotionSolve
...............................................................................................................................................................................................235
Optimization-DOE-Stochastics
...................................................................................................................................................240
MV-3000:
DOE using MotionView - HyperStudy
...............................................................................................................................................................................................241
MV-3010:
Optimization using MotionView - HyperStudy
...............................................................................................................................................................................................254
Durability
- Fatigue
...................................................................................................................................................260
MV-3030:
Load Export
...............................................................................................................................................................................................261
MV-3040:
Durability and Fatigue Tools
...............................................................................................................................................................................................267
Working
with External Codes
...................................................................................................................................................275
MV-4000:
Eigen Analysis using ADAMS/Linear
...............................................................................................................................................................................................276
MV-4010:
Working with ADAMS
...............................................................................................................................................................................................281
MV-4020:
Solver Neutral Modeling
...............................................................................................................................................................................................285
MV-4030:
Flexible Bodies for MotionView with Abaqus
...............................................................................................................................................................................................289
Animation
...................................................................................................................................................296
MV-5000:
Rigid body Animation - Basic
...............................................................................................................................................................................................297
MV-5010:
Rigid body Animation - Advanced
...............................................................................................................................................................................................302
Plotting
...................................................................................................................................................307
MV-6000:
Plotting Basics
...............................................................................................................................................................................................308
Advanced
Simulation
...................................................................................................................................................313
MV-7000:
Modeling Differential Equations Using MotionView and MotionSolve
...............................................................................................................................................................................................314
MV-7001:
Building User Subroutines in Altair MotionSolve
...............................................................................................................................................................................................321
MV-7002:
Co-simulation with Simulink
...............................................................................................................................................................................................332
MV-7003: Simulating a Single Input Single Output (SISO) Control System Using MotionView and
MotionSolve
...............................................................................................................................................................................................345
MV-7004:
Inverted Pendulum Control Using MotionSolve and MATLAB
...............................................................................................................................................................................................349
MV-7005:
Linking Matlab/Simulink Generated Code with MotionSolve
...............................................................................................................................................................................................356
MV-7006:
Python UserSub for MotionSolve
...............................................................................................................................................................................................363
ii
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MotionView
File Location
All files referenced in the MotionView tutorials are located in the HyperWorks
installation directory under <install_directory>/tutorials/mv_hv_hg/.
To locate the HyperWorks installation directory, <install_directory>, use the
following approach:
With the Plot window mode selected, from the menu bar, click Tools and select
Readers, Writers, and Functions. The Import Templates tab displays the path to
the templates. The <install_directory> is the portion of the path preceding the
templates/ directory.
If you need more help finding the installation directory, see Finding the Installation
Directory <install_ directory> or contact your systems administrator.
Finding the Installation Directory <install_directory>
Most tutorials use files that are located in the tutorials/ directory of the software installation. In the tutorials, file
paths are referenced as <install_directory>/../. In order to locate the files needed, you will need to
determine the path of the installation directory <install_directory>. This path is dependent on the installation
that was performed at your site.
To determine what this path is, follow these instructions:
1.
Launch the application.
2.
From the Help menu, select Updates.
The HyperWorks Update Information dialog opens. The installation directory path appears after Altair Home:.
The MotionView tutorial model files are located in <install_directory>/tutorials/mv_hv_hg.
Introduction
MV-100: Introduction to the MotionView Environment
Interactive
MV-1000: Interactive Model Building and Simulation
MV-1010: Contact Simulation using MotionSolve
MV-1011: Extension and Retraction Analysis of the Main Landing Gear of an Aircraft
MV-1023: Using Python Subroutines in MotionView Model Building
MV-1024: Using User Subroutines in MotionSolve Models
MV-1025: Modeling Point-to-Curve (PTCV) higher-pair constrain
MV-1026: odeling Curve-to-Curve using Templates
MV-1027: Modeling Point-to-Deformable-Curve (PTDCV) Higher-Pair Constraint
MV-1028: Modeling Point-to-Deformable-Surface (PTdSV) Higher-Pair Constraint
MV-1029: Modeling Point-to-Deformable-Surface Force (PTdSFforce) Higher-Pair Constraint
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
1
Automated
MV-1030: Model Building and Simulation using Wizards
MV-1035: Importing CAD or FE into MotionView
MV-1040: Model Building using TCL
MV-1050: Automation Using TCL
MV-1051: Understanding Sequential Simulation
Model Definition Language
MV-1060: Introduction to MDL
MV-1070: Creating a Simple Pendulum System using MDL
MV-1080: Creating an Analysis using MDL
MV-1090: Creating a Dataset using MDL
Flexible Body Modeling and Simulation using MotionView and MotionSolve
MV-2000: Introduction to Flexible Bodies
MV-2010: Flexbody Generation using Flexprep and Optistruct
MV-2020: Use of Flexbody in MBD Models
MV-2021: Simulating an Automotive Door Closure Event
MV-2035: Solving Flexbody ADM/ACF in MotionSolve
Optimization-DOE-Stochastics
MV-3000: DOE using MotionView - HyperStudy
MV-3010: Optimization using MotionView - HyperStudy
Durability – Fatigue
MV-3030: Load Export
MV-3040: Durability and Fatigue Tools
Working with External Codes
MV-4000: Eigen Analysis using ADAMS/Linear
MV-4010: Working with ADAMS
MV-4020: Solver Neutral Modeling
MV-4030: Flexible Bodies for MotionView with Abaqus
2
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Animation
MV-5000: Rigid body Animation - Basic
MV-5010: Rigid body Animation - Advanced
Plotting
MV-6000: Plotting Basics
Advanced Simulation
MV-7000: Modeling Differential Equations Using MotionView and MotionSolve
MV-7001: Building User Subroutines in Altair MotionSolve
MV-7002: Co-simulation with Simulink
MV-7003: Simulating a Single Input Single Output (SISO) Control System Using MotionView and MotionSolve
MV-7004: Inverted Pendulum Control Using MotionSolve and MATLAB
MV-7005: Linking Matlab/Simulink Generated Code with MotionSolve
MV-7006: Python UserSub for MotionSolve
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
3
Introduction
MotionView is one of the applications within HyperWorks Desktop. The following tutorials will introduce you to model
building for multi-body applications using MotionView.
It is recommended that you complete the HWD-0010: HyperWorks Desktop Environment tutorial (in order to familiarize
yourself with the HyperWorks Desktop graphical user interface) prior to going through the exercises in these tutorials.
MV-100: Introduction to the MotionView Environment
4
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-100: Introduction to the MotionView Environment
This tutorial contains an introduction to:
The MotionView Graphical User Interface Features
Loading and Saving MotionView Files
Selecting and Editing an Entity
Using the Mouse Graphic Controls and View Controls
Changing the Window Layout and Application
MotionView allows you to create and set up an analysis for MultiBody Systems, while the remaining applications
provide an interactive and easy to use environment for the visualization, plotting, study, analysis, and presentation of
engineering result data obtained from Multi Body Dynamics (MBD) (such as MotionSolve) or Finite Element Analysis
(FEA) solvers (such as RADIOSS).
The following table summarizes different file types in HyperWorks Desktop and the location where the file can be
loaded and saved.
File Type
Extension
Window Mode
Load From
Save From
Session script
.mvw
Any
Menu bar
Menu bar
Report template
.tpl
Any
Toolbar
Menu bar
MDL
.mdl
MotionView
Toolbar
Toolbar
Animation
.gra, .res, h3d, .flx, .mrf HyperView
Toolbar
Toolbar
Plot
.req, .mrf, .abf, .plt,
.res (ADAMS)
HyperGraph
Toolbar
n/a
Templex script,
any text file
.tpl
TextView
Toolbar
Toolbar
Options for loading and saving different file types
Step 1: Loading and Saving MDL Model Files.
Note
1.
MotionView model files may only be opened in the MotionView application of HyperWorks Desktop. An
attempt to open a model file in the animation or plot window will generate an error message.
Start MotionView:
In Windows - go through the Start Menu (Start Menu > Programs > Altair HyperWorks installation).
Or
In Linux - invoke ~hw_install/altair/scripts/mview in an "open terminal" (where ~hw_install is
the location where HyperWorks is installed).
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
5
2.
Click the Open Model icon,
, on the Standard toolbar.
Or
From the File menu select Open > Model.
3.
From the Open Model dialog, locate and select the model definition file soliton.mdl, located in
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\introductory\.
4.
Click Open.
5.
From the File menu, select Save As > Model.
The Save As Model dialog is displayed.
Note
You can also click the Save Model icon,
, on the Standard toolbar to the save the file in working
directory with the existing name. If the model is new, you will be prompted to input the name of the
model.
6.
Browse to your working directory and specify the File name: as model.mdl.
7.
Click Save.
6
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 2: Using the Project Browser.
1.
Expand the Pendulum model folder.
2.
View the contents of the blue Pendulum folder.
The Pendulum folder is further divided into sub-folders that contain information about all the entities used in
creating the pendulum model. The yellow folders denote entities such as points, bodies, joints, etc. The blue
folders denote systems.
3.
Expand the Points folder under Pendulum.
There are three points, Global Origin, Pivot Point and CM Point.
4.
Click Pivot Point.
The Points panel is displayed below the toolbar.
Pivot Point is highlighted in the Points list tree and its coordinates are displayed in the panel.
5.
In the MotionView application window, the Pivot Point is highlighted with a circle around it.
By default, MotionView displays all points in your model by yellow spheres. It also identifies the point by its label
when the left mouse button is held while the mouse pointer is placed on the point. Furthermore, releasing the
mouse at that point takes you to that particular point panel as shown in the figure below.
Pendulum file
6.
Expand the Bodies folder within the Project Browser.
The Ground Body and Pendulum Body are displayed.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
7
7.
Click Pendulum Body.
The Bodies panel displays.
The Pendulum body properties displays on the Properties tab.
8.
Click each system sub-folder within the Pendulum folder to view its contents.
Step 3: Selecting and Editing an Entity.
You can also use the toolbar and context menu methods to select entities in the graphics area, in order to view and
edit their properties.
1. Click the Bodies icon
on the Model-Reference toolbar.
2. Click on the first Link body on the model (in the graphics area).
The Bodies panel is displayed with the Link body properties displayed on the Properties tab.
8
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
Enter the following values for mass and inertia:
Mass = 1
Ixx = 500
Iyy = 1000
Izz = 1000
Ixy, Ixz, Iyz = 0
4.
Right-click on the top of the first Link body (in the graphics area) and choose Joint > Select from the context
menu.
The corresponding Joint is highlighted in the browser, the Joints icon is selected on the toolbar, and the Joints
panel is automatically displayed.
Step 4: Using the Mouse Graphic Controls and View Controls.
You can use the mouse graphic controls and the various view controls to rotate, zoom, and pan models in the
graphics area:
1.
Rotate the model by pressing the Ctrl key on the keyboard and clicking and moving the left mouse button.
2.
Pan/move the model by pressing the Ctrl key on the keyboard and clicking and moving the right mouse button.
3.
Zoom into an area of the model by pressing the Ctrl key on the keyboard and clicking and moving the middle
mouse button/scroll wheel.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
9
4.
You can also use the 3D View Controls to zoom into an area of the model. Click the Zoom In/Out icon
zoom in and out. Clicking the left mouse button zooms in and clicking the right mouse button zooms out.
5.
Change the zoom factor by clicking on the Tools menu and selecting Options.
, to
The Options dialog is displayed.
6.
Click the Visualization option on the tree (located on the left side of the dialog).
7.
Change the Zoom factor from its default value of 1.2 degrees to 3.0 degrees by changing the value in the text
box.
8.
Click OK to close the dialog.
9.
Click the Zoom In/Out icon again, and observe the difference in the zoom factor.
10. Use the Fit Model/All Frames button
on the Standard Views toolbar to fit the model to the window.
11. Click the Rotate Left/Right
and Rotate Up/Down
icons on the 3D View Controls toolbar, to rotate the
model about the horizontal and vertical axis, respectively. The left and right mouse buttons are used to control the
direction.
12. Click the Rotate Clockwise/Counter Clockwise icon
, to rotate the model about the axis perpendicular to the
plane of the screen. Clicking the left mouse button rotates the model clockwise, while clicking the right mouse
button rotates the model counter-clockwise.
13. Click the Isometric View icon
10
on the Standard Views toolbar to view the model in the isometric view.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 5: Change the Window Layout and the Application.
1.
Click the arrow next to the Page Window Layout button
window layout.
2.
Click on the new window to activate it.
3.
From the Select application menu, select HyperView
MotionView to HyperView.
on the Page Controls toolbar, and select the two
to change the window type for window 2 from
The toolbar changes to reflect the animation window mode.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
11
Interactive
MV-1000: Interactive Model Building and Simulation
MV-1010: Contact Simulation using MotionSolve
MV-1011: Extension and Retraction Analysis of the Main Landing Gear of an Aircraft
MV-1023: Using Python Subroutines in MotionView Model Building
MV-1024: Using User Subroutines in MotionSolve Models
MV-1025: Modeling Point-to-Curve (PTCV) higher-pair constrain
MV-1026: odeling Curve-to-Curve using Templates
MV-1027: Modeling Point-to-Deformable-Curve (PTDCV) Higher-Pair Constraint
MV-1028: Modeling Point-to-Deformable-Surface (PTdSV) Higher-Pair Constraint
MV-1029: Modeling Point-to-Deformable-Surface Force (PTdSFforce) Higher-Pair Constraint
12
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1000: Interactive Model Building and Simulation
In this tutorial, you will learn how to:
Create a model of a four-bar trunk lid mechanism
Attach an H3D graphic object to a model
Perform a kinematics analysis on the model using MotionSolve
Post-process the MotionSolve results in the animation and plot windows
A MotionView model can be built in the following three ways:
1.
Interactive
2.
Automated
3.
a.
Using modeling wizards and libraries
b.
Using tools to convert HyperMesh or CAD models to MotionView models
Model Definition Language (MDL)
Tools
The trunk lid mechanism:
Figure 1: Four-bar mechanism attached to the trunk lid
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
13
A closer view of the mechanism:
Closer view of the four-bar mechanism
Creating a Four-Bar Mechanism Model
Schematic diagram of the four-bar mechanism
Following are the entities needed to build this model:
Points
Bodies
Constraints (Joints)
Graphics
Input (Motion or Force)
Output
14
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
The table below lists the coordinates of points needed for this model. Points I, Locator Point 2 and Locator Point 3 are
used to position the trunk-lid H3D object.
Point
Location
Label
Variable
X
Y
Z
Point A
p_a
921
580
1124
Point B
p_b
918
580
1114
Point C
p_c
915
580
1104
Point D
p_d
896
580
1106
Point E
p_e
878
580
1108
Point F
p_f
878
580
1118
Point G
p_g
830
580
1080
Point H
p_h
790
580
1088
Point I
p_i
825
580
1109
Coordinate points
Copy the following files (motion_curve.csv, createPoints.tcl, point_data.csv, trunk.hm,and
trunklid.hm) from the
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\interactive to the <working
directory>.
Exercise
Step 1: Creating points.
1.
Start a new MotionView Session
2.
Add a point using one of the following methods:
From the Project Browser, right-click on Model and select Add Reference Entity > Point from the context
menu.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
15
OR
From the Project Browser, right-click on Points and select Add Point from the context menu.
OR
Right-click on the Points icon,
, on the Model-Reference toolbar.
Note
A PointPair is used to create two symmetric points (left and right) with the Global Y-axis as the axis
of symmetry.
3.
For Label, enter Point A.
4.
For Variable, enter p_A.
The label allows you to identify an entity in the GUI, while the variable name is used by MotionView to uniquely
identify an entity.
When using the Add Point or PointPair dialog, you can use the label and variable defaults. However for this
exercise, please follow the naming convention described in steps 3 and 4.
16
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
5.
Click OK.
The Points panel is displayed. Point A is highlighted in the Point's list.
6.
Type the values for X, Y, and Z, coordinates for point A, listed in the table above.
7.
Repeat steps 2 through 6 to create points B through I. Remember to substitute B, C, etc., for A when entering the
label and variable names in the Add Point or PointPair dialog.
Note
Clicking the Apply button can add all the points at once. The Data Summary... shows the table of points
and you can enter all the coordinates in this table.
Since the Y value of all the points are the same, you can parameterize the value by: selecting the Y coordinate
field, clicking on the fx button to invoke the Expression Builder, and then selecting the Y value of Point A as
shown in figure below:
Expression Builder
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
17
Note
The points listed in the table on the previous page can also be created using the tcl script
createPoints.tcl located in
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\Interactive.
Use the following steps to create the points.
Using a tcl script to read point data from an Excel sheet:
Start a new MotionView Session.
On the View menu, select Command Window…
Type source <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\Interactive createPoints.tcl at the
prompt and press ENTER.
Select the file <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\Interactive point_data.csv.
8.
Change the view to left, by clicking on the XZ Left Plane View icon
on the Standard Views toolbar.
Step 2: Creating Bodies.
The mechanism consists of four rigid-body links: ground, input, coupler, and follower. By default, MotionView
creates the ground body when you begin creating a new model in the MBD model window. In this step, you'll create
the input, coupler, and follower rigid-body links in the mechanism.
1.
From the Project Browser, right-click on Bodies and select Add Body from the context menu.
OR
Right-click on the Bodies icon,
on the Model-Reference toolbar.
The Add Body or BodyPair dialog is displayed.
2.
Specify the label as Input Link and accept the default variable name.
3.
Click OK.
The Bodies panel is displayed. The new body that you just added is highlighted in the model tree.
4.
Click the Properties tab.
5.
Enter the following values for mass and inertia:
Mass = 1
Ixx, Iyy, Izz = 1000, Ixy, Ixz, Iyz = 0
Click the CM Coordinates tab to specify the location of the center of mass of the body.
6.
Select the Use center of mass coordinate system check box.
7.
Under the Origin button, click Point.
A light blue border appears around the button.
18
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
8.
From the MBD model window, select point G on the model by using the mouse. Keep the left mouse button
pressed and move the cursor over the points to see the label. Release the mouse button when point G is located.
OR
Click Point again to launch the Select a Point or PointPair dialog.
Select point G from the model tree.
Click OK.
MotionView now uses point G as the origin of the center of mass marker for the input link.
Note
9.
The two above-mentioned methods for selecting a point can be applied to other entities, such as: body,
joint, etc. You can use either of these methods. For selecting the Ground Body or the Global Origin, you
can click on the triad representing the Global Coordinate System on the screen.
Use the orient two axes orientation scheme (the default).
Repeat steps 1 through 8 to create the two remaining links. Label them as Follower and Coupler. Specify the
mass and inertia for these links as:
Mass = 1
Ixx, Iyy, Izz = 1000, Ixy, Ixz, Iyz = 0
10. Specify points B and D as the origin of the center of mass marker for the Follower and Coupler, respectively.
Step 3: Create revolute joints.
The mechanism consists of revolute joints at the four points: A, C, E, and F. The axis of revolution is parallel to the
global Y axis.
1.
From the Project Browser, right-click on Model and select Add Constraint > Joint from the context menu.
OR
Click the Joints icon,
, on the Model-Constraint toolbar.
The Add Joint or JointPair dialog is displayed.
2.
Specify a label and variable name for the new joint, or simply accept the defaults.
3.
Under Type, select Revolute Joint from the drop-down menu.
4.
Click OK.
The Joints panel is displayed. The new joint you added is highlighted in the model tree.
5.
Under the Connectivity tab, click Body 1.
A light blue border appears around the button.
6.
Click in the graphic window. With the left mouse button pressed move the cursor to the global XYZ triad.
7.
Release the left mouse button when Ground Body is displayed in the graphic window.
Notice that in the Bodies panel the Ground Body is selected for Body 1 and the light blue border moves to Body
2.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
19
8.
Click Body 2.
The Select a Body dialog is displayed.
9.
From the model tree, select Bodies from the left-hand column.
10. Select Follower from the right-hand column.
11. Click OK to return to the Connectivity tab.
Note
You can also select the Follower body from the graphic window (step 8 and step 9 above)
12. Under Origin, click Point twice.
The Select a Point dialog is displayed.
13. Select point A as the joint origin.
14. Click OK.
15. To specify an axis of rotation, under Alignment Axis, click the downward pointing arrow next to Point and select
Vector.
16. Specify the Global Y axis vector as the axis of rotation of the revolute joint.
17. Repeat steps 1 through 16 to create the three remaining revolute joints: points C, E, and F.
Revolute Joint Label
Body 1
Body 2
Point
Vector
Ground-Follower
Ground
Follower
A
Global Y
Follower-Coupler
Follower
Coupler
C
Global Y
Coupler-Input
Coupler
Input Link
E
Global Y
Input-Ground
Input Link
Ground
F
Global Y
Revolute joint information
Step 4: Specify a motion for the mechanism.
The Input for this model will be in the form of a Motion. Motion can be specified as Linear, Expression or Curve. In
this step, a curve will used to specify Motion.
1.
From the Project Browser, right-click on Model and select Add Reference Entity > Curve from the context
menu.
OR
Right-click on the Curves icon,
on the Model-Reference toolbar.
The Add Curve dialog appears.
2.
20
Specify a label and variable name for the new curve, or simply accept the defaults.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
Click OK.
The Curves panel is displayed. The new curve is highlighted in the model tree.
4.
With 2D Cartesian option and x radio-button selected, click the file browser icon,
.
The Select a file dialog is displayed.
5.
Open the file motion_curve.csv located in <working directory>.
6.
Leave Type as Unknown, Request as Block 1 and Component as Column 1.
7.
Click the y radio-button and select file as motion_curve.csv.
8.
Leave Type as Unknown and Request as Block 1. Under Component, select Column 2.
9.
Click on the Show Curve… button to preview the curve.
10. From the Project Browser, right-click Model and select Add Constraint > Motions from the context menu.
OR
Right-click on the Motions icon,
on the Model-Constraint toolbar.
The Add Motion or MotionPair dialog appears.
11. Specify a label and variable name for the new motion, or simply accept the defaults.
12. Click OK.
The Motions panel is displayed. The new motion is highlighted in the model tree.
Note
This method of using a curve to specify Motion can be used for specifying properties of other entities like
Force, Spring Damper, Bushing, etc.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
21
13. From the Connectivity tab, click Joint twice.
The Select a Joint dialog is displayed.
14. From the model tree, select the revolute joint at point F that you created in the previous exercise.
15. From the Properties tab, select Curve by clicking on the downward arrow next to Linear.
16. Click the Curve button twice.
The Select a Curve dialog is displayed.
17. From the model tree, select the curve that you created earlier in this exercise. Click OK.
Step 5: Create outputs.
You can create outputs using bodies, points and markers. You can also directly request force, bushing, and springdamper entity outputs. Another way to create outputs is to create math expressions dependent on any of the above
mentioned entities.
In this step, you will:
Add a displacement output between two bodies using the default entities.
Add another output to record the displacement of a particular point G on the input link relative to the global
frame based on Expressions.
1.
From the Project Browser, right-click on Model and select Add General MDL Entity > Output from the context
menu.
OR
Right-click on the Outputs icon,
on the Model-Constraint toolbar.
The Add an Output dialog is displayed.
2.
Specify a label and variable name for the new output, or simply accept the defaults.
3.
Click OK.
4.
To create a Displacement output between two points on two bodies:
For Body 1 and Body 2, select Input Link and Ground Body, respectively.
For Pt on Body 1 and Pt on Body 2, select point I and the Global Origin point, respectively.
Record the displacement on Both points, one relative to the other.
5.
Add one more output (accept the default label and variable name) to to calculate the X displacement between the
markers at the global origin and the CM point of input link:
From the drop-down menu, select Expressions.
First click in the F2 field. This activates the
Click on the
22
button.
button.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
The Expression Builder dialog is displayed:
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
23
From the Motion tab, select DX.
Place the cursor inside the brackets after DX.
From the Properties tab, expand the following trees: Bodies/Ground Body/CM.
Select idstring.
Click Apply.
Add a comma to separate the next expression.
Session brow ser
6.
From the Properties tab, expand the following trees: Bodies/Input/CM.
7.
Select idstring.
8.
Click Apply.
9.
Edit the expression in the window to match the expression below:
`DX({MODEL.B_Ground.cm.idstring},{MODEL.b_0.cm.idstring})`
10. Click OK.
Note
The b_0 in the above expression is the variable name of the input link. If your input link has a different
variable name then that should be used in the above expression instead of b_0. The back quotes in the
expression are used so that the MDL math parser evaluates the expression.
11. To check for errors, go to the Tools menu and select Check Model.
Any errors in your model topology are listed in the Message Log.
24
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 6: Add graphic primitives.
MotionView graphics can be broadly categorized into three types: implicit, explicit, and external graphics.
Implicit Graphics - The small icons that you see in the MotionView interface when you create entities like
points, bodies, joints, etc. are called implicit graphics. These are provided only for guidance during the model
building process and are not visible when animating simulations.
Primitive Graphics - These graphics help in better visualization of the model and are also visible in the
animation. The various types of Primitive Graphics in MotionView are Cylinder, Box, Sphere, etc.
External Graphics – One can import in various CAD formats or Hypermesh files into MotionView. The ‘
Import CAD or FE..’ utility in MotionView can be used to convert a CAD model or a Hypermesh model to
h3d graphic format which can be imported into MotionView. One can also import .g, ADAMS View .shl and
wavefront .obj files directly into MotionView.
MotionView allows you to turn on and off implicit graphics for some of the commonly used modeling entities.
1.
To turn on all implicit graphics:
From the Model main menu, select Implicit Graphics...
Turn on the Visible check box.
Click Close.
The state of the implicit graphics (whether on or off) is not saved in your model (.mdl) or session (.mvw) files.
MotionView uses its default settings when:
You create a new model in another model window.
You start a new session.
You load an existing .mdl/.mvw file into a new MotionView session.
To visualize the four-bar mechanism, you need to add explicit graphics to the model. In this exercise, you'll
add cylinder graphics between points A and C.
To add explicit graphics to your model:
From the Project Browser, right click on Model and select Add Reference Entity > Graphic from the
context menu.
OR
Right-click on the Graphics panel icon,
, on the Model-Reference toolbar.
The Add Graphic or GraphicPair dialog is displayed.
2.
In the Add Graphic or GraphicPair dialog, enter a label and variable name, or simply accept the defaults.
3.
From the Type drop-down menu, select Cylinder. Click OK.
4.
In the Connectivity tab, double click the Body button below Parent. Select the Follower from the Select a Body
list. Click OK. This assigns the graphics to the parent body.
5.
To select the origin point of the cylinder, click Point below Origin.
A light blue border surrounds the Point button.
6.
Pick point A.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
25
7.
Click Point under Direction.
8.
Repeat step 7, but select Point C for Point.
9.
In the Properties tab, enter 2 in the Radius 1: field.
10. For the remaining bodies in your model, follow steps 2 through 9 to create the appropriate explicit graphics for
other links.
Graphic type
Body
Origin
Direction
Radius
Cylinder
Follower
Point A
Point C
2
Cylinder
Coupler
Point C
Point E
2
Cylinder
Input Link
Point F
Point E
2
Cylinder
Input Link
Point E
Point G
2
Cylinder
Input Link
Point G
Point H
2
Cylinder
Input Link
Point H
Point I
2
Step 7: Add external graphics and convert a HyperMesh file to an H3D file.
MotionView has a conversion utility that allows you to generate detailed graphics for an MDL model using HyperMesh,
Catia, IGES, STL, VDAFS, ProE, or Unigraphics source files. MotionView uses HyperMesh to perform the
conversion.
In this step, you will use this conversion utility to convert a HyperMesh file of a car trunk lid into the H3D format. You
will also use locator points to position and orient the H3D object when it is attached to the MotionView model.
locator points
1.
Three tags in the coordinate system of the geometry file that are stored in
the H3D graphics file. When attaching the H3D object to a part in the
MotionView model, these three points can be matched with three model
points to auto-position, auto-orient, and auto-scale the H3D object file. For
HyperMesh files, node IDs can be used in place of locator point
coordinates.
From the Tools menu, select Import CAD or FE….
The Import CAD or FE dialog is displayed.
2.
Activate the Import CAD or Finite Element Model Only radio button.
3.
From the Input File option drop-down menu, select HyperMesh.
4.
Click the browser button next to Input File and select trunklid.hm, located in <working directory>, as
your input file.
5.
Click the file browser button next to Output File and specify a name for the output H3D files as trunklid.h3d
under <working directory>.
26
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
Click the expand/reduce icon
display the available options.
located next to Locator Points (Must be in source reference frame) to
7.
Activate the Node Ids radio button, and enter node numbers 1, 2,and 3 into the text fields for Node 1, Node 2,
and Node 3 respectively.
8.
Click OK to begin the import process.
The Import CAD or FE utility runs HyperMesh in the background to translate the HyperMesh file into an H3D file.
9.
Click OK when the Import was a Success! Please make sure to refer to the message log for unit conversion
information message is displayed.
10. Use steps 1 through 8 to convert the trunk.hm file to trunk.h3d.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
27
Step 8: Attach a trunk lid H3D object to the input link.
In this step, you will attach the trunk lid h3d object to the input link in the MBD model window.
1.
2.
Create three new points (using the information in the table below) by right-clicking on Points (in the Project
Browser) and select Add Point from the context menu.
Point Name
X
Y
Z
Node 1
365
497
766
Node 2
362
-436
773
Node 3
749
10
1144
Click the Graphics icon on the toolbar.
The Graphics panel is displayed.
3.
Select g_ - from Project Browser.
4.
In the Connectivity tab, double click the Body button under Parent. Select the Follower from the Select a Body
list. Click OK.
5.
Go to the Location Tab. You can Position, Orient and Scale your H3D object using the fields in this tab.
You will now match the locator points on the H3D object with the corresponding points from the MotionView model
to Position and Orient the trunklid.h3d object.
6.
Change Transformation Method to Auto Position and Orient.
7.
To resolve the three locator points, select the matching points from the mechanism model. See the table below
for details.
Point Number
Matching Model Point
Point 1
Node 1
Point 2
Node 2
Point 3
Node 3
Note
This will not change the position of the graphics, since the actual position of the trunk lid and the
assembly position are the same.
8.
Click on the fit icon in the view controls.
Check your model to make sure that the outer trunk lid component has been successfully positioned and oriented
with respect to your MotionView model, as shown in Figure 1.
28
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
9.
Similarly, select the newly created g_ graphics from the Project Browser and set the Body as Ground Body.
Please note that you do not need to use the Location tab in this case.
Note
You can also import an H3D file into MotionView using the animation window. The Add Object panel on
the toolbar in the animation window allows you to add an H3D file as an object.
Step 9: Solve the model with MotionSolve.
MotionSolve can be used to perform kinematic, static, quasi-static, and dynamic analyses of multi-body mechanical
systems. It is completely integrated with MotionView. The input file for MotionSolve is an XML file called MotionSolve
XML. This file is written by MotionView.
In this step, you will use MotionSolve to perform a kinematic simulation of the mechanism for a simulation time of 1
second, with a step size of 0.025 seconds.
1.
Click the Run icon,
on the Model-Main toolbar.
2.
Click on the Check button to check for errors in the model.
3.
From the Main tab, specify Transient as the Sim Type.
4.
In the Save As field, specify a name for the XML file.
MotionView uses the base name of your XML file for other result files generated by MotionSolve. See the
MotionView User’s Guide for details about the different result file types.
5.
Activate the Save MDL file check box (in order to save the model).
6.
Click the Simulation Parameters tab.
7.
Specify an End Time of 1 for your simulation and a Print Interval of 0.025. Use second as the time unit (this is
the default).
You can access the Units form from the Forms panel,
.
8.
From the Main tab, click the Run button to solve the model using MotionSolve.
9.
Check the Message Log for more information.
Step 10: View animation and plot results on the same page.
Once the run is successfully complete, both the Animate and Plot buttons are active.
Animate and Plot buttons
1.
Click the Animate button. This loads the animation in the second window.
2.
To start the animation, click the Start/Stop Animation icon,
Altair Engineering
, on the toolbar.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
29
3.
To stop/pause the animation, click the Start/Stop Animation icon again,
4.
Click the Plot button.
, on the toolbar.
This loads the results file and opens the Plot window in the new window on the same page.
5.
Leave the X-axis Data Type as Time.
6.
Input the following y-axis data:
7.
Y Type
Marker Displacement
Y Request
Displacement (on input link)
Y Component
DM (Magnitude)
Click Apply.
This plots the magnitude of the displacement of point I relative to the Global Origin.
Your session should look like the figure below:
Session w ith model, plot and animation
30
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 11: Save your work as a session file.
1.
From the File menu, select Save As > Session File.
2.
Specify a name for your session file.
3.
Click Save.
Your work is saved as a session file.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
31
MV-1010: Contact Simulation using MotionSolve
In this tutorial, you will learn how to:
Model contact between two graphics
Perform Transient analysis on a MotionView model with contact forces using MotionSolve
View the Transient analysis results from MotionSolve using MotionView
Theory
The Geneva drive is an indexing mechanism that translates a continuous rotation into an intermittent rotary motion. It
is an intermittent gear where the drive wheel (crank) has a pin that reaches into a slot of the driven wheel (slotted disk)
and thereby advances it by one step. The drive wheel also has a raised circular blocking disc that locks the driven
wheel in position between steps.
Contact forces are very common in the mechanisms/general machinery domain. MotionSolve uses the Penalty-based
Poisson contact normal force model, impact function based model, and user-defined subroutine for calculating the
magnitude and direction of the contact and friction forces. For more information on this, please refer to the
MotionSolve online help.
Step 1: Modeling contact.
1.
Start a new MotionView session.
2.
Click the Open Model icon,
, on the Model-Main toolbar.
Or
Open the model by selecting File > Import > Model.
32
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
From the Open model dialog, select the file geneva.mdl, located in <Install
directory>\tutorials\mv_hv_hg\mbd_modeling\Interactive. Click Open to load the model.
Check the model for the following entities in the Project Browser:
Four bodies - Ground, Crank, Slotted Disk, and Stand.
A fixed-joint between the Stand and the Ground.
Tessellated H3D Graphics for the Crank, Slotted Disk, and Stand.
Note
Contact modeling begins with the geometry of colliding bodies. The surface geometry may be defined
using CAD or MotionView primitives. The collision detection algorithm in MotionSolve requires that the
CAD geometry must first be tessellated (meshed).
The MotionView interface provides a CAD to H3D translator for automatically meshing the CAD model.
The H3D file contains the tessellated geometry.
The MotionView primitive graphics are tessellated automatically by MotionSolve.
The following entities need to be added to complete the model:
Two Revolute Joints; one between Crank and stand and the other between Slotted Disk and Stand.
Motion at the revolute joint between the Crank and stand.
Torsion Spring Damper to damp any vibrations in the Slotted Disk.
Contact between the Crank graphic and Slotted Disk graphic.
4.
From the Project Browser, right-click on Model and select Add Constraint > Joint (or right-click on the Joints
icon,
, from the toolbar).
The Add Joint or JointPair dialog is displayed.
5.
Use the table below to add two revolute joints in your model.
Please follow the procedure described in Step 3 of MV-1000 for adding a revolute joint.
Revolute Joint Label
Body 1
Body 2
Point
Vector
Slotted Disk-Stand
Slotted Disk
Stand
body_1-Pivot
Global Z
Crank-Stand
Crank
Stand
body_2-Pivot
Global Z
The input for this model will be in the form of a motion. A velocity motion will be applied at the Crank-Stand
revolute joint.
6.
From the Project Browser, right-click on Model and select Add Constraint > Motions (or right-click the
Motions icon,
, from the toolbar).
The Add Motion or MotionPair dialog is displayed.
7.
Click OK.
8.
From the Connectivity tab, select the revolute joint between the Crank and the Stand using the Joint button.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
33
9.
From the Connectivity tab, use the Property drop-down menu to change the type of input from Displacement to
Velocity.
10. From the Properties tab, enter 5 into the Value text box (located next to Linear).
11. From the Project Browser, right-click on Model and select Add Force Entity > Spring Damper (or right-click
the Spring Damper icon,
, from the toolbar).
The Spring Damper or Spring DamperPair dialog is displayed.
12. Click OK to accept default values.
13. Select Torsion Spring using the drop-down arrow and click OK.
14. Use the following information to specify the connectivity of the spring damper:
Body 1
Body 2
Origin Point
Alignment Vector
Slotted Disk
Stand
body_1-Pivot
Global Z
15. Under the Properties tab, specify the following:
Property
Type
Value
K
Linear
100
C
Linear
50
16. From the Project Browser, right-click on Model and select Add Force Entity > Contact (or right-click the
Contact icon,
, from the toolbar).
The Contact dialog is displayed.
17. Specify a label and variable name for the contact, or simply accept the defaults.
18.Specify the contact type as RigidToRigidContact.
19. Click OK.
20. Under the Connectivity tab, select Poisson Contact for Calculation Method and Coulomb Friction On for
Calculation options: using the drop-down arrow.
21. For Body I, select Crank. For Body J, select Slotted Disk. The graphics assigned to the I and J part are
displayed in the I graphics and J graphics box.
22. For I Graphics, select Crank.
23. Similarly for J graphic, select Slotted Disk.
34
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
24. Click the Properties tab and enter the properties from the following table under the respective fields.
Property
Value
Description
Penalty
1000
Models the stiffness of the contact patch.
Restitution Coeff
0.75
Models the energy loss or damping of the contact patch.
MU static
0.7
Coefficient of static friction.
MU dynamic
0.5
Coefficient of dynamic friction.
Stiction transition velocity 0.05
The slip velocity at which the coefficient of friction reaches the value
specified by MU static.
Friction transition velocity 0.1
The slip velocity at which the coefficient of friction reaches the value
specified by MU dynamic.
Note
The two primary inputs to the Poisson contact force model are:
Penalty
Coefficient of Restitution (COR)
Too high of a value for penalty may cause numerical difficulties, while too small of a value may lead to excessive
penetration.
COR is defined as the ratio of relative speed of separation to the relative speed of approach of the colliding bodies.
A COR of 1 implies a perfectly elastic collision and a COR of 0 represents a perfectly plastic collision.
Some tuning of these two parameters is usually required to reach stable and accurate results.
Step 2: Performing Transient simulation using MotionSolve.
1.
Click the Run icon,
, on the toolbar.
The Run panel is displayed.
2.
In the Save As field, specify a name for the XML file under <Working directory>.
MotionView uses the base name of your XML file for other result files generated by MotionSolve. See the
MotionView User’s Guide for details about the different result file types.
3.
Click the Simulation Parameters tab.
4.
Specify an End Time of 4 for your simulation. Use second as the time unit (this is the default).
5.
You can access the Units form from the Forms panel,
6.
From the Main tab, click the Run button to solve the model using MotionSolve.
Altair Engineering
.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
35
Step 3: Viewing the animation in MotionView.
1.
Once the run is successfully complete, the Animate button is activated.
Animate button
2.
Click the Animate button. This loads the animation in the second window.
3.
To start the animation, click the Start/Stop Animation icon,
, on the toolbar.
4.
To stop the animation, click the Start/Stop Animation icon,
, on the toolbar.
36
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1011: Extension and Retraction Analysis of the Main
Landing Gear of an Aircraft
In this tutorial, you will learn how to:
Create a model of the landing gear mechanism.
Perform a Dynamics Analysis of the mechanism.
Create a Sequential Simulation script to simulate the extension and retraction of the landing gear.
Post-process the MotionSolve results in the animation and plot windows.
Figure 1: The main landing gear of an aircraft
A closer view of the mechanism:
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
37
The following entities are needed to build this model:
Points
Bodies
Constraints (Joints)
Graphics
Input (Motion or Force)
Output
Exercise
Copy the files Extention_Motion.csv, Input_Motion.csv, Aircraft_Structure.hm and
MainLandingGear.h3d from the location
Note
<Install>\tutorials\mv_hv_hg\mbd_modeling\interactive\aero to your <Working
directory>.
Phase 1
In this phase, you will build a main landing gear model and simulate the retraction of the landing gear.
38
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 1: Creating the landing gear mechanism.
In this step, create all the necessary joints to connect the various links and complete the landing gear mechanism.
1.
Click the Open Model icon,
, on the Model-Main toolbar.
Or
Open model by selecting File > Import > model.
2.
From the Open model dialog, select the file MainLandingGear.mdl and click Open.
3.
Refer to the table below and create joints at various locations from the Joints panel.
Type
Body 1
RevJoint
Main LG Cylinder Aircraft 5
MLG_MAIN_CYL_STRUC Axis(Vect)
Global X
RevJoint
Activating
Main LG Cylinder Cylinder
MLG_ACT_CYL_MAIN_C
YL
Axis(Vect)
Global X
RevJoint
Activating Piston MLG Link1
MLG_ACT_PIS_LINK1
Axis(Vect)
Global X
RevJoint
MLG Link1
Aircraft 5
MLG_STRUC_LINK1
Axis(Vect)
Global X
RevJoint
MLG Link1
MLG Link2
MLG_LINK1_LINK2
Axis(Vect)
Global X
RevJoint
Main LG Cylinder MLG Link2
MLG_MAIN_CYL_LINK2 Axis(Vect)
Global X
RevJoint
Main LG Cylinder MLG Link3
MLG_LINK3_MAIN_CYL Axis(Vect)
Global Y
RevJoint
MLG Link3
MLG Link4
MLG_LINK3_LINK4
Axis(Vect)
Global Y
RevJoint
MLG Link4
MLG Axle
MLG_LINK4_AXLE
Axis(Vect)
Global Y
RevJoint
MLG Pis
Main LG
Piston
MLG_PIS_MAIN_PIS
Axis(Vect)
Global Y
RevJoint
MLG Cyl
MLG Axle
MLG_AXLE_CYL
Axis(Vect)
Global Y
RevJoint
Main LG Piston
MLG Axle
MLG_MAIN_PIS_AXLE
Axis(Vect)
Global Y
RevJoint
Wheel1
MLG Axle
Wheel1 CG
Axis(Vect)
Global Y
RevJoint
Wheel2
MLG Axle
Wheel2 CG
Axis(Vect)
Global Y
RevJoint
Wheel4
MLG Axle
Wheel4 CG
Axis(Vect)
Global Y
RevJoint
Wheel3
MLG Axle
Wheel3 CG
Axis(Vect)
Global Y
Activating
TransJoint Activating Cylinder Piston
Activating Cylinder CG
Axis(Pt)
MLG_ACT_PIS_LIN
K1
Main LG
TransJoint Main LG Cylinder Piston
Main LG Piston CG
Axis(Pt)
AXIS_POINT
TransJoint MLG Cyl
MLG Pis
MLG Cyl CG
Axis(Pt)
MLG Pis CG
FixedJoint Aircraft 5
Ground Body Aircraft 5 CG
Altair Engineering
Body 2
Origin(s)
Orientation Method
Reference 1
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
39
The model should look like the image below, once all the joint definitions are complete.
Figure 3: Main landing gear model after creating joints
Step 2: Creating an aircraft body graphic using the CAD/FE Import Utility.
In this step, use a HyperMesh file to create a graphic for the aircraft body and assign the graphic to aircraft body.
1.
From the Tools menu, select the Import CAD or FE utility.
2.
For Input File, select HyperMesh. For Output File, select H3D.
3.
Click the Input File file browser icon,
input file.
4.
Save the file as Aircraft_Structure.H3D in the working directory.
5.
Click OK.
6.
Once the H3D is generated successfully, go to the Graphics panel and add a new graphic with the File type and
select the H3D file generated in step 4.
40
, and select the HyperMesh file Aircraft_Structure.hm as the
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
7.
For Body, select Aircraft 5.
Figure 4: Model after importing graphic for aircraft body
Step 3: Creating a spring damper for modeling the hydraulics.
In this step, create a spring damper to model the hydraulics of the main landing gear mechanism.
1.
From the Project Browser, right-click on Model and select Add Force Entity > Spring Damper (or right-click
the Spring Damper icon,
, from the toolbar).
The Spring Damper or Spring DamperPair dialog is displayed.
2.
Click OK.
3.
The spring damper must connect the Main LG Piston and the Main LG Cylinder bodies as shown below.
Figure 5: Spring damper panel
4.
From the Properties tab, set the stiffness of the spring damper to 10000 and the damping to 1000.
5.
From the Preload tab, set the free length to 1320.43.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
41
Step 4: Defining a motion to retract the landing gear.
In this step, define motion to retract the landing gear.
1.
From the Project Browser, right-click on Model and select Add Constraint > Motions (or right-click the
Motions icon,
, from the toolbar). Add a motion and name it Retraction_Motion. Resolve the Joint to
the Revolute Joint (shown in the image below), which is defined between the bodies Link1 and Link2.
Figure 6: Rev joint
2.
From the Properties tab, under Define by, select Expression. In the Expression field, enter the expression
`STEP(TIME,0,0,5,160D)`.
3.
Add another motion and name it Aligning_Motion. Resolve the Joint to the Translational Joint defined
between MLG Cyl and MLG Pis bodies (see the image below).
Figure 7: Translation joint
4.
42
From the Properties tab, under Define by, select Expression. In the Expression field, enter the expression
`STEP(TIME,0,0,2,-100)`.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 5: Running a dynamic analysis to simulate the retraction of the main landing gear.
In this step, run a transient analysis of the main landing gear mechanism.
1.
From the Run panel,
, set the End time for 5 seconds.
2.
From the Main tab, set the Analysis type to Transient.
3.
Click the Save as button and enter a name for the output files, select Save Model, and click Run.
Phase 2
In this phase, write a Templex template to run a sequential simulation to simulate the retraction and extension of the
landing gear mechanism.
Step 1: Defining an extension motion for the landing gear.
In this step, model the extension motion of the landing gear.
1.
From the Project Browser, right-click Model and select Add Constraint > Motions (or right-click the Motions
icon,
, from the toolbar). Add a motion named Extension_Motion. Resolve the motion to the same joint for
which the Retraction_Motion (for retracting the landing gear) has been defined.
2. From the Properties tab, set the type of motion as Expression and enter the following in the Expression field.
`STEP(TIME,5,0,10,-155D)` .
Step 2: Defining a template to run the sequential simulation.
In this step, write a template to run a sequential simulation.
1.
From the Project Browser, right-click on Model and select Add General MDL Entity > Template (or right-click
the Template icon,
, from the toolbar). Define a template with the script given below and for Write text to
solver command file, select type.
<Deactivate
element_type = "MOTION"
element_id
= "{the_model.mot_2.idstring}"
/>
<Simulate
analysis_type
= "Transient"
end_time
= "5.0"
print_interval
= "0.01"
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
43
/>
<Deactivate
element_type = "MOTION"
element_id
= "{the_model.mot_0.idstring}"
/>
<Activate
element_type = "MOTION"
element_id
= "{the_model.mot_2.idstring}"
/>
<Simulate
analysis_type
= "Transient"
end_time
= "10.0"
print_interval
= "0.01"
/>
<STOP/>
The above script has five blocks.
Block 1 – Deactivates the motion which defines the extension of the landing gear.
Block 2 – Simulates the model for the retraction of the landing gear.
Block 3 – Deactivates the motion used to retract the landing gear
Block 5 – Activates the motion which defines the extension of the landing gear.
Block 6 – Simulate the model for extension of the landing gear.
The Stop command is used to stop the simulation at the time set in the last Simulate block.
Step 3: Simulating the model.
In this step, run the model to simulate the retraction and extension of the main landing gear model.
1.
Run the model.
Phase 3: Post-processing.
In this phase, create output requests an rerun the model to measure the force required to extend and retract the
landing gear.
1.
From the Project Browser, right-click on Model and select Add General MDL Entity > Output (or right-click
the Outputs icon,
44
, from the toolbar).
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
2.
Create an Output Request. From the drop-down menu, set the type to Force. For the Joint, measure it on the
Translational Joint between the Activating Piston and Activating Cylinder Bodies (the same joint on which
the input motion is applied).
3.
Create an Output Request to measure the velocity at the same joint as above.
4.
Rerun the analysis with these output requests and plot the requested results from the generated PLT file in
HyperGraph.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
45
MV-1024: Using User Subroutines in MotionSolve Models
User subroutines are created for various reasons. Some include:
To describe a physical phenomenon that is determined by non-trivial logical conditions.
When it is impractical to formulate a complicated expressions in an explicit form.
To take full advantage of a programming language like C/C++ or Fortran and simpler programming with
interpreters like Tcl, Python, and Ruby.
To use your own subroutines in MotionSolve, follow these steps:
1.
Create a C/C++, FORTRAN, Tcl, or Python source file that contains the user-defined modeling entity.
Refer to the MotionSolve User's Guide for a list of supported solver subroutines and a general guideline on setting
up and using subroutines in your model.
2.
Obtain a DLL by compiling and linking your user subroutine(s) for C/C++ or Fortran, or use the source file directly
for Tcl or Python.
MotionSolve supports two separate levels of user DLLs and the algorithm attempts to resolve the symbols, starting
from the most specific library.
A) Element Level DLL (most specific)
Specify the name of the DLL in the modeling element definition.
B) Machine Level DLL
You can create an environment variable called MS_USERSUBDLL and set it to the DLL file. This environment
variable is not defined automatically when MotionSolve is installed. However, Fortran, and C/C++ DLLs are
provided in the installation folder <installation path>\hwsolvers\usersub\subdll\win32\. This
allows you to run some of the test models that use user subroutine DLLs.
Note: The DLL that is loaded is based on the "most specific" rule: number one overrides number two.
3.
Modify the corresponding entity in your multi-body model to be "user defined" and point it to your DLL. This can
be done in two ways:
A) By modifying the entity in the MotionView interface.
B) By editing the MotionSolve XML file.
Regardless of the method you select, you will end up with an XML file where one or more entities are now user
defined.
46
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
For example, consider the coupler modeling element in the XML file:
<Constraint_Coupler
id
= "1"
type
= "TwoJoint"
i_marker_id_joint1 = "30603030"
j_marker_id_joint1 = "30602031"
body1_id_joint1
= "30603"
body2_id_joint1
= "30602"
joint_type_joint1
= " "
i_marker_id_joint2 = "30603040"
j_marker_id_joint2 = "30604040"
body1_id_joint2
= "30603"
body2_id_joint2
= "30604"
joint_type_joint2
= " "
usrsub_param_string = "USER(-8.5)"
usrsub_dll_name
= "C:/work/testsub.dll">
</Constraint_Coupler>
The usrsub_dll_name argument defines C:/work/testsub.dll as the element level DLL for this coupler
element. Any element can be defined by pointing to a different DLL.
The coupler modeling element in the XML file can also be defined as:
<Constraint_Coupler
id
= "1"
type
= "TwoJoint"
i_marker_id_joint1 = "30603030"
j_marker_id_joint1 = "30602031"
body1_id_joint1
= "30603"
body2_id_joint1
= "30602"
joint_type_joint1
= " "
i_marker_id_joint2 = "30603040"
j_marker_id_joint2 = "30604040"
body1_id_joint2
= "30603"
body2_id_joint2
= "30604"
joint_type_joint2
= " "
usrsub_param_string = "USER(-8.5)"
usrsub_dll_name
= "NULL">
</Constraint_Coupler>
In this case, MotionSolve looks for a machine level DLL as defined by the value of the MS_USERSUBDLL
environment variable.
4.
Run MotionSolve, verifying that it picks up the appropriate DLL during simulation.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
47
Exercise
The model file required for this exercise, Pendu_model.mdl, is available in the HyperWorks Desktop installation at
this location: <Altair>\hw11.0\tutorials\mv_hv_hg\mbd_modeling\motionsolve\. Copy the file to
your <working directory>.
Step 1: Using an expression to define motion.
1.
Launch a new MotionView session.
2.
Load the MDL model file Pendu_model.mdl from your <working directory>.
3.
From the Project Browser, right-click on Model and select Add Constraint > Motions (or right-click the
Motions icon,
, from the toolbar). Add a Displacement motion to the revolute joint between the Pendulum
Body and the Ground Body.
4.
Click the Properties tab.
Set an expression of 3.142* TIME for the displacement motion.
5.
Click the Outputs panel icon,
, to access the Outputs panel.
Review the output request.
6.
Click the Run panel icon,
, to access the Run panel.
7.
Click the Save as: folder icon and browse to your <working directory>. Specify the name as
Pendu_model.xml for the MotionSolve input XML file.
8.
Confirm that the Sim type: is set to Transient.
9.
Click the Simulation Parameters tab and specify 1 as the End Time.
10. Click the Check button to check for any modeling errors.
11. After verifying that there are no errors, click the Run button.
12. Once the run is complete, the Animate button is activated. Click Animate to view the animation of the simulation.
13. From the Run panel, click the Plot button to view the time-histories of the output request.
48
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 2: Using the MOTSUB user subroutine to define motion.
In this step, we will use the user subroutine MOTSUB. This user subroutine has been compiled and linked in the DLL
ms_csubdll.dll. This machine level DLL is provided in the HyperWorks installation. For the Windows 32-bit
platform, the DLL is located at: <install_path>\hwsolvers\usersub\subdll\WIN32\.
We will use the ms_csubdll.dll as a machine level DLL.
1.
Create an environment variable MS_USERSUBDLL and set the value to the DLL file.
For Windows 32-bit platform users, this will be: <install_path>\hwsolvers\usersub\subdll\WIN32
\ms_csubdll.dll
Right-click on the My Computer icon. From the Advanced tab, select Environment variables > New
(under User variables).
Set Variable name: to MS_USERSUBDLL.
Set Variable value: to <install_path>\hwsolvers\usersub\subdll\win32\ms_csubdll.dll.
2.
With the Pendu_model.mdl from the previous step open in the MotionView model window, go to the Motions
panel,
3.
.
From the Connectivity tab, check the User-defined properties check box.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
49
4.
Click the User-Defined tab and enter `USER(100001,5,2)` in the
text-box.
Note: To use an element level (specific) DLL/Interpreter function, you can check the Use local dll and function
name check-box and point to the DLL using the folder icon,
.
The string `USER(100001,5,2)` is used to pass arguments to the MOTSUB user subroutine. The MOTSUB user
subroutine calculates motion using the parameters par1 and par2 in USER(branch_id, par1, par2) as
follows:
motion_val= par1*TIME^par2
5.
From the File menu, select Export > Model.
Note: Click the Save File icon,
, on the Main toolbar to save the file in working directory with the existing
name. If it’s a new model, you will be prompted for the name of the model.
The Export model panel is displayed.
Specify the file name as Pendu_model_usersub.mdl.
6.
Click the Run panel icon,
, to access the Run panel.
7.
Click the Save as: folder icon,
, and browse to your <working directory>. Specify
Pendu_model_usersub.xml for the MotionSolve input XML file.
8.
Confirm that the Sim type: is set to Transient.
9.
Click on the Simulation Parameters tab and specify 1 as the End Time.
10. From the Main tab, click the Check button to check for any modeling errors.
50
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
11. After verifying that there are no errors, click the Run button.
12. In the plot window, plot the results from the ABF file Pendu_model_usersub.abf to overlay the results on top
of the results from the Pendu_model.abf file
13. In the animation window, check the Overlay option on the Load Model panel.
14. Select the file Pendu_model_usersub.h3d using the Load model folder icon
.
15. Click Apply.
This will overlay the new animation over the existing animation.
Note:
If the value of the usrsub_param_string is set as “USER(3.142, 1)” the results from step 2
will be the same as results from step 1.
17. Open the MotionSolve XML file Pendu_model.xml (saved in step 1) from the <working directory>.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
51
18. Browse through the XML file to locate the Motion_Joint block.
<Motion_Joint
id
= "301001"
label
= "Motion 0"
type
= "EXPRESSION"
val_type
= "D"
expr
= "3.142*TIME"
joint_id
= "301001"
joint_type
= "R"
/>
19. Open the MotionSolve XML file Pendu_model_usersub.xml from the <working directory>.
20. Browse through the XML file to locate the Motion_Joint block.
<Motion_Joint
id
= "301001"
label
= "Motion 0"
type
= "USERSUB"
val_type
= "D"
usrsub_param_string = "USER(100001,5,2)"
usrsub_dll_name
= "NULL"
usrsub_fnc_name
= "MOTSUB"
joint_id
= "301001"
joint_type
= "R"
/>
Note:
When the value for the usrsub_dll_name parameter in the above block is set to NULL,
MotionSolve looks for the subroutine in a machine level DLL. This DLL is
passed to
MotionSolve by the MS_USERSUBDLL environment variable.
To use an element level DLL, set the value of the usrsub_dll_name parameter to point to the DLL.
The usrsub_param_string parameter is used to pass arguments to the user subroutine.
For example, the MOTSUB user subroutine calculates motion using the parameters par1 and par2 in USER(
branch_id, par1, par2) as follows:
motion_val= par1*TIME^par2
MotionSolve uses the value returned from the user subroutine to calculate the motion.
52
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1025: Modeling Point-to-Curve (PTCV) Higher-Pair
Constraint
In this tutorial, you will learn how to:
Model a PTCV (point-to-curve) joint
A PTCV (point-to-curve) joint is a higher pair constraint. This constraint restricts a specified point on a body to move
along a specified curve on another body. The curve may be open or closed, planar or in 3-d space. The point may
belong to a rigid, flexible or point body. This constraint can help avoid modeling contact in some systems. It may prove
advantageous since proper contact modeling (refer tutorial MV-1010) in many cases involves fine-tuning of contact
parameters. One good example for such a system is a knife-edge cam follower mechanism. One can avoid modeling
the contact between the cam and follower by defining a PTCV joint: the curve being the cam profile and the point being
the tip of the follower.
A Knife-edge Cam Follow er Mechanism
In this tutorial, we will model a knife-edge cam follower mechanism with the help of a PTCV joint.
Exercise
Copy all the files from the location
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\interactive\ to your <Working
directory>.
Step 1: Creating points.
Let’s start with creating points that will help us locate the bodies and joints as required. We will define points for
center of mass of the bodies and joint locations.
1.
Start a new MotionView Session. We will work with the default units (kg, mm, s, N).
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
53
2.
From the Project Browser right-click on Model and select Add Reference Entity > Point (or right-click the
Points icon
on the Model-Reference toolbar).
The Add Point or PointPair dialog is displayed.
3.
For Label, enter PivotPoint.
4.
Accept the default Variable name and click OK.
5.
Click on the Properties tab and specify the coordinates as X = 0.0 , Y = 0.0, and Z = 0.0.
6.
Follow the same procedure and create the points specified in the following table:
Point
X
Y
Z
FollowerCM
0.0
65.557
0.0
FollowerPoint
0.0
25.0
0.0
FollowerJoint
0.0
85.0
0.0
CamCM
0.0
-14.1604 0.0
Step 2: Creating Bodies.
We will have two bodies apart from the ground body in our model visualization; the cam and the follower. Pre-specified
inertia properties will be used to define the bodies.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Body (or right-click the
Body icon
on the Model-Reference toolbar).
The Add Body or BodyPair dialog is displayed.
2.
For Label, enter Cam and click OK.
3.
From the Project Browser right-click on Model and select Add Reference Entity > Body (or right-click the
Body icon
on the Model-Reference toolbar).
The Add Body or BodyPair dialog is displayed.
4.
For Label, enter Follower and click OK.
5.
From the Properties tab, specify the following for the two bodies:
54
Body
Mass
Ixx
Iyy
Izz
Ixy
Iyz
Izx
Cam
0.174526
60.3623
63.699
123.276
0.0
0.0
0.0
Follower
0.0228149
7.10381
0.219116 7.22026
0.0
0.0
0.0
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
For the Cam body, under the CM Coordinates tab, check the Use center of mass coordinate system box.
7.
Double click on Point.
The Select a Point dialog is displayed. Choose CamCM and click OK.
8.
Accept defaults for axes orientation properties.
9.
For the Follower body, under the CM Coordinates tab, check the Use CM Coordsys box.
10. Double click on Point.
The Select a Point dialog is displayed. Choose FollowerCM and click OK.
11. Accept defaults for axes orientation properties.
Step 3: Creating Joints.
Here, we will define all the necessary joints except the PTCV joint which will be defined as an advanced joint later. We
require two joints for the model. The first of them is the revolute joint between the cam and ground body. The second
joint we need is a translational joint between the follower and ground body.
1.
From the Project Browser right-click on Model and select Add Constraint > Joint (or right-click the Joints icon
on the Model-Constraint toolbar).
The Add Joint or JointPair dialog is displayed.
2.
For Label, enter CamPivot.
3.
Select Revolute Joint as the Type and click OK.
4.
From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed. Choose Cam and click OK.
5.
From the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed. Choose Ground Body and click OK.
6.
From the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed. Choose PivotPoint and click OK.
7.
For Axis click on the arrow and choose Vector. Now click on Vector.
The Select a Vector dialog is displayed. Choose Global Z and click OK.
8.
From the Project Browser right-click on Model and select Add Constraint > Joint (or right-click the Joints icon
on the Model-Constraint toolbar).
The Add Joint or JointPair dialog is displayed.
9.
For Label, enter FollowerJoint.
10. Select Translational Joint as the Type and click OK.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
55
11. From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed. Choose Follower and click OK.
12. From the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed. Choose Ground Body and click OK.
13. From the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed. Choose FollowerJoint and click OK.
14. For Axis click on the arrow and choose Vector. Now click on Vector.
The Select a Vector dialog is displayed. Choose Global Y and click OK.
Step 4: Creating Markers.
Now, we will define some markers required for the definition of the PTCV joint. We need two markers, one associated
with the cam (for the curve) and the other associated with the follower (for the point).
1.
From the Project Browser right-click on Model and select Add Reference Entity > Marker (or right-click the
Markers icon
on the Model-Reference toolbar).
The Add Marker or MarkerPair dialog is displayed.
2.
For Label, enter CamMarker and click OK.
3.
From the Properties tab, double-click on Body.
4.
The Select a Body dialog is displayed. Choose Cam and click OK.
5.
From the Properties tab, double-click on Point.
6.
The Select a Point dialog is displayed. Choose PivotPoint and click OK.
7.
Accept the defaults for axes orientation.
8.
Add another marker by right-clicking on Model in the Project Browser and selecting Add Reference Entity >
Marker (or right-click the Markers icon
on the Model-Reference toolbar).
The Add Marker or MarkerPair dialog is displayed.
9.
For Label, enter FollowerMarker and click OK.
10. From the Properties tab, double-click on Body.
11. The Select a Body dialog is displayed. Choose Follower and click OK.
12. From the Properties tab, double-click on Point.
13. The Select a Point dialog is displayed. Choose FollowerPoint and click OK.
14. Accept the defaults for axes orientation.
56
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 5: Creating Graphics.
Graphics for the cam and follower have been provided as h3d files. We need to associate the h3ds with bodies defined
in our model. To make visualization better, we will also create some graphics for the joints.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Graphic (or right-click the
Graphics icon
on the Model-Reference toolbar).
The Add Graphics or GraphicPair dialog is displayed.
2.
For Label, enter Cam.
3.
Choose File from the drop-down menu.
4.
Click on the file browser icon
5.
Click Open and then OK.
6.
From the Connectivity tab, double-click on Body.
and select CamProfile.h3d from the model folder.
The Select a Body dialog gets displayed. Choose Cam and click OK.
7.
Add another graphic by right-clicking on Model in the Project Browser and selecting Add Reference Entity >
Graphics (or right-click the Graphics icon
on the Model-Reference toolbar).
The Add Graphics or GraphicPair dialog is displayed.
8.
For Label, enter Follower.
9.
Choose File from the drop-down menu and click OK.
10. Click on the browser icon
and select FollowerProfile.h3d from the model folder.
11. Click Open.
12. Under the Connectivity tab, double-click on Body.
The Select a Body dialog gets displayed. Choose Follower and click OK.
Next, we will add some joint graphics for better visualization and aesthetics.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Graphic (or right-click the
Graphics icon
on the Model-Reference toolbar).
The Add Graphics or GraphicPair dialog is displayed.
2.
For Label, enter PivotGraphicOne (the first graphic to show the cam pivot).
3.
Choose Cylinder from the drop-down menu and click OK.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
57
4.
From the Connectivity tab, double-click on Body.
The Select a Body dialog gets displayed. Choose Ground Body and click OK.
5.
Double click on Point.
The Select a Point dialog is displayed. Choose PivotPoint and click OK.
6.
Click on the arrow below Direction and select the Vector option.
7.
Click on Vector.
The Select a Vector dialog is displayed. Choose Global Z and click OK.
8.
9.
From the Properties tab, specify the following values:
Property
Value
Length
7.5
Offset
-3.75
Radius 1
4.000
Radius 2
4.000
For the Cap properties, choose Cap Both Ends.
10. Add another graphic by right-clicking on Model in the Project Browser and selecting Add Reference Entity >
Graphics (or right-click the Graphics icon
on the Model-Reference toolbar).
The Add Graphics or GraphicPair dialog is displayed.
11. For Label, enter PivotGraphicTwo (the second graphic to show the cam pivot).
12. Choose Cylinder from the drop-down menu and click OK.
13. Under the Connectivity tab, double-click on Body.
The Select a Body dialog gets displayed. Choose Cam and click OK.
14. Double click on Point.
The Select a Point dialog is displayed. Choose PivotPoint and click OK.
15. Click on the arrow below Direction and select the Vector option.
16. Click on Vector.
The Select a Vector dialog is displayed. Choose Global Z and click OK.
58
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
17. From the Properties tab, specify the following values:
Property
Value
Length
7.6
Offset
-3.8
Radius 1
2.000
Radius 2
2.000
18. For the Cap properties, choose Cap Both Ends.
19. Add another graphic by right-clicking on Model in the Project Browser and selecting Add Reference Entity >
Graphics (or right-click the Graphics icon
on the Model-Reference toolbar). Add.
The Add Graphics or GraphicPair dialog is displayed.
20. For Label, enter FollowerJointGraphic (the graphic for the follower translational joint).
21. Choose Box from the drop-down menu and click OK.
22. From the Connectivity tab, double-click on Body.
The Select a Body dialog gets displayed. Choose Ground Body and click OK.
23. For Type, choose Center from the drop-down menu.
24. Double-click on Point.
The Select a Point dialog gets displayed. Choose FollowerJoint and click OK.
25. For axis orientation, use the vector Global Z as the Z-axis and the vector Global X, to define the ZX plane.
26. From the Properties tab, specify the following properties:
Property
Value
Length X
15
Length Y
10
Length Z
10
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
59
At the end of this step, your model should look like the one shown in the figure below:
A Knife-edge Cam Follow er Mechanism in MotionView
Step 6: Creating the Curve.
The curve that we will use here is the curve that defines the profile of the cam. The data for this curve has been
provided in .csv format. We need to define the curve using the data in the given file.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Curve (or right-click the
Curves icon
on the Model-Reference toolbar).
The Add Curve dialog is displayed.
2.
For Label, enter CamProfile and click OK.
3.
From the Properties tab, use the first drop-down menu to change the curve from 2D Cartesian to 3D Cartesian.
4.
From the Properties tab, click on the x radio button.
5.
Click on the file browser icon
60
and select CamProfile.csv. Click Open.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
Choose the properties of the curve as shown in the figure below:
7.
From the Properties tab, click on the y radio button.
8.
Click on the file browser icon
9.
Choose the properties of the curve as shown in the figure below:
and select CamProfile.csv. Click Open.
10. From the Properties tab, click on the z radio button.
11. Click on the file browser icon
and select CamProfile.csv. Click Open.
12. Choose the properties of the curve as shown in the figure below:
Notice the different column numbers used for x, y, and z properties.
13. From the Properties tab, use the fourth drop-down menu to set the curve type to Closed Curve.
Step 7: Creating the PTCV Joint.
Now, we will create the PTCV joint.
1.
From the Project Browser right-click on Model and select Add Constraint > Advanced Joint (or right-click the
Advanced Joints icon
on the Model-Constraint toolbar).
The Add AdvJoint dialog is displayed.
2.
For Label, enter PTCV.
3.
Choose PointToCurveJoint from the drop-down menu and click OK.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
61
4.
From the Connectivity tab, double-click on Body 1.
The Select a Body dialog gets displayed. Choose Follower and click OK.
5.
From the Connectivity tab, double-click on Point.
The Select a Point dialog gets displayed. Choose FollowerPoint and click OK.
6.
From the Connectivity tab, double-click on Curve.
The Select a Curve dialog gets displayed. Choose CamProfile and click OK.
7.
From the Connectivity tab, double-click on Ref Marker.
The Select a Marker dialog gets displayed. Choose CamMarker and click OK.
Step 8: Specifying the Cam Motion.
After we have the topology and constraints specified, we need to provide the cam motion. The most natural choice
here is a uniform motion imposed on the revolute joint.
1.
From the Project Browser right-click on Model and select Add Constraint > Motions (or right-click the
Motions icon
on the Model-Constraint toolbar).
The Add Motion or MotionPair dialog is displayed.
2.
For Label, enter CamMotion and click OK.
3.
From the Connectivity tab, double-click on Joint. Choose CamPivot and click OK.
4.
From the Properties tab, specify the properties as `10*TIME`.
Step 9: Specifying Gravity.
Since our shaft is along the Y-axis, we want the gravity to be in the negative Y direction. To specify this:
1.
Click the Forms icon
on the Model-General toolbar.
The Forms panel is displayed.
62
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
2.
Select Gravity and specify the following values:
Direction
Value
X
0
Y
-9810
Z
0
Step 10: Specifying Output Requests.
We would like to monitor the reaction on PTCV joint since it can help us verify the correctness of our results. This will
be discussed in detail towards the end of the tutorial when the topic of 'lift-offs' will be discussed.
1.
From the Project Browser right-click on Model and select Add General MDL Entity > Output (or right-click
the Outputs icon
on the Model-General toolbar).
The Add Output dialog is displayed.
2.
For Label, enter PTCV Reaction and click OK.
3.
From the Properties tab, choose Expressions from the drop-down menu.
4.
Click in the F2 expression box.
5.
Click on the
button.
The Expression Builder dialog is displayed.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
63
6.
Populate the expression as 'PTCV({aj_0.idstring},0,2,0)'.
7.
Click OK.
64
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
8.
Repeat the process for F3, F4, F6, F7, and F8 by changing the 3rd parameter to 3, 4, 6, 7, and 8 accordingly.
The PTCV(id, jflag, comp, ref_marker) function returns the reaction on the PTCV joint:
id
ID of the PTCV joint
jflag
0 gives reaction on the I-marker and 1 on J-marker
comp
component of the reaction
ref_marker
reference marker (0 implies Global Frame)
Step 11: Running the Model.
We now have the model defined completely and it is ready to run.
1.
Click the Run icon
on the toolbar.
The Run panel is displayed.
2.
Under the Simulation Parameters tab, specify values as shown below:
3.
Under the Main tab, choose the Save and run current model radio button.
4.
Click on the browser icon
5.
Click Save.
6.
Click Check to check the model.
7.
To run the model, click Run.
next to Save As and specify a filename of your choice.
The solver will get invoked here.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
65
Step 12: Viewing the Results.
1.
Once the solver has finished its job, the Animate button will be active. Click on Animate.
The
icon can be used to start the animation, and the
icon can be used to stop/pause the animation.
One would also like to inspect the displacement profile of the follower in this mechanism. For this, we will plot the
Y position of the center of mass of the follower.
2.
Use the Page Layout drop-down menu
on the Page Controls toolbar to select the three-window layout
.
3.
Highlight the lower right window and use the Select application drop-down menu to change the application from
MotionView
to HyperGraph
.
4.
Click the Build Plots
icon on the Curves toolbar.
5.
Click on the browser icon
6.
Make selections for the plot as shown below:
and load the result.abf file.
We are plotting the Y profile of the center of mass of the follower.
7.
Click Apply.
8.
The profile for the Y-displacement of the follower should look like the one shown below:
66
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
9.
If we set the X-axis properties to zoom in on one cycle, the profile looks as shown below:
The profile of the cam has been designed to obtain the above Y-profile for the follower.
Now, we come to the discussion regarding ‘lift-offs’. In some cases, the dynamics of the system may cause the
follower to lose contact with the cam. This is called ‘lift-off’. In such cases, modeling the system using a PTCV joint
will give us incorrect results. This is because the PTCV joint constrains the follower point to be always on the curve
and hence cannot model lift-offs. For such cases, contact modeling has to be used (refer tutorial MV-1010 for contact
modeling). However, one would like to start with a PTCV model since modeling a PTCV joint is a lot easier than
modeling contact. Given this scenario, the following modeling steps should be followed:
1.
Model the system using a PTCV joint.
2.
Monitor the PTCV joint reaction. If the reaction on the follower is a ‘pulling’ reaction, it means lift-off would have
occurred and one needs to go for a contact model. Otherwise, the PTCV model is good enough.
Now, let’s check if our PTCV model is good enough. For this, we need to plot the reaction profile on the follower.
Since the follower is moving along the Y-axis, any negative reaction along the Y-axis is a ‘pulling’ reaction. So,
let’s plot the Y-reaction on the follower. For this:
3.
Add a new page to the session by clicking on the Add Page icon
4.
Choose HyperGraph 2D
5.
Click on the browser icon
6.
Make selections for the plot as shown below:
and click on Build Plots
.
and load the result.abf file.
We are plotting the Y profile of the PTCV reaction on the follower.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
67
7.
Click Apply.
The profile should look like the one shown below:
If we zoom in on one cycle by scaling the X-axis, the profile looks like this:
We see that the Y component of the PTCV reaction on the follower is always positive and hence it is never a
‘pulling’ reaction. Thus, our PTCV model is good enough to model the dynamics since there is no expected lift-off.
In this tutorial, we learned how to model a PTCV joint and use it to model a cam-follower mechanism. We also
discussed lift-offs and ways of verifying the suitability of a PTCV joint model for modeling the dynamics of a particular
system.
68
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1026: Modeling Curve-to-Curve (CVCV) Higher-Pair
Constraint
In this tutorial, you will learn how to:
Model a CVCV (curve-to-curve) joint
A CVCV (curve-to-curve) joint is a higher pair constraint. The constraint consists of a planar curve on one body rolling
and sliding on a planar curve on a second body. The curves are required to be co-planar. This constraint can act as a
substitute to contact modeling in many cases where the contact occurs in a plane. One such case is the cam-follower
system, in which the follower is in the form of a roller. Instead of modeling the contact between the cam and the
follower, we can specify a CVCV constraint between their profiles.
A cam roller mechanism
In this tutorial, we will model a roller type cam-follower mechanism with the help of a CVCV constraint.
Exercise
Step 1: Creating points.
Let’s start with creating points that will help us locate the bodies and joints that we would like to. We will define
points for center of mass of the bodies and joint locations.
1.
Start a new MotionView Session. We will work in the default units (kg, mm, s, N).
2.
From the Project Browser right-click on Model and select Add Reference Entity > Point (or right-click the
Points icon
on the Model-Reference toolbar).
The Add Point or PointPair dialog is displayed.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
69
3.
For Label, enter PivotPoint.
4.
Accept the default variable name and click OK.
5.
Click on the Properties tab and specify the coordinates as X = 0.0 , Y, = 0.0, and Z = 0.0
6.
Follow the same procedure for the points specified in the following table:
Point
X
Y
Z
FollowerShaftCM
0.0
67.5
0.0
FollowerTransJoint
0.0
85.0
0.0
FollowerRevJoint
0.0
30.0
0.0
CamCM
0.0
-14.1604 0.0
Step 2: Creating Bodies.
We will have three bodies apart from the ground body in our model visualization: the cam, the follower shaft and the
follower roller. Pre-specified inertia properties will be used to define the bodies.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Body (or right-click the
Body icon
on the Model-Reference toolbar).
The Add Body or BodyPair dialog is displayed.
2.
For Label, enter Cam and click OK.
3.
Right-click on Bodies in the Project Browser and select Add Body to define a second body.
The Add Body or BodyPair dialog is displayed.
4.
For Label, enter FollowerShaft and click OK.
5.
Right-click on Bodies in the Project Browser and select Add Body to define a third body.
The Add Body or BodyPair dialog is displayed.
6.
For Label, enter FollowerRoller and click OK.
7.
From the Properties tab, specify the following for the three bodies:
70
Body
Mass
Ixx
Iyy
Izz
Ixy
Iyz
Izx
Cam
0.174526
60.3623
63.699
123.276
0.0
0.0
0.0
FollowerShaft
0.00735
20.679
0.0147
20.679
0.0
0.0
0.0
FollowerRoller
3.0625
0.057468 0.005468 0.0383125 0.0
0.0
0.0
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
8.
For the Cam body, under the CM Coordinates tab, check the Use CM Coordsys box.
9.
Double click on Point.
The Select a Point dialog is displayed.
Choose CamCM and click OK.
10. Accept defaults for axes orientation properties.
11. For the FollowerShaft body, under the CM Coordinates tab, check the Use CM Coordsys box.
12. Double click on Point.
The Select a Point dialog is displayed.
Choose FollowerShaftCM and click OK.
13. Accept defaults for axes orientation properties.
14. For the FollowerRoller body, under the CM Coordinates tab, check the Use CM Coordsys box.
15. Double click on Point.
The Select a Point dialog is displayed.
Choose FollowerRevJoint and click OK.
16. Accept defaults for axes orientation properties.
Step 3: Creating Joints.
Here, we will define all the necessary joints except the CVCV joint which will be defined as a advanced joint later. We
require three joints for the model. The first of them is the revolute joint between the cam and ground body. The second
joint we need is a translational joint between the follower shaft and ground body and the third joint is the revolute joint
that connects the roller to the shaft.
1.
From the Project Browser right-click on Model and select Add Constraint > Joint (or right-click the Joints icon
on the Model-Constraint toolbar).
The Add Joint or JointPair dialog is displayed.
2.
For Label, enter CamPivot.
3.
Select Revolute Joint as the type and click OK.
4.
From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed.
Choose Cam and click OK.
5.
From the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed.
Choose Ground Body and click OK.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
71
6.
Again from the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
Choose PivotPoint and click OK.
7.
For Axis click on the arrow and choose Vector. Now click on Vector.
The Select a Vector dialog is displayed.
Choose Global Z and click OK.
8.
Right-click on Joints in the Project Browser and select Add Joint to define a second joint.
The Add Joint or JointPair dialog is displayed.
9.
For Label, enter FollowerTransJoint.
10. Select Translational Joint as the type and click OK.
11. From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed.
Choose FollowerShaft and click OK.
12. From the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed.
Choose Ground Body and click OK.
13. Again from the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
Choose FollowerTransJoint and click OK.
14. For Axis, click on the arrow and choose Vector. Now click on Vector.
The Select a Vector dialog is displayed.
Choose Global Y and click OK.
15. Right-click on Joints in the Project Browser and select Add Joint to define a third joint.
The Add Joint or JointPair dialog is displayed.
16. For Label, enter FollowerRollerJoint.
17. Select Revolute Joint as the type and click OK.
18. From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed.
Choose FollowerRoller and click OK.
19. From the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed.
Choose FollowerShaft and click OK.
72
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
20. Again from the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
Choose FollowerRevJoint and click OK.
21. For Axis click on the arrow and choose Vector. Now click on Vector.
The Select a Vector dialog is displayed.
Choose Global Z and click OK.
Step 4: Creating Markers.
Now, we will define markers required for the definition of the CVCV joint. We need two markers, one associated with
the cam and the other associated with the follower roller.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Marker (or right-click the
Markers icon
on the Model-Reference toolbar).
2.
For Label, enter CamMarker and click OK.
3.
From the Properties tab, double-click on Body.
The Select a Body dialog is displayed.
Choose Cam and click OK.
4.
From the Properties tab, double-click on Point.
The Select a Point dialog is displayed.
Choose PivotPoint and click OK.
5.
Accept the defaults for axes orientation.
6.
Right-click on Markers in the Project Browser and select Add Marker to define a second marker.
The Add Marker or MarkerPair dialog is displayed.
7.
For Label, enter FollowerMarker and click OK.
8.
From the Properties tab, double-click on Body.
The Select a Body dialog is displayed.
Choose FollowerRoller and click OK.
9.
From the Properties tab, double-click on Point.
The Select a Point dialog is displayed.
Choose FollowerRevJoint and click OK.
10. Accept the defaults for axes orientation.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
73
Step 5: Creating Graphics.
Graphics for the cam have been provided as an h3d file. We need to associate the h3d with the cam body defined in
our model. The follower shaft and roller can be represented using primitive graphics. To make the visualization better,
we will also create some graphics for the joints.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Graphic (or right-click the
Graphics icon
on the Model-Reference toolbar).
The Add Graphics or GraphicPair dialog is displayed.
2.
For Label, enter Cam.
3.
Choose File from the drop-down menu.
4.
Click on the browser icon
5.
Click Open and then OK.
6.
From the Connectivity tab, double-click on Body.
and select CamProfile.h3d from the model folder.
The Select a Body dialog is displayed.
Choose Cam and click OK.
7.
Right-click on Graphics in the Project Browser and select Add Graphic to define a second graphic.
The Add Graphics or GraphicPair dialog is displayed.
8.
For Label, enter FollowerShaft.
9.
Choose Cylinder from the drop-down menu and click OK.
10. From the Connectivity tab, double-click on Body.
The Select a Body dialog is displayed.
Choose FollowerShaft and click OK.
11. Double click on Point.
The Select a Point dialog is displayed.
Choose FollowerShaftCM and click OK.
12. Click on the arrow below Direction and select the Vector option.
13. Click on Vector.
The Select a Vector dialog is displayed.
Choose Global Y and click OK.
74
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
14. From the Properties tab, specify the following values:
Property
Value
Length
75
Offset
-37.5
Radius 1
2.000
Radius 2
2.000
15. For the Cap properties, choose Cap Both Ends.
16. Right-click on Graphics in the Project Browser and select Add Graphic to define a third graphic.
The Add Graphics or GraphicPair dialog is displayed.
17. For Label, enter FollowerRoller.
18. Choose Cylinder from the drop-down menu and click OK.
19. From the Connectivity tab, double-click on Body.
The Select a Body dialog is displayed.
Choose FollowerRoller and click OK.
20. Double click on Point.
The Select a Point dialog is displayed.
Choose FollowerRevJoint and click OK.
21. Click on the arrow below Direction and select the Vector option.
22. Click on Vector.
The Select a Vector dialog is displayed.
Choose Global Z and click OK.
23. From the Properties tab, specify the following values:
Property
Value
Length
5.0
Offset
-2.5
Radius 1
5.000
Radius 2
5.000
24. For the Cap properties, choose Cap Both Ends.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
75
Next, we will add some joint graphics for better visualization and aesthetics.
1.
Right-click on Graphics in the Project Browser and select Add Graphic to define another graphic.
The Add Graphics or GraphicPair dialog is displayed.
2.
For Label, enter CamPivotGraphicOne (first graphic to show the cam pivot).
3.
Choose Cylinder from the drop-down menu and click OK.
4.
From the Connectivity tab, double-click on Body.
The Select a Body dialog is displayed.
Choose Ground Body and click OK.
5.
Double click on Point.
The Select a Point dialog is displayed.
Choose PivotPoint and click OK.
6.
Click on the arrow below Direction and select the Vector option.
7.
Click on Vector.
The Select a Vector dialog is displayed.
Choose Global Z and click OK.
8.
9.
From the Properties tab, specify the following values:
Property
Value
Length
7.5
Offset
-3.75
Radius 1
4.000
Radius 2
4.000
For the Cap properties, choose Cap Both Ends.
10. Right-click on Graphics in the Project Browser and select Add Graphic to define another graphic.
The Add Graphics or GraphicPair dialog is displayed.
11. For Label, enter CamPivotGraphicTwo (second graphic to show the cam pivot).
12. Choose Cylinder from the drop-down menu and click OK.
13. From the Connectivity tab, double-click on Body.
The Select a Body dialog is displayed.
Choose Cam and click OK.
76
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
14. Double click on Point.
The Select a Point dialog is displayed.
Choose PivotPoint and click OK.
15. Click on the arrow below Direction and select the Vector option.
16. Click on Vector.
The Select a Vector dialog is displayed.
Choose Global Z and click OK.
17. From the Properties tab, specify the following values:
Property
Value
Length
7.6
Offset
-3.8
Radius 1
2.000
Radius 2
2.000
18. For the Cap properties, choose Cap Both Ends.
Repeat this process for the FollowerRevJoint and label the graphics as:
RollerPivotGraphicOne on FollowShaft with a length of 7.5 and radius of 2.
and
RollerPivotGraphicTwo on FollowRoller with a length of 7.6 and radius of 1.
19. Right-click on Graphics in the Project Browser and select Add Graphic to define another graphic.
The Add Graphics or GraphicPair dialog is displayed.
20. For Label, enter FollowerTransJointGraphic (the graphic for the translational joint).
21. Choose Box from the drop-down menu and click OK.
22. From the Connectivity tab, double-click on Body.
The Select a Body dialog is displayed.
Choose Ground Body and click OK.
23. For Type, choose Center from the drop-down menu.
24. Double-click on Point.
The Select a Point dialog is displayed.
Choose FollowerTransJoint and click OK.
25. For axis orientation, use the vector Global Z as the Z-axis and the vector Global X to define the ZX plane.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
77
26. From the Properties tab, specify the following properties:
Property
Value
Length X
15
Length Y
10
Length Z
10
At the end of this step, your model should look like the one shown in the figure below:
Step 6: Creating the Curves.
The curves that we will use here are the curves that define the profile of the cam and the roller. The data for the cam
profile curve has been provided in csv format. Since the roller profile is circular - it can be defined using mathematical
expressions.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Curve (or right-click the
Curves icon
on the Model-Reference toolbar).
The Add Curve dialog is displayed.
2.
For Label, enter CamProfile and click OK.
3.
From the Properties tab, use the first drop-down menu to change the curve from 2D Cartesian to 3D Cartesian.
4.
From the Properties tab, click on the x radio button.
78
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
5.
Click on the file browser icon
and select CamProfile.csv. Click Open.
6.
Choose the properties of the curve as shown in the figure below:
7.
From the Properties tab, click on the y radio button.
8.
Click on the file browser icon
9.
Choose the properties of the curve as shown in the figure below:
and select CamProfile.csv. Click Open.
10. From the Properties tab, click on the z radio button.
11. Click on the file browser icon
and select CamProfile.csv. Click Open.
12. Choose the properties of the curve as shown in the figure below:
Notice the different column numbers used for the x, y and z properties.
13. From the Properties tab, use the fourth drop-down menu to set the curve type to Closed Curve.
14. Right-click on Curves in the Project Browser and select Add Curve to define another curve.
The Add Curve dialog is displayed.
15. For Label, enter FollowerRollerProfile and click OK.
16. From the Properties tab, use the first drop-down menu to change the curve from 2D Cartesian to 3D Cartesian.
17. From the Properties tab, click on the x radio button.
18. Select Math from the second drop-down menu on the left.
19. Enter 5*sin(2*PI*(0:1:0.01)) in the Expression Builder.
20. From the Properties tab, click on the y radio button.
21. Select Math from the second drop-down menu on the left.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
79
22. Enter 5*cos(2*PI*(0:1:0.01)) in the Expression Builder.
23. From the Properties tab, click on the z radio button.
24. Select Math from the second drop-down menu at the left.
25. Enter 0.0*(0:1:0.01) in the expression builder.
26. From the Properties tab, use the fourth drop-down menu to change the curve from Open Curve to Closed Curve.
We now have both of the curves defined.
Step 7: Creating the CVCV Joint.
Now, we will create the CVCV joint.
1.
From the Project Browser right-click on Model and select Add Constraint > Advanced Joint (or right-click the
Advanced Joints icon
on the Model-Constraint toolbar).
The Add AdvJoint dialog is displayed.
2.
For Label, enter CVCV.
3.
Choose CurveToCurveJoint from the drop-down menu and click OK.
4.
From the Connectivity tab, double-click on Curve 1.
The Select a Curve dialog is displayed.
Choose CamProfile and click OK.
5.
From the Connectivity tab, double-click on Curve 2.
The Select a Curve dialog is displayed.
Choose FollowerRollerProfile and click OK.
6.
From the Connectivity tab, double-click on Ref Marker 1.
The Select a Marker dialog is displayed.
Choose CamMarker and click OK.
7.
Again from the Connectivity tab, double-click on Ref Marker 2.
The Select a Marker dialog is displayed.
Choose FollowerMarker and click OK.
Step 8: Specifying the Cam Motion.
After we have the topology and constraints specified, we need to provide the cam motion. The most natural choice
here is a uniform motion imposed on the revolute joint.
1.
Click the Project Browser right-click on Model and select Add Constraint > Motions (or right-click the
Motions icon
on the Model-Constraint toolbar).
The Add Motion or MotionPair dialog is displayed.
80
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
2.
For Label, enter CamMotion and click OK.
3.
From the Connectivity tab, double-click on Joint. Choose CamPivot and click OK.
4.
From the Properties tab, specify the properties as `10*TIME`.
Step 9: Specifying Gravity.
Since our shaft is along the Y-axis, we want the gravity to be in the negative Y direction. To specify this:
1.
Click the Forms icon
on the Model-General toolbar.
The Forms panel is displayed.
2.
Select Gravity and specify the following values:
Direction
Value
X
0
Y
-9810
Z
0
Step 10: Specifying Output Requests.
We would like to monitor the reaction on CVCV joint since it can help us verify the correctness of our results. This will
be discussed in detail towards the end of the tutorial where we will also discuss lift-offs.
1.
From the Project Browser right-click on Model and select Add General MDL Entity > Output (or right-click
the Outputs icon
on the Model-General toolbar).
The Add Output dialog is displayed.
2.
For Label, enter CVCV Reaction and click OK.
3.
From the Properties tab, choose Expressions from the drop-down menu.
4.
Click in the F2 expression box.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
81
5.
Click on the
button.
The Expression Builder dialog is displayed.
6.
Populate the expression as 'CVCV({aj_0.idstring},1,2,0)'.
7.
Click OK.
82
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
8.
Repeat the process for F3, F4, F5, F6, F7, F8 by changing the third parameter to 3, 4, 6, 7, and 8 accordingly.
The CVCV (id, jflag, comp, ref_marker) function returns the reaction on the CVCV joint:
id
ID of the CVCV joint
jflag
0 gives reaction on the I-marker and 1 on J-marker
comp
component of the reaction
ref_marker
reference marker (0 implies Global Frame)
Step 11: Running the Model.
We have the model defined completely and it is now ready to run.
1. Click the Run icon
on the Model-Main toolbar.
The Run panel is displayed.
2. Under the Simulation Parameters tab, specify values as shown below:
3.
Under the Main tab, choose the Save and run current model radio button.
4.
Click on the browser icon
5.
Click Save.
6.
Click Check to check the model.
7.
To run the model, click Run.
next to Save As and specify a filename of your choice.
The solver will get invoked here.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
83
Step 12: Viewing the Results.
1. Once the solver has finished its job, the Animate button will be active. Click on Animate.
The
icon can be used to start the animation, and the
icon can be used to stop/pause the animation.
One would also like to inspect the displacement profile of the follower in this mechanism. For this, we will plot the
Y position of the center of mass of the follower.
2. Use the Page Layout drop-down menu
on the Page Controls toolbar to select the three-window layout
3. Highlight the lower right window and use the Select application drop-down menu to change the application from
MotionView
to HyperGraph 2D
4. Click the Build Plots
5. Click on the browser icon
.
icon on the Curves toolbar.
and load the result.abf file.
6. Make selections for the plot as shown below:
We are plotting the Y profile of the center of mass of the follower.
7.
Click Apply.
The profile for the Y-displacement of the follower should look like the one shown below:
84
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
.
If we set the X-axis properties to zoom in on one cycle, the profile will look as shown below:
The profile of the cam has been designed to obtain the above Y-profile for the follower.
Now, we come to the discussion on ‘lift-offs’. In some cases, the dynamics of the system may cause the follower to
lose contact with the cam - this is called ‘lift-off’. In such cases, modeling the system using a CVCV joint will give us
incorrect results. This is because the CVCV joint constrains the follower point to be always on the curve. For such
cases, contact modeling has to be used. However one would like to start with a CVCV model whenever applicable,
since modeling a CVCV joint is a lot easier than modeling contact. Given this scenario, the following modeling steps
should be followed:
1.
Model the system using a CVCV joint.
2.
Monitor the CVCV joint reaction. If the reaction on the follower is a ‘pulling’ reaction, it means that 'lift-off' would
have occurred and one needs to go for a contact model. Otherwise, the CVCV model is good enough.
Now, let’s check if our CVCV model is good enough. For this, we need to plot the reaction profile on the follower
roller. Since the follower is moving along the Y-axis, any negative reaction along the Y-axis is a ‘pulling’ reaction.
So, let’s plot the Y-reaction on the follower roller. For this:
3.
Add a new page to the session by clicking on the Add Page icon
4.
Choose HyperGraph 2D
5.
Click on the browser icon
6.
Make selections for the plot as shown below:
and click on Build Plots
.
.
and load the result.abf file.
We are plotting the Y profile of the CVCV reaction on the follower roller.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
85
7.
Click Apply.
The profile should look like the one shown below:
If we zoom in on one cycle by scaling the X-axis, the profile looks like this:
We see that the Y component of the CVCV reaction on the follower is always positive, and hence it is never a
‘pulling’ reaction. Thus, our CVCV model is good enough to model the dynamics since there is no expected liftoff.
In this tutorial, we learned how to model a CVCV joint and use it to model a cam-follower mechanism. We also
discussed 'lift-offs' and ways of verifying the suitability of a CVCV joint model for modeling the dynamics of a particular
system.
86
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1027: Modeling Point-to-Deformable-Curve (PTdCV)
Higher-Pair Constraint
In this tutorial, you will learn how to:
Model a PTdCV (point-to-deformable-curve) joint
A PTdCV (point-to-deformable-curve) joint is a higher pair constraint. This constraint restricts a specified point on a
body to move along a specified deformable curve on another body. The curve may be open or closed, planar or in 3-d
space. The point may belong to a rigid, flexible or a point mass. For this, we define a deformable curve on a beam
supported at its ends by revolute joints. A mass is constrained to move along the curve with a PTdCV constraint.
Exercise
Copy the file KG_N_MM_S_50elems2.h3d from
<Install directory>\tutorials\mv_hv_hg\mbd_modeling\interactive to <working directory>.
Step 1: Creating points.
Let’s start with creating points that will help us locate the bodies and joints as required. We will define points for
center of mass of the bodies and joint locations.
1.
Start a new MotionView Session. We will work with the default units (kg, mm, s, N).
2.
From the Project Browser right-click on Model and select Add Reference Entity > Point (or right-click the
Points icon
on the Model-Reference toolbar).
The Add Point or PointPair dialog is displayed.
3.
For Label, enter PointbeamInterface1.
4.
Accept the default variable name and click OK.
5.
Click on the Properties tab and specify the coordinates as X = 152.4, Y, = 0.0, and Z = 0.0.
6.
Follow the same procedure for the other points specified in the table below:
Point
X
Y
Z
PointbeamInterface2
460.80
0.0
0.0
Point0
183.24
0.0
0.0
Point1
214.08
0.0
0.0
Point2
244.92
0.0
0.0
Point3
275.76
0.0
0.0
Point4
306.60
0.0
0.0
Point5
337.44
0.0
0.0
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
87
Point
X
Y
Z
Point6
368.28
0.0
0.0
Point7
399.12
0.0
0.0
Point8
429.96
0.0
0.0
Step 2: Creating Bodies.
We will have two bodies apart from the ground body in our model visualization: the beam and the ball. Pre-specified
inertia properties will be used to define the ball.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Body (or right-click the
Body icon
on the Model-Reference toolbar).
The Add Body or BodyPair dialog is displayed.
2.
For Label, enter Beam and click OK.
3.
Accept the default variable name and click OK.
For the remainder of this tutorial - accept the default names that are provided for the rest of the variables that you
will be asked for.
4.
From the Properties tab, check the Deformable box.
5.
Click on the Graphic file browser icon
directory> and click Open.
, select KG_N_MM_S_50elems2.h3d from the <working
The same path will automatically appear next to the H3D file browser icon
6.
.
Right-click on Bodies in the Project Browser and select Add Body.
The Add Body or BodyPair dialog is displayed.
7.
For Label, enter Ball and click OK.
8.
From the Properties tab, specify the following for the Ball:
9.
88
Body
Mass
Ixx
Iyy
Izz
Ixy
Iyz
Izx
Ball
100
1e6
1e6
1e6
0.0
0.0
0.0
For the Ball body, under the CM Coordinates tab, check the Use center of mass coordinate system box.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
10. Double click on Point.
The Select a Point dialog is displayed.
11. Choose Point4 and click OK.
12. Accept defaults for axes orientation properties.
13. For the Ball body, from the Initial Conditions tab - check the Vx box under Translational velocity and enter a
value of 100 into the text box.
This sets a value of 100 for the translational velocity of the ball in the X-direction. A somewhat high value of Vx is
introduced to make the motion of the ball clearly visible in the animation.
14. Accept all the other default values.
Step 3: Creating Markers.
Now, we will define some markers required for the beam. We will totally define eleven markers here at equal distances
along the span of the beam.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Marker (or right-click the
Markers icon
on the Model-Reference toolbar).
The Add Marker or MarkerPair dialog is displayed.
2.
For Label, enter Marker0 and click OK.
3.
Under the Properties tab, double-click on Body.
The Select a Body dialog is displayed.
4.
Choose Beam and click OK.
5.
Under the Properties tab, double-click on Point.
The Select a Point dialog is displayed.
6.
Choose PointbeamInterface1 and click OK.
Accept the defaults for axes orientation.
7.
Right-click on Markers in the Project Browser and select Add Marker to define a second marker. Continue
adding markers until Marker10 is reached.
8.
For subsequent labels; enter Marker1, Marker2, etc. until Marker10 is reached.
9.
From the Properties tab, always select the Beam (after double-clicking on Body each time).
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
89
10. From the Properties tab, select Point0 through Point8, and finally PointbeamInterface2 for Marker10 (by
double-clicking on Point every time).
Always accept the defaults for axes orientation.
A table is provided below for reference:
Marker No.
Body
Point
0
Beam
PointbeamInterface1
1
Beam
Point0
2
Beam
Point1
3
Beam
Point2
4
Beam
Point3
5
Beam
Point4
6
Beam
Point5
7
Beam
Point6
8
Beam
Point7
9
Beam
Point8
10
Beam
PointbeamInterface2
Step 4: Creating Joints.
Here, we will define all the necessary joints except for the PTdCV joint, which will be defined as an advanced joint
later. We require two joints for the model, both of them being fixed joints between the beam and ground body.
1.
From the Project Browser right-click on Model and select Add Constraint > Joint (or right-click the Joints icon
on the Model-Constraint toolbar).
The Add Joint or JointPair dialog is displayed.
2.
For Label, enter Joint0.
3.
Select Fixed Joint as the type and click OK.
4.
From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed.
5.
90
Choose Beam and click OK.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
Under the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed.
7.
Choose Ground Body and click OK.
8.
From the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
9.
Choose PointbeamInterface1 and click OK.
10. Right-click on Joints in the Project Browser and select Add Joint to define a second joint.
The Add Joint or JointPair dialog is displayed.
11. For Label, enter Joint1.
12. Select Fixed Joint as the type and click OK.
13. From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed.
14. Choose Beam and click OK.
15. From the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed.
16. Choose Ground Body and click OK.
17. From the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
18. Choose PointbeamInterface2 and click OK.
Step 5: Creating Deformable Curves.
Here we will now define the deformable curve on the surface of the beam. The ball is constrained to move along this
curve.
1.
Click the Project Browser tab, right-click on Model and select Add Reference Entity > Deformable Curve (or
right-click the Deformable Curves icon
on the Model-Reference toolbar).
The Add DeformableCurve dialog is displayed.
2.
For Label, enter DeformableCurve0, and click OK.
3.
From the Properties tab, select Marker for Data type, and NATURAL for Left end type and Right end type.
4.
Check the box just to the left of the Marker collector (which situated to the far right of Data Type).
The intermediate Add button is changed to an Insert button.
5.
Enter 10 into the text box located just to the right of the Insert button, and then click on the Insert button.
Eleven Marker collectors are displayed.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
91
6.
Click on the individual collectors.
The Select a Marker dialog is displayed.
7.
Select all the markers one by one, starting from Marker 0 to Marker 10.
Step 6: Creating Advanced Joints.
Now we will define the advanced PTdCV joint.
1.
From the Project Browser right-click on Model and select Add Constraint > Advanced Joint (or right-click the
Advanced Joints icon
on the Model-Constraint toolbar).
The Add AdvJoint dialog is displayed.
2.
For Label, enter AdvancedJoint 0.
3.
From the Connectivity tab select: PointToDeformableCurveJoint, Ball for Body, Point4 for Point, and
DeformableCurve 0 for DeformableCurve.
Step 7:Creating Graphics.
Graphics for the ball will now be built here.
1.
Click the Project Browser tab, right-click on Model and select Add Reference Entity > Graphic (or right-click
the Graphics icon
on the Model-Reference toolbar).
The Add Graphics or GraphicPair dialog is displayed.
2.
For Label, enter Graphic0.
3.
For Type, choose Sphere from the drop-down menu and click OK.
4.
From the Connectivity tab, double-click on Body.
The Select a Body dialog is displayed.
5.
Choose Ball and click OK.
6.
Again from the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
7.
Choose Point4 and click OK.
8.
From the Properties tab, enter 2.0 as the radius of the Ball.
9.
From the Visualization tab, select a color for the Ball.
92
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 8: Return to the Bodies Panel.
1.
Click the Body icon
on the Model-Reference toolbar.
2.
For the beam which has already been defined, click on the Nodes button.
The Nodes dialog is displayed.
3.
Uncheck the Only search interface nodes box and then click on Find All.
4.
Close the the Nodes dialog.
At the end of these steps your model should look like the one shown in the figure below:
One final comment before running the model:
This type of constraint does not ensure that the contact point will stay within the range of data specified for
the curve. Additional forces at the end need to be defined by the user to satisfy this requirement. If the
contact point goes out of range of the data specified for this curve, the solver encounters an error (unless
additional forces are defined to satisfy this). In that case, one has to change the initial velocities for the ball,
or increase the range of data specified for the curve, or run the simulation for a shorter interval of time.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
93
Step 9: Running the Model.
We now have the model defined completely and it is ready to run.
1.
Click the Run icon
on the Model-Main toolbar.
The Run panel is displayed.
2.
From the Simulation Parameters tab, specify values as shown below:
3.
From the Main tab, choose the Save and run current model radio button.
4.
Click on the browser icon
5.
Click Save.
6.
Click Check, to check the model.
7.
To run the model, click Run.
next to Save As, and save the files as result.abf.
The solver will get invoked here.
Step 10: Viewing the Results.
1.
Once the solver has finished its job, the Animate button will be active. Click on Animate.
The
icon can be used to start the animation, and the
icon can be used to stop/pause the animation.
One would also like to inspect the displacement profile of the beam and the ball. For this, we will plot the Z
position of the center of mass of the ball.
2.
Click on the Add Page icon
and add a new page.
3.
Use the Select application drop-down menu to change the application from MotionView
to HyperGraph 2D
.
4.
Click the Build Plots
5.
Click on the browser icon
94
icon on the Curves toolbar.
and load the result.abf file.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
Make selections for the plot as shown below:
We are plotting the Z position of the center of mass of the ball.
7.
Click Apply.
The profile for the Z-displacement of the ball should look like the one shown below:
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
95
MV-1028: Modeling Point-to-Deformable-Surface (PTdSF)
Higher-Pair Constraint
In this tutorial, you will learn how to:
Model a PTdSF (point-to-deformable-surface) joint
A PTdSF (point-to-deformable-surface) joint is a higher pair constraint. This constraint restricts a specified point on a
body to move along a specified deformable surface on another body. The point may belong to a rigid, flexible, or point
body. The deformable surface for this tutorial is defined on a rigidly supported plate. A mass is constrained to move
on the surface with a PTdSF constraint.
Exercise
Copy the files membrane.h3d and membrane.fem from
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\interactive to <working
directory>.
Step 1: Creating points.
Let’s start with creating points that will help us locate the bodies and joints as required. We will define points for
center of mass of the bodies and joint locations.
1.
Start a new MotionView Session. We will work with the default units (kg, mm, s, N).
2.
Click the Project Browser tab, right-click on Model and select Add Reference Entity > Point (or right-click the
Points icon
on the Model-Reference toolbar).
The Add Point or PointPair dialog is displayed.
3.
For Label, enter BallCM.
4.
Accept the default variable name and click OK.
5.
Click on the Properties tab and specify the coordinates as X = 0.0, Y, = 0.0, and Z = 0.0.
6.
Follow the same procedure for the other points specified in the following table:
96
Point
X
Y
Z
PointMembInterface39
-55.00
-55.00
0.0
PointMembInterface40
55.00
-55.00
0.0
PointMembInterface41
55.00
55.00
0.0
PointMembInterface42
-55.00
55.00
0.0
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 2: Creating Bodies.
We will have two bodies apart from the ground body in our model visualization: the membrane and the ball. Prespecified inertia properties will be used to define the ball.
1.
From the Project Browser, right-click on Model and select Add Reference Entity > Body (or right-click the
Body icon
on the Model-Reference toolbar).
The Add Body or BodyPair dialog is displayed.
2.
For Label, enter Membrane.
3.
Accept the default variable name and click OK.
For the remainder of this tutorial - accept the default names for the rest of the variables that you will be asked for.
4.
From the Properties tab, check the Deformable box.
5.
Click on the Graphic file browser icon
and select membrane.h3d from the <working directory>.
The same path will automatically appear next to the H3D file browser icon
6.
.
Right-click on Bodies in the Project Browser and select Add Body to define a second body.
The Add Body or BodyPair dialog is displayed.
7.
For Label, enter Ball and click OK.
8.
From the Properties tab, specify the following for the Ball:
9.
Body
Mass
Ixx
Iyy
Izz
Ixy
Iyz
Izx
Ball
1.00
4000.00
4000.00
4000.00
0.0
0.0
0.0
For the Ball body, under the CM Coordinates tab, check the Use center of mass coordinate system box.
10. Double click on Point.
The Select a Point dialog is displayed.
11. Choose BallCM and click OK.
12. Accept defaults for axes orientation properties.
13. For the Ball body, from the Initial Conditions tab - check the Vx box under Translational velocity and enter a
value of 1 into the text box.
This sets a value of 1 for the translational velocity of the ball in the X direction.
14. Repeat the same for Vy.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
97
Step 3: Creating Markers and a Deformable Surface.
Now, we will define some markers required for the membrane.
1.
From the Macros menu, select Create Markers For Deformable Surface.
The Create Markers For Deformable Surface utility is displayed at the bottom of the screen.
2.
For Select the Body, use the Body input collector to select Membrane.
3.
Click on the Select the FEM file file browser icon and select the membrane.fem file.
4.
Use the default values for the Maximum number of marker rows and Maximum number of marker columns.
5.
Click Generate.
The Markers and Deformable Surface are created.
Step 4: Creating Joints.
Here, we will define all the necessary joints except the PTdSF joint, which will be defined as an advanced joint later.
We require four joints for the model, all of them being fixed joints between the membrane and the ground.
1.
From the Project Browser, right-click on Model and select Add Constraint > Joint (or right-click the Joints
icon
on the Model-Constraint toolbar).
The Add Joint or JointPair dialog is displayed.
2.
98
For Label, enter Joint 1.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
Select Fixed Joint as the type and click OK.
4.
From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed.
5.
Choose Membrane and click OK.
6.
From the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed.
7.
Choose Ground Body and click OK.
8.
From the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
9.
Choose PointMembInterface39 and click OK.
10. Repeat the same procedure for the other three joints.
A table is provided below for your convenience:
Label
Type of Joint
Body 1
Body 2
Point
Joint 2
Fixed
Membrane
Ground Body
PointMembInterface40
Joint 3
Fixed
Membrane
Ground Body
PointMembInterface41
Joint 4
Fixed
Membrane
Ground Body
PointMembInterface42
Step 5: Creating Advanced Joints.
Now we will define the advanced PTdSF joint.
1.
From the Project Browser, right-click on Model and select Add Constraint > Advanced Joint (or right-click
the Advanced Joints icon
on the Model-Constraint toolbar).
The Add AdvJoint dialog is displayed.
2.
For Label, enter AdvancedJoint 0.
3.
Accept the default variable name and click OK.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
99
4.
From the Connectivity tab, select:
PointToDeformableSurface Joint
Ball for Body
BallCM for Point
DeformableSurface 1 for DeformableSurface.
Step 6: Creating Graphics.
Graphics for the ball will now be built here.
1.
From the Project Browser, right-click on Model and select Add Reference Entity > Graphic (or right-click the
Graphics icon
on the Model-Reference toolbar).
The Add Graphics or GraphicPair dialog is displayed.
2.
For Label, enter Ball.
3.
For Type, choose Sphere from the drop-down menu and click OK.
4.
Under the Connectivity tab, double-click on Body.
The Select a Body dialog gets displayed.
5.
Choose Ball and click OK.
6.
Again under the Connectivity tab, double-click on Point.
The Select a Point dialog gets displayed.
7.
Choose BallCM and click OK.
8.
Under the Properties tab, enter 1.0 as the radius of the Ball.
9.
Under the Visualization tab, select a color for the Ball.
Step 7: Return to the Bodies Panel.
1.
Click the Body icon
on the Model-Reference toolbar.
2.
For the membrane which has already been defined, click on the Nodes button.
The Nodes dialog is displayed.
3.
Uncheck the Only search interface nodes box and then click on Find All.
100
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
4.
Close the the Nodes dialog.
At the end of these steps your model should look like the one shown in the figure below:
One final comment before running the model:
This type of constraint does not ensure that the contact point will stay within the range of data specified for
the surface. Additional forces at the end need to be defined by the user to satisfy this requirement. If the
contact point goes out of range of the data specified for this curve, the solver encounters an error (unless
additional forces are defined to satisfy this). In that case, one has to change the initial velocities for the ball,
or increase the range of data specified for the curve, or run the simulation for a shorter interval of time.
Step 8: Running the Model.
Now we have the model defined completely and it is ready to run.
1.
Click the Run icon
on the Model-Main toolbar.
The Run panel is displayed.
2.
From the Simulation Parameters tab, specify values as shown below:
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
101
3.
From the Main tab, choose the Save and run current model radio button.
4.
Click on the browser icon
directory>.
5.
Click Save.
6.
Click Check to check the model.
7.
To run the model, click Run.
next to Save As, and save the file as result.abf in the <working
The solver will get invoked here.
Step 9: Viewing the Results.
1.
Once the solver has finished its job, the Animate button will be active. Click on Animate.
The
icon can be used to start the animation, and the
icon can be used to stop/pause the animation.
One would also like to inspect the displacement profile of the beam and the ball. For this, we will plot the Z
position of the center of mass of the ball.
2.
Click on the Add Page icon
3.
Use the Select application drop-down menu to change the application from MotionView
2D
and add a new page.
to HyperGraph
.
4.
Click the Build Plots
icon on the Curves toolbar.
5.
Click on the browser icon
6.
Make selections for the plot as shown below:
and load the result.abf file from the <working directory>.
We are plotting the Z position of the center of mass of the ball.
102
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
7.
Click Apply.
The profile for the Z-displacement of the ball should look like the one shown below:
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
103
MV-1029: Modeling Point-to-Deformable-Surface Force (PTdSF)
Higher-Pair Constraint
In this tutorial, you will learn how to:
Model a PTdSFforce (point-to-deformable-surface) joint with a contact force
A PTdSFforce (point-to-deformable-surface) joint is a higher pair constraint with an added contact force. The force is
either modeled as a linear one or a Poisson type here. This constraint restricts a specified point on a body to move
along a specified deformable surface on another body. The point may belong to a rigid, flexible or point body. The
deformable surface for this tutorial is defined on a rigidly supported plate. A mass is constrained to move on the
surface with a PTdSFforce constraint. The added feature here is that a flexible contact force acts at the center of
mass of the ball between it and the deformable surface. In this tutorial we will take up the case of the linear force
model.
Exercise
Copy the following file Plate.h3d and membrane.fem from
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\interactive to <working
directory>.
Step 1: Creating points.
Let’s start with creating points that will help us locate the bodies and joints as required. We will define points for
center of mass of the bodies and joint locations.
1.
Start a new MotionView Session. We will work with the default units (kg, mm, s, N).
2.
From the Project Browser right-click on Model and select Add Reference Entity > Point (or right-click the
Points icon
on the Model-Reference toolbar).
The Add Point or PointPair dialog is displayed.
3.
For Label, enter BallCM.
4.
Accept the default variable name and click OK.
5.
Click on the Properties tab and specify the coordinates as X = 0.0, Y, = 0.0, and Z = 50.0.
6.
Follow the same procedure for the other points specified in the following table:
104
Point
X
Y
Z
PointMembInterface39
-55.00
-55.00
0.0
PointMembInterface40
55.00
-55.00
0.0
PointMembInterface41
55.00
55.00
0.0
PointMembInterface42
-55.00
55.00
0.0
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 2: Creating Bodies.
We will have two bodies apart from the ground body in our model visualization: the membrane and the ball. Prespecified inertia properties will be used to define the ball.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Body (or right-click the
Body icon
on the Model-Reference toolbar).
The Add Body or BodyPair dialog is displayed.
2.
For Label, enter Membrane and click OK.
3.
Accept the default variable name and click OK.
For the remainder of this tutorial - accept the default names that are provided for the rest of the variables that you
will be asked for.
4.
From the Properties tab, check the Deformable box.
5.
Click on the Graphic file browser icon
and select Plate.h3d from the <working directory>.
The same path will automatically appear next to the H3D file browser icon
6.
.
Right-click on Bodies in the Project Browser and select Add Body.
The Add Body or BodyPair dialog is displayed.
7.
For Label, enter Ball and click OK.
8.
From the Properties tab, specify the following for the Ball:
9.
Body
Mass
Ixx
Iyy
Izz
Ball
1.00
40000.00
40000.00 40000.00
Ixy
Iyz
Izx
0.0
0.0
0.0
For the Ball body, under the CM Coordinates tab, check the Use center of mass coordinate system box.
10. Double click on Point.
The Select a Point dialog is displayed.
11. Choose BallCM and click OK.
12. Accept defaults for axes orientation properties.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
105
Step 3: Creating Markers and a Deformable Surface.
Now, we will define some markers required for the membrane.
1.
From the Macros menu, select Create Markers For Deformable Surface.
The Create Markers For a Deformable Surface utility is displayed at the bottom of the screen.
2.
For Select the Body, use the Body input collector to select Membrane.
3.
Click on the Select the FEM file file browser icon and select the membrane.fem file.
4.
Use the default values for the Maximum number of marker rows and Maximum number of marker columns.
5.
Click Generate.
The Markers and Deformable Surface are created.
Step 4: Creating Joints.
Here, we will define all the necessary joints. We require four joints for the model, all of them being fixed joints between
the membrane and the ground.
1.
From the Project Browser right-click on Model and select Add Constraint > Joint (or right-click the Joints icon
on the Model-Constraint toolbar).
The Add Joint or JointPair dialog is displayed.
2.
For Label, enter Joint 1.
3.
Select Fixed Joint as the type and click OK.
4.
From the Connectivity tab, double-click on Body 1.
The Select a Body dialog is displayed.
106
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
5.
Choose Membrane and click OK.
6.
From the Connectivity tab, double-click on Body 2.
The Select a Body dialog is displayed.
7.
Choose Ground Body and click OK.
8.
From the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
9.
Choose PointMembInterface39 and click OK.
10. Repeat the same procedure for the other three joints.
A table is provided below for your convenience:
Label
Type of Joint
Body 1
Body 2
Point
Joint 2
Fixed
Membrane
Ground Body
PointMembInterface40
Joint 3
Fixed
Membrane
Ground Body
PointMembInterface41
Joint 4
Fixed
Membrane
Ground Body
PointMembInterface42
Step 5: Creating Contacts.
Here we will define the contact force between the deformable membrane and the ball.
1.
From the Project Browser right-click on Model and select Add Force Entity > Contact (or right-click the
Contacts icon
on the Model-Force toolbar).
The Add Contact dialog is displayed.
2.
For Label, enter Contact 0.
3.
Select PointToDeformableSurfaceContact for the type of contact and click OK.
4.
From the Connectivity tab; select Linear as the calculation method, Ball for Body, BallCM for Point, and
DeformableSurface 1 for DeformableSurface.
5.
Uncheck the Flip normal checkbox.
6.
Click on the Properties tab and enter 10 for Radius, 1000 for Stiffness, and 0.2 for Damping.
Step 6: Creating Graphics.
Graphics for the ball will now be built here.
1.
From the Project Browser right-click on Model and select Add Reference Entity > Graphic (or right-click the
Graphics icon
on the Model-Reference toolbar).
The Add Graphics or GraphicPair dialog is displayed.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
107
2.
For Label, enter Ball.
3.
For Type, choose Sphere from the drop-down menu and click OK.
4.
From the Connectivity tab, double-click on Body.
The Select a Body dialog is displayed.
5.
Choose Ball and click OK.
6.
Again from the Connectivity tab, double-click on Point.
The Select a Point dialog is displayed.
7.
Choose BallCM and click OK.
8.
From the Properties tab, enter 10 as the radius of the Ball.
9.
From the Visualization tab, select a color for the Ball.
Step 7: Return to the Bodies Panel.
1.
Click the Body icon
on the Model-Reference toolbar.
2.
For the membrane which has already been defined, click on the Nodes button.
The Nodes dialog is displayed.
3.
Uncheck the Only search interface nodes box and then click on Find All.
4.
Close the the Nodes dialog.
At the end of these steps your model should look like the one shown in the figure below:
108
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 8: Running the Model.
Now we have the model defined completely and it is ready to run.
1.
Click the Run icon
on the Model-Main toolbar.
The Run panel gets displayed.
2.
From the Simulation Parameters tab, specify values as shown below:
3.
From the Main tab, select the Save and run current model radio button.
4.
Click on the browser icon
directory>.
5.
Click Save.
6.
Click Check, to check the model.
7.
To run the model, click Run.
next to Save As, and save the file as result.abf in the <working
The solver will get invoked here.
Step 9: Viewing the Results.
1.
Once the solver has finished its job, the Animate button will be active. Click on Animate.
The
can be used to start the animation, and the
icon can be used to stop/pause the animation.
One would also like to inspect the displacement profile of the membrane and the ball. For this, we will plot the Z
position of the center of mass of the ball.
2.
Click on the Add Page icon
3.
Use the Select application drop-down menu to change the application from MotionView
2D
and add a new page.
to HyperGraph
.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
109
4.
Click the Build Plots
icon on the Curves toolbar.
5.
Click on the browser icon
6.
Make selections for the plot as shown below:
and load the result.abf file from the <working directory>.
We are plotting the Z position of the center of mass of the ball.
7.
Click Apply.
The profile for the Z-displacement of the ball should look like the one shown below:
We can also plot the penetration distance for this flexible contact.
1.
Make selections for the plot as shown below:
2.
Click Apply.
110
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
The penetration profile as a function of time looks like the one shown below:
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
111
Automated
MV-1030: Model Building and Simulation using Wizards
MV-1035: Importing CAD or FE into MotionView
MV-1040: Model Building using TCL
MV-1050: Automation Using TCL
MV-1051: Understanding Sequential Simulation
112
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1030: Model Building and Simulation using Wizards
In this tutorial, you will:
Learn how to create and instantiate a system definition using the MotionView GUI
How to use the assembly and task wizards to efficiently build and analyze a front suspension model
How to use the Data Summary and Topology Summary to see model information collectively
Build an aircraft landing gear mechanism with new wizards
Wizards are one of the most powerful features in MotionView. There are two standard wizards in the MotionView MBD
model window: the Assembly Wizard and the Task Wizard. The wizards rely on a library of system, task, and report
definition files to automate the processes of building models, analyzing them, and post-processing the results. The
wizard mechanics are shown in the flowchart below:
Please see below for the explanation of the picture:
Section 1 (Step 1)
A model will be built in MotionView
The model is then saved from MotionView as a System Definition
A categorized collection of system definition then can be used as a Model Library
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
113
What is a System Definition?
A system definition is a reusable system model that can be a part of any model as long all the attachment
requirements are satisfied.
A system definition can be created in two ways:
1.
An existing model can be converted in to a reusable system definition using the text editor.
2.
A system definition can be created from GUI. This requires minimal text editing.
A system definition is an incomplete model which needs information about the attachment bodies to get connected
to.
Excluding the attachment information, a system definition is similar to an MDL model file:
A system receives information about outside entities via attachments.
Any MDL entity can be passed to a system as an attachment. Such as Body, Point, Marker, Joint, etc.
Please refer to the Tutorial: MV-1070: Creating a Simple Pendulum System using MDL for more detailed information
on System Definitions.
Section 2 (Steps 2 – 7)
The Model Wizard is invoked which gives the user options to select different model configurations.
The user input required to build the model would be the selection of components.
The Assembly Wizard when invoked grabs the configuration of the model from the model information and
throws out a list of model specific Tasks or Analysis from the task library.
When a user selects a certain Task the task is then accessed from the Task Library and is appended to the
model.
Thus we get a fully assembled Model complete with the Task that it has to perform.
Exercise: Automated Modeling and Analysis Using Wizards
Step 1: Creating a System Definition from the GUI.
This exercise will help you to learn how to build system definitions using the MotionView user interface.
1.
To start building a System Definition, right-click on Model in the Project Browser and select Add System (or
right-click on the System/Analyses panel button
on the Model-Main toolbar).
The Add System dialog is displayed.
2.
Specify Pendulum as the Label and sys_pendu as the Variable.
3.
Click OK.
114
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
4.
From the Attachments tab: click on the Add button (located in the middle of the panel) and add an attachment to
the system definition with the label Attachment Point,and arg_p for the variable name, select the type as
Point (from the drop-down menu) and click OK.
5.
Add another attachment with a label Attachment Body and the variable name as arg_b and this time select
the type as Body.
Note
model.
Here we have created two attachments which will be used to attach the system definition to another
6.
Once the system attachments are created you will see that the attachments are Unresolved. Double click on
the Attachment/Body collector and pick Ground Body from the model tree in the pop-up dialog and click OK.
Next, pick the Global Origin as the Attachment Point.
7.
Right-click Pendulum in the Project Browser and select Add Reference Entity > Point (or right-click on the
Points panel button
8.
on the Model-Reference toolbar).
Add a point with a label name Mass CG, a variable name p_cg, and the default system Pendulum.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
115
9.
From the Properties tab, click in the X Coordinate field of the point. Click on the fx button.
Note
The background color of the field changes when the value is parameterized.
The Expression Builder is displayed.
116
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
10. In the expression builder type in sys_pendu.arg_p.x+500 as the value of the X coordinate for the point and
click OK. For the Y and Z values of the point, use the expression builder and type in sys_pendu.arg_p.y+500
and sys_pendu.arg_p.z+500 respectively.
11. Right-click on Pendulum in the Project Browser and select Add Reference Entity > Body. Add a body using
the default Label and Variable names.
12. From the Properties tab specify the Mass as 1 and the Inertia properties as 1000 for Ixx, Iyy and Izz
respectively.
13. Click on the CM Coordinates tab and check the Use center of mass coordinate system option. Pick the point
Mass CG as the Origin.
14. Right-click on Pendulum in the Project Browser and select Add Contstraint > Joint. Add a Revolute Joint
type joint using the default Label and Variable names.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
117
15. For the Body1 of the joint pick Body 0 (created in the earlier step). For the second body, double click on the
Body2 icon to open the model tree. Here browse through the model tree and look for Attachment Body in the
system Pendulum. Pick Attachment Point as the point of origin of the joint and select Global Y as the axis of
rotation.
16. Right-click on Pendulum in the Project Browser and select Add Reference Entity > Graphic. Add a Cylinder
type graphic using the default names.
17. In the Connectivity tab; click on the Body collector and pick Body 0 in the Pendulum system, click on the
Point collector and pick Mass CG as Origin, and choose the Attachment Point as the Direction.
18. Next, add a Sphere graphic to the Pendulum system. Pick Body 0 for the body and Mass CG as the Origin
Point. From the Properties tab, specify 25 for the Radius.
19. Select the Pendulum system by clicking on it in the Project Browser. Click on the Load/Save tab in the
Systems\Analyses panel and activate the Save radio button. Specify the name of the system definition as
<working_directory>/system_<your name>.mdl by clicking on the folder icon and click on Save. This
will save the selected pendulum system as a system definition.
20. Go to the Session Browser tab, right-click on w1.model and select Erase (from the context menu) to clear the
screen.
Note
Open the system definition you saved in the previous step in a text editor and remove any model path
references from the MDL file. For example: the Mass CG (p_cg) point in the *Graphics statement is
specified as MODEL.sys_pendu.p_m, change it to p_cg. In the two *Attachment statements, remove
the last arguments of both the statements (MODEL.P_Global_Origin and MODEL.B_Ground).
21. Go back to the Project tab and click on Model in the Project Browser. Click on the Load/Save tab in the
System\Analyses panel and activate the Load radio button. Click the Load button to load the recently saved
system definition.
22. MotionView will give out warnings about the unresolved attachments for the system that was loaded in the
previous step. Go to the Attachments tab, click on Attachment Point and change the point to Global Origin as
the point attachment and the Ground Body as the Attachment Body. Now it will be seen that the warnings have
disappeared.
118
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
23. In the same way the same system can be instantiated a multiple number of times either within the same model or
in another model.
This is an example of creating a simple system definition using the GUI; in the same way much more complex
and bigger models can be converted to system definitions and instantiated in some other model. Any model library
is built in the same way by building the sub-systems one by one and using the Model and Task Assembly
wizards to later specify logics to assemble complete models. The complete system definition is shown below for
reference:
//////////////////////////////////////////////////////////////////////
Altair HyperWorks
Version : HWVERSION_11.0
System : def_sys_pen
Customer ID :
Date :
//////////////////////////////////////////////////////////////////////
*DefineSystem(def_sys_pendu, arg_p, arg_b)
*SetDefaultSystemInstance(sys_pendu, "Pendulum")
*Attachment(arg_p, "Attachment Point", Point, "Make a selection for
this argument.", )
*Attachment(arg_b, "Attachment Body", Body, "Make a selection for
this argument.", )
*Point(p_cg, "Mass CG")
*SetPoint(p_cg,
arg_p.x+500, arg_p.y+500, arg_p.z+500)
*Body(b_mass, "Mass", p_cg)
*SetBodyInertia(b_mass,
1, 1000, 1000, 1000)
*Set(b_0.usecm, true)
*SetOrientation(b_0.cm,
1.0, 0.0, 0.0 )
TWOAXES, ZX, 0.0, 0.0, 1.0,
*RevJoint(j_0, "Joint 0", b_0, arg_b, arg_p, MODEL.V_Global_Y)
*Graphic(gra_0, "Graphic 0", CYLINDER, b_0, arg_p, p_cg, 10, gra_0.
r1, , 0.0, CAPBOTH)
*Graphic(gra_1, "Graphic 1", SPHERE, b_0, p_cg, 25)
*SetSystem(PARENT)
*EndDefine()
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
119
Step 2: Building a Front Suspension Model Using the Assembly Wizard.
1.
Start a new session.
2.
On the Model menu, click Assembly Wizard.
3.
For Model type, select Front end of vehicle.
4.
Click Next.
5.
For Drive type, select No driveline.
6.
Click Next.
7.
From the Primary Systems for Front end of vehicle dialog, specify the following:
Vehicle body = Body fixed to ground
Front subframe = None
Front suspension = Front SLA susp (1 pc. LCA)
Steering linkage = Rackpin steering
Powertrain = None
8.
Click Next.
9.
From the Select steering subsystems dialog, specify the following:
Steering Column = Steering column 1 (not for abaqus)
Steering Boost = None
10. Click Next.
11. From the Select springs, dampers and stabilizer bars dialog, select the following:
Front shocks = Frnt shock absorber (with inline jts)
Front stabilizer bars = None
12. Click Next.
13. From the Select jounce and rebound bumpers dialog, set the options to None, and click Next.
14. For the Label and Varname specify Front Static Ride and front_sride respectively, and click Next.
120
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
15. From the Attachment Wizard, set Compliant to No and click Finish.
You can change the attachments and options of each sub-system by clicking the Next button prior to clicking
Finish.
Your model should look as follows:
Step 3: Specify the Static Ride Analysis Task Using the Task Wizard.
The Analysis task wizard allows you to assign a static or dynamic event analysis to your model. Since this is a halfvehicle model, only static events are available. A full-vehicle model would contain a different set of analysis events.
1.
On the Analysis menu, click Task Wizard.
2.
In the Task Wizards – Front end tasks dialog select the Front end task as Static Ride Analysis from the pull
down menu.
3.
Click Next.
4.
Read the information in the dialog box.
5.
Click Finish.
The Vehicle parameters dialog is displayed. Vehicle parameters such as wheelbase, jounce, and rebound
distances can be changed in this dialog.
6.
Retain the current parameters and click Finish.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
121
7.
Go to the Project Browser.
The model tree in the Project Browser now includes a folder called Static ride analysis. It is possible to add
many different analysis tasks to the same model, but only one analysis task may be active at one time.
Click the + sign next to the Static ride analysis folder to open the folder in the Project Browser.
8.
Click on the Forms folder under Static ride analysis.
9.
Select the form called Vehicle parameters by clicking on it.
Step 4: Save Model and Run the Simulation.
1.
Click on Model in the Project Browser.
The System/Analyses panel is displayed.
2.
Click in the System/Analysis Info button,
.
3.
Change the label of the model from Model to Front Static Ride.
4.
From the File menu, select Export > Model.
The Export Model dialog is displayed.
Note
You can also click the Save Model icon,
, on the Standard toolbar to the save the file in working
directory with the existing name. If the model is new, you will be prompted to input the name of the
model.
5.
Save your model as an MDL file named sla_rigid.mdl in your working directory.
6.
Go to the Run panel.
7.
Save your model as a MotionSolve input file (XML) <working_directory>/sla_rigid.xml.
8.
Make sure that the Sim type is set as Quasi-Static and click on the Run button.
9.
After the success of the run, click on Animate and Plot to post-process the results from MotionSolve.
122
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
10. To run your models using the ADAMS solver change the SolverMode to ADAMS.
Selecting Save and run current model allows you to save and run your current model. You can also choose
which analysis type you want run from those previously set up.
When you select Run ADAMS file, you must have connected the ADAMS solver to the Run button in the
MotionView interface through the preferences file.
!
Note
Do not complete the following steps without connecting the ADAMS solver to the
Run button.
During the training session, the ADAMS/Solver is not connected to MotionView. The results are provided
wherever required.
11. For Script, select Altair Executable.
12. Save your model as an ADAMS file named sla_rigid.adm.
13. Click Run to start the simulation.
Step 5: View Pre-specified Results.
In these steps, you will view standardized reports that MotionView generates for the static ride analysis task. You can
specify your own report template.
1.
On the Analysis menu, click View Reports.
The Reports dialog lists all the reports contained in the .reports log file.
2.
Select the report Front Ride - MSolve Report for the model named Front Static Ride if the model was solved in
MotionSolve and select the report Front SDF Ride Report A if the model was solved in ADAMS. Select the
report Front SDF Ride Report A for the model named model_<yourname>_1.
3.
Under Mode, select Append.
4.
Under Overlay options, select Auto fit plots.
5.
Click OK.
A standard report generates. Curves that typically interest suspension designers can be found on pages 2 through
5 of the report.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
123
How does viewing pre-specified results work?
Whenever a model containing one or more report definitions is saved as an ADAMS input deck and/or submitted to a
solver, MotionView writes a record of the report into a log file named .reports. You can specify the location of this
file with the preference file statement *RegisterReportsLog(path). The default location of the .reports file is:
UNIX - <user home>
PC - C:\Documents and Settings\<user>
The path to the .reports file can also be set by selecting the Set Wizard path option under the Model menu.
For information on preference file statements, refer to the MotionView on-line help.
When you select View Reports from the Analysis menu, MotionView displays the contents of the .reports file in
the Reports dialog. When you select a report from the dialog, MotionView loads the requested report definition file
into your session.
Below is a sample entry from the .reports log file:
Front Ride - MSolve Report
Front Static Ride
02/10/XX 06:07:58
E:/Altair/hw11.0/hw/mdl/mdllib/Libs/Tasks/adams/Front/Ride/ms_rep_kc_front.tpl
*Report(rep_kc_frnt_mc, Front Ride - MSolve Report, repdef_kc_frnt, "E:/Temp/sla_rigid.h3d", "E:/Temp/sla_rigid.
h3d", "E:/Temp/sla_rigid.plt")
The first line contains the report label, model label, and the date and time when the solver input files were saved. This
information is contained in the Reports dialog. It is recommended that you give your models specific names,
otherwise they will be labeled Model 1 as shown in line 1.
Line 2 contains the name of the report definition file.
Line 3 contains an MDL statement called *Report(). This statement specifies the report definition file name along
with the required parameters. Refer to the MDL on-line help for more information.
Note
124
You can use the session script to post-process multiple simulation runs by editing the filenames inside their
script files and appending the script file several times to load multiple results sets. However, using the
session scripts to overlay multiple result sets is time consuming. It is better to use the Append option on
the Reports panel. The Reports panel allows you to overlay and auto-color plots very easily.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 6: Use the Data Summary, Topology Summary, and Check Model Utilities.
In these steps, you will use the Data Summary, Topology Summary, and Check Model utilities to review the model
data and topology and check for errors.
1.
From the Model menu, select Data Summary.
The Data Summary dialog is displayed. This dialog displays a summary of all entities in your model.
Data Summary dialog
2.
Click the tabs and examine the entity properties.
3.
Click Export Data on the Data Summary dialog to export the data to a text file.
The Export Data dialog is displayed.
4.
Click on the Export button.
5.
Enter a filename.
6.
Click Save.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
125
7.
Click Close to close the Data Summary dialog.
The Edit check box when checked allows the data to be modified from this dialog.
8.
From the Model menu, select Topology Summary.
The Topology Summary dialog is displayed. This dialog displays a summary of the topology of the model.
Topology Summary dialog
8.
Click Close to close the Topology Summary dialog.
9.
On the Tools menu, click Check Model.
The Message Log dialog is displayed. Before submitting the model to the solver, review this message log to
check your model for errors.
Note
Click Clear to clear the messages in the Message Log dialog.
To reopen the dialog, select Help/Message Log from the menu bar.
Saving property data is a concise way to record changes made when performing multiple simulation runs.
126
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 7: Save a Model.
1.
Start a new session and load the file, sla_rigid.mdl, located in
<installation directory>\tutorials\mv_hv_hg\mbd-modeling\automation\.
2.
From the File menu, select Export > Model.
The Export Model dialog is displayed.
Note
3.
You can also click the Save Model icon,
, on the Standard toolbar to the save the file in working
directory with the existing name. If the model is new, you will be prompted to input the name of the
model.
Save your model as an MDL file named sla_rigid_1.mdl in your working directory.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
127
Step 8: Change Wizards.
MotionView allows you to change wizards using the Set Wizard Paths option on the Model menu. You can select
from many wizards, some of which you may have created. In this exercise, you will change wizards and create new
models from them.
1.
On the Model menu, click Set Wizard Paths….
The Set Wizard Path dialog is displayed. Uncheck the Use values from preference file option.
Set Wizard Path dialog
2.
In this dialog, specify the following:
Select the file <Installation directory>\tutorials\mv_hv_hg\mbdmodeling\automation\Landing_Gear\model_wizard_landing_gear for the Assembly Wizard file.
Select the file <Installation directory>\tutorials\mv_hv_hg\mbdmodeling\automation\Landing_Gear\task_wizard_landing_gear for the Task Wizard file.
Select the path <Installation directory>\tutorials\mv_hv_hg\mbdmodeling\automation\Landing_Gear\mdllibs for the Wizard Library.
3.
Click OK.
4.
On the Model menu, click Assembly Wizard… and build a landing gear model.
5.
On the Analysis menu, click Task Wizard….
6.
Select Retraction Analysis as the analysis task.
7.
Solve the model using MotionSolve with an end time of 1.3 seconds. Click on the Animate button on the Run
panel to view the animation.
Setting the wizard paths to other libraries enhances the automation power of assembly and task wizards.
Note
In the Motionview preference file you can set default paths for the wizards. Clicking the Use
preference file check box allows you to use these wizard paths directly.
The default library model definitions are compatible with MotionSolve, ADAMS, and Abaqus solvers.
128
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1035: Importing CAD or FE into MotionView
Multi-body model building in MotionView can now be done using an imported CAD assembly file or a CAD part. Basic
model data, graphics and hard point locations from the CAD assembly file act as a starting point.
The multi-body aspects of any CAD assembly that can be imported in MotionView are:
Component Mass
Component Moments of Inertia
Component Center of gravity location
Exercise
In the following exercise, we will import a CATIA CAD assembly into MotionView, simplify the model from a multi-body
analysis point of view, and define constraints, model inputs and model outputs.
All the files necessary to complete this exercise are located at:
<installation directory\tutorials\mv_hv_hg\mbd_modeling\automation\CAD\
Please copy all the files from this folder into your <working directory>.
Step 1: Loading the CAD file into MotionView.
In this step, we will focus on understanding the process of import and model simplification.
1.
Launch a New session of MotionView.
2.
From the menu bar, select File > Import > Geometry.
The Import CAD or FE dialog is displayed.
3.
From the Import Options radio box, select Import CAD or Finite Element Model With Mass and Inertias.
4.
From the Input File pull-down menu, select Catia.
5.
Click the
6.
Select the file Front Assembly.CATProduct from your <working directory>.
7.
Click Open.
8.
Click the Output Graphic File icon,
9.
Click Save.
icon to select the CATIA file.
Altair Engineering
, and specify front_assembly.h3d as the H3D filename.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
129
10. Click the plus button,
Note
, next to MDL Options and review the various options.
The MDL Options allow for flexibility while importing.
For this exercise, accept the defaults.
11. Click the plus button,
, next to Meshing Options for Surface Data and review the options.
Note
The Launch Hypermesh to create MDL points option allows you to select nodes in HyperMesh
which can be imported into MotionView as MDL points. This is not needed for this tutorial since you will be
creating these additional points using a Tcl Macro.
12. Click the plus button,
, next to Locator Points (Must be in source reference frame) and review the options.
Note
The Locator Points options can be used in cases where the CAD model being imported is not in the
same coordinate system as the MBD model in MotionView. This option gives you control to specify three nodes
or coordinates on the source graphic, which can then be used to orient using three points in MotionView after it's
imported.
130
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
13. After reviewing the options to see the summary of the parts in the CAD model, click OK. Set Input file length to
Millimeter, leave the default value of the density as 7.83e-6 and click OK.
14. If the import into MotionView is successful, a message box is displayed as shown below.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
131
The utility will import the MDL model into the currently active window in MotionView. It converts each of the CAD
components of the assembly into a separate body in MotionView. This means that even the smallest of
components (for example, nuts, bolts, etc.) become bodies and need to be constrained to the larger bodies to
reduce the size problem .
To further reduce the size problem, you can delete those parts whose contribution to mass and inertia of the
problem is negligible and add only their graphics to the bodies that they get attached to.
15. From the Project Browser, select Model and expand the Bodies group. Right-click ALDEFAU05112236519244
and select Rename. Change the label of the selected body to Wheel.
16. Similarly, rename the following parts:
S. No
Original Label
New Label
1
Body 12
Wheel Hub
2
Body 13
Lower Control Arm
3
Body 14
Axle Shaft
4
Body 15
Strut Holder
5
Body 16
Damper Top
6
Body 18
Damper Lower
17. From the Project Browser, select Graphics and select the last graphic, PartBody3.2 Graphic.
18. From the Connectivity tab, click Body and select Strut Holder.
19. From the Project Browser, select Bodies, right-click PartBody3.2 and select Cut to delete the body.
132
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
20. Using the same procedure outlined in steps 18-20, integrate the graphics and delete the parts without graphics.
S. No
Graphic to be moved
Destination Body
Body to be Removed
1
PartBody1.1 Graphic
Strut Holder
PartBody1.1
2
PartBody4 Graphic
Wheel Hub
PartBody4
3
PartBody3 Graphic
Strut Holder
PartBody3
4
PartBody2 Graphic
Wheel Hub
PartBody2
5
PartBody1 Graphic
Strut Holder
PartBody1
6
Body.17 Graphic
Damper Top
Body.17
7
Body.19 Graphic
Damper Lower
Body.19
Note
We will be creating a SpringDamper entity between the bodies Damper Top and Damper Lower.
Therefore, we will not need the body Body.110.
21. Delete the body Body.110. A dialog is displayed asking if the associated graphics need to be deleted. Click Yes
.
The model is now in its simplest form.
22. Save the model as front_susp.mdl.
Note
After creating the bodies, additional points need to be created to act as joint locations and joint
orientations. We can use an automated method to create points,
provided we have the
Cartesian coordinates of all the points required in the CSV file.
23. From the View menu, select Command Window....
24. Right-click in the Command Window and select File > Load File.
25. Select the file Point_Import_v2.tcl from your working directory, <Altair Install
location>\utility\mbd\point_import.
26. Select the file suspension_points.csv from your working directory.
27. Click Open.
The points are added to the model. These extra points will be used for defining joints, orientations and other model
inputs.
28. Close the command window by de-selecting Command Window from View menu.
29. Save the model.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
133
Step 2: Creating joints/constraints.
In this step, we will add the joints, a spring damper, and attach a Jack to the wheel of the suspension so that a
reciprocatory vertical motion can be applied to the wheel.
1.
From the Project Browser, right-click Model and select Add Constraint > Joint and right-click MDL Project (or
right-click the Joints icon,
, from the toolbar),.
The Add Joint or JointPair dialog is displayed.
2.
Specify the Label and Variable as Wheel Spindle RJ and j_whl_spindle_revj, respectively.
3.
For Type, select Revolute Joint.
4.
Click OK.
5.
For Body1 of the joint, specify Wheel.
For Body2, specify Wheel Hub.
For Origin, specify Point8.
For Axis, specify Point20.
6.
Add the rest of the joints of the model using the table below:
Note
7.
Accept the default variable names for all joints being added.
S. Label
No
Type
1
Strut Hub Fix
2
Body 1
Body 2
Origin(s)
Orient Method Referenc Reference
e1
2
Fixed Joint Wheel Hub
Strut
Holder
Point9
Damper Hub Fix
Fixed Joint Damper
Lower
Strut
Holder
Body.15
CG
3
Damper Lower
Upper Trans
Translation Damper
Joint
Lower
Damper
Top
Point24
Axis(Pt)
4
Damper Upper
Ground UJ
Universal
Joint
Damper Top Ground
Body
Point10
Shaft(Pt), Shaft Point24
(Vect)
5
Axle Hub Fix
Fixed Joint Axle Shaft
6
Hub Control Arm
Ball
Ball Joint
7
Control Arm Ground Revolute
Rev
Joint
Point10
Global X
Wheel Hub Body.14
CG
Lower Control Wheel Hub Point4
Arm
Lower Control Ground
Arm
Body
Point2
Axis(Pt)
Point3
From the Project Browser, right-click Model and select Add Force Entity > Spring Dampers (or right-click the
Spring damper icon,
134
, from the toolbar).
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
8.
Specify the Label and Variable as Strut-SpringDamper and sd_strut, respectively.
9.
Click OK.
10. For Body1 and Body2, specify Damper Top and Damper Lower, respectively.
11. For Point1 and Point2, specify Point10 and Point1, respectively.
12. Under the Measure between points: section of the panel, notice that the distance magnitude between the two
points is 259.942.
We will use this number as the Free length of the spring.
13. Click the Preload tab and specify 259.942 as the Free length.
14. Click the Properties tab and specify a stiffness (K linear) of 10 and damping (C linear) of 0.1.
15. From the Project Browser, right-click MDL Project and select Add Reference Entity > Graphic (or right-click
the Graphic icon ,
, from the toolbar to add a graphic).
16. Specify the Label as Spring graphic, and accept the default variable name. For Type, select Spring from the
drop-down menu.
17. Click OK.
18. On the Connectivity tab of the Spring graphic just added, pick the Strut-SpringDamper as the Parent.
19. Specify Point10 and Point1 as Point1 and Point2 of the graphic, respectively.
20. Click the Properties tab and specify the Radius and Coils as 40 and 10, respectively.
21. Next, add a jack to this model and use the jack to give some vertical motion to the wheel. From the Project
Browser, right-click Model and select Add Reference Entity > Body (or right-click the Bodies icon,
the toolbar). Add a body with Label and Variable as Jack Dummy and b_jdummy, respectively.
, from
22. Click the body Properties tab and specify the Mass and the three principle inertia values of the body as 0.01,
100, 100, and 100, respectively.
23. Click the CM Coordinates tab and select the Use CM Coordsys check box.
24. Pick Point11 as the CM Origin point for the Jack Dummy body.
25. From the Project Browser, right-click Model and select Add Reference Entity > Graphic (or right-click the
Graphic icon,
, from the toolbar) to add a graphic. Specify the Label of the graphic as Jack Plate and
select the Type as Cylinder from the drop-down menu. Accept the default variable.
26. From the Connectivity tab, select the Parent Body as Jack Dummy.
27. Pick Point11 as the Origin and Point8 as the Direction.
28. Click the Properties tab. From the Length drop-down menu, change the option from Autolen to Length and
specify a value of -30 in the field next to it.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
135
29. Specify a value of 250 for Radius 1.
Notice that the Radius 2 field is updated with the same value as Radius 1.
30. From the Project Browser, right-click Model and select Add Constraint > Joint (or right-click the Joints icon,
, from the toolbar). Specify the Label and Variable as Jack Wheel Inplane and j_jack_wheel,
respectively. For Type, select Inplane Joint from the drop-down menu.
31. Click OK.
32. From the Connectivity tab, select Wheel as Body1, select Jack Dummy as Body2, pick Point11 as Origin
and Point8 as Normal.
33. Add another joint and specify the Label and Variable as Jack Ground Trans and j_jack_grnd,
respectively. For Type, select Translational Joint.
34. Click OK.
35. From the Connectivity tab, select Jack Dummy as Body1, Ground Body as Body2, pick Point11 as Origin
and Point8 as Axis.
36. All the joints required to complete the model are now in place.
37. Save the model once.
Step 3: Specifying motion inputs and running the model in MotionSolve.
In this step, we will create a motion that is applied to the jack and specify the outputs that we require from the
analysis.
1.
From the Project Browser, right-click Model and select Add Constraint > Motion (or right-click the Motion
icon,
, from the toolbar) to add a motion. For Label, specify Jack Motion. For Variable, specify
mot_jack.
2.
From the Connectivity tab, select Jack Ground Trans (the translation joint between Jack Dummy and Ground
Body) as the Joint.
3.
From the Properties tab, change the property type to Expression from the pull-down menu. Type in the
expression `50*sin(TIME)` as the displacement Motion expression.
4.
Add another motion to arrest the free spinning of the wheel. Add a motion and specify the label and variable name
as Wheel Spindle and mot_wheel, respectively.
5.
From the Connectivity tab, select Wheel Spindle RJ as the Joint.
6.
From the Properties tab, verify that the value of the Motion is 0.0.
This motion of 0.0 degree displacement keeps the wheel body from spinning freely about its axis.
7.
Save the model.
8.
Go to the Run panel,
136
.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
9.
Specify a name for the MotionSolve input XML file by clicking the Save as icon,
.
10. From the Sim type: drop-down menu, select Static+Transient.
11. Click the Check button to check for any modeling errors.
12. After verifying that there are no errors, click the Run button.
13. Once the run is complete, click the Animate button to view the animation of the simulation.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
137
MV-1040: Model Building using Tcl
In this tutorial you will:
Learn the advantages of using Tcl programming to save time and effort in MBD model building with MotionView
Work with the HyperWorks Desktop – Tcl interface
Build a simple model using Tcl commands
About Tcl
Tool Command Language or Tcl (typically pronounced as "tickle" or "tee-see-ell") is a scripting language that is
commonly used for quick prototyping, scripted applications, GUIs, and testing.
More About Tcl/Tk
Tcl has a simple and programmable syntax.
Tcl is open source.
HyperWorks has an inbuilt Tcl interpreter which has libraries to help end users.
Tcl can be used as a standalone or embedded in applications like HyperWorks Desktop (including
MotionView).
Unlike C which is a complied language, TCL is interpreted. Tcl programs are simple scripts consisting of Tcl
commands that are processed by a Tcl interpreter.
Tcl is extensible. New Tcl commands can be implemented using C language and integrated easily. Many
people have written extension packages for common tasks and are freely available on the internet.
Engineering teams use different resources and application. Tcl can be used to glue those resources together.
This greatly helps in automating the work flow.
Tk is a Graphical User Interface toolkit that makes it possible to quickly create powerful GUIs.
Tcl/Tk is highly portable, and runs on different flavors of UNIX, windows, Macintosh and more. This proves
useful to those who work on various platforms.
Tcl with MotionView
When building huge multibody models in MotionView, you will come across cases where the same steps are
repeated multiple times. Such steps, or the set of steps, can be automated suing Tcl in order to save time
and effort wasted in performing repetitive and time consuming tasks.
Like all of the HyperWorks Desktop applications, MotionView has Tcl command layers which help in
accessing the various functionalities of the product and utilizing them to write scripts to automate processes.
The Tcl scripts can be called by Tk applications or tied in to a process manager.
Tcl scripts can be registered in a preference file and be made a part of product with Menu shortcuts.
138
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
The HyperWorks Desktop handles and the HyperWorks database consists of a hierarchy of objects, the root of
which is the hwi object which is automatically created. The hwi provides access to the hwiSession object and a few
high level utilities. Currently, HyperWorks supports only one session per run. The session object can be retrieved by
issuing the following command at the Tcl command prompt:
(System32) 1 % hwi GetSessionHandle sess1
Once the session handle is retrieved, it can be used to access all objects in the HyperWorks database as shown
below:
(System32) 2 % sess1 GetProjectHandle proj1
(System32) 3 % proj1 GetPageHandle page1 1
Windows are retrieved as shown below. Windows are assigned a client type, which can be modified.
(System32) 4 % page1 GetWindowHandle win1 1
(System32) 5 % win1 SetClientType "Animation"
(System32) 6 % win1 GetClientHandle post1
A window's client type cannot be changed after the client handle has been retrieved. The client handle must be
released and retrieved again if the window's client type is changed.
Every HyperWorks command object supports the following utility commands:
ListMethods: Displays the method commands which can be performed on an object.
ListHandles: Lists the names of all command objects of the same type.
ReleaseHandle: Releases the command object.
The top level hwi command object supports the following utility commands:
ListAllHandles: Displays all command objects currently in use.
Exercise: Model Building using Tcl
Step 1: Building a Simple Pendulum through Tcl commands.
In this exercise you will write a simple Tcl script to build a simple pendulum model.
Note
Putting a ‘#’ character in the beginning of any line makes it a comment and that line is not evaluated. In
addition, all HyperWorks Tcl commands are case sensitive.
The structure of every Tcl script created for HyperWorks Desktop products should follow the following
structure:
hwi OpenStack
Obtain All necessary handles
Perform some function
Release All obtained handles individually
hwi CloseStack
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
139
1.
Open a new MotionView session.
2.
Go to View menu, and click on Command Window.
3.
A TkCon window opens up and displays the version of Tcl and Tk installed with Hyperworks.
4.
In the Command Prompt type:
hwi GetSessionHandle sess
The prompt prints sess as the command output if the command is successful. This command assigns the
Session Handle to the variable "sess".
5.
To view all the option/commands available with the hwi class type in hwi ListMethods at the command
prompt. This will list all the options available under hwi.
6.
Now, type:
sess GetProjectHandle proj
This command will assign the Project handle to the variable "proj".
7.
The next step is to obtain the Page handle, the command for it is:
proj GetPageHandle page 1
The variable "page" now points to the page handle of the first page of the session.
Note
8.
Please refer the "Programming with Tcl/Tk Commands" online help under the "HyperView, MotionView and
HyperGraph" Reference Guide for the explanation on the syntax of these commands.
To get the control of the window we need to get the window handle the command for that is:
page GetWindowHandle win 1
This assigns the window handle of the first window to the variable "win".
9.
Now to get the client handle type in:
win GetClientHandle mc
Note
A HyperWorks session has multiple clients (HyperView, MotionView, HyperGraph 2D, etc). When
MotionView is invoked, the default client is MotionView. The GetClientHandle command gets you the
access to the MotionView model object through the Client Handle.
10. To be able to set different views and fit the model in the graphics window the view control handle is required, the
command to get view control handle is:
win GetViewControlHandle vch
11. To start with a new blank model we will run the command:
mc CreateBlankModel
140
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
12. To obtain the handle of the model just created in the previous step type in the command:
mc GetModelHandle m
Note
Once the model handle is obtained we can now start creating entities using the InterpretEntity and
InterpretSet statements.
To build a simple pendulum we will be using 2 points, 1 body, 3 graphic entities, and 1 revolute joint.
The syntax for the InterpretEntity command is given below:
modelHandle InterpretEntity EntityHandle Entitytype
EntityVariableName EntityLabel <Parameters>
Where:
EntityHandle - The handle for the entity.
Entitytype - The type of entity to create (Point, Body, Graphic, etc.).
EntityVariableName – The variable name for the entity to view in MotionView.
EntityLabel – The label for entity to view in MotionView.
Parameters – The parameters which are required to create the respective entity (for example, CM
point for Body).
13. To start with Add a point for the pendulum pivot with variable p_0 and label Pivot with a command:
m InterpretEntity p Point p_0 "\"Pivot\""
14. Now to set the properties of the point just created, the command is:
m InterpretSet SetPoint p_0 0.0 0.0 0.0
15. P is the Point handle for Tcl and is released with p ReleaseHandle command:
p ReleaseHandle
16. To create a point for the location of the pendulum mass and set the property for it, the set of commands are:
m InterpretEntity p Point p_1 "\"Mass\""
m InterpretSet SetPoint p_1 p_0.x+100 p_0.y p_0.z
p ReleaseHandle
17. Add the pendulum body and set its mass and inertia properties type in the following commands:
m InterpretEntity b Body b_0 "\"Pendulum\"" p_1
m InterpretSet SetBodyInertia b_0 0.5 100 100 100
m InterpretSet SetOrientation b_0.cm TWOAXES ZX
b ReleaseHandle
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
141
18. To add the graphics on the body for visualization the three graphic entities are added using the commands:
m InterpretEntity g Graphic gra_0 "\"Graphic_Pivot\"" CYLINDER B_Ground p_0
V_Global_Y 1 1 10 -5 CAPBOTH
g ReleaseHandle
m InterpretEntity g Graphic gra_1 "\"Graphic_Pendulum_Cylinder\"" CYLINDER b_0 p_0
p_1 1 CAPBOTH
g ReleaseHandle
m InterpretEntity g Graphic gra_2 "\"GraphicMass_Cylinder\"" CYLINDER b_0 p_1
V_Global_Y 5 5 3 -2 CAPBOTH
g ReleaseHandle
19. The pendulum will need to be connected to the ground with a revolute:
m InterpretEntity j RevJoint j_0 "\"Joint_Pivot_Rev\"" B_Ground b_0 p_0 V_Global_Y
j ReleaseHandle
20. After adding any entity to the model the database has to be updated by using the evaluate command:
m Evaluate
21. To the fit model in the graphics window:
vch Fit
22. The model is ready to be run. Go to the Run panel, specify a name for the result file and click on the Run button
to run the model using MotionSolve. Use the Animate button to view the animation.
23. The handles obtained through the commands in the above steps now have to be released using the
ReleaseHandle command. Type in the following:
m ReleaseHandle;
mc ReleaseHandle;
win ReleaseHandle;
page ReleaseHandle;
proj ReleaseHandle;
sess ReleaseHandle;
24. In a text editor paste all the above Tcl commands and save the file as pendulum.tcl in the working directory.
This file can be "sourced" and the model can be built in one step. The complete script is given below for your
reference (please see the bottom of the tutorial).
Note
You can also use the file pendulum.tcl located at:
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\automation\
Copy this file to your <working directory>.
142
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 2: Sourcing the Tcl file.
1.
Start a new MotionView session.
2.
Go to the View menu from the menu bar.
3.
Click on Command Window. A TkCon window opens up at the bottom of the screen.
4.
Change the directory to current working directory by using the cd command.
5.
To invoke a Tcl script, use the command source pendulum.tcl, where pendulum.tcl is the file that you
saved in the previous step.
6.
This will build the complete model by sequentially running the commands in the file line by line.
Step 3: Registering the Tcl in the preference file.
1.
Open a text editor with a new file.
2.
Write the following statements:
*Id("HyperWorks v11.0")
*BeginModelDefaults()
*BeginMenu(scripts, "My Scripts")
*MenuItem(flexprep, "Build Simple Pendulum", Tcl, "<working directory>/pendulum.
tcl")
*EndMenu()
*EndModelDefaults()
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
143
Note
Please refer to online help if you need to know more about the syntax.
Replace <working_directory> with the actual path on your machine to the working directory,
using forward slashes for the path, if necessary.
3.
Save the file as mypreference.mvw in the <working directory>.
4.
Start a new MotionView session.
5.
From File menu select Load > Preference File.
The Preferences dialog is displayed.
6.
Click Register.
7.
Select the file mypreference.mvw you created.
A new registered preference is added to the list.
8.
Select the new preference and click Load.
9.
Close the session and start a new one.
10. You should see a new menu My Scripts in the modeling client. This should be available every time you open the
MotionView session as long you have the preference file registered.
11. Click on My Scripts -> Build Simple Pendulum menu and run the script.
144
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
The complete script is given below for your reference:
## Macro to Build a Simple Model in MotionView ##
## Requesting for the Handles required to Use MotionView ##
hwi OpenStack
hwi GetSessionHandle sess
sess GetProjectHandle proj
proj GetPageHandle page [proj GetActivePage]
page GetWindowHandle win [page GetActiveWindow]
win GetClientHandle mc
win GetViewControlHandle vch
mc CreateBlankModel
mc GetModelHandle m
## Building the Model using the InterpretEntity statements ##
m
m
p
m
m
p
InterpretEntity p Point p_0 "\"Pivot\""
InterpretSet SetPoint p_0 0.0 0.0 0.0
ReleaseHandle
InterpretEntity p Point p_1 "\"Mass\""
InterpretSet SetPoint p_1 p_0.x+100 p_0.y p_0.z
ReleaseHandle
m
m
m
b
InterpretEntity b Body b_0 "\"Pendulum\"" p_1
InterpretSet SetBodyInertia b_0 0.5 100 100 100
InterpretSet SetOrientation b_0.cm TWOAXES ZX
ReleaseHandle
## Adding graphics to the pendulum and the Ground to improve result visualization
m InterpretEntity g Graphic gra_0 "\"Graphic_Pivot\"" CYLINDER B_Ground p_0
V_Global_Y 1 1 10 -5 CAPBOTH
g ReleaseHandle
m InterpretEntity g Graphic gra_1 "\"Graphic_Pendulum_Cylinder\"" CYLINDER b_0
p_0 p_1 1 CAPBOTH
g ReleaseHandle
m InterpretEntity g Graphic gra_2 "\"GraphicMass_Cylinder\"" CYLINDER b_0 p_1
V_Global_Y 5 5 3 -2 CAPBOTH
g ReleaseHandle
## Adding the Revolute joint between the Ground and the pendulum body
m InterpretEntity j RevJoint j_0 "\"Joint_Pivot_Rev\"" B_Ground b_0 p_0
V_Global_Y
j ReleaseHandle
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
145
m Evaluate
vch Fit
after 1000
## Running the Model ##
mc ExportModel simple_pendu.xml
mc RunSolverScript simple_pendu.xml
## Releasing All the Handles
m ReleaseHandle;
mc ReleaseHandle;
win ReleaseHandle;
page ReleaseHandle;
proj ReleaseHandle;
sess ReleaseHandle;
hwi CloseStack;
## End of Script
146
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1050: Automation Using TCL
In this tutorial, you will:
Invoke a TCL script from MotionView. The TCL script automates the model building, solver runs and post
processing in MotionView.
Link the script to a Menu Item on the menu bar in MotionView.
Exercise: Automation using TCL
Step 1: Running the Script manually.
1.
Start a new session.
2.
From the View menu, click on Command Window.
A TkCon window opens up at the bottom of the screen.
The Command Window
3.
Right-click in the Command Window and select File > Load File.
The Source File dialog is displayed.
4.
Select the file simple_auto.tcl from the location
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\automation.
5.
Click Open.
Note
The script does the following:
Builds a Simple Pendulum model.
Runs the model through the MotionSolve Solver (the pendulum is modeled to just swing under gravity).
Creates new windows for Animation and Plotting and loads the animation results and the plotting results
in these windows.
Note
You can also invoke the script by using the following steps:
In the Tk Console type cd <installation directory>/tutorials/mv_hv_hg/
mbd_modeling/automation.
The Command Window acts like a UNIX shell.
Type in Source simple_auto.tcl and press Enter.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
147
Step 2: Creating a Menu Item that invokes the script automatically.
The TCL-script simple_auto.tcl that was discussed in Step 1 can be linked to a Menu Item on the MotionView
Menu bar.
1.
Open a new text file in a text editor.
2.
Type in the following lines in the text file:
*Id("MotionView v11.0")
*BeginModelDefaults()
*BeginMenu(fut_mv_1050, "MotionView Tutorial Script")
*MenuItem(automation_tutorial, "Tutorial Script", TCL, { getenv
("ALTAIR_HOME") + "/tutorials/mv_hv_hg/mbd_modeling/automation/
simple_auto.tcl" } )
*EndMenu()
*EndModelDefaults()
3.
Save the file as script_invoke_menu.mvw and place at any convenient location on your machine.
Note
The script_invoke_menu.mvw file is a preference file.
A preference file is a special script file that is read each time the program is started. It specifies default
user settings such as the order in which colors are assigned, the default printer, default page layout, the
autosave interval, and so on. Custom menu options in MotionView can be added using a preference file.
To learn more about the preference file, type ‘preference file’ under the Index tab under the Help menu.
To learn more about the preference file statements, type ‘preference statements’ under the Index tab under
the Help menu.
4.
In MotionView, go to the File menu and select Load > Preference File.
The Preferences dialog is displayed.
148
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
5.
Click Register.
6.
Open the script_invoke_menu.mvw that you created.
A new registered preference is added to the list.
7.
Select the new preference and click Load.
8.
A menu called MotionView Tutorial Script is added to the Menu bar, under which you will find the Menu Item
Tutorial Script.
New menu item in HyperWorks Desktop - M otionView
9.
Once this preference file is set, the new menu will appear every time HyperWorks Desktop is invoked.
10. Start a new session of HyperWorks Desktop by pressing the SHIFT + F9 on your keyboard.
11. Check to make sure that the application is set to MotionView.
12. Click the Tutorial Script under MotionView Tutorial Script menu to invoke the script simple_auto.tcl
which in turn will make MotionView to perform the scripted operations.
Note
If you no longer want your new menu item to appear on the menu bar, you can un-set the preference file by
going to the File menu and selecting Load > Preference File. From the Preferences dialog, select
script_invoke_menu.mvw and click on the Unregister button. This will make MotionView unload the
preference file.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
149
MV-1051: Understanding Sequential Simulation
Sequential Simulation allows you to write simulation instructions to change the model, modify the solver settings and
submit analyses.
This tutorials covers the following topics:
Fixed joint definition between non-coinciding points using marker definitions.
Using a sensor to activate the joint when two markers coincide during simulation.
Using Templex statements to:
o
Deactivate a fixed joint when markers are non-coincident.
o
Activate a fixed joint when markers coincide.
o
Simulate until t = 5.00 seconds.
This tutorial illustrates how to build a model with sensor elements to capture the state of a body, use the sensor signal
to activate some joints and deactivate others, and carry out a sequential simulation.
Exercise: Running a Sequential Simulation on a Model
Note
Copy all the files from the location
Install>tutorials\mv_hv_hg\mbd_modeling\interactive\sequential_simulation
to your <Working directory>.
Step 1: Creating joints, markers and sensors.
1.
Start a new MotionView session.
2.
From the Standard toolbar, click the Open Model icon,
.
Or
From the File menu, select Open > Model to open the model Sequential_simulation.mdl.
The model contains two bodies, namely a slider and a picker. You need to create markers, joints, and a sensor
as well as use Templex statements to perform a sequential simulation.
150
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
2.
From the Project Browser, right-click on Model and select Add Constraint > Joint (or right-click on the Joints
icon,
3.
, from the toolbar). Under Type, select Translational Joint. Label the joint slider trans.
For Body 1, select slider.
For Body 2, select Ground Body.
For Origin, select slider cg.
Define the Alignment axis using the point slider end.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
151
4.
Add another joint. For Type, select Fixed Joint and label the joint picker rest fix.
For Body 1, select picker.
For Body 2, select Ground Body.
For Origin, select part fix.
This joint will be deactivated when the slider body coincides with the picker body during simulation.
When you create a fixed joint between the slider and the picker and they come in contact, you need to define two
markers which are initially not coincident, but coincide during the course of simulation. Creating a joint based on
markers must be done using Templex, as it is not possible to create it from the user interface.
5.
From the Project Browser, right-click Model and select Add Reference Entity > Marker (or right-click on
Marker icon,
image below:
6.
7.
Similarly, create another marker with the label Marker Picker Track and set the properties of the markers
as shown in the image below:
From the Project Browser, right-click Model and select Add Control Entity > Sensor (or right-click the Sensor
icon,
8.
, from the toolbar). Label it Marker Slider Track and set the properties as shown in the
, from the toolbar) to add a new sensor.
From the Signal field, select the type as Expression and enter the following expression:
`DX({the_model.m_0.idstring},{the_model.m_1.idstring})`
152
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
9.
In the Compare to field, enter 0.0010 for the Value and 0.0010 for Error. Set Respond if to Signal is
greater than VALUE - ERROR.
10. In the Response field, select Return to Command File.
This directs the solver to look into the template for further instruction on how to proceed once the signal is
attained.
11. From the Project Browser, right-click on Model and select Add Constraint > Motion (or right-click on the
Motion icon,
, from the toolbar. Set the properties as shown in the figure below.
Step 2: Creating a fixed joint between two non-coincident markers using Templex.
1.
To create a fixed joint between the slider and picker that is activated once the distance between the slider and
picker is zero, from the Project Browser, right-click on Model and select Add General MDL Entity > Template
(or right-click on the Template icon,
2.
, from the toolbar).
Label it Fixed Joint Defn. For Type, select Write text to solver input deck. Enter the following commands
as they are listed below in the same order.
<Constraint_Joint
id
= "5000"
type
= "FIXED"
i_marker_id
= "{the_model.m_0.idstring}"
j_marker_id
= "{the_model.m_1.idstring}"
/>
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
153
The panel should look like this:
Step 3: Creating a template to define the sequential simulation.
In this step, you will write a template to do the following:
Set the type of Output files to be written after the simulation.
Deactivate Joint between Slider and Picker for the initial simulation.
Perform a transient analysis for 3.5 seconds.
Activate Joint between Slider and Picker.
Deactivate Joint between Picker and Ground.
Deactivate the Sensor Element.
Run a transient analysis for 5 seconds.
1.
From the Project Browser, right-click on Model and select Add General MDL Entity > Template (or right-click
the Template icon,
, from the toolbar).
2.
Set the Type as Write text to solver command file.
3.
Type the following commands as listed below.
<ResOutput
plt_angle
= "YAW_PITCH_ROLL"
/>
<ResOutput
mrf_file
= "TRUE"
/>
<ResOutput
plt_file
= "TRUE"
/>
<H3DOutput
switch_on
= "TRUE"
increment
= "1"
/>
154
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
<ResOutput
abf_file
= "TRUE"
/>
<Deactivate
element_type = "JOINT"
element_id
= "5000"
/>
<Simulate
analysis_type
= "Transient"
end_time
= "3.5"
print_interval
= "0.01"
/>
<Deactivate
element_type = "JOINT"
element_id
= "{the_model.j_1.idstring}"
/>
<Deactivate
element_type = "SENSOR"
element_id
= "{the_model.sen_0.idstring}"
/>
<Activate
element_type = "JOINT"
element_id
= "5000"
/>
<Simulate
analysis_type
= "Transient"
end_time
= "5."
print_interval
= "0.01"
/>
<Stop/>
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
155
Step 4: Running the simulation and animating the results.
1.
Click the Run Solver button,
file and export the solver data.
2.
Click the Save as button,
, and enter a name for the solver run file. This will save the model in the current
state to run_xml_snapshot.mdl, where run_xml is the base name of the solver run file being provided in the
next step.
3.
In the Simulation Parameters field, set End time as 5 and the Print interval as 0.01.
4.
From the Transient tab, select DSTIFF for the Integrator type.
5.
From the Main tab, click Run.
6.
Once the solver procedure is complete, the Animate button on the Main tab is activated. Click Animate to
animate the model. Click
156
, and activate the Export MDL snapshot check box. This will save your model
to start the animation and
to stop the animation.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Model Definition Language
MV-1060: Introduction to MDL
MV-1070: Creating a Simple Pendulum System using MDL
MV-1080: Creating an Analysis using MDL
MV-1090: Creating a Dataset using MDL
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
157
MV-1060: Introduction to MDL
In this tutorial, you will learn how to:
Create an MDL model file.
Run a dynamic simulation of this model for time = 2 seconds, and steps = 500.
Plot the rotation of the pendulum about the global X-axis and view animation.
Use MotionView’s default units, kg, mm, seconds, and Newtons.
MDL stands for Model Definition Language. A MotionView model is an object that holds the information required to
describe a mechanical system. The complete information about the model including the topology, data, and solver is
stored using MDL. When model is saved from the GUI, it gets stored in MDL format. MDL is an ASCII and
programmable Language.
Some benefits of learning MDL include:
Assists with model debugging
Open and edit in any text editor because MDL is ASCII
Programmable
Changing model configurations on the fly using logical statement "if".
Building Modular and reusable models
Parameterizing the models
Use modeling entities which are not available through GUI (for example, datasets)
Allows you to generate reports
Easily create and maintain model, task, and report libraries
Section 1: Entities in MDL
An entity represents a modeling element such as a point, body, joint, system, or dataset.
MDL contains two types of entities:
Built-in
User-defined entities
Built-in Entities
Built-in entities are predefined in MDL.
They represent both the physical and geometric elements found in most models.
Some examples of built-in entities are point, body, and vector.
Each built-in entity has certain properties consistent with its type. For example, point has the properties xcoordinate, y-coordinate, z-coordinate, label, state, and varname (variable name).
158
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
User-defined Entities
User has to define these entities before using them in the model.
These entities are reusable. Once defined, the same entity-definition may be instantiated several times within
the same model or different model files. You can use a user-defined entity to define another entity. Or, you
can use built-in entities to create user-defined entities.
All built-in entities or other user-defined entities can be used to define these.
Some examples of user defined entities are system, analysis, dataset, and template.
Some of the commonly used user-defined entities are:
System
Analysis
Dataset
Template
A system entity defines a collection of modeling entities. These definitions may be used repeatedly within the same
model or different MDL model files. Examples of system entities include SLA suspension system, wiper blade
system, and power-train system.
An analysis is a collection of loads, motions, output requests, and entities (bodies, joints, etc.) describing a particular
analysis task applied to a model. For example, a static ride analysis task calculates SDF parameters for different
suspension models.
A dataset is a collection of user-defined variables of type integer, real, string, Boolean, or filename.
A template is literal text that can be placed in any file. Its primary use is to implement external solver input deck
statements and commands not supported by MDL and to generate text reports.
Section 2: Properties of Entities
Each entity has variable, label, and other properties associated with it.
Each entity should have a unique variable name.
Following is the recommended convention for variable names which allows the user to identify the modeling
entity during debugging.
Following is the recommended naming convention for the entities. You are not restricted to this nomenclature,
but are encouraged to adopt it.
This list of entities and their properties is not comprehensive. For the complete list, refer to the MDL Language
Reference on-line help.
Built-in Entities
Naming Convention
Properties
Point
p_
x, y, z, label, state, varname
Body
b_
mass, IXX, IYY, IZZ, IXY, IYZ, IXZ, cg,
cm, im, lprf, label, state, varname
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
159
Built-in Entities
Naming Convention
Properties
RevJoint
j_
b1, b2, i, j, id
Vector
v_
x, y, z, label, state, varname
Marker
m_
body, flt, x-axis, y-axis, z-axis, origin
ActionReactionForce
frc_
b1, b2, fx, fy, fz, id, tx, ty, tz
Built-in entities, their naming conventions, and properties
User-Defined Entities
Naming Conventions
Properties
System
sys_
Label, varname, state
Analysis
ana_
Label, varname, state
Dataset
ds_
Label, varname, state
Template
tmplt_
Label, varname, state
User-defined entities, their naming conventions, and properties
To access entity properties, use the entity varname, followed by a dot separator, followed by the property. Below are
some examples:
Entity Varname
Varname Represents
b_knuckle
A body representing the knuckle in the mechanical system.
p_knuckle_cg
A point representing the center of mass point for the
knuckle body.
160
Entity Property Name
Property Accessed
b_knuckle.cm
The center of mass marker of the knuckle body,
b_knuckle.
b_knuckle.cm.id
The ID of the center of mass marker of the knuckle body,
b_knuckle.
p_knuckle_cg.x
The x coordinate of p_knuckle_cg.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Section 3: Keywords
MDL contains keywords available for use in any model. Some keywords are case sensitive. To reduce problems with
case-sensitive keywords, assume all keywords are case-sensitive. The table below lists some commonly used
keywords and what they represent:
Keyword
Refers to
B_Ground
Ground body
P_Global_Origin
Global Origin
V_Global_X, V_Global_Y, V_Global_Z
Vectors along the global XYZ axes
Global_Frame
Global reference marker
MODEL
References the entire model
EXPR
Denotes an expression from an *Output()
statement
Common keyw ords in MotionView
Section 4: MDL Model File Overview
MDL model file is an ASCII file; it can be edited using any text editor.
The syntax of the MDL statement is an asterisk (*) followed by a valid statement with its arguments defined.
Statements without a leading asterisk (*) are considered comments. In this course, comment statements are
preceded by // to improve readability.
MDL file saved from the GUI is stored with two sections:
Topology section: Shows how the model is configured topologically.
Data Section: Specifies data for the entities defined in the topology section. e.g. coordinates for the
points.
MDL files contain three types of statements:
Type
Description
Example
1
Definition statements for user-defined
entities.
*DefineAnalysis, *DefineSystem
2
Declaration statements for built-in and
user-defined entities used in the model.
*Point, *Body, *System
3
Set statements to establish entity
properties.
*SetPoint, *SetBody
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
161
Statement types 1 and 2 together comprise the topology data for the model, while type 3 statements represent the
property data in the model.
MDL accepts statements in any order, with a few exceptions.
To help you learn this language, the code in the course examples follow this structure:
//comments about the MDL file
*BeginMDL(argument list)
//Topology section
//user-definitions sub-section
.
.
.
//declaration of entities sub-section
.
.
.
//Property section
.
.
.
*EndMDL
Note
MDL statements may follow any random order. There are a few exceptions, for example, when setting
property data for a system entity without referencing its explicit entity address.
You may find maintaining your MDL model file easier if you follow the organizational method suggested
above. When MotionView saves an MDL file, it saves it in this format.
162
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Exercise: Build a Pendulum Model using Built-In Entities
The figure below shows the schematic diagram of a pendulum. The pendulum is connected to the ground through a
revolute joint at the global origin. The pendulum falls freely under gravity, which acts in the negative global-Z direction.
Geometry and inertia properties are shown in the figure. The center of mass of the pendulum is located at (0, 10, 10).
Schematic representation of the pendulum
The following MDL statements are used in this exercise:
*BeginMDL()
*EndMDL()
*Point()
*Body()
*Graphic() - cylinder
*Graphic() - sphere
*RevJoint()
*Output() - output on entities
*SetPoint()
*SetBody()
Step 1: Create an MDL model file.
1.
In a text editor, create the following comment statements describing the purpose of the MDL model file:
//Pendulum falling under gravity
//date
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
163
2.
Create a *BeginMDL - *EndMDL block to signify the beginning and end of the MDL model file. Create all other
MDL model file statements between these block statements:
The syntax for the *BeginMDL() statement is:
*BeginMdl(model_name, "model_label")
where
model_name
The variable name of the model.
model_label
The descriptive label of the model.
For this model, use:
*BeginMDL(pendulum, "Pendulum Model")
*EndMDL()
Users are strongly recommended to look for the syntax of the corresponding statements by invoking the online
help and typing the statement in the Index. In MDL statements, only the keywords are case sensitive.
Step 2: Create the entity declarations required for the problem.
1.
Create a point where the pendulum pivot would be placed using a *Point() statement. The syntax is:
*Point(point_name, "point_label", [point_num])
where:
point_name
The variable name of the point.
point_label
The descriptive label of the point.
point_num
An optional integer argument assigned to the point as
its entity number.
For this problem, you will need point_name and point_label.
//Points
*point(p_pendu_pivot, "Pivot Point")
2.
Using the same *Point statement create another point which would be pendulum center of mass:
*point(p_pendu_cm, "Pendulum CM")
164
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
Use the *Body() statement to define the ball’s body. The syntax is:
*Body(body_name, "body_label", [cm_origin], [im_origin], [lprf_origin],
[body_num])
where:
body_name
The variable name of the body.
body_label
The descriptive label of the body appearing in the graphical
display of the body.
cm_origin
An optional argument for the center of mass point of the
body.
im_origin
An optional argument for the origin point of the inertia marker
of the body.
lprf_origin
An optional argument for the origin point of the local part
reference frame of the body.
body_num
An optional integer argument assigned to the body as its
entity number.
Square brackets,[ ], in the description of any statement syntax means an optional argument.
This problem requires body_name, body_label, and cm_origin.
//Bodies
*Body(b_link, "Ball", p_pendu_cm)
4.
Define the graphics for entities you want to display. To attach graphics to the body, use the *Graphic()
statement for spheres and cylinder to display the link and the sphere.
Statement syntax for sphere graphics:
*Graphic(gr_name, "gr_label", SPHERE, body, origin, radius)
where:
gr_name
The variable name of the graphic.
gr_label
The descriptive label of the graphic.
SPHERE
This argument indicates that the graphic is a sphere.
body
The body associated with the graphic.
origin
The location of center point of the sphere.
radius
The radius of the sphere.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
165
For this problem, use all of the arguments. The statement is:
//Graphics for sphere
*Graphic(gr_sphere, "pendulum sphere graphic", SPHERE, b_link, p_pendu_cm, 1)
Statement syntax for cylinder graphics:
*Graphic(gr_name, "gr_label", CYLINDER, body,point_1,point_2,radius,
[CAPBOTH|CAPBEGIN|CAPEND])
where
gr_name
The variable name of the graphic.
gr_label
The descriptive label of the graphic.
CYLINDER
This argument indicates that the graphic is a cylinder.
body
The body associated with the graphic.
Point1
The locations of one end of the cylinder.
Point2
The location of the other end of the cylinder.
Radius
The radius of the cylinder.
[CAPBOTH|
An optional argument that identifies if either or both cylinder
ends should be capped.
CAPBEGIN|
CAPEND]
For this problem, use all arguments. The statement is:
//Graphics for cylinder
*Graphic(gr_link, "pendulum link graphic", CYLINDER, b_link, p_pendu_pivot,
p_pendu_cm, 0.5, CAPBOTH )
5.
Create a revolute joint at the pivot point. The syntax is:
*RevJoint(joint_name, "joint_label", body_1,body_2, origin, point|vector,
[ALLOW_COMPLIANCE])
where:
166
Joint_name
The variable name of the joint.
Joint label
The descriptive label of the revolute joint.
Body 1
The first body constrained by the revolute joint.
Body 2
The second body constrained by the revolute joint.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
origin
The locations of revolute joint.
point|vector
A point or vector that defines the rotational axis of the revolute joint.
[ALLOW
COMPLIANCE]
An optional argument that indicates the joint can be made compliant.
For this problem, you will use the following statement:
//Revolute Joint
*RevJoint(j_joint, "New Joint", B_Ground, b_link, p_pendu_pivot, V_Global_X)
6.
Create an entity output statement. The syntax for *Output - output on entities is:
*Output(out_name, "out_label", DISP|VEL|ACCL|FORCE, ent_name, [ref_marker])
where:
out_name
The variable name of the output.
out_label
The descriptive label of the output.
DISP|VEL|ACCL|FORCE
An argument that indicates whether the output type is displacement,
velocity, acceleration, or force.
ent_name
The entity on which output is requested.
ref_marker
An optional argument for the reference marker in which the output is
requested.
In order to obtain the displacement vs. time output of the falling ball, you will use the *Output() statement as
follows.
//Output
*Output(o_pendu, "Disp Output", DISP, b_link)
7.
Set property values for the entities you created in your MDL model file. This is done in the property data section of
the MDL model file. For this problem, use the *SetSystem(), *SetPoint(), and *SetBody() statements.
//Property data section
*setsystem(MODEL)
*setpoint(p_pendu_pivot, 0, 5, 5)
*setpoint(p_pendu_cm, 0, 10, 10)
*setbody(b_link, 1, 1000, 1000, 1000, 0, 0, 0)
It is recommended that you include the *setsystem(MODEL) statement. MotionView uses this to reference the
entire model.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
167
8.
Save the model as pendulum.mdl. Your MDL model file will look like the file below. It summarizes the key
sections of the MDL model file for this exercise.
//Pendulum Model
//05/31/XX
*BeginMDL(pendulum, "Pendulum Model")
//Topology information
//declaration of entities
//Points
*point(p_pendu_pivot, "Pivot Point")
*point( p_pendu_cm, "Pendulum CM")
//Bodies
*Body(b_link, "Ball", p_pendu_cm)
//Graphics
*Graphic(gr_sphere, "pendulum sphere graphic", SPHERE, b_link, p_pendu_cm, 1)
*Graphic(gr_link, "pendulum link graphic", CYLINDER, b_link, p_pendu_pivot,
p_pendu_cm, 0.5, CAPBOTH)
//Revolute Joint
*RevJoint(j_joint, "New Joint", B_Ground, b_link, p_pendu_pivot, V_Global_X)
//Output
*Output(o_pendu, "Disp Output", DISP, b_link)
//End Topology
// Property Information
*setsystem(MODEL)
*setpoint(p_pendu_pivot, 0, 5, 5)
*setpoint(p_pendu_cm, 0, 10, 10)
*setbody( b_link, 1, 1000, 1000, 1000, 0, 0, 0)
*EndMDL()
168
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 3: Load and run the MDL model file.
1.
If using TextView, add a new page.
2.
From the toolbar, use the Select application drop-down menu to change the application to MotionView
3.
Click the Open Model icon,
, on the Standard toolbar.
Or
From the File menu, select Open > Model.
4.
From the Open Model dialog, locate and select the file pendulum.mdl.
5.
Click Open.
6.
Use the Project Browser to view the model entities and verify their properties.
7.
Go to the Tools menu and click on Check Model to check for any modeling errors.
8.
Perform the following steps to run MotionSolve:
From the SolverMode menu, select MotionSolve.
Go to the Run panel and select Transient as the Sim Type: option.
Click on the Simulation Parameters tab and set the End time as 2 seconds.
Click the Transient tab and review the integrator parameters.
Click the Main tab, use the file browser, and enter pendulum as the base name for the input as well as
output files.
Click Run.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
169
.
MV-1070: Creating a Simple Pendulum System using MDL
In this tutorial, you will learn how to create a system using MDL.
Using systems allows you to:
Organize your model file modularly
Reuse system definition files
Easily debug and maintain your files
Create a library of modeling components
Perform certain operations on the entire system at once (e.g. turning systems on/off, making the whole
system compliant/rigid, translation etc.). An operation, such as translation on a system, is automatically
performed on all the subsystems within that system.
The concept of system definition is analogous to the procedures/subroutines in a programming language.
Analogy between programming and MDL approach
A procedure is a program that needs information from the main program. The procedure can be called /instantiated
any number of times. A procedure is a part of main program, but can be maintained separately.
Similarly, a system definition is a model aggregate which needs information from the main model. It can be called/
instantiated any number of times. A system definition is a part of the main model which can be maintained
separately.
Use of system definition is two-step process:
1.
Defining the system
2.
Instantiation of the system definition in the model
170
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Section 1: System Definitions
A system definition is a reusable system model that can be a part of any model as long all the attachment
requirements are satisfied.
A system definition is represented by a *DefineSystem() block. This block should end with a *EndDefine()
statement that indicates the end of a definition block. All entities defined within this block are considered to be part of
the system definition.
A typical system definition example is shown below:
*DefineSystem(def_sys, att_1, att_2…att_n)
*Attachment(att_1, “Label for attachment” entity_type, “Comment”,
default_entity)
*Attachment(att_2, “Label for attachment” entity_type, “Comment”,
default_entity)
..
..
*Attachment(att_n, “Label for attachment” entity_type, “Comment”,
default_entity)
*Point(….)
*Body(….)
*RevJoint..
…
…
*EndDefine()
In the system definition example above:
def_sys is the variable name of the system definition and will be used while instantiating this system.
att_1, att_2, … att_n are attachments to the system.
Other entities in a system definition are similar to those in an MDL model file.
A system definition can be created in two ways:
1.
Using the text editor.
2.
Created from GUI. This requires minimal text editing. Refer to tutorial MV-1030.
Note
This tutorial covers Method 1, as it covers all the details of the system definition.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
171
Section 2: System Attachments
Attachments act as local variables for entities that are external to the system. As an example, the picture above
shows a system definition of SLA suspension. It is an incomplete system which needs information about the
attachment bodies and points (which are not part of the suspension system) to get connected to. Those entities are
declared as attachments in the system definition using *Attachment. Entities created within the suspension
system (like joints or bushings) that refer to the external entities are referred through the attachment variable names.
While instantiating the suspension system (using *System statement), the actual entity variables are passed as
arguments that map to the declared attachments, and thereby resolve the connection.
The general structure of a system definition is:
A system receives information about entities external to the system via attachments.
Any MDL entity can be passed to a system as an attachment.
The *Attachment() statement inside the system definition declares the arguments in the
*DefineSystem block as an attachment, along with assigning what type of entity the attachment is going to
be.
The same variable name as the attachment should be referred within the definition when defining an entity that
depends on the external entity.
Refer to the entries in bold in the example below. Reference line numbers are for reference only and not part
of the MDL file.
172
o
Line 2 - defines a system with a variable name sys_definition and has one argument
b_body_att as an attachment.
o
Line 4 - declares b_body_att as an attachment with the entity type as Body.
o
Line 7 - creates a revolute joint between b_sys_body which is a body defined within this system (not
shown) and b_body_att which is a body that is an attachment to this system.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Note
An attachment entity need not serve as a physical attachment to entities inside the system definition. It
may be used to represent external variables being passed into the system definition. For example,
datasets may also serve as attachments.
Section 3: Instantiating a System
Instantiating a system means creating an instance of a system definition. A system is instantiated using a
*System() MDL statement, which has the following syntax:
o
*System(varname, “label”, def_varname, arg_1, arg_2, …, arg_n) where,
varname – variable name of the system instance.
label – descriptive label for the system.
def_varname – variable name of the system definition being instantiated.
arg_1, arg_2,… arg,_n – entity variable names that act as attachment to the system.
The number of arguments should match the number of attachments listed and declared in the
system definition.
A Definition can be instantiated multiple times. For example, a single system definition file for an SLA
suspension can be used to create multiple SLA suspension systems within one or more vehicle model files.
The following example illustrates a system definition and its subsequent instantiation within an MDL file.
Some of the terms in the example below are in bold to highlight a few key relationships between a system
definition and its instantiation. See the table that follows the example for an explanation of each term in bold.
Reference numbers are for the example only, and are not contained in an MDL file.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
173
The following table details the relationships between the system definition file and its instantiation in the MDL Model
file.
174
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Defining relationships between the system definition and MDL model files.
You can instantiate systems within your model in one of three ways:
1.
Manually edit the MDL file.
2.
Add a system from the System/Assembly panel in the MotionView MBD Model window.
3.
Use the Assembly Wizard in the MotionView MBD Model window.
The exercises that follow explain the first two methods; the third is not covered this tutorial.
Exercise 1: Creating and Using System Definitions
The following exercise illustrates how system definition can be generated from the original system MDL file. The later
part of the exercise shows two different ways of system instantiation. The following MDL statements are used in this
exercise:
*Include()
*DefineSystem()
*System()
*SetSystem()
*Attachment()
Problem
In Steps 1 and step 2:
Modify the pendulum model from tutorial MV-1060 to create a pendulum system definition file called system.
mdl.
Use this system definition to add another pendulum to the pendulum model from the tutorial MV-1060 to
obtain the double pendulum model shown in the figure below.
Save your base model file as doublependulum.mdl.
Perform a dynamic simulation of the transient response and view the animation.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
175
Schematic representation of the double pendulum
Properties table for the double pendulum
Step 1: Create a system definition.
The structure of a system definition is similar to an MDL model file. With a few modifications, you can convert the
pendulum model file you created in the previous exercise into a more generalized system definition.
1.
Copy the file pendulum.mdl from the <installation directory>\
tutorials\mv_hv_hg\mbd_modeling\mdl to your working directory.
Below is a sample MDL file for the pendulum model in tutorial MV-1060.
176
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
//Pendulum Model
//05/31/XX
*BeginMDL(pendulum, "Pendulum Model")
//Topology information
//declaration of entities
//Points
*point( p_pendu_pivot, "Pivot Point")
*point( p_pendu_cm, "Pendulum CM")
//Bodies
*Body(b_link, "Ball", p_pendu_cm)
// Revolute joint
*RevJoint(j_joint, "New Joint", B_ground, b_link, p_pendu_pivot, V_Global_X)
//Graphics
*Graphic(gr_sphere, "pendulum sphere graphic", SPHERE, b_link, p_pendu_cm, 1)
*Graphic(gr_link, "pendulum link graphic", CYLINDER, b_link, p_pendu_pivot,
p_pendu_cm, 0.5, CAPBOTH)
//Output
*Output(o_pendu, "Disp Output", DISP, b_link)
//End Topology
// Property Information
*setsystem(MODEL)
*setpoint(p_pendu_pivot, 0, 5, 5)
*setpoint(p_pendu_cm, 0, 10, 10)
*setbody( b_link, 1, 1000, 1000, 1000, 0, 0, 0)
*EndMDL()
You can convert the above MDL file into a system definition by making small changes to your MDL file.
2.
Replace the *BeginMDL() and *EndMDL() statements with the *DefineSystem() and *EndDefine()
statements, respectively. Specify an appropriate variable name for the system definition (sys_def_pendulum is
used in this illustration).
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
177
3.
The pendulum system definition would need information about:
What body to connect to (attachment body)
What location to connect to (attachment point or pivot point)
Let’s use att_body and att_point as the attachment entities.
4.
Use these variables in the *DefineSystem () statement:
*DefineSystem (sys_def_pendulum, att_point, att_body)
Note
5.
As mentioned earlier, the attachment entity can be any MDL entity. One needs to specify the entity type
that the variable represents (e.g. att_point represents the POINT entity).
Use *Attachment statement to specify the entity type that each variable represents.
*Attachment (att_point, "Pivot Point", POINT, "Attachment point where the pendulum
definition gets attached")
*Attachment (att_body, "Attachment body" , BODY, " Any body to which the pendulum
definition gets attached")
Note
In the original model variable p_pendu_pivot was representing the pivot point. While converting the
pendulum model to pendulum system definition, this pivot point would be provided by the attachment
point.
6.
The point p_pendu_pivot is now passed as an attachment, therefore we do not need to define the pivot point.
Delete the statement *Point (p_pendu_pivot, "Pivot Point").
7.
Retain pendulum CM point as it is.
8.
Retain the *Body() statement to create the pendulum body.
The *RevJoint() statement refers to the B_Ground and p_pendu_pivot. Replace B_Ground with the
att_body and p_pendu_pivot with att_point.
9.
Retain the sphere *Graphic() statement.
*Graphic() statement for the cylinder refers to the variable p_pendu_pivot. Replace the variable
p_pendu_pivot with att_point.
Note
All of these variable replacements show that attachment variables should replace the variables external to
the system.
10. Retain the *Output() statement. This allows you to obtain displacement outputs on each pendulum body in
your model.
11. Remove *setsystem(MODEL), *setpoint(p_pendu_pivot, 0, 5, 5).
12. Parameterize the points in the system so that they are positioned with respect to each other in a certain way. In
this case, you can set the CM point to be 5 units away from the attachment point in the y and z direction
(att_point.y+5, att_point.z+5).
178
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
13. The following file shows a sample system definition (system.mdl):
// system.mdl
// created on:
*DefineSystem(sys_def_pendulum, att_point, att_body)
//Topology Data
// Declaration of Entities
//Attachments
*Attachment (att_point, "Pivot Point", Point, "Attachment
point where the pendulum definition gets attached")
*Attachment (att_body, "Attachment body" , Body, " Any body
to which the pendulum definition gets attached")
//Points
*Point( p_pendu_cm, "Pendulum CM")
//Bodies
*Body(b_link, "Ball", p_pendu_cm)
//Joints
*RevJoint(j_joint, "New Joint", att_body, b_link, att_point,
V_Global_X)
//Output
*Output(o_pendu, "Disp Output", DISP, b_link)
//Graphics
*Graphic(gr_sphere, "pendulum sphere graphic", SPHERE,
b_link, p_pendu_cm, 1 )
*Graphic(gr_link, "pendulum link graphic", CYLINDER, b_link,
att_point, p_pendu_cm, 0.5, CAPBOTH )
// Property Data
*SetPoint(p_pendu_cm, 0, att_point.y+5, att_point.z+5)
*SetBody(b_link, 1, 1000, 1000, 1000, 0, 0, 0)
*EndDefine()
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
179
Step 2: Add a system definition by manually editing your MDL file.
In step 1, you created a reusable system definition. In this step, you will instantiate this system definition in your
model file. In the manual approach, you will write an MDL file which includes the system definition and instantiates it
several times.
1.
Begin the model file with a *BeginMDL() statement.
2.
Include the system definition file, system.mdl, within your model file as follows:
*Include("system.mdl")
The *Include() statement inserts the contents of the specified file into the MDL file.
Note
The saving of the MDL file subsequently removes *Include() and has the entire content of the
included file within the MDL file.
3.
Instantiate the first pendulum system using the *System() statement. Refer to the MDL Language Reference
online help for syntax. For example:
*System(system1, "First Pendulum System", sys_def_pendulum, P_Global_Origin,
B_Ground)
When you instantiate a system, remember:
Reference the system definition used by the system by specifying its variable name as the third argument in
the *System() statement. The variable name of the system definition should be the same as you specified
in the corresponding *DefineSystem() statement. In the above example, system1 uses the system
definition sys_def_pendulum.
If the system definition contains attachments, resolve those attachments when you instantiate the system.
For example, sys_def_pendulum has an attachment, att_body, to reference body_1 in the *RevJoint
() statement. In system1, the pendulum body, b_link, is connected to the ground body, B_Ground.
Therefore, specify B_Ground as the attachment body.
Repeat the above steps with appropriate modifications, to create the second pendulum system. Note that the
link body in the first system is now the attachment to the second system (instead of B_Ground), and so is
the first pendulum (CM instead of P_Global_Origin).
4.
Close the MDL file with the *EndMDL() statement.
A sample MDL file is provided below:
*BeginMDL(model, "MODEL")
*Include("system.mdl")
*System(system1, "First Pendulum System", sys_def_pendulum,
P_Global_Origin, B_Ground)
*System(system2, "Second Pendulum System", sys_def_pendulum, system1.
p_pendu_cm, system1.b_link )
*EndMDL()
Note
180
When more than one system instance shares a common system definition, the system definition is said
to be shared. Changing the content in the MotionView GUI in one system will affect the other system
instance.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
5.
Run the MotionSolve simulation and post-process the results.
Exercise 2: Adding Systems from the Systems/Assembly Panel
This exercise demonstrates how to instantiate a system from MotionView using the Systems/Assembly panel.
Problem
In this exercise:
Use MotionView to add another pendulum link to your double pendulum model to obtain the triple pendulum
shown in the image below.
Solve and view the animation.
The triple pendulum
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
181
Properties table for the triple pendulum
Step 1: Add the system definition from MotionView.
Adding system definitions to a model is similar to adding other entities except the system definitions are loaded from
a file.
1.
Start MotionView and open the pendulum model file from Section 3, Exercise1 (the previous exercise) in the MBD
Model window.
2.
From the Project Browser, click Model.
The Systems/Assembly panel is displayed.
3.
Click the Import/Export tab.
4.
Using the Select File: file browser
5.
Click Import.
, pick the system definition you just created, system.mdl.
The Specify entity details dialog is displayed.
182
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
Under Select a definition, select sys_def_pendulum.
7.
Under Label, remove the default label and enter Third Pendulum System as the new label.
8.
Under Variable, remove the default variable and enter system3 as the new variable.
9.
Click OK.
Step 2: Resolve attachments and update points.
1.
Select the newly added system from the Project Browser.
The *Attachment() line added to the system definition now appears in the Attachments tab for the system
folder of the newly added system. Attach the third link of the pendulum to the second link in the pendulum
system.
2.
From the Attachments tab, double-click the yellow Body collector (in the row corresponding to att_body) to
select a body attachment.
The Select a Body dialog is displayed.
3.
Expand the Bodies folder in the second pendulum system and pick the Ball.
4.
Click OK.
5.
Next, click the yellow Point collector highlighted with a cyan border (in the row corresponding to att_point) to
select a point attachment.
The Select a Point dialog is displayed.
6.
Expand the Points folder under the second pendulum system and select the CM point.
7.
Click OK.
8.
Save the model as triplependulum.mdl for future use.
9.
Run MotionSolve and view the results.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
183
MV-1080: Creating an Analysis using MDL
In this tutorial, you will learn how to create an analysis definition and instantiate it in an MDL file.
Section 1: Analysis Definitions
An analysis is a collection of loads, motions, output requests, and entities (bodies, joints, etc.) describing a particular
event applied to a model.
An analysis definition is similar to a system definition in syntax and usage. An analysis definition uses
*DefineAnalysis(), while a system definition uses *DefineSystem().
A analysis definition is represented by a *DefineAnalysis() block. This block should end with a
*EndDefine() statement that indicates the end of a definition block. All entities defined within this block
are considered to be part of the analysis definition.
A typical analysis definition example is shown below:
*DefineAnalysis(ana_def_name,
arg_1,arg_2, ..., arg_n)
*Attachment(att_1, “Label for attachment” entity_type, “Comment”,
default_entity)
*Attachment(att_2, “Label for attachment” entity_type, “Comment”,
default_entity)
..
..
*Attachment(att_n, “Label for attachment” entity_type, “Comment”,
default_entity)
*Point(….)
*Body(….)
*RevJoint..
*EndDefine()
In the analysis definition example above:
ana_def_name is the variable name of the analysis definition and will be used while instantiating the analysis.
arg_1,arg_2..arg_n are a list of arguments passed to the analysis definition as attachments.
The concept of attachments is similar to those in a system definition as illustrated in the earlier tutorial MV-1070.
184
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Section 2: Instantiating an Analysis
Similar to a system, instantiating an analysis means creating an instance of an analysis definition. An
analysis is instantiated using a *Analysis() MDL statement, which has the following syntax:
o
*Analysis(varname, “label”, def_varname, arg_1, arg_2, …, arg_n) where,
varname – variable name of the analysis instance.
label – descriptive label for the analysis.
def_varname – variable name of the analysis definition being instantiated.
arg_1, arg_2,… arg,_n – entity variable names that act as attachment to the analysis.
The number of arguments should match the number of attachments listed and declared in the
analysis definition.
A Definition can be instantiated multiple times. For example, a single analysis definition file can be used in
two different events.
A major difference between a System and an Analysis is - only one analysis can be active in the model at a
time (irrespective of whether or not they refer to a common definition). This is done through
*SetActiveAnalysisInstance() statement.
The following table illustrates an analysis definition and its subsequent instantiation within an MDL file. Two
files, an analysis definition file and the model file, work together when instantiating a particular analysis under
study.
Some of the terms in the example below are in bold to highlight a few key relationships between the files.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
185
The following table details the relationships between the analysis definition file and its instantiation in the MDL Model
file.
Variable
Relationship
analysis.mdl
The contents of the analysis definition file, analysis.mdl, are included in
the model by passing its file name as an argument of the *Include()
statement in the MDL model file.
Note - The saving of the MDL file subsequently removes *Include and
has the entire content of the included file within the MDL file.
j_joint_att
The varname of the attachment, declared in the *Attachment()
statement (line 3) in the analysis definition file. Appears as an argument in
the *DefineAnalysis() statement (line 2).
def_analysis1
The varname of the analysis definition as specified in the
*DefineAnalysis() statement in the analysis definition file (line 2).
Indicates the analysis definition used by analysis1 in the *Analysis()
statement the MDL model file.
Defining relationships betw een the analysis definition and MDL model files
Process
An experimental technique for estimating the natural frequencies of structures is to measure the response to an
impulsive force or torque, then look at the response in the frequency domain via a Fourier Transform. The peaks in the
frequency response indicate the natural frequencies. In this tutorial, we will create an analysis to simulate this test
procedure. The analysis applies an impulsive torque to the system and measures the response.
1.
Use the following function expression to create the impulse torque about the x axis.
Tx = step(TIME,.3, 0, .31, 10) + step(TIME, .31, 0, .32, -10)
2.
Apply this torque to estimate the natural frequencies of the triple pendulum model shown in the image below:
186
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Schematic representation of a triple pendulum in stable equilibrium
Your analysis applies to a pendulum with any number of links or to more general systems.
Properties table for the triple pendulum
The following MDL statements are used in this exercise:
*Attachment()
*ActionReactionForce()
*SetForce()
*Output()
Note
Refer to the HyperWork s Desk top Reference Guide for the syntax of the above MDL statements.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
187
Exercise: Creating an Analysis Definition
Step 1: Create the analysis definition file.
1.
Create the *DefineAnalysis() and *EndDefine() block. All other statements will be added between this
block.
In the text editor, define an analysis with a variable name of def_ana_0 and one argument j_att as an
attachment.
2.
The torque may be applied between two bodies connected by a revolute joint, with the origin of the revolute joint
taken as the point of application of the force. This allows you to have only one attachment; the revolute joint.
Create an *Attachment() statement which defines j_att as the attachment and Joint as the entity type.
Make sure that the variable name used in the statement is the same as is used in the *DefineAnalysis()
statement.
3.
Use the appropriate *ActionReactionForce() statement to define an applied torque. Please note to
reference the correct properties of the attachment joint to reach the bodies involved in the joint.
4.
Reference the correct properties of the attachment joint to reach the bodies involved in the joint.
Note
Refer to the description of the dot separator in MDL. You can access properties of an
entity by using the dot separator.
For example, bodies attached to the revolute joint can be accessed as
<joint variable name>.b1 and as <joint variable name>.b2.
Create an *ActionReactionForce() statement with the following:
Variable name of force_1.
Force type as ROT (rotational).
Body 1 as j_att.b1 (attachment joint body 1).
Body 2 as j_att.b2 (attachment joint body 2).
Force application point as j_att_i.origin (the attachment joint origin).
Reference frame as Global_Frame (global).
5.
Use the *SetForce() statement to set the torque value to the force defined in the previous step.
Create a *SetForce() statement with a variable name of force_1 (the existing force) and the following
torque values:
TX = step(TIME,.3,0,.31,10) + step(TIME,.31,0,.32,-10),TY = 0,TZ = 0
188
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
Use an *Output() statement to output the applied force.
Define an *Output() statement with the following:
Variable name of o_force.
Entity type as FORCE.
Variable name of force_1 (the action-reaction force created in Step 3 above).
Reference frame as Global_Frame.
7.
Save the analysis definition as analysis.mdl.
The saved file analysis.mdl will look like this:
*DefineAnalysis(def_ana_0,j_att)
*Attachment(j_att, "Joint", Joint, "")
*ActionReactionForce(force_1, "Force Label", ROT,
j_att.b1, j_att.b2, j_att.i.origin, Global_Frame)
*Output(o_force, "Force Output", FORCE, force_1,
Global_Frame, BOTH_MARKERS )
*SetForce(force_1,`step(TIME, 0.3, 0, 0.31, 10) + step(TIME, 0.31, 0, 0.32, -10)
`,0,0)
*EndDefine()
Step 2: Create the model file.
1.
Start MotionView and open the
<installation directory>\ tutorials\mv_hv_hg\mbd_modeling\mdl\triplependulum_equi.
mdl file.
2.
From the Project Browser, click Model.
The Systems/Assembly panel is displayed.
3.
Click Import/Export tab.
4.
Using Select File: file browser
5.
Click Import.
Altair Engineering
, pick the analysis definition you just created, analysis.mdl.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
189
6.
Make sure that the definition is set to Analysis.
7.
Click OK.
8.
Select the newly added analysis by clicking on Analysis 0 in the Project Browser, and resolve the joint
attachment by selecting any one of the pivot joints of the triple pendulum:
From the Attachments tab, select the Joint Attachment.
Select any pivot joint of the triple pendulum.
9.
Save your model as new_triplependulum.mdl.
10. Run the solver.
11. View the animation.
190
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-1090: Creating a Dataset using MDL
In this tutorial, you will learn how to:
Create a dataset to specify the start time, mid time, end time, and the force magnitude
Include dataset definition in the analysis definition
Vary the magnitude and time of the impulse torque
A dataset is a collection of user-defined variables whose values can be referenced in entities within an MDL file.
Datasets are defined using a *DefineDataSet() - *EndDefine() block which is similar to other definition based
entities such as systems and analyses. The definitions are then instantiated using the *DataSet() statement .
Exercise: Defining a Dataset
Step 1: Create a dataset definition.
The following steps illustrate how to create a dataset definition and instantiate it.
Consult the MDL Language Reference online help for the correct syntax for the MDL statements you choose to use.
1.
In a new file, create the *DefineDataSet() and *EndDefine() block. You will create all other statements to
define the dataset between these statements.
The variables that are needed to define the dataset are:
Begin time
Mid time
End time and
The magnitude for the torque.
As all the variables are real numbers, use *Real() to define them.
Use one *Real() statement to define one real type variable.
You can also define other types of variables, such as integers, strings, options, or files as applicable.
2.
Save the file in the working directory as dataset.mdl. Your file should look like this:
*DefineDataSet(ds_def_force)
*Real(start_time, "Starting Time")
*Real(mid_point, "Mid Point")
*Real(end_time, "End Time")
*Real(force_magnitude, "Force Magnitude")
*EndDefine()
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
191
Step 2: Include the dataset in the analysis definition.
The dataset will be included in the analysis definition by using the *Include() statement. The dataset entities will
be incorporated in the expression for torque.
1.
In a text editor, open the analysis definition file created in tutorial MV-1080. Include the dataset definition in it by
using the *Include() statement before the *DefineAnalysis() statement.
The syntax is:
*Include("dataset.mdl")
2.
Instantiate the dataset by choosing a suitable variable name and label using the *DataSet() statement.
The syntax for the *DataSet() statement is:
*DataSet(ds_name, "ds_label", ds_def, [optional arguments])
where
ds_name is the variable name of the dataset.
ds_label is the label of the dataset.
ds_def is the variable name of the existing dataset definition.
Notice that the ds_def is the same as the variable of the dataset definition used in the *DefineDataset()
statement.
3.
Set the default values of the entities in the dataset by using the *SetReal() statement.
The syntax for the *SetReal() statement is:
*SetReal(real_name, real_value)
where
real_name is the variable name of the entity for which the value is being set.
real_value is the value of the entity.
As the real entity is a part of the dataset, the correct variable name of the real entity is:
Dataset ds_name.real_name
For example, the *SetReal() statement for begin time would be:
*SetReal(ds_name.begin_time, 0.3)
4.
Set the default values of all entities used in the dataset definition.
Include the lines below before *SetForce():
*DataSet(ds_force, "Force Data", ds_def_force)
*SetReal(ds_force.start_time, 0.3)
*SetReal(ds_force.mid_point, 0.31)
*SetReal(ds_force.end_time, 0.32)
*SetReal(ds_force.force_magnitude, 10)
192
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
5.
The *SetForce() statement in the analysis definition looks like:
*SetForce(force_1,`step(TIME, 0.3, 0, 0.31, 10) + step(TIME, 0.31, 0, 0.32, 10)`,0,0)
6.
Change the appropriate values in the *SetForce() statement by incorporating the entities in the dataset. The
idea is to use the dot operator to browse through the model hierarchy and access the dataset values. This is
illustrated in the following statement:
*SetForce(force_1,`step(TIME, {ds_force.start_time.value}, 0, {ds_force.
mid_point.value}, {ds_force.force_magnitude.value}) + step(TIME,
{ds_force.mid_point.value}, 0, {ds_force.end_time.value}, -{ds_force.
force_magnitude.value})`,0,0)
The expressions within the curly braces ({}) get processed by Templex in MotionView and get evaluated to the
appropriate values defined in the dataset.
7.
Save the above work in a new analysis definition file.
The analysis definition file should similar to the one shown below:
*Include(“dataset.mdl”)
*DefineAnalysis(def_ana_0,j_att)
*Attachment(j_att, "Joint", Joint, "")
*ActionReactionForce(force_1, "Force Label", ROT, j_att.b1, j_att.b2,
j_att.i.origin, Global_Frame)
*Output(o_force, "Force Output", FORCE, force_1, Global_Frame,
BOTH_MARKERS )
*DataSet(ds_force, "Force Data", ds_def_force)
*SetReal(ds_force.start_time, 0.3)
*SetReal(ds_force.mid_point, 0.31)
*SetReal(ds_force.end_time, 0.32)
*SetReal(ds_force.force_magnitude, 10)
*SetForce(force_1,`step(TIME, {ds_force.start_time.value}, 0, {ds_force.
mid_point.value}, {ds_force.force_magnitude.value}) + step(TIME,
{ds_force.mid_point.value}, 0, {ds_force.end_time.value}, -{ds_force.
force_magnitude.value})`,0,0)
*EndDefine()
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
193
Step 3: Change the dataset parameters and run the analysis.
1.
In MotionView, load the triple pendulum model created in tutorial MV-1080.
2.
From the Analysis panel, add the new analysis definition with the included dataset definition.
3.
From the Project Browser, expand the Datasets folder and click on the Force Data dataset.
You will see the dataset with the Labels and Values for all entities in the dataset.
You can change the Starting Time, Mid Time, End Time and the Force Magnitude using the dataset graphical
user interface.
4.
Run the analysis.
5.
Load results in the animation window.
You can now easily change the force parameters and re-run your analysis.
194
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Flexible Body Modeling and Simulation using
MotionView and MotionSolve
MV-2000: Introduction to Flexible Bodies
MV-2010: Flexbody Generation using Flexprep and Optistruct
MV-2020: Use of Flexbody in MBD Models
MV-2021: Simulating an Automotive Door Closure Event
MV-2035: Solving Flexbody ADM/ACF in MotionSolve
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
195
MV-2000: Introduction to Flexible Bodies
Why Flexible Bodies?
Traditional multi-body dynamic (MBD) analyses involve the simulation of rigid body systems under the
application of forces and/or motions.
In the real world, any continuous medium deforms under the application of force. Rigid body simulations do
not capture such deformations and this may lead to inaccurate results. Inclusion of flexible bodies in MBD
simulations accounts for flexibility.
MotionView provides the modeling tools required to incorporate flexible bodies in your MBD model. Flexible MBD
simulations allow you to:
capture body deformation effects in simulations.
acquire greater accuracy in load predictions.
study stress distribution in the flexible body.
perform fatigue analysis.
However, flexible bodies introduce an additional set of equations in the system and consequently, have a higher
computational cost as compared to rigid body systems.
What is a Flexible Body?
Finite element models have very high number of degrees of freedom. It is hard for MBD solvers to handle
these.
A flexible body is a modal representation of a finite element model. The finite element model is reduced to very
few modal degrees of freedom.
The nodal displacement in physical coordinates is represented as a linear combination of a small number of
modal coordinates.
where,
U
nodal displacements vector
modal matrix
Q
matrix of modal participation factors or modal coordinates to be determined by
the MBD analysis.
MotionView uses the process of Component Mode Synthesis(CMS) to reduce a finite element model to set
of orthogonal mode shapes.
196
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Two types of CMS methods are supported in RADIOSS:
Craig Bampton
Craig Chang
Note
At the end of this tutorial, links to online help direct you to where you can learn more about the theory
behind flexible bodies and CMS method.
Flexbody Generation Using RADIOSS
There are two ways you can generate flexible bodies using RADIOSS:
1.
Using the FlexPrep utility in MotionView.
2.
Manually editing the input deck.
Using the FlexPrep utility in MotionView interface
FlexPrep is a MotionView utility which allows you to generate a flexible body from a finite element mesh. It also
allows translation between various flexbody formats. These translations are discussed in the next section, "
Flexbody Translation Using Flexprep".
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
197
Using the FlexPrep GUI, you can:
generate a flexible body from any RADIOSS or Nastran bulk data file.
create RBE2 spiders.
request for stresses and strains.
create RADIOSS preparation file which can be used in the file size reduction of a flexible body.
Manually Editing the Input Deck
You can manually insert certain cards in the RADIOSS input deck to run the Component Mode Synthesis routine.
These cards allow file size reduction of a flexbody. This helps in faster pre/post-processing and overall better
efficiency of the process.
Note You can manually edit the preparation file generated by FlexPrep to reduce the size of the flexible body
H3D.
By modifying the input deck, you can:
request only the skin elements of the flexbody to display .
request stress and strain information for a selected set of elements.
use released degrees of freedom for the interface nodes.
The following data is included in a flexbody H3D file:
1. Nodal positions.
7. Translational displacement mode shapes.
2. Element connectivity.
8. Rotational displacement mode shapes.
3. Eigenvalues of all modes.
9. Interface node IDs (optional).
4. Inertia invariants (optional).
10.Element stress/strain tensors (optional).
5. Nodal mass.
11.Global (rigid) inertia properties (optional).
6. Nodal inertia (optional).
Flexprep.exe always generates points 1, 2, 3, 4, 5, 6, 7, 8, 9, and 11 and writes them to the H3D file. Points
4, 6, 9, and 11 are not strictly required.
Flexbody Translation Using FlexPrep
FlexPrep allows the you to translate a flexbody from one format to another. Using FlexPrep, you can:
1.
Mirror an existing flexible body H3D file about a plane.
2.
Translate an ADAMS MNF file to an Altair H3D file.
3.
Translate an H3D file to an ADAMS MTX file.
4.
Translate an Altair H3D file to ADAMS MNF file.
198
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
5.
Translate an Nastran PCH file to an Altair H3D file.
6.
Translate an Altair H3D file to DADS DFD file.
Note Once the flexbody H3D is created, it can be used in the MBD model and the model can be submitted to
either MotionSolve or ADAMS. This is covered in the following tutorials.
Stress Recovery and Fatigue Calculations
Stress recovery and fatigue calculations are done in two stages during the MBD analysis:
For stress recovery in the pre-processing stage, element stresses are obtained using the orthogonalized
displacement modes. Every displacement mode is associated with a particular number of stress modes, each
representing a basic stress tensor. This particular number depends on the type of elements used in the
flexible body, for example, one, two, or three-dimensional elements. These stress modes are then saved to
the H3D file.
In the post-processing stage, the actual stress recovery and fatigue index calculations are carried out. The
modal participation factors obtained from the simulation are used to linearly superimpose the stress modes to
come up with the stress tensor for each element. This stress tensor is used to calculate the other
components of stresses: Principal, Shear, or von Mises.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
199
MV-2010: Flexbody Generation using Flex Prep and Radioss
In this tutorial you will:
get familiar with the flexible body generation techniques available in MotionView and Radioss.
be introduced to all available features in FlexBodyPrep for flexbody generation.
be introduced to the various options available in Radioss to reduce the size of the H3D file.
There are two ways you can generate the flexible bodies for MBD simulation in Hyperworks:
1.
Using FlexPrep utility in MotionView interface.
2.
Manually editing the input deck (*.fem) for Radioss solver.
Introduction to Flex Prep
Flex Prep is a tool in MotionView which is used to:
create flexbody H3D files using Radioss.
create flexbody H3D file from ADAMS MNF and NASTRAN PCH.
translate flexbody H3D file to ADAMS MTX, Altair H3D (mirrored), ADAMS MNF, DADS FDF, and nCode
FES.
Exercise: Creating and Simulating Flexible LCA
Step 1: Using FlexBodyPrep.
Once you provide the required input, Flex Prep generates an input deck (_prp.fem) for the Radioss solver with all the
required cards, and then it calls Radioss to run the job. Please refer to tutorial MV-2000 to understand all the inputs
and process.
Note
1.
The files for this exercise are located in the folder <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\flexbodies. Please copy them all to your
working directory before proceeding further.
From the Flex Tools menu, select Flex Prep.
Launching Flex Prep
2.
Select Radioss Flexbody generation.
3.
From the pull down menu, pick the option Create Radioss prp (preparation) file and generate the h3d flexbody
.
200
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
4.
Click on the file browser icon,
sla_flex_left.fem.
Note
, next to Select Bulk Data file and select the input bulk data file
You can use any Radioss (FEM) or Nastran (nas, dat, bdf) bulk data files.
5.
For Save the *.h3d file as, enter the name of the output H3D file as sla_flex_left.h3d in your <working
directory>.
6.
For the Component mode synthesis type, select Craig-Bampton to perform Craig-Bampton component mode
synthesis.
7.
In the Specify Interface Node List field, enter 4927+4979+4984.
The interface nodes are the nodes where constraints or forces are applied in the MBD analysis.
Two of the nodes are located at the two corners of the control arm, while the third node is located at its center.
8.
For the Cutoff type and value, select Highest Mode # and enter a value of 10.
Limiting Modal Information
MotionView allows you to specify a limit on the modal information contained in your H3D file. Two methods are
available to set these limits.
Specify a maximum number of Eigen modes for which modal data is included in your H3D file.
OR
Specify an upper cut-off frequency for the Eigen modes.
We used the first method in this exercise.
9.
Switch on Perform stress recovery by clicking on the check box next to it.
With this option set, the Flex Prep puts relevant cards in the Radioss input deck to calculate the modal stresses
while processing your bulk data file.
10. Switch on Perform Strain Recovery by clicking on the check box next to it.
With this option set, the Flex Prep puts relevant cards in the Radioss input deck to calculate the modal strains
while processing your bulk data file.
11. Under Specify units in bulk data file, select the following:
Mass Units
Kilogram
Length
Millimeter
Force
Newton
Time
Second
Note
HyperMesh is unit-less and you need to make sure to use consistent units, or the flexbody generated will
have incorrect masses and inertia.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
201
12. Verify that the FlexBodyPrep dialog has the values shown in the image below:
Altair FlexBodyPrep Translator dialog
13. There are 3 RBE2 Spiders already in the sla_left_flex.fem and the 4th RBE2 spider should be created
using the Create RBE2 Spiders option explained in the next step.
202
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 2: Create RBE2 Spiders.
Description of an RBE2 Spider
An RBE2 is an element whose independent degrees of freedom are specified at a single grid point and whose
dependent degrees of freedom are specified at an arbitrary number of grid points. This is usually used to model stiff
structures like bolts.
If you have a hole in your finite element (FE) model and need to use the center of the hole as the interface node, you
need to transfer the loads from the center node to the peripheral nodes. This feature allows to you create RBE2
spiders at the hole in the FE model to transfer forces from the independent node to dependent nodes on the periphery
of the hole.
Click on the file browser icon next to Select Bulk Data File and select the input bulk data file sla_flex_left.fem
from your working directory.
1.
Click the Create RBE2 Spider button.
2.
HyperMesh is invoked and displays a user defined page with three buttons (steps 1 to 3).
Note
If HyperMesh asks for a user profile, click Cancel and go to the utility panel in the browser area.
Note
If the user defined page with the three buttons is not displayed, follow these steps to view it:
From the View menu, select the Utility Menu.
From the Utility menu, click the User button, located at the bottom of the page.
3.
The Info button details the procedure to create RBE2 spiders.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
203
4.
Zoom into the area of the lower ball joint location as shown in the image below:
5.
Click the Step 2: Superspider to create one spider at a time.
6.
Select a node on the periphery of the hole and click Proceed.
7.
The script would create a RBE2 Spider automatically as shown in image below:
8.
Click the Step 3: Save and Close, which will save the modified file and automatically grab the ID of the center
(interface) node. You can give a new name to the file and check to see if the interface node ID is added to the flex
prep.
204
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
9.
The new interface node IDs are automatically added to the interface node list in FlexBodyPrep as displayed in the
image below:
10. Click OK to launch Radioss in a command window.
Messages from the FlexBodyPrep translator are displayed in the command window. Check the status of the
Radioss run and look for any error messages there.
Step 3: Viewing the model and verifying results.
In this exercise, you will verify your work in Step 1 by viewing the flexible control arm in HyperView.
1.
From Select window mode drop-down menu on the toolbar, select HyperView.
The Load model and results: panel is displayed.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
205
2.
Click the Load model file browser and select the H3D flex file, <working directory>/sla_flex_left.
h3d.
The flexible arm model and its modal results are contained in the H3D flex file you created using the Flexprep
wizard.
Load model and results fields
Since the modal results are also contained in the same H3D file, MotionView automatically updates the Load
results file field with the same filename.
3.
Click Apply to load the model into the HyperView.
Flexible LCA Model
206
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
4.
Click the Select animation mode arrow and select Set Transient Animation Mode,
5.
Animate the results by clicking the Start Animation icon,
.
.
HyperView sequentially animates the flexible control arm through its mode shapes. The mode number and its
frequency are displayed at the top-right of the window.
6.
Stop the cycling of modes by clicking the Pause Animation icon ,
7.
Click the Select animation mode arrow and from the drop-down list, select Set Modal Animation Mode.
8.
To animate a particular mode shape, go to the Results Browser and change the mode from Undeformed Model
Frame to Mode 7.
Altair Engineering
.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
207
Selecting specific mode using the Simulation selector panel
Although there is not a direct correlation possible, you can recognize the first six modes as rigid body modes due
to near zero frequency values.
9.
Click the Animation icon,
, to animate the selected mode.
Toggle the animation on and off by clicking the button.
208
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
You can similarly animate other modes of the flexible body.
10. Click the Contour button,
, to view the stresses on the flexbody.
11. From the Result type drop-down menu, select Stress and vonMises. For Entity with layers, select Z1 as
shown in image below:
12. Click Apply to display the contours and the legend in the graphic area.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
209
vonMises Stress contours displayed on the model
Step 4: Invoking FlexPrep in batch mode.
The FlexPrep executable can also be invoked in batch mode.
To run the FlexPrep from the command line in UNIX:
<install_path>/altair/scripts/flexprep
To run the FlexPrep from the command line in DOS:
<install_path>\io\translators\bin\WIN32\flexprep.exe
The usage options and corresponding syntax is listed if the above command is given without any arguments.
The sla_flex_left.h3d flexbody created in the earlier exercise is the lower control arm of a left front SLA
suspension. Now, we will create a symmetric flexible body for the right front SLA suspension by invoking flex prep in
batch mode.
Note
210
In this exercise, you will run the FlexPrep translator from the MS DOS prompt for the Windows Operating
System. You may follow analogous steps for the UNIX OS command prompt.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
1.
From the Start menu, open an MS DOS prompt window.
2.
Use the cd command to navigate to your working directory.
3.
Enter the command to launch FlexPrep <install_path>\translators\flexprep.exe.
4.
Go through the usage options for running the FlexPrep translator in batch mode.
5.
Enter the following command:
<install_path>\io\translators\bin\WIN32\flexprep.exe sla_flex_left.h3d
sla_flex_right.h3d -MIRROR_XZ
6.
FlexPrep creates the mirrored lower control arm sla_flex_right.h3d flexbody file.
Exercise: Manual Methods to Reduce the Size of the Flexbody
The previous exercise discussed flexbody generation using FlexPrep. It is possible to generate flexbodies directly
from RADIOSS by editing the input FEM file and adding the cards that invoke the flexbody generation from RADIOSS.
Steps 1 to 4 below discuss these cards in brief.
Understanding the RADIOSS input file for flexbody generation
1.
Open the file sla_flex_left.fem in any text editor.
2.
The first few lines of the FEM file are given below with explanation for each line:
Line 1: SUBCASE
1
Line 2: OUTFILE, sla_left_flex.h3d
Line 3: CMSMETH
1
Line 4: STRESS=ALL
Line 5: STRAIN=ALL
Line 6: BEGIN BULK
Line 7: DTI, UNITS, 1, KG, N, MM, S
Line 8: PARAM COUPMASS
Line 9: CMSMETH, 1, CB, ,
-1
10
Line 10: ASET1, 123456,
4927
Line 11: ASET1, 123456,
4979
Line 12: ASET1, 123456,
4984
Line 13: ASET1, 123456,
4985
BULK DATA FOLLOWS THIS.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
211
A generalized input deck (FEM file) need the cards specified above to generate a flexbody from RADIOSS. The
definition of each line is as follows:
Line 1: SUBCASE – indicates the start of a new subcase definition.
Line 2: OUTFILE – used to specify a base name for the H3D file.
Line 3: CMSMETH – is the card defining the component mode synthesis solution method used to generate
flexbodies in RADIOSS.
Line 4: STRESS=ALL – use to specify that modal stresses are to be computed by RADIOSS for all the elements
in the model.
Line 5: STRAIN=ALL – use to specify that modal strain values are to be computed by RADIOSS for all the
elements in the model.
Line 6: BEGIN BULK – defines the start of FE entities in the model.
Line 7: DTI, UNITS – defines the units for the flexbody.
Line 8: PARAM COUPMASS -1 – defines values for parameters used by RADIOSS for the generation of a
flexbody. In this case, lumped mass matrix approach is used by RADIOSS for eigenvalue analysis.
Line 9: CMSMETH CB 10 – component mode synthesis method selected is Craig Brampton and 10 modes are
requested.
Lines 10 to 13: ASET1 – defines the boundary degrees of freedom for the interface nodes.
With these cards specified, RADIOSS generates a flexbody H3D file. In the event that the size of the flexbody
can be huge based on the bulk data file, number of interface nodes, modes and other details, you may want to
reduce the size of the H3D file. It is possible to do so by using the following methods:
MODEL Set
STRESS/STRAIN Set
OUTLINE
Reduced DOF
All the above methods of flexbody size reduction are described in Step 6.
Modifying the Input Deck to Incorporate Stress/Strain Set, Model Set, Outline and
Released DOF into the Flexbody
The need to incorporate these sets in the RADIOSS input deck is:
to reduce the size of the flexbody.
to help increase the speed of the multi-body pre-processing, simulation and animation.
212
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 1: Stress/strain set in RADIOSS.
The cards STRESS and STRAIN specify the elements for which the stress and strain computations have to be carried
out during flexbody generation.
Syntax of the STRESS and STRAIN cards:
STRESS=7
STRAIN=7
Where STRESS and STRAIN are the RADIOSS cards that specify the elements of the flexbody for which the stress
and strain computations are carried out. Seven is the ID of the set that defines the elements.
1.
Open the FEM input deck sla_left_stress_strain_set.fem from your working directory (and is also
located at <Install>\tutorials\mv_hv_hg\mbd_modeling\flexBodies\) in any text editor.
2.
Modify the cards STRESS=ALL and STRAIN=ALL as STRESS=7 and STRAIN=7, respectively.
3.
Save and close the file.
4.
Run the FEM deck in RADIOSS or you can generate the flexbody using FlexBodyPrep. Select the option Create
h3d flexbody using pre-existing prp file under RADIOSS Flexbody Generation drop-down menu.
5.
Start a new MotionView session and change the window type to HyperView.
6.
Load in the H3D file generated by RADIOSS.
7.
Go to the Contour panel apply Stress and Strain contours. You will see that only a few elements display the
contours. These are the elements that were pre-selected for stress and strain computations using the element
set.
Note
To run RADIOSS from the command prompt, type into the working directory:
<install>\hwsolvers\bin\win32\radioss.bat sla_left_stress_strain_set.fem.
Please refer to the topic Running OptiStruct in the OptiStruct User's Guide for more help with running the model.
For more details on creating sets of elements, refer to the tutorial - Generating a Flexible Body for use in Altair
MotionSolve - OS-1230.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
213
Step 2: Model Set in RADIOSS.
This card lets you control the display of elements of the flexbody in the H3D file while using the H3D file during preand post-processing in MotionView.
Syntax of the MODEL card:
MODEL=7
Where MODEL is the RADIOSS card that determines the elements of the flexbody that are displayed in MotionView.
Seven is the ID of set that defines the element displayed.
1.
Open the FEM input deck sla_left_model_set.fem in a text editor.
2.
Add the model card as MODEL = 7 above the line STRESS=7
3.
Save the file in the working directory and close the file.
4.
Run the FEM deck in RADIOSS or you can generate the flexbody using FlexBodyPrep. Select the option Create
h3d flexbody using pre-existing prp file under RADIOSS Flexbody Generation drop-down menu.
5.
Start a new MotionView session and change the window type to HyperView.
6.
Load in the H3D file generated by RADIOSS.
7.
You will see that only a part of the flexbody is displayed. Only those elements that are included in the set and
used with the MODEL card are displayed here.
Note
To run RADIOSS from the command prompt, cd into your working directory and type:
<Install>\hwsolvers\bin\win32\radioss.bat sla_left_model_set.fem.
Please refer to the topic Running OptiStruct in the OptiStruct User's Guide for more help with running the
model.
Step 3: Outline feature using PLOTEL elements in RADIOSS.
The size of the flexbody can be greatly reduced by using PLOTEL elements in the RADIOSS input deck for flexbody
generation. In case you would like only the edges of the flexbody to be displayed in MotionView, PLOTEL elements
can be defined in the input deck and displayed using the MODEL card. PLOTEL is a one-dimensional dummy element
for use in display.
Syntax of the PLOTEL element:
PLOTEL
EID
G1
G2
Where PLOTEL is the element type, EID is the element ID, G1 and G2 are the nodes used to define the element. For
example: PLOTEL
8786 4698 1702
214
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
The procedure to incorporate the PLOTEL feature is:
In HyperMesh, create PLOTEL elements that define the feature edges of your flexbody.
You can use the features option in HyperMesh to generate the PLOTEL elements of the feature edges of
your model automatically. The features option is available on the Tool page in HyperMesh.
The picture below shows the flexbody model with PLOTEL elements created with the features option:
Create an element SET consisting of all the PLOTEL elements created above.
Use the MODEL card and specify the SET ID of the SET created above PLOTEL.
Save the FEM file and run it in RADIOSS to generate the flexbody that displays only the PLOTEL elements.
1.
Open the FEM deck sla_left_plotel.fem located in
<Install>\tutorials\mv_hv_hg\mbd_modeling\flexBodies\ in any text editor.
2.
Look for the MODEL card and the set ID (8) that it uses.
3.
Within the BULK DATA you will be able to see many PLOTEL elements.
4.
These PLOTEL elements are referred to by the element set 8.
5.
Close the FEM deck.
6.
Run the FEM deck in RADIOSS or you can generate the flexbody from FlexPrep. Select the option Create h3d
flexbody using pre-existing prp file from the RADIOSS Flexbody Generation drop-down menu.
7.
Start a new MotionView session and change the window type to HyperView.
8.
Load in the H3D file generated in step 6. You will see that the flexbody is shown only as lines or edges defined by
the PLOTEL elements created earlier.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
215
Step 4: Released DOF method for interface nodes in RADIOSS.
The released DOF (degrees of freedom) feature enables you to free some degrees of freedom of the interface nodes. If
the appropriate DOF are released for a particular interface node, the simulation is not affected in any way. Depending
on the kind of kinematic constraints in the model and the MBD simulation being carried out, you can release the
appropriate degrees of freedom at the interface nodes to reduce the size of the H3D file generated.
The ASET1 card is used define the boundary degrees of freedom of an interface node of a flexbody.
Syntax of the ASET1 card:
ASET1 C
G1 or ASET1, C, G1
Where ASET1 is the card name, C is the DOF to be constrained and G1 is the node ID. For example:
ASET1, 123456, 4927
This means that the interface node of ID 4927 will be constrained for all DOF, where 123456 represent the 3
translational and 3 rotational in that order. Thus, to release a DOF from the interface node (for example, rotation about
X), the C value will be 12356. Multiple nodes can be constrained using a single ASET1 card as given below:
ASET1, 123456, 4927, 4797, 4984, 4985
1.
Open the RADIOSS input deck sla_left_rdof.fem in any text editor.
2.
Modify the ASET1 cards in the deck to these values:
ASET1, 123456,
ASET1, 1234,
ASET1, 1234,
ASET1, 123,
4927
4979
4984
4985
3.
Save the file in your working directory and close the file.
4.
Run the FEM deck in RADIOSS or generate the flexbody from FlexPrep. Select the option Create h3d flexbody
using pre-existing prp file from the RADIOSS Flexbody generation drop-down menu.
5.
Check the size of the H3D generated and you will notice a reduction in size; this is due to the released DOF
incorporated into the flexbody.
Note
To run RADIOSS from the command prompt, cd into your working directory and type:
<Install>\hwsolvers\bin\win32\radioss.bat sla_left_rdof.fem.
Please refer to the topic Running OptiStruct in the OptiStruct User's Guide for more help with running the
model.
Compare the sizes of all the H3D files generated using the cards mentioned in this step to know the
reduction in file size.
216
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-2020: Use of Flexbody in MBD Models
In this tutorial you will:
use the flexible bodies created in tutorial MV-2010 in an MBD model and solve the model using MotionSolve.
Exercise: Simulating a Front SLA suspension with Flexible LCA
Step 1: Replacing rigid bodies with flexible bodies and solving them in MotionSolve.
In this exercise, you will integrate the flexbodies into your MBD model. All the files required to complete this tutorial
are located at <installation directory>\tutorials\mv_hv_hg\mbd_modeling\flexbodies. Please
copy them over to your working directory before proceeding further.
1.
From the MotionView menu bar, select Model > Assembly Wizard… to bring up the wizard.
2.
Use the criteria from the table below to assemble a front end half vehicle model.
Panel
Selection
Model Type
Front-end of the vehicle
Driveline Configuration
Defaults <No driveline>
Primary Systems
Frnt. SLA susp (1 pc LCA) and Defaults for the rest
Steering Subsystems
Steering Column = Steering column 1 (not for abaqus)
and Steering boost = None
Springs, Dampers, and Stabars
Defaults
Jounce/Rebound Bumpers
Defaults
Label and Varname
Defaults
Attachment Wizard
Compliant = Yes; Defaults for the rest
Assembly Wizard settings
You should make sure to select Frnt. SLA susp (1 pc LCA) since the flexible bodies you have created are for this
suspension geometry.
3.
From the MotionView menu bar, select Analysis >Task Wizard… to display the wizard.
4.
Load a Static Ride Analysis task from the Task Wizard - Front end tasks. Click Next and click Finish.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
217
5.
From the Project Browser, select Lwr control arm from the Bodies folder (located underneath the FrntSLA
Susp (1 pc.LCA) system).
The Bodies panel is displayed.
6.
Under the Properties tab for the Lwr control arm-left, deselect the symmetry check-box, Symmetric
properties. Click Yes to copy the properties of Left to Right.
7.
Select the Deformable check box and click Yes to confirm right side as deformable.
Notice that the graphics of the rigid body lower control arm vanishes.
8.
Using the Graphic file browser,
, select the file sla_flex_left.h3d from your working directory.
9.
You will see that the H3D file field is populated automatically with the same path and the file name as the graphic
file you specified in point 8.
Properties panel
The flexible body drops into the right position.
Note
218
You need to specify the flexbody H3D file as the H3D file. Specify the same or any other file as the
Graphic file.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
External Graphics for Flexbodies
Use of large flexbodies is becoming very common. For faster pre-processing, one can use any graphic file for the
display and use the flexbody H3D file to provide the data to the solver. You can use the input FEM deck or the CAD
file used for the flexbody generation to generate a graphic H3D file using the CAD to H3D Conversion and specify that
file as the Graphic file. This will make pre-processing a much more efficient process.
10. Click Nodes….
The Nodes panel is displayed.
11. Click the Find All button on the Nodes dialog to find nodes on the flexible body that are located closest to the
interface points on the vehicle model. The Nodes option is used to resolve the flexbody’s attachments with the
vehicle model, since the vehicle model is attached to the flexible body at these interface nodes.
Note
Many times there is a little offset between the flexible body interface node and its corresponding interface
point in the model. When you click the Align button, MotionView moves the connection point in the
model to the node location on the flexible body. This affects other entities that reference this point. If the
offset is more than the tolerance value, MotionView inserts a dummy body between the flexible body and
the nearest connection point.
The Locate button on this panel is an optional step to relocate a flexible body if it is not imported in the
desired position. This may happen if the coordinate system used while creating the flexible body in the
original FEM model does not match the MBD model coordinate system. However, if your flexible body is
already in the desired position you can skip this step.
You can attach joints to the flexible body only at the interface nodes. These attachment nodes are
created when you use the Flex Prep translator.
12. Close the Nodes dialog.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
219
13. Click the Modes button. The Modes panel is displayed. This option lets you select the modes that will be active
during the simulation. By default rigid body modes are deactivated. You can also change the damping used for
modes.
Note
By default, for frequencies under 100Hz, 1% damping is used. For frequencies greater than 100Hz and
less than 1000Hz, 10% damping is used. Modes greater than 1000 Hz use critical damping. You can
also give any initial conditions to the modes.
Please note that when selecting the modes, the simulation results may vary as you change the modes to
be included in simulation.
14. Click Close.
220
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
15. Repeat steps 7 through 14 to integrate the right side flexible body sla_flex_right.h3d (created in tutorial
MV-2010) in your model.
Your model should look like the image below:
Now you will compare the mass properties of the H3D flex file with the properties of the FEM model file.
16. Click the FEM Inertia Props tab.
The following information is displayed:
The Bodies panel/FEM Inertia Props tab
17. Add a page to your session.
18. Select the TextView window.
The original sla_flex_left.fem file was loaded in HyperMesh. A summary of the mass and inertia properties
was exported to the summary.txt file.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
221
19. Load the summary.txt file located in your working directory.
The following information is displayed:
The TextView w indow displaying the summary text file information
Notice that the mass and inertia values of the flexible body in your model match well with the values of the original
FEM model.
20. Return to the MotionView window.
21. From the Tools menu, select Check Model to check your complete MBD model for errors.
222
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
22. From the File menu, select Export > Model.
Note
Click the Save Model icon,
, on the Standard toolbar to save the file in working directory with existing
name. If it’s a new model, you will be prompted for the name of the model.
The Save As Model dialog is displayed.
23. Save your model as an MDL file named sla_flex.mdl.
24. Click the Run icon
4.00 seconds.
on the toolbar and run the model with simulation type as Quasi-Static and end time of
25. Once the run is complete, load the MotionSolve result file sla_flex.h3d located in your working directory in a
HyperView window and view the animation of the run.
Step 2: Replacing rigid bodies with flexible bodies and solving them in ADAMS.
The steps to integrate flexbodies into a rigid model are slightly different if the model is to be solved in ADAMS. For
most of the part, the points are the same as the above steps, hence only those points that are different are described
in this exercise.
1.
Go to SolverMode menu and select ADAMS.
2.
Refer to and repeat 1 to 7 from Step 1 above.
3.
Using the Graphic file browser, select the graphic file sla_flex_left.h3d from your working directory.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
223
4.
Under the Functional source pull down menu, select the Use specified (functional) H3D file to create specified
MTX file.
5.
Using the H3D file browser, select H3D file: sla_flex_left.h3d created in Step 4.
6.
Using the MTX file browser, type in sla_flex_left.mtx in your working directory.
Note
7.
When the model is exported to the ADAMS solver in the form of ADM and ACF files, an MTX file is
written out with the same base name. The ADAMS solver understands flexible bodies in MTX format.
You will see that the Invariants button becomes active now. Click Invariants to bring up the dialogue that allows
you to choose the flexibility inertia invariants of the flexbody that are written out to the MTX file.
Invariants dialog
Note In the dialog you will see that the Invariant 5 and Invariant 9 are turned off this corresponds to the Partial
Coupling formulation for modal flexibility. This setting is also suitable for use with the Constant Coupling
formulation. Only Full Coupling requires all nine invariants, but it is computationally expensive to solve
flexbody models with Full Coupling. Thus, there is an option to prevent these invariants being written out
to the MTX file. Note that unless you think you might need Full Coupling, you can safely keep the 5 and
9 Invariants turned off.
8.
Click Close.
9.
Refer and repeat 11 to 16 from Step 1 above.
10. From the Tools menu, select Check Model to check your complete MBD model for errors.
11. From the Project Browser, select DataSets > Result options.
The DataSets panel,
, is displayed.
12. Click the Properties tab. For the Write results file option, under the Value column, select Yes from the dropdown list.
13. For the Results file type, under the Value column, keep Text as the selected option.
224
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
14. From the File menu, select Export > Model.
Note
Click the Export Model icon,
, on the Standard toolbar to save the file in working directory with
existing name. If it’s a new model, you will be prompted for the name of the model.
The Export model panel is displayed.
15. Save your model as an MDL file named sla_flex.mdl.
16. Go to the Run,
, panel and save the model as sla_flex.acf and click Run.
Note MotionView will write out the ADAMS command file, ADAMS solver dataset and MotionView FLX file with
this name. You can run the model in ADAMS at this stage. During the training session, the ADAMS
solver is not hooked to MotionView. The result files from the ADAMS run are provided wherever
required.
17. Once the run is complete, add a new page and change the window type to HyperView.
18. Load in the sla_flex.flx file in the Load Model and Load Result fields.
19. The ADAMS results can now be animated by clicking on the Set Transient Animation Mode icon,
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
.
225
MV-2021: Simulating an Automotive Door Closure Event
In this tutorial, you will learn how to:
use an FEM file to create a flexible body file.
use body data to create a rigid body model.
make the door flexible and use the flexbody file created in the model.
set up a door closure simulation.
No Copy the files metro_door.fem and car_body_graphics.hm from the location
te <Install>\tutorials\mv_hv_hg\mbd_modeling\flexbodies
to your <Working directory>.
Step 1: Review of a finite element model for the flexible door.
In this step, we will review the contents of the finite element (FE) model, which is the starting point for creating a
flexible body.
1.
Import the model metro_door.fem in HyperMesh.
2.
Click the Model Browser on the left of the graphics area and expand the model tree to review all components,
properties, and materials of the model.
226
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
The FEM model should have the following attributes:
A decent, quality mesh on all components.
The Section properties are assigned to all components.
All components refer to appropriate materials.
4.
Identify the interface nodes of the flexible body. Please check the following nodes by ID: 9751, 9750, 10090.
5.
Export the FEM as metro_door_flex.fem for Flexbody Generation.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
227
Step 2: Generating the flexbody using Flex Prep
In this step, we will use the FEM file created in Step 1 and use Flex Prep to generate a flexible body H3D file. A prerequisite for going through this step of the tutorial is an understanding of Flex Prep as described in the tutorial: MV2010: Flexbody Generation using Flexprep and Optistruct.
1.
In MotionView, from the FlexTools menu, select Flex Prep. The FlexBodyPrep dialog is displayed.
2.
Once the FlexBodyPrep dialog is displayed, enter the following information in the FlexBodyPrep dialog to
generate the flexbody for building the door closure model.
228
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
See the image above where the entries and options on the FlexBodyPrep dialog are labeled with numbers.
4.
For #2, Select Bulk Data file (fem/nas/bdf/dat):, specify the input file metro_door_flex.fem generated in
Step 1.
5.
For #3, Save the h3d file as:, specify the output H3D file as metro_door_flex.h3d.
6.
For #4, Specify Interface Node List, specify the interface node numbers as: 9751+9750+10090.
7.
For #5, Cutoff type and value: select Highest Mode # and enter 20.
8.
For #6, activate both Perform stress recovery and Perform strain recovery, and select No for Perform element
check in Radioss model.
9.
For Mass units, select Megagram.
10. Click OK to start the flexbody generation.
11. The flexbody H3D file is generated in the selected folder with the name metro_door_flex.h3d.
Step 3: Creating the MBD model of the car door.
In this step, you will create the MBD model of the car door, after which the door closure simulation can be performed.
For this model, use the following units for length, mass, force, and time, respectively: millimeter, megagram, Newton,
second.
Model Units
1.
From the Forms panel,
, change the Mass units from the default Kilogram to Megagram.
Points
For building this model, a total of six points need to be created.
1.
From the Project Browser right-click Model and select Add Reference Entity > Point (or right click on Points
icon,
, from the toolbar. Add the points as shown in the table below.
Table 1 – Points required for the model
Bodies
In this model, there are two bodies: one body to represent the car and another to represent the flexible door.
1.
From the Project Browser, right-click Model and select Add Reference Entity > Body (or right-click the Bodies
icon,
, from the toolbar. Add a body and label it Car Body .
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
229
2.
Specify the center of mass of the body as the point Car Body CG from the CM Coordinates tab.
3.
Click the Properties tab of the Car Body and enter the mass and inertia properties values as shown in Table 2
below.
Table 2 – Mass and inertia properties of the car body
4.
Add another body and label it Car Door.
5.
From the Properties tab, click the Deformable check box.
6.
Browse and specify the metro_door_flex.h3d file as the Graphic file: and H3D file: of the Door Body. Use
the flexbody file generated in Step 2 above.
Graphics
After Point 6 above, we see that the Door Body has a graphical representation, but Car Body is still not graphically
represented. Let’s add a File Graphic to the Car Body so that visualization of the model becomes more meaningful.
1.
From the Tools menu, select Import CAD or FE.
2.
From the Input File drop-down menu, select HyperMesh. Use the file browser to select the HyperMesh file
car_body_graphics.hm.
230
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
From the Output File drop-down menu, select H3D. Specify the name of the H3D file as
car_body_graphics.h3d.
4.
Click OK. The HyperMesh file is converted to H3D and imported into the MotionView window.
5.
From the Graphics panel,
6.
From the Connectivity tab, double-click the Body button and pick Car Body as the body. This will associate the
selected graphic with the Car Body.
, click the graphic just now added.
Joints
For this body, we will need to add a total of four constraints/joints. One of these joints will need to be added using the
XML Template.
1.
From the Project Browser, right-click Model and select Add Constraint > Joint.(or right-click the Joints icon,
, from the toolbar). Add joints as specified in the table below.
Table 3 – List of the joints to be created and their topology
Once the joints are specified and since there is a flexible body in the model, the interface nodes of the flexible
body have to be associated with corresponding joint markers.
2.
From the Bodies panel, select Car Door.
3.
From the Properties tab, click the Nodes… button.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
231
4.
From the Nodes dialogue, click Find All to find the interface node numbers and to resolve them with the
respective connection markers.
Initial Conditions
In this simulation, we will have body initial velocity as the primary motion input to the model.
1.
From the Project Browser, select the Door Body from the filter on the left.
2.
Click the Initial Conditions tab.
3.
Activate WZ and specify a value of 5.0 for the same. This will be the magnitude of the initial angular velocity
about the global Z axis that will be applied to the Door Body.
4.
Do a test simulation to check how the model behaves with just the initial velocity and the constraints.
Markers
To represent the locking mechanism of the car door, we will use a sensor activated fixed joint between the Car Body
and the Door Body that initially is deactivated. The fixed joint will need to be created using XML templates since the
MotionView interface allows joints to be created using bodies and points. In this case, we need to create the joint
between two initially non-coincident markers.
1.
From the Project Browser, right-click Model and select Add Reference Entity > Marker (or right-click the
Marker icon,
, from the toolbar. Add two markers as specified in the table below.
Table 4 – List of markers to be created and their topology
2.
Once the markers are created, repeat steps 2-4 under Joints above to resolve the node connections of Car Door
Body with the maker Door Lock Mark.
Sensor
In this model, we will use an Event Sensor to detect the closing of the door. At the instance of the event detection,
the fixed joint between the door and the car body is activated to simulate the actual locking mechanism.
1.
From the Project Browser, right-click Model and select Add General MDL Entity > Sensor (or right-click the
Sensor icon,
, from the toolbar. Add a sensor and label it Lock Recognize.
2.
Click the Signal tab and change the signal type from Linear to Expression.
3.
Use the following expression as the signal: DY({MODEL.m_door.idstring},{MODEL.m_car.idstring},
{MODEL.m_car.idstring}).
The DY function accepts three markers as arguments. It returns the Y distance of the first marker from the
second marker in the third marker’s reference frame. In this case, the first marker is the maker labeled Door
Lock Mark, which belongs to the Car Door Body. The second and the third marker is Car Body Lock Mark,
which belongs to the Car Body.
232
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
4.
From the Compare To tab, specify 0.0010 for Value: and 0.0001 for Error: Under Respond if:, select Signal
is less than VALUE + ERROR.
5.
From the Response tab, activate the Return to command file check box.
Templates
To simulate the door lock, we need a fixed joint between the door and the car body. The fixed joint needs to be
activated with the sensor. The activation of the joint and the deactivation of the sensor can be done using a sequential
simulation operation.
1.
From the Project Browser, right-click Model and select Add General MDL Entity > Template (or right-click
the Template icon,
, from the toolbar). Add a template to the model and label it Lock Fix Joint.
2.
From the Properties tab of the template, under Type:, select Write text to solver input deck.
3.
Type in the following definition of the fixed joint in XML format in the template are of the panel:
<Constraint_Joint
id
type
i_marker_id
j_marker_id
/>
=
=
=
=
"1001"
"FIXED"
"{the_model.m_door.idstring}"
"{the_model.m_car.idstring}"
This defines the fixed joint between the two markers Door Lock Mark and Car Body Lock Mark.
4.
From the Project Browser, right-click Model and select Add General MDL Entity > Template (or right-click
the Template icon,
, from the toolbar) to add another template.
5.
Specify the label as Seq Sim Commands.
6.
From the Properties tab of the template, under Type, select Write text to solver command file.
7.
Below are XML Commands for the sequential simulation. Enter the following blocks of XML commands in the
template area of the panel:
<Deactivate
element_type =
element_id
=
/>
<Simulate
analysis_type
end_time
print_interval
/>
<Activate
element_type =
element_id
=
/>
<Deactivate
element_type =
element_id
=
/>
Altair Engineering
"JOINT"
"1001"
= "Transient"
= "1.0"
= "0.001"
"JOINT"
"1001"
"SENSOR"
"{the_model.sen_0.idstring}"
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
233
<Param_Transient
integrator_type
= "VSTIFF"
/>
<Simulate
analysis_type = "Transient"
end_time
= "2.5"
print_interval = "0.001"
/>
<Stop/>
These set of XML blocks define a sequential simulation operation as specified in the steps below:
A. Deactivate Fixed Joint (initially).
B. Simulate for 1 second.
C. Activate Fixed Joint.
D. Deactivate Sensor.
E. Change the Integrator Type to VSTIFF.
F. Simulate for 1.5 seconds.
G. Stop simulation.
Continuing from step 7:
8.
Save the model once by selecting Export > Solver Deck from File menu.
9.
From the Run panel, click the file browser,
, next to Save as: and specify a name for the solver XML file.
10. Click Run to run the model in MotionSolve.
11. Once the run is complete, click Animate to animate the simulation results.
234
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-2035: Solving Flexbody ADM/ACF in MotionSolve
In this tutorial, you will learn how to:
solve an ADM/ACF model that has flexbodies using MotionSolve.
use the Add Object panel in Hyperview and view the transient analysis results from MotionSolve.
Theory
You can submit Adams dataset language files (ADM and ACF) directly to MotionSolve, thus avoiding manual
translation. The Adams model is first automatically translated into the MotionSolve XML format and then it is solved. If
the Adams model has a flexible body represented by the MNF and MTX files, the MotionView Flexprep utility will be
used to generate an H3D flexible body file (using the MNF file). This H3D flexbody file is the MotionSolve equivalent of
the Adams MNF and MTX files. It holds the mass and inertia properties, as well as the flexibility properties which allow
the body to deform under the application of loads. The deformation is defined using a set of spatial modes and time
dependent modal coordinates.
Process
In this tutorial, an Adams single cylinder engine model (ADM and ACF) is provided. To improve the accuracy of the
model responses, the connecting rod is modeled as a flexbody
(MNF and MTX). This chapter deals with transient analysis of this single cylinder engine model using MotionSolve.
We will modify the ACF file to include an argument that would generate a flexbody H3D file. MotionSolve internally
calls OptiStruct, which generates the H3D flexbody file. The ADM and ACF is translated into MotionSolve XML format
and solved. MotionSolve outputs the results H3D file, which can be loaded in HyperView for animation. In HyperView,
external graphics (for piston and crank) can be added for visualization.
MotionSolve supports most of the Adams statements, commands, functions, and user subroutines. Refer to the
MotionSolve User’s Guide help for additional details.
Tools
Copy the following files from <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\motionsolve to your <working directory>:
single_cylinder_engine.adm
single_cylinder_engine.acf
connecting_rod_flex_body.h3d
Flexible_body.mnf
Flexible_body.mtx
piston.h3d
crank.h3d
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
235
Note
Below is a table listing the flexbody files in Adams and the equivalent files for MotionSolve:
Adams
MotionSolve
Flexbody file
mnf and mtx
h3d flexbody
Post processing animation
Gra and res
h3d-animation
Plot
Req
plt/abf
Step 1: Modifying the ACF file.
1.
Start a new MotionView session.
2.
Click the Select Application icon,
3.
From the toolbar, click the arrow next to the Open Session icon,
, and select Open document ,
single_cylinder_engine.acf, located in your <working directory>.
4.
Add the following text in line 3 :
,and choose Text View,
.
. Select
FLEX_BODY/1, H3D_FILE=connecting_rod_flex_body.h3d
The ACF file should look like this:
5.
From the toolbar, click the Save Document icon,
your <working directory>.
, and save the file as single_cylinder_engine.acf to
Note
The connecting_rod_flex_body.h3d file that has been used in this tutorial is generated using
the FlexPrep utility in MotionView. Refer to the MotionView online
help for more information on
converting an Adams MNF file into a MotionView H3D flexbody.
236
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 2: Running the ACF file in MotionSolve.
1.
Go to Start > All Programs > Altair HyperWorks > MotionSolve.
2.
For Input file, click Browse and select All files (*.*) from the file type menu. Select the input file
single_cylinder_engine.acf from your <Working directory>.
3.
Click Run.
MotionSolve translates the Adams model (ADM, ACF) to the MotionSolve XML format and solves it. MotionSolve
internally invokes OptiStruct, which converts the connecting rod flexbody MNF and MTX files to a flexbody H3D
file.
MotionSolve outputs the following files:
Results H3D file - single_cylinder_engine.h3d
Plot files - single_cylinder_engine.abf and single_cylinder_engine.plt
Log file - single_cylinder_engine.log
Note
MotionSolve is completely integrated into MotionView. You can also use the Run icon,
toolbar in MotionView to perform this action.
, from the
MotionSolve can also be run from the command prompt. Open a DOS command window, and
at the command prompt type:
[install-path]\optistruct\bin\WIN32\motionsolve.bat input_filename.
[fem,acf,xml].
Step 3: View transient analysis results in HyperView by adding external graphics.
Since the ADM file does not carry the external graphic information, the results from MotionSolve will not contain this
information either. From Adams, you can export a Parasolid file which can be used for visualizing results in
HyperView. In this step, we will attach the piston and crank external graphic for better result visualization.
1.
Start a new HyperView session.
2.
Using the Load model file browser,
<working directory>.
, select: single_cylinder_engine.h3d, located in your
The Load results file field will be automatically be updated with the single_cylinder_engine.h3d file.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
237
3.
Click Apply.
The model is displayed in the window.
4.
From the Add Object panel,
, using the Add object from: browser, select the piston.h3d file. If the Add
Object icon is not visible on the toolbar, select the View menu > Toolbars > HyperView > Tools.
5.
For Select object, select All to add all objects to the list.
6.
Using the expansion button,
move.
7.
For Reference system, select the Global coordinate system.
8.
Click Add.
, select Piston as the component with which you want the selected object to
Notice that the piston graphic is added to the model.
9.
Repeat steps 5 through 8 to add the crank object to the model.
Note
Remember to select the crank.h3d file in the Add Object from: browser and attach it to Crank
using the expansion button.
10. Click the Contour icon,
, on the toolbar. From the Result type drop-down menu, select the data type that
should be used to calculate the contours.
11. Select a data component from the second drop-down menu located below Result type.
Note
If you select Mag (Magnitude), the results system is disabled (since magnitude is the same for any
coordinate system).
12. Click Apply.
The contour is displayed.
13. Click the Start Animation icon,
238
, on the toolbar to animate the model.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
14. Click the Stop Animation icon,
, on the toolbar to stop the animation.
Note
In the Add Object from: browser, you can directly select a wavefront file (*.obj) from Adams to add
graphics. Whereas, if you have a Parasolid file (*.x_t) from
Adams, use the Tools menu >
Import CAD or FE utility in MotionView to generate an H3D file. You can then use this file to add the graphics.
Refer to the MotionView help for additional details.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
239
Optimization-DOE-Stochastics
MV-3000: DOE using MotionView - HyperStudy
MV-3010: Optimization using MotionView - HyperStudy
240
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-3000: DOE using MotionView - HyperStudy
In this tutorial, you will:
Use Hyperstudy to set-up a DOE study of a MotionView model
Perform DOE study in the MotionView – HyperStudy environment
Create approximation (using the DOE results) which can be subsequently used to perform optimization of the
MotionView model
Theory
HyperStudy allows you to perform Design of Experiments (DOE), optimization, and stochastic studies in a CAE
environment. The objective of a DOE, or Design of Experiments, study is to understand how changes to the
parameters (design variables) of a model influence its performance (response).
After a DOE study is complete, approximation can be created from the results of the DOE study. The
approximation is in the form of a polynomial equation of an output as a function of all input variables. This is called as
the regression equation.
The regression equation can then be used to perform Optimization.
Note
The goal of DOE is to develop an understanding of the behavior of the system, not to find an optimal, single
solution.
HyperStudy can be used to study different aspects of a design under various conditions, including non-linear behavior.
HyperStudy also does the following:
Provides a variety of DOE study types, including user-defined
Facilitates multi-disciplinary DOE, optimization, and stochastic studies
Provides a variety of sampling techniques and distributions for stochastic studies
Parameterizes any solver input model via a user-friendly interface
Uses an extensive expression builder to perform mathematical operations
Uses a robust optimization engine
Includes built-in support for post-processing study results
Includes multiple results formats such as MVW, TXT for study results
Tools
In MotionView, HyperStudy can be accessed from
The Main-Menu under ‘Applications ->HyperStudy’
You can then select MDL property data as design variables in a DOE or an optimization exercise. Solver scripts
registered in the MotionView Preferences file are available through the HyperStudy interface to conduct sequential
solver runs for DOE or optimization.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
241
For any study, the HyperStudy process is shown below:
The HyperStudy process
MotionView MDL files can be directly loaded into HyperStudy. Any solver input file, such as ADAMS, MotionSolve,
OptiStruct, Nastran, or Abaqus, can be parameterized and the template file submitted as input for HyperStudy. The
parameterized file identifies the design variables to be changed during DOE, optimization, or stochastic studies. The
solver runs are carried out accordingly and the results are then post-processed within HyperStudy.
Copy the files hs.mdl and target_toe.csv from <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\doe to your <working directory>.
In the following steps, you will create a study to carry out subsequent DOE study on a front SLA suspension model.
While performing a Static Ride Analysis, you will determine the effects of varying the coordinate positions of the origin
points of the inner and outer tie-rod joints on the toe-curve.
Step 1: Study Set-up.
1.
Start a new MotionView session.
2.
Click the Open Model icon,
3.
Select the file model hs.mdl, located in your <working directory>, and click Open.
4.
Review the model and the toe-curve output request.
5.
From the Applications menu, select HyperStudy.
, on the Model-Main toolbar.
HyperStudy is launched.
6.
From the Create studies dialog box, click Add Study and select New.
7.
Accept the default label and variable names and click OK.
8.
Under Study directory, click the file browser and select <working directory>\.
9.
Click Next to go to Create models.
242
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
10. From the Create models dialog, click Add Model.
11. For Model type, select MotionView.
12. Accept the default variable name.
13. Click OK.
Create models dialog
Your model and analysis task are displayed in HyperStudy.
14. Click Next to go to Create Design Variables….
15. From the Create Design Variables dialog box, click Add Model Parameter….
Note: This option might be hidden if the HyperStudy window is smaller. Maximizing the window should make this
option visible.
The Model Parameter Tree dialog is displayed.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
243
16. Select the following from the browser in the Model Parameter Tree dialog:
System
Point
Coordinate
Function
Front SLA susp.
Otr tierod ball jt-left-y
Y
Click Add
Front SLA susp.
Otr tierod ball jt-left-z
Z
Click Add
Parallel Steering
Inr tierod ball-left-y
Y
Click Add
Parallel Steering
Inr tierod ball-left-z
Z
Click Add
The M odel Parameter Tree dialog
17. Click Done.
244
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
18. In the Design variable properties box, edit the upper and lower bounds of the design variables according to the
following table. The first DV is already selected. Click in the first column in the Design Variables table to move
from one variable to another.
Label
Varname
Lower
Upper
Otr tierod ball jt-left-y
dv_1
-571.15
-559.15
Otr tierod ball jt-left-z
dv_2
246.92
250.92
Inr tierod ball-left-y
dv_3
-221.9
-209.9
Inr tierod ball-left-z
dv_4
274.86
278.86
19. Click Next to go to Do nominal run.
20. Enter m_1 as the Solver input file.
21. Select the Solver Execution Script as MotionSolve_HSt.
22. Click Write/Execute.
MotionSolve runs in the background and the analysis is carried out for the base configuration. Please note the
messages along the bottom edge of the HyperStudy interface and the MotionView interface.
23. Once the nominal run is complete, click Next.
The Create responses dialog is displayed.
24. Click Add Response to add a new response.
25. Label the response Sum of Squared Error.
26. Accept the variable name and click OK.
The Expr Builder.. button becomes enabled.
27. Click Expr Builder.. button to launch the HyperStudy-Response Expression Builder which can be used to
create response function.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
245
Response Expression Builder
For this exercise, the response function requires two vectors:
The elements of Vector 1 contain actual data points of the toe curve from the solver run for the nominal
configuration.
The elements of Vector 2 contain data points from the target curve.
28. Click the Add button on the Vectors tab to create Vector 1.
This enables the Vector resource file box.
29. Click the file browser button under Vector resource file and select file m_1.abf from <working
directory>\nom_run\m_1\.
This enables the Type, Request and Component fields.
30. From the Type combo box, select Expressions.
246
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
31. From the Request combo box, select REQ/70000033 toe-curve.
32. Select Component F2.
33. Click Apply.
You have now selected the toe curve data from the solver run as the data elements for vector 1.
Now create a vector to hold the data elements from the target toe curve.
34. Click Add on the Vectors tab.
35. Click the file browser button under Vector resource file and select file target_toe.csv, located in <working
directory>\.
The Load Data Vectors dialog is displayed.
36. On the Load Data Vectors dialog, under Vector file type, select Reference file.
37. Click Open.
38. Keep the Type as Unknown and Request as Block 1.
39. From the Component combo box, select Column 1.
40. Click Apply.
41. In the Response expression field, create the following expression:
sum((v_1-v_2)^2).
42. Check the Evaluate response expression box to verify the expression is evaluated correctly. You should get a
value of 16.2864.
43. If you do not encounter any error messages, and were able to successfully extract the response for the nominal
run, uncheck the Evaluate response expression check box.
44. Click OK to return to the Create responses dialog.
45. Click Next.
The Link design variables dialog is displayed.
Note
In this branch, you can link design variables to be used for the current study in DOE, Optimization, or
Stochastic studies. The linking is defined as the result of some mathematical operation on a number of
design variables.
In this example you will not be linking design variables.
46. From the File menu, select Save Current Study As….
47. Save this study set-up as Setup.xml to the directory <working directory>\.
Step 2: DOE Study.
1.
Click the Continue To... button in the Sensitivity dialog and select DOE Study.
2.
Click Add DOE Study.
3.
Accept the default labels and click OK.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
247
4.
Select the DOE class for Controlled factors, as Fractional Factorial.
5.
All the Design Variables in this study are controlled. Therefore leave the DOE class for Uncontrolled factors as
None.
6.
Click Next.
7.
In the Controlled variables dialog, verify that all the four design variables have the On flag checked.
8.
Click the Next button to move to the Controlled interactions dialog.
This dialog allows you specify the interactions between design variables.
Create controlled interactions
9.
Check all the check boxes to request results of all the interactions. You can also use the All button to check all
interactions.
10. Click Next to display the Controlled allocations dialog.
11. From the Design combo box, select an L16 Design Matrix.
The Allocations sub-panel displays the design variables associated with the columns in the Design Matrix.
The Design Matrix displays the index of the parameter values being used in each solver run.
248
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
12. Click Next.
Since there are no uncontrolled variables in the study, the Uncontrolled variables, Uncontrolled interactions and
Uncontrolled allocations dialogs are grayed out and you will move to the Select responses dialog.
13. Verify that the response you created in the study setup is checked.
14. Click Next.
15. In the Write/Execute runs dialog box, you will see the runs table updated with the actual values of the design
variables.
Clicking the Write button creates the solver-input file for the base run in the study directory.
Clicking the Execute button executes the solver run-script with the solver-input file as the command line
argument.
16. Click the Write/Execute button to start the runs. Click Yes when a pop-up asks if you want to perform the Input
Deck Creation and Analysis Solver Execution in interactive mode.
MotionSolve is launched for the number of runs specified in the study.
17. Once the study is complete click Next.
18. In the Extract Responses dialog, verify that the check boxes for all the runs are checked.
19. Click Extract.
The results from the runs are extracted and the response values are populated.
20. Click Next to display the Post processing panel.
The Main Effects tab shows the main effect of each controlled parameter on the response.
DOE – Main effects plot
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
249
21. Click the Controlled Design Variable Interaction tab and select the response that you added.
22. Click on the DV’s tab and select an interaction to observe the plot.
The Controlled Design Variable Interactions plot shows the effects of combining various design variables on the
response. If the interaction plot showed parallel lines, it would indicate that the two displayed parameters have no
interaction.
23. Observe the plot for interaction between C1 and C3.
Controlled design variable plot for C1 & C3 interaction
Step 3: Approximation.
1.
From the Sensitivity dialog, click on Continue to... Approximation.
2.
Click Add.. to create a new approximation.
3.
Select the Approximation Type as Moving Least Squares from the HyperStudy – Add Approximation
window.
4.
Click OK.
5.
Click Next to go to the Input Matrix dialog.
250
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
Click Import Matrix... and click OK in the Import DOE window to import the DOE matrix.
7.
Click Next to go to the Validation Matrix dialog.
A Validation matrix can be imported using the Import Matrix… button. In this example, validation matrix is not
used.
8.
Click Next.
9.
In the Build Approximation dialog, specify Order: as 1.
To build the approximation, the order needs to be 1 because the number of levels for the design variable is 2.
Using additional levels for the design variables will allow higher order approximation.
10. Click the Build button to build the approximation.
11. Check the Diagnostics for the Run Matrix to assess the quality of the approximation.
Build Approximation
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
251
12. Click Next to go to the Residual dialog.
The Residual tab shows the difference between the response value from the solver and the response value from
the regression equation.
The residual values can be used to determine which runs are generating more errors in the regression model.
13. Click Next. The Trade-off dialog shows the plots of the main effects vs. response from the approximation.
14. Click the 3-D plots tab to visualize the main effects and response.
Trade-off: 3-D plots
15. From the File menu, click Save Output Files….
252
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
16. From the File Save Options window select the DOE Files and Approximations Files to be saved and click Save
.
The files are saved under the corresponding folders in the study directory.
17. From the File menu, select Save Current Study.
18. Save this study as Study_1.xml to the directory <working directory>\.
19. From the File menu, click Exit to end this study session.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
253
MV-3010: Optimization using MotionView - HyperStudy
In this tutorial you will,
Perform an optimization study in the MotionView-HyperStudy environment
Compare the baseline and optimized models
Theory
In general, an optimization problem consists of:
The objective function
The design constraints
The design variables that change during optimization
Design variables change during optimization. The design variables always have a certain range within which they can
be modified. Typical examples of design variables are thickness of shell elements, shape vectors, and masses.
The changes in the design variables cause some change in model responses. Such responses can become either
objective function or design constraints. Examples of such responses include displacements and forces.
The response to be minimized or maximized becomes the objective function, while the rest of the responses that need
to be within a certain tolerance range become constraints. Only one response can be defined as objective function.
HyperStudy can be used to set-up and perform an optimization study on a MotionView model. You can use
HyperStudy to perform optimization studies involving both linear and non-linear CAE analysis as well as perform
optimization of mathematical equations using Templex.
HyperStudy creates the input parameter files using Templex and provides iterative changes to them during the
optimization process. HyperStudy uses HyperOpt (a general purpose, wrap around software) as the optimization
engine to perform optimization, in conjunction with both linear and non-linear CAE analysis software. HyperOpt uses a
robust sequential response surface methodology for optimization.
Tools
In MotionView, HyperStudy can be accessed from:
The Main-Menu under ‘Applications ->HyperStudy
You can then select MDL property data as design variables in the optimization exercise. Solver scripts registered in
the MotionView Preferences file are available through the HyperStudy interface to conduct sequential solver runs for
the optimization study.
254
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
For any study, the HyperStudy process is shown below:
The HyperStudy process
MotionView MDL files can be directly loaded into HyperStudy. Any solver input file, such as ADAMS, MotionSolve,
OptiStruct, Nastran, or Abaqus, can be parameterized and the template file submitted as input for HyperStudy. The
parameterized file identifies the design variables to be changed during DOE, optimization, or stochastic studies. The
solver runs are carried out accordingly and the results are then post-processed within HyperStudy.
The files needed for this tutorial are hs.mdl, target_toe.csv (used in tutorial MV-3000); Setup.xml saved in
tutorial MV-3000 and the nom_run folder created in tutorial MV-3000.
These files should be in the <working-directory> that was used in tutorial MV-3000.
Note:
You can also copy the files hs.mdl, target_toe.csv and Setup.xml and the folder nom_run from
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\doe\.
If you copy the Setup.xml file from the above location, the path in the <Folder> tag in the file needs to be
edited to point to your <Working directory>.
In the following steps you will perform an optimization study on a front SLA suspension model and determine the
optimum coordinate positions of the inner and outer tie-rod points while trying to achieve a target toe curve. The
baseline model will then be compared with the optimized model.
Step 1 Optimization Study.
1.
Start a new MotionView session.
2.
Load the model hs.mdl, located in <working directory>.
3.
Review the model and the toe-curve output request.
4.
From the SolverMode menu make sure that MotionSolve is selected.
5.
From the Applications menu, launch HyperStudy.
6.
In the Create studies dialog box, click Add Study and select From File.
7.
Select the Study_1.xml file saved in tutorial MV-3000.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
255
8.
From the Sensitivity panel, click Continue To... and select Optimization Study.
9.
In the Create optimization study dialog, click Add Optimization.
10. Accept the default label and variable names and click OK.
11. Accept the default Optimization Engine: Adaptive Response Surface Method and click Next.
12. In the Define design variables panel, verify that all the design variables are checked.
This panel displays all the variables and their upper and lower bounds.
13. Click Next.
14. We will not have any constraints in our design, so click Next in the Constraints dialog.
15. In the Objectives dialog, click Add Objective.
16. Accept the default label and variable names and click OK.
Your defined responses populate the panel.
17. In this exercise, minimize the Sum of Squared Error response function to obtain optimum values for the design
parameters: the Y and Z coordinate positions of the inner and outer tie-rod points.
Check to make sure that the Evaluate From option is set to Solver.
Optimization objective
The Maximum iterations and Convergence criteria are specified in the same dialog.
256
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
18. Click the Launch Optimization button.
MotionSolve launches and the HyperOpt engine attempts to find a solution to the problem.
19. Once the optimization is complete, click Next to display the Post processing dialog.
20. Click the Optimization Iteration History Plot.
In this panel you can see the plots of variation in values of the objectives, constraints, design variables, and
responses during different design iterations. The Optimization Iteration History Table displays the same data in
a tabular format.
Optimization history plot
Note that in this study, iteration 9 is the optimal configuration.
21. Save your study to <working directory> as Study_2.xml.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
257
Step 2: Comparing the Baseline and Optimized Models.
1.
Add a Page to your MotionView session.
2.
Select HyperView from the Select application drop down option.
3.
Load the animation file <working directory>\nom_run\m_1\m_1.h3d using the Load Model panel.
4.
Click the Page Layout icon on the toolbar and select the two-window layout.
5.
In the second window, switch to HyperGraph.
6.
Click the Build Plots icon on the toolbar.
7.
Use the Build Plots file browser and select the file target_toe.csv, located in <working
directory>\basicd2\chapter3.
8.
For X-axis data, select:
Type = Unknown
Request = Block 1
Component = Column 1
9.
For Y-axis data, select:
Type = Unknown
Request = Block 1
Component = Column 2
10. Click Apply.
11. Using the file browser on the Build Plots panel, select the file
<working directory>\nom_run\m_1\m_1.abf.
12. For X-axis data, select:
Type = Expressions
Request = REQ/70000033 toe-curve
Component = F2
13. For Y-axis data, select:
Type = Expressions
Request = REQ/70000033 toe-curve
Component = F3
14. Click Apply.
258
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
15. Plot another curve from the file
<working directory>\optimization\opt_1\run9\m_1.abf using steps 10-12.
You should end up with a session looking like the one shown below. Notice the optimized toe-curve.
Optimization results
You may also overlay the animation of the optimal configuration (run 6) over the nominal run. Notice the toe angle
differences.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
259
Durability - Fatigue
MV-3030: Load Export
MV-3040: Durability and Fatigue Tools
260
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-3030: Load Export
The Load Export utility allows you to bridge the gap between Multi-Body Dynamics (MBD) analysis and Finite
Element (FE) analysis using MotionView by:
Identifying and summarizing all loads acting on one/multiple body(ies) for any given time step(s) in a tabular
format.
Identifying and transferring all the forces and moments for one component at any given time step(s) to a
NASTRAN input deck that contains GRID, CORD, FORCE, and MOMENT cards.
Using Load Export
To use this utility, specify the components in the MotionView model for which loads are to be processed. You can do
this by:
Using the MotionView Interface.
OR
Editing the MDL model file to add force output requests on body(ies).
When performing the MS/ADAMS solver run on the MotionView model, you will get a metadata file (an ASCII file
written out from MotionView that contains information about force output on a body).
This file along with the solver output files viz. MS (*.plt) or ADAMS (*.req) become the input files for this utility. The
application scope of this utility is shown in the figure below:
Application Scope of the Load Export Utility
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
261
Step 1: Creating a Metadata File and Launching Load Export.
1.
Copy the file load_export.mdl from
<installation_directory>\tutorials\mv_hv_hg\mbd_modeling\externalcodes to
<working_directory>.
2.
Start a new MotionView session.
3.
Load the front vehicle model file load_export.mdl, located in <working directory>.
4.
Right-click on The Model in the Project Browser and select Add General MDL Entity > Output, or right-click
the Outputs icon,
, on the Model-General toolbar.
The Add Output dialog is displayed.
5.
Accept the default selections and click OK.
6.
Use the drop-down menu to change the Output type from the default Displacement to Force.
7.
Double-click the Body collector.
The Select a Body dialog is displayed.
8.
Expand the model-tree.
9.
In the Frnt macpherson susp system folder, expand the Bodies folder and select the body Lwr control arm –
left. (or you can pick the Lwr Control arm - left directly from the model in the graphics area by clicking the Body
collector once).
10. Repeat steps 4 through 9 to create an output force request on Lwr control arm – right.
11. Click the Run Solver icon
.
12. From the Simulation Parameters tab, change Simulation End Time to 2 seconds.
13. Click on the Main tab.
14. Save the solver input file as load_export.xml, to the <working directory>.
15. Click on the Run button, to solve the model in MotionSolve.
MotionView creates a metadata file named load_export.meta in the <working directory>.
262
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 2: Using the Load Export Utility and Generating a NASTRAN Input Deck.
1. From the Flex Tools menu, select the Load Export utility.
Launching the Load Export utility
The Load Export utility
2.
From the Load Export panel, open the file load_export.meta, located in <working directory>.
All bodies for which force outputs are requested are displayed in a tree structure in the Body Selection panel.
You can select one or multiple bodies from the tree. In this step select the body Lwr control arm-left.
Body Selection panel
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
263
3.
Expand the sys_frnt_susp folder and select the body Lwr control arm – left.
All the forces acting on the lwr control arm – left are displayed in the Force Selection panel. You can choose
any number of loads acting on the body. Only the loads selected by you are exported by the utility.
4.
Select all three forces acting on Lwr control arm – left.
Force Selection panel
5.
The Time Selection panel allows you to enter/select the time steps for which the loads are to be exported.
6.
Click the Range button.
7.
The current simulation runs from 0 to 2 seconds. Specify a Minimum Time Step Value of 1 and a Maximum
Time Step Value of 2.
Activating the Export panel
8.
Click Apply.
9.
Enter Min/Max Time Step Values.
10. Click Apply on the Time Selection panel.
This activates the Export panel.
Note
264
After time step input, you must click the Apply button to verify the validity of the time steps. If a time step
entered is not present in the ADAMS request file, an error message is generated and you must make
appropriate corrections.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
11. Select RADIOSS/NASTRAN [1] by using the radio button under the Export panel.
Nastran options
12. Click Nastran Options [2] to launch the Nastran Export Panel.
This dialog allows you to enter the Nastran node ID numbers in the second column of the table.
You can specify three additional options:
the Nastran deck format (Large/Small)
the reference frame (LPRF/Global) in which the GRID cards are written
whether or not to explicitly output the CORD1R card in the Nastran input deck (Yes/No)
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
265
13. Accept the default selections in the Nastran Export dialog.
14. Specify the Node ID’s as follows:
o
Lwr ball joint – 1
o
LCA rear bush – 2
o
LCA frnt bush – 3
15. Click Apply.
16. Click Export on the Load Export panel.
17. Specify a filename.
18. Click Save.
This creates a subcase file, in addition to the Nastran input deck, in the same directory as the .dat file.
19. Repeat steps 3 through 18 to export the loads on the Lwr control arm – right.
Note
In point 2 above, if you select multiple bodies, the Nastran Export panel will look as shown below:
The Nastran Export Panel for multiple body selection
266
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-3040: Durability and Fatigue Tools
In this tutorial, you will learn how to:
Convert results from a multi-body simulation run into file formats which can be used for fatigue analysis using
a tool like NCode
Write a fatigue analysis file from the MotionView animation window (HyperView)
Tools
The following functionalities are used in this tutorial: Fatigue Prep, Flex File Gen, and build plots.
The Fatigue Prep feature can be accessed by:
On the Flex Tools menu, click Fatigue Prep.
This panel translates the following files:
Original Format
Translated Format
Altair .H3D flexbody (modal content)
Ncode .FES/.ASC
Ncode .DAC
Altair .ABF
ADAMS .RES (modal participation factors)
Ncode .DAC
ADAMS .REQ files (loads information)
Ncode .DAC
Altair .PLT
Ncode .DAC
ADAMS .REQ files (loads information)
MTS .RPC
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
267
The Flex File Gen feature can be accessed by:
On the Flex Tools menu, click Flex File Gen.
The Flex File Gen feature allows you to create an .flx file using the Flex File Gen tool. This file references
a .gra file (rigid body graphics), a .res file (flex and rigid body results), and N .H3D files (flexbody graphics).
These files are required to animate ADAMS results that contain flexbodies. The .flx file can be loaded directly
into the animation window.
The build plots feature can be accessed by:
Go to the HyperGraph client, and click the build plot icon,
.
The Build Plots panel constructs multiple curves and plots from a single data file. Curves can be overlaid in a
single window or each curve can be assigned to a new window. Individual curves are edited using the Define
Curves panel.
Step 1: Using the Fatigue Prep Wizard.
1.
Start a new MotionView session.
2.
Select the MBD Model window.
268
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
From the FlexTools menu, select Fatigue Prep.
Fatigue Prep Wizard
The form shown above, describes the set of file translations possible using the Fatigue Prep wizard.
4.
Use the drop-down menu to select the H3D to FES option.
5.
Click Next.
6.
Specify the H3D file as <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\durability-fatigue\sla_flex.h3d.
7.
Specify the FES file as <working dir>\sla_flex_left.fes.
Fatigue Prep Wizard
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
269
8.
Click Finish.
The Altair flexible body pre-processor is launched and the FES file is created in your working directory.
Using the Fatigue Prep wizard, you can convert your results files to .fes, .asc or .dac files. You can use
these files for fatigue and durability analysis in Ncode’s FE-Fatigue software.
Step 2: Converting ADAMS results from a REQ file to a DAC file.
The Fatigue Prep translator can be used to convert the request files created from an ADAMS run to DAC files. These
DAC files can be further used for fatigue or durability analysis.
1.
Start a new MotionView session.
2.
Select the MBD Model window.
3.
From the FlexTools menu, select Fatigue Prep.
4.
Select the REQ to DAC option.
5.
Click Next.
6.
Click the file browser button attached to Select req file and select indy.req from <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\durability-fatigue.
Note
DAC file format does not support unequal time steps since only frequency is specified, not each time
step. Therefore your REQ file needs to have equal output time steps.
7.
Click on the file browser attached to Select DAC file and specify indy.dac as an output filename in <working
directory>\.
8.
Under Y type, select Displacement.
Once you select Displacement, Y requests and Y components will populate the text boxes.
270
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
9.
Select first five Y requests and the first three Y components.
REQ to DAC translation
Note
You can select any number of Y requests and Y components for REQ2DAC conversion.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
271
10. Click the Finish button.
The message Translation complete is displayed on the screen.
MotionView generates 15 DAC files for each combination selected.
11. Click Cancel and close the window.
12. Change the application to HyperGraph.
13. From the Build Plots panel, load the file indy_D_997000_X.dac from <working directory>\.
Note
In this filename, D represents Displacement, 9970000 represents the request number, and X represents
the component. This is how you get the information about the DAC file you are plotting.
14. Click Apply to see the plot.
You may plot the corresponding request from the original REQ file for comparison.
Step 3: Using the Flex File Tool.
1.
Start a new MotionView session.
2.
From the Flex Tools menu, select Flex File Gen.
3.
The Flex File Generator dialog is displayed.
This dialog lists the files you will need for this conversion.
4.
Using the Save the *flx file as file browser, select your destination file to be <working-dir>\sla_flex.
5.
In the Number of FlexBodies field, enter 2 since this model includes two lower control arms as flexible bodies.
6.
From the Select model source (*.gra) file browser, select the file <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\durability-fatigue\sla_flex.gra.
7.
From the Select result source (ASCII *.res) file browser, select the file <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\durability-fatigue \sla_flex.res.
8.
Using the first file browser under Select flexible body source (*.h3d), select <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\durability-fatigue\sla_flex.h3d.
9.
Using the second file browser under Select Flexible Body Source (*.h3d), select <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\durability-fatigue\sla_flex_m.h3d.
272
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
10. Under ID: field, enter 10404 and 20404 for the two h3ds, respectively.
These values should correspond to the actual IDs of the flexible bodies in the ADM input deck of the ADAMS
solver.
The deformation of these flexible bodies during animation can be scaled using the Def. Scale field. In this case,
accept the default value of 1.000.
11. Click OK.
The translator is launched and the resulting FLX file is created in the destination directory.
12. Select the TextView window from the Select application list.
13. Click the arrow next to the Open Session icon,
.
Altair Engineering
, on the Standard toolbar and select Open Document
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
273
14. Open the sla_flex.flx file.
You should see the following contents of the FLX file:
Note
To load transients results for selected time intervals check the Optional flx statements check-box to
enter the Start Time, End Time and Increment.
To load selected mode shapes from modal animation files for models with one or more flexible bodies,
check the Optional flx statements for linear analysis check-box to enter the Start Mode and End
Mode.
Additional statements are inserted in the FLX file reflecting the above mentioned parameters.
Step 4: Viewing Fatigue Results in the Animation Window.
1.
Select HyperView
2.
Use the Open drop-down menu on the Standard toolbar (click the arrow next to the Open Session icon
select Open Model
using the Select application option on the toolbar.
) to
.
3.
Use the Load model file browser to select the file, sla_flex.flx that you just created. The Load result field
automatically populates with the same file name.
4.
Click Apply.
5.
Click the Start/Pause Animation icon,
to animate the model.
Observe the animating model, which is a combination of rigid multi-bodies and two flexible lower control arms.
6.
Click the Contour icon,
on the Results toolbar.
7.
Choose different options from the Result Type drop down menu, to view the various results available in the
analysis result files.
For a detailed description of writing a fatigue analysis file from here, refer to Write Fatigue Analysis File in the How
Do I… section of Fatigue Manager in the HyperView User’s Guide.
274
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Working with External Codes
MV-4000: Eigen Analysis using ADAMS/Linear
MV-4010: Working with ADAMS
MV-4020: Solver Neutral Modeling
MV-4030: Flexible Bodies for MotionView with Abaqus
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
275
MV-4000: Eigen Analysis using ADAMS/Linear
In this tutorial, you will learn how to:
Perform Static+Linear analysis on a MotionView model using ADAMS/Linear
View the Static+Linear analysis results from ADAMS/Linear analysis using MotionView
Theory
This chapter deals with modal analysis of Multi-Body Dynamic (MBD) systems. This kind of analysis gives insight
about system stability. Vehicle dynamics engineers often use the planar half-car model to analyze the ride quality of
vehicles. You will use the ADAMS/Linear simulation to do a modal analysis of this type of model.
Process
Using the MotionView interface, you can obtain modal results in two ways: using MotionSolve and ADAMS/Linear.
These two ways are illustrated in the flowcharts below:
Obtaining modal results w ith MotionSolve or ADAMS/Linear
276
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 1: Obtaining Modal Results with ADAMS/Linear.
1.
Start a new MotionView session.
2.
Click the Open Model icon,
, on the Standard toolbar.
Or
From the File menu select Open > Model.
3.
From the Open Model dialog, locate and select halfcar_lin.mdl located in
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\ExternalCodes.
4.
Click the Open button to load the model.
5.
From the SolverMode menu, select ADAMS.
6.
Click the Forms icon,
7.
Verify that the Solution type is set to Linear/Eig.
, on the Model-General toolbar and select the Solution Options form.
This ensures the ADAMS solver will first do a static analysis and then a linear modal analysis on your model.
8.
Click the Run icon on the Model-Main toolbar.
!
9.
Complete the following steps only if you have connected the ADAMS solver to the Run
button in the MotionView interface through the preferences file. If ADAMS solver is not
linked to MotionView, for the purpose of this tutorial, go to Step 2: Viewing ADAMS/
Linear Modal Results.
From the Script combo box, change the script to Altair Executable.
10. Click Run to start the simulation.
Step 2: Viewing ADAMS/Linear Modal Results.
1.
Copy the files halfcar_lin_adams.gra and halfcar_lin_adams.res located in
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\ExternalCodes to <Working
directory>.
2.
Start a new MotionView session.
3.
Select HyperView from the Select Application list.
4.
Click the Load Results icon,
, from the Standard toolbar.
The Load model and results panel is displayed.
5.
Click the Load model file browser and select the file halfcar_lin_adams.gra, located in <Working
directory>.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
277
6.
Click the Load results file browser and select the file halfcar_lin_adams.res, located in <Working
directory>.
7.
Click Apply.
8.
From the Results Browser, click on the arrow next to Time History Animation and use the Change load case
drop-down menu to set the load case to Mode Animation @ Time = 0.000000.
9.
The modes will automatically load and be displayed in the Simulation drop-down menu (located directly under
the Change load case drop-down menu).
While an ADAMS Linear analysis may be performed multiple times through a transient simulation, in this
example, the linear analysis was performed only at time step = 0.0.
10. Use the Simulation drop-down menu to select Mode 3.
11. Switch the view to Top
.
12. Click the Start/Pause Animation icon,
, to start transient animation.
The model cycles through its mode shapes/frequencies.
13. Click the Start/Pause Animation icon again,
278
, to stop transient animation.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
14. Switch to Modal animation,
Note
.
To visualize a single mode while using the ADAMS/Solver, the modal icon is used,
MotionSolve the Start/Stop Animation icon is used,
15. Click the Page Layout icon
. For
.
on the Page Controls toolbar and select a four-window layout
.
Note that the current window becomes one of the four windows.
16. Click one of the remaining windows to make it active.
17. From the Load model panel, click Apply.
18. Repeat steps 16 and 17 for the remaining windows (note - the Edit menu can also be used to copy and paste
windows into the four-window layout), and then load Simulation Modes 4, 5, and 6.
!
Notice that the animations signify the pitch and bounce modes of car vibrations. The
"wheel hop" resonance can also be seen in this example. Analyzing the above
occurrences can help isolate vibrations by appropriately designing car suspensions.
Linear modal animation – ADAMS/Linear results
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
279
Step 3: Plotting ADAMS/Linear Results for Eigenvalues in the Complex Plane.
A file named halfcar_lin_adams.eig_inf is generated in the directory <working directory> where the gra
and res files are located following an ADAMS/Linear run. The extension eig_inf denotes eigenvalue information.
In this exercise, you will use this file to plot the model eigenvalues in the complex plane.
Eigenvalues in the complex plane
280
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-4010: Working with ADAMS
MotionView -MotionSolve-ADAMS process flow
MotionView-MotionSolve can work very closely with ADAMS.
Existing ADAMS users can switch to MotionView or MotionSolve in their workflow keeping the rest of the flow
as it is.
Following are the different ways one can use MotionView or MotionSolve with ADAMS.
Import a model built in ADAMS preprocessor into MotionView preprocessor; solve it with MotionSolve and
post process the results using MotionView.
Submit a model built in ADAMS directly to MotionSolve and post process the results in MotionView.
Build a model in MotionView, submit it to ADAMS solver and post process the results using MotionView.
Post process the ADAMS solver results in MotionView.
Exercise
Step1: Loading an .adm File into MotionView’s MBD Model Window.
1.
Copy the file quick_return.adm file from
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\externalcodes to your current
working directory.
2.
Start a new MotionView session by selecting New > Session from the File menu.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
281
3.
Make sure the application is MBD model.
4.
From the File menu, select Import > Solver Deck.
Or
Click the Import Solver Deck button
Note
on the Standard toolbar.
If the Import Solver Deck button is not visible, click on the Import drop-down menu (the down arrow
next to the icon) and select the Import Solver Deck option.
5.
From the Import Solver Deck dialog, use the Select file browser to locate and select the adm file.
6.
Click Import.
The MotionView message log generates warning messages for all unsupported ADAMS statements in your model.
Unsupported ADAMS statements are stored in the Unsupported Statements template. This template and its
contents can be viewed from the Templates panel on the MotionView toolbar.
Unsupported ADAMS statements template
7.
Use the Project Browser to examine the model tree.
Note
adm is an input file for the solver. Due to this the model comes out flat and there is no hierarchy. In
addition, you would see many markers involved.
Now the model is in the MotionView domain. You can modify the model the way you want and then run
MotionSolve from the MotionView interface.
282
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step2: Running an ADAMS File with MotionSolve.
In step 1, we learned how to import an ADAMS (.adm) file into MotionView. This allows the user to modify the model
once it is in the MotionView environment. Step 2, shows how a user can run an ADAMS model directly in
MotionSolve.
Copy the ADAMS input files quick_return.adm and quick_return.acf from the <installation
directory>\tutorials\mv_hv_hg\externalcodes to your current working directory.
1.
Invoke MotionSolve.
2.
Browse for the quick_return.acf file in your working directory.
3.
Click on Run.
This would start a MotionSolve run in a command prompt. MotionSolve would run in a batch mode. MotionSolve
would read the information from the ADAMS command file (*.acf ) and ADAMS model data file (*.adm) , generate
the solver input file (*.xml) then run it.
4.
You may view the results in HyperView/HyperGraph.
Note
MotionSolve generates *.log file which holds information for the solver run. It is always a good idea to go
through the log file for detailed information.
Step 3: Running an MotionView MBD model with ADAMS solver.
In Step 1 and Step 2 we learned how to run an ADAMS model with MotionSolve. Step 3 focuses on running a model
built in MotionView with the ADAMS solver. If you want to run the ADAMS solver from the MotionView interface,
please refer to Tip Trick #213 available on Altair’s website.
1.
Copy the file V_Engine.mdl from
<installation directory>\tutorials\mv_hv_hg\externalcodes to your current working directory.
2.
Invoke MotionView.
3.
Load the model in MotionView.
4.
From the menu bar select SolverMode as ADAMS.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
283
5.
From the Project Browser, locate the Datasets folder and select Solution Options as the dataset.
These datasets are used to control the solver run.
6.
Change the end time to 3 seconds.
7.
Right-click on ADAMS Model in the Project Browser and select Model > Add General MDL Entity >
Template, or click on Templates icon
Note
8.
on the Model-General toolbar, to add a template.
This is a very important feature when it comes to solver neutral modeling. The statements written in this
section are directly written to the solver input deck. The user can pass modeling entities to these
templates. Please refer to the template "Solution Option-ACF file" to understand how values from datasets
are passed to an acf file.
Add the following statement in the template: !The idstring for center of mass maker for body 0
is {Model.b_0.cm.idstring}.
Note
This is a comment and will not change the model. One needs to be familiar with solver input file
formats to use this feature.
9.
From the File menu, select Export > Solver Deck. This saves the ADAMS input files (*.adm/*.acf). You can
then run the ADAMS solver using these files.
10. If the ADAMS solver is hooked to MotionView, click on the Run icon
.
11. Check the model.
12. If there are no errors, run the model directly.
284
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-4020: Solver Neutral Modeling
MotionView provides a solver-neutral pre- and post- processing environment to facilitate working with other MBD
solvers.
MotionView has the following solver interfaces:
MotionSolve
ADAMS
ABAQUS
DADS
NASTRAN
MDL models can be exported to any of these solvers for analysis:
User can change the solver mode and then export the model to the particular solver.
User can register a script to run a solver from within MotionView. Refer to the Tip and Trick, "Start an ADAMS
run from within MotionView" available on Altair’s website.
If the user needs to add any statement specific to the solver, Templex template can be used in the model.
Refer to tutorial MV-4010 for some more details about the Templex template.
The results from these solvers can be post processed in MotionView.
Copy the folder named solver_neutral from
<installation directory>\tutorials\mv_hv_hg\mbd_modeling\externalcodes to <workingdirectory>.
Exercise
Step 1: Loading a Solver-Neutral Model and Running Different Solvers.
1.
Start a new MotionView session.
2.
Copy the folder named solver_neutral from <installation
directory>\tutorials\mv_hv_hg\mbd_modeling\externalcodes to <working-directory>.
3.
Load the file model.mdl.
4.
From the SolverMode menu, confirm that MotionSolve is selected.
5.
Click the RUN icon,
6.
Review the simulation parameters by clicking on Simulation Parameters tab, however do not edit them.
7.
Return to the Main tab.
Altair Engineering
, on the Model-Main toolbar.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
285
8.
Click the file browser icon next to Save as: and specify your output filename as <working directory>\ms.
xml.
9.
Select the Sim Type: Transient.
10. Click Run.
MotionSolve is launched and completes the run.
11. From the SolverMode menu, select ADAMS.
12. From the Project Browser, under the Data Sets folder select Solution Options.
13. Review the Solution Options dataset.
14. You can enter the simulation parameters for the ADAMS solver into this table.
15. Click the RUN icon,
, on the toolbar.
16. Click the Save as file browser and specify the output filename as <working directory>\adams.adm.
!
Do not complete the following steps without connecting the ADAMS solver to the RUN
button.
For this tutorial, you can assume the ADAMS run is complete and go to Step 2:
Comparing Solver Animations.
17. From the Script combo box, select the script ADAMS Executable.
18. Click the RUN button to start the simulation.
The ADAMS solver is launched and completes the run.
19. From the SolverMode menu, select ABAQUS.
286
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
20. From the Project Browser, under the Data Sets folder select ABAQUS Solution Options.
Review the ABAQUS Solution Options table. Notice that it has been updated and displays the ABAQUS
simulation options.
You can enter the simulation parameters for the ABAQUS solver in the Solution Options table.
21. Click the RUN icon,
, on the toolbar.
22. Click the Save as file browser and specify the output filename as <working directory>/abaqus.inp.
!
Do not complete the following steps without connecting the ABAQUS solver to the RUN
button.
For this tutorial, you can assume the ABAQUS run is complete and go to Step 2:
Comparing Solver Animations.
23. In the Script combo box, select the script ABAQUS Executable.
24. Click Run to start the simulation.
The ABAQUS solver is launched and completes the run.
Note
The animation results file from the ABAQUS run has the extension .FIL.
To translate an ABAQUS .FIL file to a .MRF file:
From the Tools menu, select Custom Wizards.
From the Custom Wizards menu, select the ABAQUS Fil -> Altair Formats custom wizard.
Specify the source and destination files to translate the .FIL file to a .MRF file.
Step 2: Comparing Solver Animations.
1.
Click the Add Page icon,
2.
Select HyperView
3.
Click the Page Layout,
Altair Engineering
, on the Page Controls toolbar to add a new page to your session.
from the Select Application drop-down menu.
, icon on the toolbar and select the three horizontal windows layout,
.
MotionView 11.0 Tutorials
287
Proprietary Inform ation of Altair Engineering
4.
5.
Load the following model and results files into the three windows:
Window 1
Window 2
Window 3
Model
ms.h3d
adams.gra
abaqus.fil
Results
ms.h3d
adams.gra
abaqus.mrf
Click the Start/Pause Animation icon,
, on the Animation toolbar to animate the model.
Notice that if the same solver parameters are chosen, the results from different solvers are in-sync.
6.
Click the Start/Pause Animation icon again,
288
, to stop/pause the animation.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-4030: Flexible Bodies for MotionView with Abaqus
MotionView can write input decks for the Abaqus solver. Users can:
Export Abaqus solver input deck (*.inp) for the rigid body model
Replace a rigid body in the model with a ABAQUS substructure (flexible body) and export ABAQUS solver
input deck (*.inp)
Replace a rigid body with ABAQUS inp (nodal FE component) file and export ABAQUS solver input deck (*.
inp)
The results of the Abaqus solver can be post processed in HyperView.
Here is the flow of flexible body creation and integration:
Integrating Abaqus substructure or FE model in MotionView
Exercise
In the first step of the exercise, you will be creating an Abaqus substructure. The second step involves the
replacement of the rigid lower control arm with the Abaqus substructure. In the third step you will run the solver, and in
last step you will post process the results.
Copy the folder "abaqus" from
<Install>/tutorials/mv_hv_hg/mbd_modeling/externalcodes to your <working directory>.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
289
Step 1: Creating the Flexible Body Substructure.
First, you will need to create the flexible body. This stage must be completed in Abaqus, independent of MotionView.
It is assumed that you are familiar with flexible multi-body dynamics in Abaqus. Here is a brief overview of the steps
you would need to do in Abaqus to generate a substructure:
Use standard elements to define the structure
Assign material and geometric properties to the elements
Define the retained degrees of freedom. The retained nodes will connect the substructure to the rest of the
model
Substructures must be created in one analysis and used in a subsequent analysis
The Abaqus *.inp deck of a substructure generation analysis should look something like this:
*NODE...
*ELEMENT...
*MATERIAL...
*STEP
*FREQUENCY, EIGENSOL=LANCZOS
20
*BOUNDARY
RETAINED_NODES, 1, 6
*END STEP
*STEP
*SUBSTRUCTURE GENERATE
TYPE=z2, LIBRAYR=carm_right, MASS MATRIX=YES, OVERWRITE, RECOVERY MATRIX=YES
*RETAINED NODAL DOFS, SORTED=NO
RETAINED_NODESET,1,6
*RETAINED EIGENMODES, GENERATE
1,20,1
*END STEP
This is just a sample deck. For detailed syntax you may have to look up Abaqus documentation.
Note
You have been provided with two inp files: carm_left.inp and carm_right.inp. Use these files to
generate the two substructure files (*.sup) for the left and right lower control arms using Abaqus. These
substructure files should be named as carm_left.sup and carm_right.sup respectively.
The intermediate files (*.stt, *.mdl, *.prt) created by Abaqus during the substructure generation
analysis are required for reference during the MBD system analysis. You will need to generate these files in
Abaqus. The result files (*.mrf, *.odb) which are needed for the post-processing step of this tutorial are
provided.
290
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Once the substructure is generated you should be ready to integrate it in your MBD model.
Step 2: Integrating a Flexible Body into the MBD System.
Once you complete the substructure generation step in Abaqus, you should have the <substructure-name>.sup
file. This .sup along with the original <substructure-name>.inp file will be used to integrate your flexible body
into MotionView.
1.
Start a new MotionView session and load the file sla_abaqus.mdl, located in <working directory>.
2.
Make sure that the SolverMode is ABAQUS.
3.
From the Project Browser, under the Bodies folder select the Lwr control arm.
4.
On the Properties tab for the LCA-Left, activate the Deformable check-box.
5.
Click Yes in the question dialog.
Notice that the graphics of the rigid body lower control arm vanishes.
Now you would need to specify a particular INP file that was used to create the flexible body.
6.
For Functional source, select the Use nodal FEA body option from the drop-down menu.
7.
Using the Graphic file browser, select carm_left.h3d from your working directory.
Properties tab
Notice that the Inp file field is automatically populated by MotionView.
Note
The file carm_left.h3d is the graphic file for the ‘lower control arm-left’ body. This file is for display
and assists in allowing faster pre-processing. The flexbody (or the INP file in this case) is used to provide
data to the solver. The graphic H3D file can be generate from the input (INP) file (or CAD file) using the
Import CAD or FE option located in the Tools menu in MotionView. In this exercise the graphic H3D files
are provided.
If the INP file is located in the same directory as the H3D graphic file, the Inp file field would be populated
automatically. Otherwise, one also has the option of selecting the INP file from its respective location.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
291
8.
Click Nodes….
The Nodes dialog is displayed.
9.
Click the Find ALL button on the Nodes dialog to find nodes on the flexible body that are located closest to the
interface points on the vehicle model. The vehicle model is attached to the flexible body at these interface nodes.
Nodes dialog
Note
In this case there is no offset between the flexible-body interface nodes and their corresponding interface
points on the vehicle model. But if there is an offset you can use the Align button. When you click the
Align button, MotionView moves the connection point in the model to the node location on the flexible
body. If the offset is more than the tolerance value, MotionView inserts a dummy body between the
flexible body and the nearest connection point. This affects any other entities that reference this point.
You can attach joints to the flexible body only at the interface nodes. These attachment nodes are
created during your substructure generation analysis in Abaqus. Creating more attachment points
increases the actual number of modes calculated, and may increase the CPU time.
10. Close the Nodes dialog.
292
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
11. Repeat steps 6 through 9 to integrate the right side flexible body carm_right.inp in your model.
Your model should look like the image below:
13. From the Tools menu, select Check Model to check your complete MBD model for errors.
Step 3: Running MBD Systems in ABAQUS.
The flexible bodies are now fully integrated in your model. Now you will set up the ABAQUS solver run.
MotionView writes out the INP file for the whole MBD system. It is important that this INP deck should contain the
substructure path references for the model to run successfully in Abaqus. The way to include these is via Templates
in MotionView. Templex templates can be used to export syntax directly to the solver input deck, including parametric
substitution if required.
1.
From the Project Browser, under the Templates folder select the Abaqus output template.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
293
2.
Click the expansion button,
Note
, on the panel and read through the template.
For the ABAQUS solver, the location of statements within the solver input deck is important. The four
keywords used in this template allow you to position the extra text. These keywords must be the first line
of the Templex template. For additional assistance and information on these keywords you may look up
the topic "Exporting MDL models to ABAQUS" in the online help.
The remaining text of the template is written according to the position specified. In this case there are two
substructure paths included for the two flexible bodies. You will need to add or delete such paths
depending on the number of flexible bodies integrated in your model.
{MODEL.sys_frnt_susp.b_lca.l.idstring} is the parameterized path to grab the element ID
number assigned to the left arm substructure.
Now your model is complete and ready to run in ABAQUS solver.
3.
Close the Abaqus output template.
4.
From the Project Browser, under the Data Sets folder select ABAQUS Solution Options.
5.
From the File menu, select Export > Solver Deck.
6.
Save your model as an MDL file named sla_flex.mdl in the working directory.
7.
Save your model as sla_flex.inp file in your working directory.
Note
294
You can run your model in ABAQUS at this stage. Select ABAQUS from the SolverMode menu and
click on the Run icon on the toolbar to display the Run panel. Specify a file name for the inp file using
the Save as option and check the Write MDL animation file (.maf) checkbox. Click on the Run button.
MotionView will write the inp file and the maf file (which will be used for animation). If the ABAQUS
solver script is linked to MotionView, the job will be submitted to ABAQUS.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 4: Post-processing Abaqus Results.
You will now load the results of the Abaqus run in the Animation window.
Note
MotionView has FIL2MRF translator residing in Tool..Custom wizards. Using this will allow you to
translate an Abaqus fil file to an mrf file. In this exercise the mrf file is provided to you.
The carm_left.odb and carm_right.odb files needed in this step will be generated once the model
successfully runs in Abaqus.
1.
Click the Add Page icon,
, on the toolbar to add a new page to your session.
2.
Select HyperView
3.
Load the sla_flex.maf and sla_flex.mrf as model and results files, respectively.
4.
In the same window, again click the Load model file browser and select the carm_left.odb file from your
working directory.
5.
Activate the Overlay checkbox and click Apply.
6.
Repeat the steps 4 and 5 to also overlay carm_right.odb file on the same model.
from the Select window mode drop-down menu.
Notice that the substructures are overlayed on your model.
7.
Use the Entity Attributes panel,
, to turn off the graphics of the rigid control arm.
8.
Click the Start/Pause Animation icon,
9. Click the Start/Pause Animation icon again,
Altair Engineering
, on the Animation toolbar to animate the model.
, to stop/pause the animation.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
295
Animation
MV-5000: Rigid body Animation - Basic
MV-5010: Rigid body Animation - Advanced
296
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-5000: Rigid body Animation - Basic
Introduction
In this tutorial, you will learn how to:
Use some features available for post-processing animation results in HyperView
Control the display of the simulation results using Entity Attributes
HyperWorks animation functions allow you to view your model in motion. The three animation types include transient,
linear, and modal.
Transient
Transient animation displays the model in its time step positions as calculated by the
analysis code. Transient animation is used to animate the transient response of a
structure.
Linear
Linear animation creates and displays an animation sequence that starts with the
original position of the model and ends with the fully deformed position of the structure.
An appropriate number of frames are linearly interpolated between the first and last
positions. Linear animation is usually selected when results are from a static
analysis.
Modal
Modal animation creates and displays an animation sequence that starts and ends
with the original position of the structure. The deforming frames are calculated based
on a sinusoidal function. Modal animation is most useful for displaying mode shapes.
Animation Use-cases and File Types
The tables below show the animation use-cases and the model and results file types required to animate ADAMS and
MotionSolve results.
Use Case
Parts in Model
Model File
Results File
Transient
Purely rigid
H3D
H3D
Transient
One or more flexible bodies
H3D
H3D
Modal
Purely rigid
MAF
MRF
Modal
One or more flexible bodies
MAF
MRF
Animation use cases for MotionSolve Results
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
297
Use Case
Parts in Model
Model File
Results File
Transient
Purely rigid
GRA
GRA
Transient
One or more flexible bodies
FLX
FLX
Modal
Purely rigid
GRA
RES
Modal
One or more flexible bodies
FLX
FLX
Animation use cases for ADAMS Results
Step 1: Viewing and Controlling Animation Files.
In this exercise, you will view and control the pendulum animation based on the files output by MotionSolve.
Note
Copy all the h3d files from the location
<installation_directory>\tutorials\mv_hv_hg\mbd_modeling\animation\ to your <working
directory>.
1.
From the File menu, select New > Session to start a new session.
If a warning message is displayed, asking if you want to discard the current data, click Yes to continue.
2.
Click the Select application drop-down menu,
3.
Click the Load Results icon,
, from the toolbar, and select HyperView
.
, from the Standard toolbar.
The Load model and results panel is displayed.
Load model and results panel
4.
Click the file browser icon,
, next to Load model and select the model file as single_pendulum.h3d,
located in your working directory.
5.
The field for Load results will be automatically updated with the same path and name.
6.
Click Apply.
HyperView loads the animation file.
298
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
7.
Click the XZ Left Plane View icon
8.
Click the Start/Pause Animation icon,
9.
Right-click on the Fit Model/Fit All Frames icon
the window.
10. Click the Animation Controls icon,
on the Standard Views toolbar to change to the left view of the model.
, on the Animation toolbar to start the animation.
on the Standard Views toolbar to fit the entire animation in
, on the Animation toolbar.
From this panel, you can control the parameters like speed, start time, end time of the animation.
Animation Controls panel
Drag the vertical slider bar on the left to change the animation speed from fast to slow.
Current time: show all the time steps.
The Animate start and Animate end sliders can be set to restrict the animation to a certain window in time.
For example, moving the start slider to 0 and end slider to 3.5 to restrict the animation to these time limits
and covers only a partial cycle of motion.
11. Click the Start/Pause Animation icon,
, on the Animation toolbar to stop the animation.
Step 2: Tracing Entities.
HyperView allows you to trace the path of any moving part while animating.
1.
Retain the animation file single_pendulum.h3d that was loaded in Step 1 above.
2.
To trace the pendulum motion, click the Tracing button,
, on the toolbar.
Tracing panel
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
299
3.
Under Trace select Component from the radio buttons on the left.
4.
Pick the entity/component that needs to be traced by clicking on it from the graphics window.
5.
Change the view to the Iso
6.
Under Tracing mode: select Last and specify 10 as the steps.
7.
Animate the model. This displays the last 10 steps in the animation.
8.
To turn the tracing off, click the Delete button to remove the selected components from the tracing list.
9.
Try the From First Step and All Steps options.
view.
10. Use the Display Options to change the line color and thickness.
Step 3: Tracking Entities.
The Tracking option allows one of the parts of the animation to be fixed to the center of the animation window and the
rest of the parts move relative to the tracked part.
1.
Add a new page to the session by clicking on the Add page button,
2.
Load the animation file front_ride.h3d from your working directory.
3.
To Track or fix any part of your model in the center of the animation window and to see all the other parts moving
with respect to the fixed part, click on the Tracking,
, on the Page Controls toolbar.
, button on the Results toolbar.
Tracking panel
4.
Add a tracking system to the animation by clicking on the Add button under Tracking Systems.
5.
Under the Track pull down menu select Component and click on a part from the model currently loaded.
6.
Select the Displacements and/or Rotations to track the part.
7.
Click the Start/Pause Animation icon,
Start/Pause Animation icon again,
300
, on the Animation toolbar to start the animation, and click the the
,to stop the animation.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 4: Editing Entity Attributes.
In this exercise, you will edit the graphic entity attributes.
1.
Retain the model front_ride.h3d loaded in the previous exercise Step 3 above.
2.
Click the Entity Attributes icon,
, on the Visualization toolbar.
The Entity Attributes panel is displayed.
Entity Attributes panel
3.
Click the arrow to the right of the Entity option menu to expand it.
The list contains the following entity types: Components, Systems, Assembly Hierarchy, and Sets.
4.
Select Assembly Hierarchy from this list to show all the parts of the model in the entity list tree below.
5.
To change the color of the entire model:
Select Assembly Hierarchy from the Entity option menu.
Select All from the list of buttons next to the entity list tree (AlI, None, Flip, and Displayed).
Select a color from the color palette under the Color section.
6.
To change the entire model to wire frame:
Click All from the list of buttons next to the entity list tree.
Click the Wire Frame icon,
7.
, beside Shaded.
To make the entire model transparent and shaded:
Click All from the list of buttons next to the entity list tree.
Click the Shaded icon,
.
Click the Transparent icon,
.
8.
Use the On/Off buttons to turn the entities on or off.
9.
Use the On/Off buttons next to ID: to display and hide the entity IDs.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
301
MV-5010: Rigid body Animation - Advanced
Introduction
In this tutorial, you will learn how to:
View force and moment vectors from a MotionSolve results file.
Use the collision detection feature
Use the measure panel to extract information from the animation results
Step 1: Force and Moment Graphics.
HyperView allows you to view the change in force and moment in the form of dynamic vectors that represent the
magnitude and direction of the force and moment.
Copy all the h3d files from the location
<installation_directory>\tutorials\mv_hv_hg\mbd_modeling\animation\ to your <working
directory>.
1.
Start a new MotionView session or refresh your MotionView session by pressing SHIFT+F9.
2.
Change the application on the page to HyperView.
3.
Load the MotionSolve result file front_ride.h3d from your working directory.
4.
Click on Vector icon,
, on the toolbar.
Vector panel
5.
Under the Result type: select Force (v).
6.
Under Display options: select By Magnitude for Size scaling.
7.
Click on Apply.
8.
Now, animate the results by clicking on the Start/Pause Animation button,
302
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
.
Altair Engineering
9.
You will see an arrow whose size and direction change dynamically as the simulation is animated from start to
end. This arrow represents the magnitude and direction of force on a body or at a joint as it is specified for force
output in the model.
10. Click on the Clear Vector button to clear the force vector.
11. For the Result type: now select Moment (v).
12. Repeat the Steps 6 to 9 to view the Moment vectors of the simulation.
13. Under Display options: try changing the scale of the vectors by changing the Scale value:.
Collision Detection
HyperView allows you to view and detect collisions between bodies during simulations.
Step 2: Using the Collision Detection Option.
1.
Click the Add a page button,
, from the toolbar.
2.
Use the Select Application menu to select HyperView as the application.
3.
Click the Load Results icon,
on the toolbar.
The Load Model and Results panel is displayed.
4.
Click the Load model file browser
and select collision.h3d, from your working directory.
5.
Click the Load results file browser
above.
and select collision.h3d from the same location specified in Step 4
6.
Click Apply.
7.
Click the Start/Pause Animation icon,
8.
After the file is read, click the Start/Stop Animation icon,
Altair Engineering
, to animate the model.
, to stop the animation.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
303
9.
Click the Collision Detection button,
on the Tools toolbar (if this toolbar is not visible by default, go to the
View menu and select Toolbars > HyperView > Tools).
The Collision Detection panel is displayed.
Collision Detection panel
10. Click the Add button in the leftmost column under Collision Sets to add a new collision set.
11. Pick the Trunk body in the graphics area.
Note
Clicking on the Components input collector will display the Extended Entity Selection dialog. The
Extend Entity Selection dialog provides you with criteria based selection options available for entity
selection in HyperView. This method of selection is not used in this tutorial. See Selecting Entities
Using the Input Collector (in the HyperView User's Guide) to learn more about using this selection
method.
12. Click the Add to Group A button.
13. Next, pick the Car body in the graphics area.
14. Click the Add to Group B button.
15. Under the Proximity section, click Enable Proximity checking and specify the Minimum Distance for the
proximity check.
304
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
16. Under the Show result by: section select Elements by clicking on the radio button next to it.
17. Click Apply.
18. Click the Start/Pause Animation icon,
, to start the animation.
The animation begins.
Wherever areas of the trunklid collide with the trunk (car body), the colliding elements turn red.
The color yellow indicates proximity. When neither proximity nor collision is detected, the bodies retain their
natural colors.
19. Stop the animation.
20. Try these additional steps:
Try to view the Element and Component results alternately by clicking on the radio buttons in the Show
Results by: section.
Click on Summary below to get a text summary of the penetration.
Step 3: Using the Measure Panel.
HyperView allows you to measure certain parameters during post processing of the results.
Refresh your MotionView session by pressing SHIFT+F9.
Note
Please refer to HyperView tutorial Using Keyboard Shortcuts and Function Keys - HV-2050 for more
information regarding keyboard shortcuts.
1.
Change the Application to HyperView.
2.
Load the file front_ride.h3d as the model and result file from the your working directory.
3.
Click on the Measure button,
4.
Under Measure Groups click on Add to add a Measure Group.
5.
From the measure type pull-down menu select Position.
6.
Click on the Nodes button and from the graphic window pick on a point of your choice.
7.
Turn on the check boxes for X, Y and Z.
Altair Engineering
, on the Annotations toolbar to go to the Measure panel.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
305
8.
Click the Create Curves button (located on the right side of the panel).
The Create Curves dialog is displayed.
9.
From the Place on drop-down menu select New Plot.
10. For the Y Axis: select X and activate the Live link check box.
Note
The Live link helps you correlate the measured value with the animation. As you animate the current
animation model a small square marker moves on the measured curve to indicate the value of the curve at
the corresponding time step of the animation.
11. Click OK.
12. Repeat Point 10 and 11 twice more by selecting Y and Z respectively and clicking on OK each time.
13. Click the Start/Pause Animation icon,
, to start the animating the results.
14. You will see a marker on all the three plots which corresponding to the simulation time step in the HyperView
window.
For more advanced animation options, refer to the HyperView tutorials.
306
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Plotting
MV-6000: Plotting Basics
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
307
MV-6000: Plotting Basics
Introduction
In this tutorial you will learn to:
Import a MotionSolve result (plot) file for plotting curves
Plot multiple curves in a single window
Plot multiple curves in different windows on a single page
Save your work as a session (mvw) file
Theory
The Build Plots panel allows you to import plot files that can be plotted in a 2D layout. The panel allows you to
control what curves are to be plotted either in single or multiple windows.
Tools
The Build Plots panel can be accessed in any one of these three applications: MotionView, HyperView or
HyperGraph.
Copy the file
<install_directory>\tutorials\mv_hv_hg\mbd_modeling\plotting\Demo.plt to <working
directory>.
Step 1: Opening a plot file.
1.
Start a new MotionView session.
2.
Select HyperGraph from the Select application menu,
, on the toolbar.
The toolbar is located right below the plot window.
3.
Click the Build Plots icon,
, on the toolbar.
4.
Click the Open File icon,
5.
Select the file <working directory>\Demo.plt.
6.
Click Open.
, on the Build Plots panel.
This file contains several curves.
7.
Confirm that Time is selected under X Type:.
8.
For Y Type: click on Displacement to select it.
The Y Request text box displays the data available in the file.
308
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
9.
Click the Y Request expansion button
to view the Y Request list.
10. Press CTRL button on the keyboard and click on REQ/70000006 and REQ/70000007 (or left-click and drag the
mouse to select both REQ/70000006 and REQ/70000007). Click OK.
11. Select X under Y Component:.
12. Set Layout as one plot per Component.
13. Click Apply.
Two curves are plotted in the plot window, each with its own line type and color. The legend identifying the curves
is located in the upper right hand corner of the plot.
Single plot w indow w ith multiple curves created using Build Plots panel.
Step 2: To build multiple curves on multiple plots using the plot file.
In this step you will select multiple curves and plot them in multiple windows.
1.
Stay in Build Plots panel.
2.
Leave Time selected under X:.
3.
Leave Displacement selected under Y Type:.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
309
4.
Leave REQ/70000006, and REQ/70000007 selected under Y Request:.
5.
Press CTRL and under Y Component: select X, RX, MAG and RMAG.
6.
Select One plot per Component from the Layout pull down menu
panel.
, located in the lower left corner of the
This selection creates one plot for every request selected under Y component. There will be four plots created.
You could have one page for each plot. However, this tutorial wants all four plots on the same page.
7.
Click the Page Layout button
, located next to the Show Legends check box.
8.
Select the four window layout option
.
The Page Layout dialog automatically closes.
9.
Click Apply.
A second page is added to the page list with four windows and the plots you requested.
Multiple plots w ith multiple curves created using Build Plots panel.
Note
310
The procedure to plot and edit curves from other result/request files (for example, .req, .abf, etc.) remains
the same as described in this tutorial.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 3: To save this work session.
You can save your work with multiple curves in multiple windows on multiple pages as a session file. A session
allows later retrieval either for display, printing, or to continue adding more information. The session file is a script with
the extension .mvw. The contents of an .mvw file are all the information in the program that gets recorded in the
script file.
Note
To save a session as a script file with curve data: select the Options panel icon from the Annotations
toolbar, and activate the Save All Curve Data To Script File check box (located on the Session tab).
1.
From the File menu, select Save As > Session.
2.
Select a directory.
3.
In the File name text box type Demo1.mvw.
Save Session As dialog
4.
Confirm that Session (*.mvw) is selected from the Save as type drop-down menu.
5.
Click Save.
This saves your current work session as a session script file called Demo1.mvw.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
311
Step 4: To exit the program.
1.
From the File menu, select Exit.
A dialog displays prompting you to save the session.
2.
Click No, since you saved the session in the previous step.
For more advanced plotting options, refer to the HyperGraph tutorials.
312
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Advanced Simulation
MV-7000: Modeling Differential Equations Using MotionView and MotionSolve
MV-7001: Building User Subroutines in Altair MotionSolve
MV-7002: Co-simulation with Simulink
MV-7003: Simulating a Single Input Single Output (SISO) Control System Using MotionView and MotionSolve
MV-7004: Inverted Pendulum Control Using MotionSolve and MATLAB
MV-7005: Linking Matlab/Simulink Generated Code with MotionSolve
MV-7006: Python UserSub for MotionSolve
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
313
MV-7000: Modeling Differential Equations Using MotionView and
MotionSolve
Differential equations are very versatile and have many different applications in modeling multi-body systems. Userdefined dynamic states are commonly used to create low pass filters, apply time lags to signals, model simple
feedback loops, and integrate signals. The signal may be used to:
define forces.
used as independent variables for interpolating through splines or curves.
used as input signals for generic control modeling elements.
define program output signals.
The MotionSolve expressions and user-subroutines allow you to define fairly complex user-defined dynamic states.
The expression type is used when the algorithm defining the differential equation is simple enough to be expressed as
a simple formula. In many situations, the dynamic state is governed by substantial logic and data manipulation. In
such cases, it is preferable to use a programming language to define the value of a differential equation. The userdefined subroutine, DIFSUB, allows you to accomplish this.
Step 1: Build and analyze a simplified model.
In the following exercise, we will build and analyze a simplified model of a pressure vessel blown down using
MotionView and MotionSolve.
1.
We specify the following parameters (state variables) as solver variables:
2.
Model the following differential equations:
The three states of the system are PT ,TT and mT.
314
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
Specify the initial conditions for the system as:
4.
Run the model in MotionSolve and post-process the results in HyperGraph.
Creating Solver Variables
A solver variable defines an explicit, algebraic state in MotionSolve. The algebraic state may be a function of the
state of the system or any other solver variables that are defined. Recursive or implicit definitions are not allowed at
this time.
Two types of solver variables are available. The first, and probably the most convenient, is the expression valued
variable. The second is the user-subroutine valued variable.
The expression method is used when the algorithm defining the algebraic state is simple. In many situations, the
algebraic state is governed by substantial logic and data manipulation. In those cases, it is preferable to use a
programming language to define the value of a solver variable. The user-defined subroutine, VARSUB, enables you to
do this.
Solver Variables are quite versatile and have many different applications in modeling multi-body systems. They are
commonly used to create signals of interest in the simulation. The signal may then be used to define forces,
independent variables for interpolation, inputs to generic control elements, and output signals.
MotionSolve expressions and user-subroutines allow for fairly complex algebraic states to be defined.
For more information, please refer to the MotionView and MotionSolve User's Guides in the on-line help.
Step 2: Add a solver variable.
1.
Launch a new session of MotionView.
2.
From the Project Browser, right-click on Model and select Add General MDL Entity > Solver Variable (or
right-click on the Solver Variables icon,
, from the toolbar).
3.
The Add Solver Variable dialog is displayed.
4.
In the Label field, assign the label K to the solver variable.
5.
In the Variable field, assign a variable name to the solver variable or leave the default name.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
315
6.
Click OK.
7.
From the Properties tab, under Type:, select Linear and enter a value of 1.4 in the field.
8.
Repeat steps 1 through 7 to create the three remaining solver variables:
316
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 3: Modeling differential equations.
1.
From the Project Browser, right-click on Model and select Add General MDL Entity > Solver Differential
Equation (or right-click on the Solver Differential Equation icon,
, from the toolbar.
2.
The Add SolverDiff dialog is displayed.
3.
In the Label field, assign a label to the solver diff or leave the default label.
4.
In the Variable field, assign a variable name to the solver diff or leave the default name.
5.
Click Apply twice.
6.
Click OK. Now, three solver differential equations will be created.
7.
Next, we'll model the first differential equation:
This is an implicit differential equation that has a constant (Cp/R). The initial condition of the differential equation
(IC) and its first derivative (IC dot) are known (given).
8.
Select SolverDiff 0. From the Properties tab, select Implicit and specify IC and IC dot as 2000 and -58875,
respectively.
9.
Select the type as Value Expression.
10. To access the expression builder, click in the text field and select the F(x) button,
, from the trio of buttons at
the top of the panel,
. This will display the Expression Builder. In this dialog, you can enter
expressions in text boxes without extensive typing and memorization. It can be used to construct mathematical
expressions.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
317
11. Populate the expression as shown in the image below:
`-DIF1 ({diff_0.id})/DIF({diff_0.id})+{sv_3.value.lin}*DIF1({diff_1.id})/DIF
({diff_1.id})`
You can use the model tree to access entity variables in your model. As you can see for the above expression, to
refer to the ID of the differential equation, browse for it from the list-tree on the Properties tab and select the ID.
Click Apply. The name of the selected entity or property is inserted into the expression.
318
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
12. Click OK. The new expression is displayed in the text box on the panel.
13. Repeat steps 8 through 13 to modify the remaining two differential equations:
Implicit: Yes.
IC: 560
IC_dot: -4710
Value Expression:
`DIF1({diff_0.id})/DIF({diff_0.id})-DIF1({diff_1.id})/DIF({diff_1.id})-DIF1
({diff_2.id})/DIF({diff_2.id})`
Implicit: No.
IC: 0.000256
Value Expression:
`-{sv_1.value.lin} *sqrt({sv_0.value.lin}*DIF({diff_2.id})*DIF({diff_0.id}) /
{sv_2.value.lin})*0.5787`
Step 4: Running the model in MotionSolve.
1.
Click the Run button,
2.
From the Simulation Parameters tab, specify the values as shown below:
Altair Engineering
, on the toolbar. The Run panel is displayed.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
319
3.
From the Main tab, select Save and run current model.
4.
Click the file browser button,
5.
Click Save.
6.
Click Check to check the model to see if there are any errors in the model.
7.
Click Run to run the model. The solver gets invoked here.
8.
Post-process the results using Altair HyperGraph.
320
, next to Save As and specify a filename.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-7001: Building User Subroutines in Altair MotionSolve
In this tutorial, you will learn how to:
Compile and build a MotionSolve C++ and FORTRAN user subroutine.
Use the Altair User Subroutine Build Tool to build the DLLs.
Use Visual Studio and Intel FORTRAN Compiler to build the DLLs.
Software Requirements to Compile and Build MotionSolve User-Subroutine DLLs
1.
Microsoft Visual Studio version 2005 (Visual C++ 8 or VC8) - both Express and Professional Versions.
2.
Intel Visual FORTRAN Compiler 9.1 and 10.0.026.
Installation Instructions for Microsoft Visual Studio 2005 and Intel FORTRAN Compiler 10.0.026
1.
Install Visual Studio first, then the FORTRAN Compiler (see figure 1).
2.
After installing the Intel FORTRAN Compiler, verify that the Visual Studio integration was successful.
3.
From the Start > All Programs menu, select the Intel(R) Software Development Tools and open the Build
Environment for FORTRAN IA-32 applications (see figure 2 below). If the Visual Studio integration was not
successful, the DOS prompt will return an error that an installation of Visual Studio cannot be located.
Figure 1
Figure 2
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
321
4.
After installing the FORTRAN Compiler, the FORTRAN Libraries need to be linked/associated with Visual Studio.
This can be done in Visual Studio using Tools > Options. Please see figure 3 below for the proper settings.
Figure 3 - FORTRAN Compiler Library Settings in Microsoft Visual Studio
5.
The Visual Studio and Intel FORTRAN Compiler are ready to build MotionSolve user subroutine DLLs.
Please copy the contents of the User Subroutine folder from the location <installation
directory>\hwsolvers\usersub\ to your working directory. By default, all files have read only attributes.
Change their attributes so that they are in Archive mode.
Exercise One - Using the Altair User Subroutine Build Tool to Create DLLs
for MotionSolve
Step 1: Building a C++/Fortran User Subroutine DLL Using the Build Tool GUI:
1.
Browse the folder <working_directory>\c_src\. The folder named C Source contains all C++ subroutine
codes.
2.
Open the required C++ file in a text editor and change the code as necessary. Save the C++ file with the same
name in the folder.
3.
Once the required changes are made, start the UserSubBuildToolGUI.exe by double-clicking it. The build
tool is located in
<installation directory>\hw\hwsolvers\usersub\usersub_buildtools\win32.
322
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
4.
The Altair User Subroutine Build Tool interface is show below:
Figure 4 - The User Subroutine Build Tool Interface
5.
The User Subroutine Build Tool features are labeled in figure 5 and are explained in the next few steps.
Figure 5 - The User Subroutine Build Tool GUI w ith labels
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
323
6.
Under Source, specify the source C++ subroutine files or the compiled object files. It is possible to build a DLL
containing a single subroutine sourced from a single C++ file or using a list of C++ source files. If you want to
specify a single file, select Input file and specify the C++ filename.
7.
If you want to specify a list of C++ subroutine source files to create a combined DLL, specify a text file with the
list of names. Select List file and specify the file cpp_source_files.txt.
8.
Under Binaries, specify the path to the C++ compiler and the FORTRAN compiler.
9.
Click the file browser button,
, for VC path and specify the path of the Visual C++ compiler, which is part of
the Visual Studio installation. For example, C:\Program Files\Microsoft Visual Studio 8\VC\bin.
10. Click the file browser button,
, for FORTRAN path and specify the path of the Intel FORTRAN compiler. For
example,
C:\Program Files\Intel\Compiler\Fortran\10.0\IA32\Bin.
11. Under Misc, specify the UserSubAPI Lib folder and the output DLL filename.
12. Once all fields/entries are specified, the tool should look similar to the figure below:
Figure 6
13. After completing the settings, click Build to generate the DLL.
324
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
14. If the settings are entered correctly, the build tool displays the following message:
Figure 7
15. The settings entered from steps 6 to 13 can be stored as a configuration file, using the button group identified as
in figure 5 above.
16. Click Save .cfg to save the path settings to a configuration file, which can be read back into the tool. This
facilitates quickly setting the paths and other settings.
17. To rebuild the DLL with the same name, click CleanUp, identified as
18. Once the cleanup is done, click Build, identified as
in figure 5 above.
in figure 5 above, to rebuild the DLL file.
19. To quit the tool and close the program, click Quit.
Appendix: Step 1: Using the Build Tool to Generate a DLL for a 64-bit Machine
To generate a DLL for a 64-bit machine to use with MotionSolve 64-bit, use the same Build Tool with some additional
steps.
1.
For the VC 64-bit Bin Path, select the path of the 64-bit installation of Visual Studio.
2.
Click Advanced and specify a DEF File containing the symbol names to be exported to the 64-bit DLL. See
Figure 7a for reference.
Figure 7a – Specification of the DEF file for a 64-bit DLL
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
325
3.
An example of the DEF file contents is shown below.
MOTSUB
CONSUB
DIFFSUB
Step 2: FORTRAN User Subroutine Using the Build Tool GUI
The same steps in Exercise 1, Step 1 can be repeated to build a FORTRAN user subroutine DLL for MotionSolve.
The only difference is that the text file containing the list of C++ source files needs to contain the names and paths of
the FORTRAN subroutine files.
Step 3: Building a FORTRAN User Subroutine DLL Using the User Subroutine Build Tool
Command Layer Interface
1.
Browse the folder <working_directory>\f_src\. Name this the F source directory. This folder contains all
FORTRAN subroutine code files.
2.
Open the required FORTRAN files in a text editor and make the necessary modifications to the default code.
3.
Run the program UserSubBuildToolCLI.exe, located in
<Altair>\hw10.0\hw\hwsolvers\usersub\usersub_buildtools\win32, by double-clicking it or
invoking it in a command prompt. .
4.
The command layer interface resembles the image shown below.
Figure 8
5.
Select the Interactive mode by entering i as the option.
326
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
6.
The Interactive mode selection displays additional menu options as shown in figure 9.
Figure 9
7.
In the Interactive mode of building the user subroutine, you need to specify the FORTRAN source files in .f
format.
8.
If you have a single file, you can enter the name of the file along with the path, or you can also specify a text file
containing the list of .f subroutine files. The text file should contain one filename per line.
9.
At the prompt, the following message is displayed: Enter your option of ‘h’ for help > enter l.
Use the file list methods to show how a list of .f files can be used to build a combined user subroutine DLL file.
10. The tool prompts you to enter the name of the list file, including the path, with this message: Enter the path
of the List file which contains collection of src files.
11. Specify the filename as <working_directory>\f_source_lis.txt.
12. Specify the path folder containing the Visual C++ compiler. For this, enter c at the prompt. Enter option ‘h’ for
help.
13. Enter the VC path. Specify the path of the folder containing the VC compiler, for example, C:\Program
Files\Microsoft Visual Studio 8\VC\bin.
14. Specify the FORTRAN compiler path. Enter f as the option at the prompt.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
327
15. The tool prompts you to enter the FORTRAN path. Specify the path of the folder containing the FORTRAN
compiler, for example, C:\Program Files\Intel\Compiler\Fortran\10.0\IA32\Bin.
16. Specify the path of the folder containing the MotionSolve API Library. At the prompt, enter a.
17. Specify the path to the API library. This is available in the installation at <Altair>\hw9.0
\hwsolvers\usersub\apilib\win32. This path can be entered at this message: Enter API LIB Path.
18. Specify the output DLL name, including the output path. Enter o at the prompt and specify the output DLL name
when the tool prompts Enter Output DLL Path. For example, E:\Temp\msoutput.dll. Please see
figure 10 for an illustration of the above steps.
Figure 10
20. Enter d at the prompt to display the settings you've entered so far. Please see figure 11 below for an illustration.
Figure 11
21. Save the settings as a configuration file, which can be reloaded at a later time to set these paths. This
configuration file can also be used when running the User Subroutine Build Tool in batch mode. Enter sc at the
prompt and press ENTER.
22. Specify the path and name of the configuration file to be saved when the following message is displayed: Please
Enter the path to save the Config file:.
328
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
23. Specify the path of the configuration file.
24. Enter bld at the prompt to build the DLL.
The User Subroutine Build Tool builds the DLL and displays a success message: DLL file generated and
stored as: E:/Temp/msoutput.dll.
25. You can now use the DLL file in your model.
26. Enter q at the prompt to exit the Interactive mode and enter q again to close the build tool.
27. To build a DLL in the 64-bit format, you need to specify the three additional options that are highlighted in the
image below.
Figure 11a – Additional Option Setting for 64-bit DLL Generation
Step 4: C++ User Subroutine Using the Build Tool Command Layer Interface
The same steps can be repeated to build a C++ user subroutine DLL for MotionSolve. The only difference is that the
text file containing the list of FORTRAN source files needs to have the names and paths of the C++ subroutine files.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
329
Exercise Two - Using the Microsoft Developer Studio to Build the DLLs
Step 1: Building a C++ User Subroutine DLL Using Microsoft Visual Studio 2005
1.
Open Microsoft Visual Studio 2005 (Express and Professional Editions will work).
2.
From the File menu, select Open > Project > Solution.
Figure 12
3.
Browse to your working directory, select the file ms_csubdll.sln and click Open.
The solution opens in Visual Studio.
4.
In the Solution Explorer, you will see a list of the CPP subroutines that are part of the solution.
5.
Double-click any of the CPP files that you want to modify/view and make the required changes.
6.
Click Save to save the changes made to the file.
7.
Go to Build > Build Solution to build the DLL.
330
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
8.
Upon successful completion of the build, Visual Studio displays a message as shown below:
Figure 13
9.
You will find the new DLL ms_csubdll.dll in <working_directory>\c_project\Win32\Debug\.
Step 2: FORTRAN UserSubroutine Using Microsoft Visual Studio 2005
The same steps can be repeated to build a FORTRAN user subroutine DLL for MotionSolve. The only difference is
that the solution file to be opened in Visual Studio is ms_fsubdll.sln. All other steps remain the same.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
331
MV-7002: Co-simulation with Simulink
What is co-simulation?
Consider a complex system that contains various sub-systems of different nature. Imagine that these sub-systems
are modeled in different environments. Now, imagine a simulation in which to simulate the behavior of the mother
system, different environments modeling the sub-systems constantly interact with each other by sharing and
exchanging system state data. Such a simulation is called co-simulation between the various modeling
environments.
Why is co-simulation needed?
Most systems consist of various sub-systems which are inherently disparate in the way they need to be modeled and
simulated. Quite a few commercial software products tend to be ‘specialists’ in modeling certain kinds of systems
instead of trying to be ‘jack of all trades’. In such situations, a symbiosis between two ‘specialists’ that can model a
complex combination of different kinds of systems turns out to be beneficial. This advocates using co-simulation.
Specific to the current context, consider a complex system which is made up of a multi-body sub-system (MBS) and
one or more control sub-systems. MotionSolve is a multi-body solver that has fundamental, but limited, coverage of
control system capabilities. On the other hand, Simulink is a ‘specialist’ control system simulation environment with
fundamental, but limited, multi-body solving modeling and solving capabilities. So, to effectively model the entire
system, the MBS can be simulated in MotionSolve and the control sub-system can be simulated in Simulink with the
help of an interface that enables constant data sharing and exchange between the two environments. This can be
referred to as MotionSolve-Simulink co-simulation. The following figure illustrates this concept.
MotionSolve®-Simulink® co-simulation concept
332
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MotionSolve-Simulink Co-simulation Design
There are various to set up a co-simulation environment. For HyperWorks 11.0, the MotionSolve-Simulink cosimulation setup is designed to have superior performance and accuracy and is quite different from the co-simulation
release in HyperWorks 10.0.
The following aspects of the new co-simulation environment are worth noting:
1.
MotionSolve and Simulink run in parallel, each on their own thread. Multi-threading gives superior performance to
a single thread setup.
2.
MotionSolve and Simulink communicate data via a shared memory setup.
3.
MotionSolve interpolates data in time as needed, thereby reducing wait time.
4.
Solvers are held within one integration time step of each other to maintain a higher accuracy.
5.
You may choose zero-order, first-order, or second-order hold for data interpolation.
6.
In contrast to the master-slave setup in 10.0, the current setup is reciprocal in nature. This increases the
performance and robustness of the simulation environment.
7.
The new co-simulation no longer requires the MATLAB-based GUI. This functionality is moved inside the modeling
elements in Simulink and MotionSolve. This makes the co-simulation process more stream-lined.
8.
By naming the S-function in the Simulink as ‘mscosim’ in advance, you no longer need to create a MEX DLL (as
in 10.0).
Tutorial Objectives
In this tutorial, you will learn how to:
1. Use the MotionSolve-Simulink co-simulation interface.
2. Perform the process flow-thru exercises.
Software and Hardware Requirements
Software requirements:
MotionSolve (version 9.0 with latest updates)
MATLAB/Simulink (MATLAB Version 7.6(R2008a), Simulink Version 7.1(R2008a))
Microsoft Visual C++ 2005 in Microsoft® Visual Studio 2005
Hardware requirements:
PC with 32/64bit CPU, running Windows XP Professional (win32 XP Professional or win64 XP professional)
Linux RHL5 32/64
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
333
Cosim Presettings
A few settings are needed for successfully running a co-simulation using MATLAB.
Step 1: Setting up environment variables to run MotionSolve from MATLAB Simulink.
1.
Environment variables point to the solver executables:
NUSOL_DLL_DIR
<Installation directory>\hw11.0\hwsolvers\bin\win32
NUSOL_EXEC_DIR <Installation directory>\hw11.0\hwsolvers\bin\win32
2.
The environment variable points to the license path.
RADFLEX_PATH
3.
<License path>
The environment variable points to the user DLL location, if any.
MS_USERDLL_DIR <Installation path>\win32\altairfsubdll.dll
Step 2: Setting the search path for MATLAB.
1.
mscosim (s-function) is a dynamic load library for MATLAB/Simulink and installed under hwsolvers/bin/
<platform>. The location of the MotionSolve binaries needs to be added to the search path of MATLAB in order
for Simulink to identify mscosim.
334
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Bus Suspension Model
Consider a bus suspension system that consists of a bus mass, suspension mass, and a road dummy. The bus
mass, suspension mass pair, the road dummy and the suspension mass pair are constrained with a translation joint.
The road dummy has a sinusoidal motion.
Bus suspension schematic
Along with the multi-body system, the model contains a pre-designed controller that maintains the reference signals of
the desired displacement and velocity. A block diagram of the control system is shown the figure below.
Block diagram of the control system
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
335
In the image above:
Gc(S) - MIMO controller
D(S) - Displacement of body mass from the bus suspension model
V(S) - Velocity of body mass from the bus suspension model
Rd(S) - Reference signal of the displacement
Rv(S) - Reference signal of the velocity
E1 (S) - Displacement tracking error of the body mass with ground
E2 (S) - Velocity tracking error of the body mass with ground
Y1(S) - Control Force 1 output from the controller
Y2(S) - Control Force 2 output from the controller
The transfer function for the controller is:
x’ = Ax + Bu
y = Cx + Du
where:
A - State matrix
B - Input matrix
C - Output matrix
D - Direct feed-through matrix
Below is the state-space representation of the controller:
A = [0 0;0 0]
B = [1 0;0 1]
C = [10 0;0 20]
D = [10000 0;0 20000]
u = [Displacement of the bus mass; velocity of the bus mass]
y = [Control force (stiffness); Control force (damping)]
These act between the bus mass and the suspension mass. Therefore, this is a MIMO controller that controls the
displacement and velocity profiles of the bus mass. In this model, a single MIMO controller is modeled in Simulink
and the co-simulation interface is used.
336
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
In this exercise:
Using the base bus suspension model with a MIMO continuous controller and the Control_StateEqn element,
solve the model in MotionSolve to obtain baseline results.
The plant model required for the control scheme is created by modifying the MotionSolve XML created in the
previous step by including the Control_PlantInput and Control_PlantOutput entities.
Review the controller in the state-space form modeled in Simulink.
Use the MATLAB interface and submit the controller, along with the plant model, to generate an S-function for
co-simulation.
Perform a co-simulation and compare the results for MotionSolve and co-simulation.
Copy all the files in the <Install>\tutorials\mv_hv_hg\mbd_modeling\motionsolve\cosimulation
folder to your <Working directory>.
Step 1: Run the XML in MotionSolve.
In this step, use a Linear State Equation (LSE) to model the control system. LSE (Control_StateEqn with LINEAR
option in MotionSolve) is an abstract modeling element that defines a generic dynamic system. The dynamic system
is characterized by a vector of inputs, u, a vector of dynamic states, x, and a vector of outputs, y. The state vector x is
defined through a set of differential equations. The output vector y is defined by a set of algebraic equations.
Linear Dynamical Systems are characterized by four matrices: A, B, C, and D. These are related to the dynamical
system in the following way:
The four matrices A, B, C, D are all constant valued. The first equation defines the states. The second equation
defines the outputs.
The A matrix is called the state matrix. It defines the characteristics of the system. If there are "n" states, then the A
matrix has dimensions n x n. A is required to be non-singular.
The B matrix is called the input matrix. It defines how the inputs affect the states. If there are "m" inputs, the size of
the B matrix is n x m.
The C matrix is called the output matrix. It defines how the states affect the outputs. If there are "p" outputs, the size
of the C matrix is p x n.
The D matrix is called the direct feed-through matrix. It defines how the inputs directly affect the outputs. The size of
the D matrix is p x m.
The input variables to the Control_StateEqn element are the reference displacement error and reference velocity
error. The output variables are control forces that will be applied between the bus mass and the suspension mass.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
337
1.
From the Start menu, select All Programs > Altair HyperWorks 11.0 > MotionSolve.
2.
For Input file, click the file browser icon and select the input file BusSuspensionFeedBack_motionsolve.
xml from your <Working Directory>.
3.
Click Run.
MotionSolve is invoked and runs the job.
4.
The results that we get from Step 3 will be used as the baseline to compare the results that we get from cosimulation.
Step 2: Modify the XML to define the plant in the control scheme.
The XML used above is modified to include the Control_PlantInput and Control_PlantOutput model elements.
In contrast to the block diagram of the control system, the summing junctions have been absorbed into the Sfunction (the MBD model) by appropriately taking the difference between the displacement, velocity, and their
corresponding reference values. The following XML example illustrates this:
338
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
The MotionSolve XML in this form is used to define the plant in the control scheme.
The Control_PlantInput element defines the inputs to a mechanical system or plant. This is part of the
information necessary to create a linearized model of the plant. You also need to specify the outputs from the
plant using the Control_PlantOutput element. The inputs specified using the CONTROL_PLANTINPUT
element can be accessed using the PINVAL function. For more details, please refer to the MotionSolve
User's Guide on-line help.
Three new attributes have been added to the Control_PlantInput and Control_PlantOutput elements:
hold_order specifies the order to which data is held by the co-simulation buffer. Legal values are 0,1
and 2.
sampling_period identifies the sampling period of that particular port. This means that each port can
have a different sampling period. A value of 0 for this attribute represents a continuous-time system.
offset_time specifies the offset time of its port.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
339
An example is shown below:
We have:
Plant Input: Two control forces that will be applied between the bus mass and the suspension mass.
Plant Output: Bus mass displacement and velocity errors.
Step 3: View the controller modeled in Simulink and edit the Simulink model to generate
the S-function for co-simulation.
1.
In the Simulink Library Browser, select File > Open.
The Open file… dialog is displayed.
2.
Select the BusSuspension.mdl file from your <Working Directory>.
340
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
3.
Click Open.
You will see the PI controller modeled in the State space form that will be used in the co-simulation.
4.
Double-click the state-space block to view the properties of the controller.
5.
The controller has a transfer function and an S-function. The S-function is generated using the MATLAB interface.
The MotionSolve model is entered into the S-function. Name the S-function ‘mscosim’.
6.
Double-click the S-function with name mscosim (for your convenience, the S-function has been added into the
Simulink model). In the dialog box that is displayed, under the S Function Parameters, the three parameters
listed below are specified, which is what you will provide while running mbd_d.exe. For example, '
CoSimuBusSuspensionFeedBack.xml', 'CoSimuBusSuspensionFeedBack.mrf'.
1.
MotionSolve XML model name
2.
MRF name, and
3.
DLL name
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
341
Step 4: Perform the co-simulation.
1.
Double-click the Simulink model, which will launch MATLAB and Simulink. Set the working directory to be the
same as that of the Simulink model.
2.
Click Execute to start the co-simulation. MATLAB uses ODE45 to perform the analysis.
342
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 5: Compare the MotionSolve results to the co-simulation results.
1.
From the Start menu, select All Programs > Altair HyperWorks 11.0 > HyperGraph.
2.
Click the Build Plots icon,
3.
Click the file browser icon,
4.
Make selections for the plot as shown below to plot the PInput.
5.
Click Apply.
6.
Repeat steps 2 to 5 and plot POut using the BusSuspension_ipc_cosim.mrf file.
7.
You will notice that both the signals match as shown below.
8.
Add a new page to the session by clicking the Add Page button,
9.
Using the following selections for the plot, follow steps 2 through 5 to plot POut from the
BusSuspensionFeedBack_motionsolve.mrf and BusSuspension_ipc_cosim.mrf files.
Altair Engineering
.
, and load the BusSuspensionFeedBack_motionsolve.mrf file.
.
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
343
10. You will notice that both the signals match as shown below.
11. The pure MotionSolve model and the co-simulation model give us the exact same results.
344
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-7003: Simulating a Single Input Single Output (SISO) Control
System Using MotionView and MotionSolve
This tutorial shows you how to implement a single input single output (SISO) controller in MotionView and solve it
using MotionSolve.
Consider the problem of maintaining the reference speed of a rotor in the presence of disturbances. A block diagram
of the control system is shown in Figure 1 below.
Figure 1 - Block diagram of the control system.
One simple approach is to design a proportional integral (PI) controller (Ogata, 1995), such that:
This tutorial shows you how to implement this PI controller.
Exercise
Step 1: Loading the rotor model.
1.
From the Start menu, select All Programs > Altair HyperWorks 11.0 > MotionView.
2.
From the directory <install_directory>/tutorials/mv_hv_hg/mbd_modeling/motionsolve, load
the file rotor.mdl.
The model contains a body called rotor that is attached to ground by a revolute joint. The joint axis is parallel to
the global Z-axis. There is a torsional spring-damper with only damping and no stiffness.
The model also contains output requests for the displacement and velocity of the rotor body.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
345
Step 2: Adding a solver variable for reference speed.
1.
From the Project Browser, right-click on Model and select Add General MDL Entity > Solver Variable (or
right-click on the Solver Variables icon,
, from the toolbar.
The Add SolverVariable dialog will be displayed
2.
Change Label to Reference Speed.
The variable name remains sv_0.
4.
Click OK.
5.
To maintain a linear speed of 3 rad/sec, from the Type drop-down menu, select Linear and enter 3 as the value of
the solver variable.
Step 3: Adding a SISO Controller
In this section, add a SISO controller. The input to the controller is the error between the reference speed solver
variable and the rotor angular speed. The output of the controller is the torque to be applied to the rotor. The
parameters for the simulation are chosen, somewhat arbitrarily, as Kp=1 and K=10.
1.
From the Project Browser, right-click on Model and select Add General MDL Entity > Control SISO (or rightclick on the Control SISO icon,
, from the toolbar).
The Add Control dialog will be displayed.
2.
Click OK.
3.
From the Input tab, select Expression from the Type drop-down menu and enter this expression:
'-WZ({MODEL.b_0.cm.idstring})+{sv_0.value}'
Note the single back quotes, indicating the expression is not to be processed by MDL, but by Templex. The
parameters inside the curly braces are evaluated.
4.
Click the Properties tab.
5.
To add Numerator coefficients, click Append.
6.
Enter 10 and 1 for the coefficients of 1 and s, respectively.
7.
Similarly, for Denominator coefficients, click Append and enter 0 and 1 for the coefficients of 1 and s,
respectively.
346
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 4: Adding the Control Torque
In this section, create a control torque acting on the rotor body. The Z-component of this torque is the output of the
controller.
1.
From the Project Browser, right-click on Model and select Add Force Entity > Force (or right-click on the
Forces icon,
, from the toolbar).
2.
The Add Force or ForcePair dialog is displayed.
3.
Leave the label and variable name default settings and click OK.
4.
From the Connectivity tab, under Force, select Action Reaction and for Properties, select Rotational.
5.
Set Local ref. frame by double-clicking Ref Marker and selecting Global Frame.
6.
Double-click Body 1 for Action force on: and select the rotor body.
7.
Double-click Body 2 for Reaction force on: and select Ground Body.
8.
Double-click Point 1 for Apply force at: and select Point 0.
9.
Click the Rot Properties tab and leave Tx and Ty set to 0.
10. Under Tz, select Expression and enter `{MODEL.siso_0.OUTPUT}`.
11. You may also click
to access the expression builder and create this expression using the model tree.
Step 5: Adding Output Requests for Control Force
1.
From the Project Browser, right-click on Model and select Add General MDL Entity > Output (or right-click on
the Outputs icon,
, from the toolbar).
2.
The Add Output dialog will be displayed.
3.
Enter Control force for the Label name and click OK.
4.
Specify other choices as shown in figure 2 below:
Figure 2 - Setting up the output request for control force.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
347
Step 6: Running the Simulation
1.
Click the Run button,
, on the toolbar to display the Run panel.
2.
Under Sim type, select Transient and specify the output (.xml) filename under Save as.
3.
Click the Simulation Parameters tab and enter 25 for the End time:.
4.
Return to the Main tab and click Run.
The results are displayed in the image below.
Figure 3 - Simulation results for the PI speed controller.
Reference
K. Ogata, Modern Control Engineering, 1990, Prentice-Hall Inc., Englewood Cliffs, N.J., US
348
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-7004: Inverted Pendulum Control Using MotionSolve and
MATLAB
This tutorial illustrates how to use MotionView and MotionSolve to design a control system that stabilizes an inverted
pendulum. The goal is to design a regulator using the pole placement method. The inverted pendulum MDL model file
is supplied.
The tutorial steps include:
Check the stability of the open loop system.
Export linearized system matrices A,B,C, and D using MotionSolve linear analysis.
Design a controller using MATLAB.
Implement a controller in MotionView.
Check the stability of a closed loop system using MotionSolve linear analysis.
Add disturbance forces to the model and run simulation using MotionSolve.
Figure 1 shows the classic inverted pendulum on a slider. The system has two degrees of freedom leading to four
state variables. The vertically upright position of the pendulum is unstable. The goal is to design a regulator to
stabilize this configuration.
Figure 1: Inverted pendulum model
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
349
We want to find a full-state feedback control law to achieve our goal. The control input is a force applied to the slider
along the global X-axis. Plant output is the pendulum angle of rotation about the global Y-axis.
Start by loading the file inv_pendu.mdl from the directory <Altair_Install_Path>\hw10.0
\tutorials\mv_hv_hg\mbd_modeling\motionsolve\ into MotionView. Upon examination of the model
topology, you will notice that everything needed for this exercise is already included in the model. However, depending
on which task you are performing, you will need to activate or deactivate certain entities.
Step 1: Determine the stability of the open loop model
First, compute the equilibrium position corresponding to the upright pendulum configuration. Next,compute the
eigenvalues to determine the stability of the equilibrium.
Compute Static Equilibrium
1.
From the SolverMode menu, select MotionSolve.
2.
From the toolbar, click the Forces icon,
, and make sure that Control ForceOL is active, while Control
Force – CL and Disturbance-step are deactivated.
3.
Click the Run icon,
4.
From Sim type drop-down menu, select Static.
5.
Specify the output filename as inv_pendu_stat_eq.xml.
6.
Select the Save MDL file (.mdl) option so that the MDL file is saved before static simulation is performed.
7.
Click Run.
8.
Add a new page and change the application window to HyperView.
9.
Load the file inv_pendu_stat_eq.h3d and click Apply.
.
10. To view the static equilibrium position, click the Animation Controls icon,
, on the toolbar. In the panel area,
click the Model Step button to see the static equilibrium position. For this model, the model step and static
equilibrium are the same configurations.
Compute Eigenvalues
1.
Return to the Run panel.
2.
From the Sim type drop-down menu, select Linear.
3.
Select Initial position (.mrf) and specify the MRF file generated in the previous exercise:
inv_pendu_stat_eq.mrf.
4.
Specify the output filename as inv_pendu_ol_eig.mrf.
5.
Select the Include geometric non-linearities option. This is required to account for the effect of gravity.
6.
From the Output File Types tab, select the Eigen info (.eig) and MDL animation file (.maf) options.
7.
From the Main tab, click Run.
350
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
8.
Add a new page and change the application to HyperView. Load the MAF and MRF files for each mode into
HyperView and animate them. For example, for mode 2, load the file inv_pendu_ol_eig_Pair2_Freq0HZ.
mrf.
9.
The eigenvalues computed by MotionSolve are shown in the table below:
Table 1 - Open Loop Eigenvalues
EIGENVALUES at Time = 0.0
Number
Real(cycles/unit time)
Imaginary(cycles/unit time)
1
-1.624739E-02
0.00000000E+00
2
-4.003220E-01
0.00000000E+00
3
5.581392E-01
0.00000000E+00
4
-1.732491E+00
0.00000000E+00
There is one eigenvalue with a positive real part, indicating that the system is unstable in the current configuration.
Step 2: Obtaining a Linearized Model
Usually, the first step in a control system design is to obtain a linearized model of the system in the state space form,
where A,B,C,and D are the state matrices, x is the state vector, u is the input vector, and y is the output vector. The
A,B,C,and D matrices depend on the choice of states, inputs, and outputs. The states are chosen automatically by
MotionSolve and the chosen states are reported in one of the output files. We need to define only the inputs and
outputs.
1.
2.
Click the Solver Variables icon,
, on the toolbar and examine the entities.
a.
Control Force Variable - CL is used to define the control input after the control law has been found. Ignore
this at this stage.
b.
Control Force Variable - OL is used to define the control input, which is a force named Control Force - OL.
This force is applied to the slider body. This variable is set to zero. It is needed by MotionSolve to properly
generate the linearized system matrices.
c.
Solver variable Pendulum Rotation Angle defines the plant output and measures the pendulum rotation
about the Global Y-axis.
Click the Solver Array icon,
, on the toolbar and examine the solver arrays that are defined.
a.
Plant-I defines a solver array entity of type Plant-Input. Click the Value tab to ensure that it is set to
Control Force Variable - OL.
b.
Plant-O defines a solver array entity of type Plant-Output. Click the Value tab to ensure that it is set to
Pendulum Rotation Angle.
3.
Click the Run icon.
4.
Select the Initial Position (.mrf) option and point it to the file inv_pendu_stat_eq.mrf.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
351
5.
Specify the output filename as inv_pendu_state_matrices.xml.
Output File Types tab for specifying the Matlab matrix files output
6.
From the Output File Types tab, select the Matlab matrix files (.a, .b, .c, .d) option.
7.
From the Main tab, click Run.
You should get seven new files with base name inv_pendu_state_matrices and extensions .a, .b, .c, .d, .
pi, .po and .st. The .pi and .po files contain information about the input and output variables. The .st file
contains information regarding the states chosen by the MotionSolve solver. The contents of the .st file are
shown below.
Table 2: Contents of inv_pendu_state_matrices.st
1.00000000E+00 3.01030000E+04
1.00000000E+00 3.01030000E+04
1.00000000E+00 3.01030000E+04
1.00000000E+00 3.01030000E+04
5.00000000E+00
1.00000000E+00
1.10000000E+01
7.00000000E+00
MotionSolve also automatically generates the file inv_pendu_state_matrices_states.tag, which describes
the states chosen in linearization. The contents of the _states.tag file are shown below:
Table 3 - Contents of inv_pendu_state_matrices_states.tag
<Plant State Array> (4 by 1)
RB
RB
RB
RB
3
3
3
3
Delta_RY
Delta_X
Delta_RY
Delta_X
[Part/30103]
[Part/30103]
[Part/30103] Dot
[Part/30103] Dot
<Plant Input Array> (1 by 1)
Plant_Input/30100100 (U1)
<Plant Output Array> (1 by 1)
Plant_Out/30100200 (Y1)
It's is clear from Table 3 that the states chosen by the MotionSolve solver are:
1.
Angular displacement about the global-Y axis.
2.
Translation displacement along the global X-axis.
3.
Angular velocity about the global-Y axis.
4.
Translation velocity along the global X-axis of the pendulum body center of mass marker.
352
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Step 3: Control System Design in MATLAB
A detailed discussion of control system design is beyond the scope of this document. However, the steps to design a
regulator using pole placement [1] to stabilize the inverted pendulum are described briefly. For details, refer to the
standard controls text and the MATLAB documentation.
It can be easily verified using MATLAB that the system is completely state controllable [1, 2]. We employ a full-state
feedback control law
u = -k*x, where u is the control input, k is the gain vector, and x is the state vector. Then, assuming the desired
pole locations are stored in vector P, you may use the pole placement method to compute k. For desired poles at [20 –20 –20 –20] (rad/s), the acker function in MATLAB yields
k=1e3[-2.4186 -0.0163 -0.070 -0.0033].
Step 4: Implementing the Control Force in MotionView
The control force is simply u=-k*x. The model contains a solver variable called Control Force Variable - CL. It is
defined using the expression:
`-1e3*(-2.4186*AY({b_pendu.cm.idstring})-0.0163*DX({b_pendu.cm.idstring}),-0.070*WY
({b_pendu.cm.idstring})-0.0033*VX({b_pendu.cm.idstring}))`
Notice that it is simply the dot product between the gain vector (k) and the state vector (x) elements. This solver
variable is used to define a force named Control Force - CL.
Activate the force Control Force - CL if it is deactivated.
Step 5: Check the Stability of a Closed Loop System
1.
From the SolverMode menu, select MotionSolve. Activate the force Control Force - CL if it is deactivated.
2.
From the Run panel, under Sim type, select Linear. Select Initial position (.mrf) and specify
inv_pendu_stat_eq.mrf.
3.
Specify the output file as inv_pendu_cl_eig.xml and click Run.
4.
The eigenvalues are given below.
Table 4 - Closed Loop Eigenvalues
EIGENVALUES at Time = 0.0
Number
Real(cycles/unit time)
Imag.(cycles/unit time)
1
-1.959725E+00
0.000000E+00
2
-4.695921E+00
0.000000E+00
3
-3.038100E+00
1.384870E+00
4
-3.038100E+00
-1.384870E+00
They all have negative real parts, hence the system is stabilized. Note that the negative real parts are close to the
desired poles (-20 rad/s = -3.18 Hz).
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
353
Step 6: Add Disturbance Force and Run the Simulation
The model contains another force acting on the slider titled Disturbance-step, defined using a step function:
Fx= `step(TIME,.1,0,.5,50) + step(TIME,1,0,1.5,-50)`
Fy=0
Fz=0
Activate this force and run a dynamic simulation with MotionSolve for three seconds with step size of .01 seconds.
Follow these steps.
1.
From the Project Browser, activate all the outputs in the model.
2.
From the toolbar, click the Run icon,
3.
From the Sim type drop-down menu, select Transient.
4.
Specify the output filename as inv_pendu_dyn.xml.
5.
From the Simulation Parameters tab, specify the End time and Step Size as 3.0 and 0.01, respectively.
6.
From the Main tab, click the Run button.
.
The plots of disturbance force, control force, pendulum angular displacement, and slider x displacement are shown
below.
Figure 2: Plots of disturbance and control forces as w ell as slider translational and pendulum angular displacements.
354
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
References
Feedback Control of Dynamic Systems, G. G. Franklin, J. D. Powell, and A. Emami-Naeini, Third Edition, Addison
Wesley.
See also
MATLAB Documentation, www.mathworks.com.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
355
MV-7005: Linking Matlab/Simulink Generated Code with
MotionSolve
In this tutorial, you will learn how to:
Use generated code from a model created in MATLAB/Simulink and link it with MotionSolve APIs to run a cosimulation.
Pre-requisites include:
1.
A working installation of MotionSolve.
2.
A working installation of MATLAB and Real Time Workshop (RTW).
3.
A working installation of MS Visual C++ (v8.x is used here).
Step 1: The MotionSolve model.
The MotionSolve model is set up to communicate with an external solver using the following two elements:
<Control_PlantInput
id
= "1"
num_element
= "1"
variable_id_list
= "300"
label
= "PlantIn"
usrsub_param_string
= "USER(987654320)"
usrsub_dll_name
= "my_rtwsub"
usrsub_fnc_name
= "PINSUB"
hold_order
= "1"
/>
<Control_PlantOutput
id
= "2"
num_element
= "2"
variable_id_list
= "100"
label
= "PlantOut"
usrsub_param_string
= "USER(987654320)"
usrsub_dll_name
= "my_rtwsub"
usrsub_fnc_name
= "POUTSUB"
hold_order
= "1"
/>
Attribute
Description
id
A unique identification number.
num_element
The number of elements being passed and received.
356
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
Attribute
Description
variable_id_list
A list of the element ID’s being passed and received.
label
A description of the element.
usrsub_param_string
USER(API ID): The API ID links a PlantIn and PlantOut pair that act as the
input/output to MotionSolve. The API ID must be unique for every coupled
PlantIn/PlantOut pair.
Note: There can be more than one PlantIn/PlantOut per API.
usrsub_dll_name
The name of the DLL being linked to. This is typically generated by the
external solver.
usrsub_fnc_name
The name of the user subroutine that MotionSolve calls. This has to be
“PINSUB” for Control_PlantInput and “POUTSUB” for Control_PlantOutput.
hold_order
The order of the hold that is applied.
Step 2: The Simulink model and generating code.
1.
Before starting with the simulation, a Simulink model is developed. Below is an example model:
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
357
2.
Specify the configuration parameters for the RTW. To do this, select the Simulation > Configuration
Parameters… menu option shown below.
3.
The Simulink RTW code generation does not allow using a variable step integrator. Under the Solver options
section, from the Type drop-down menu, select Fixed-step solver. The other parameters are specific to the model
that the code is being generated for. In a Simulink model with multiple rates, the fixed-step size must be the
reciprocal of the base rate, which corresponds to the least common multiple rate of all the rates involved in the
model.
358
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
4.
Make changes to the Real-Time Worskhop option as shown below.
5.
To change the System target file, click Browse and select grt.tlc – Visual C/C++ Project Makefile only for the
“grt” target”. This is shown below:
6.
Once this is done, change the Language option to C++.
7.
Click Build in the same window. This generates the RTW code for the model. T he RTW code generation creates
two folders in the current directory of MATLAB. In our example below, ‘x’ is the name of the model:
x_grt_rtw
slprj
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
359
Step 3: Compiling and linking the code.
The source code that provides MotionSolve an entry point into the RTW generated code lies inside the x_grt_rtw
folder. The following steps describe how this code is linked to the MotionSolve API.
1.
Load the project into Visual Studio by double-clicking on the x.mak file created in the x_grt_rtw folder.
A conversion process follows where Visual Studio creates a new project and loads the source code.
2.
Change the Configuration Type for the project from Application(.exe) to Dynamic Library(.dll).
3.
Under the Linker tree option on the left, change the Output File option to a file name with a .dll extension.
4.
Remove the file grt_main.c from the project
5.
Add the files cosim_main.c and rtw_sample.cpp to the project
6.
Open the x.cpp file. Make the following changes to this file:
a.
Include the header msolvsub_c_api.h and rtwapi_include.h.
b.
Modify the function static void x_output(int_T tid) to communicate with the MotionSolve API by including the
following code at the beginning of the method:
// method to get api pointer from MS
void *api = CoSimAPI_Get_API_Ptr(rtw_id);
360
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
c.
Add the following code at the beginning of the method, if any input to the Simulink model exists:
// method to get input from MS
CoSimAPI_SimulinkRTW_Update_U(api,model,input);
d.
Add the following code to the end of the same method, if any output to the Simulink model exists:
// method to deposit ouput to MS
CoSimAPI_SimulinkRTW_Update_Y(api,model,output);
Note: See Appendix A for more information on these methods.
7.
Include the ms_usersubapi.lib in the list of dependencies for the linker.
8.
In Additional Include Directories part of the project (Project properties>>Configuration Properties>>C/C+
+>>Additional Include Directories), include the following path
<Altair_Root>\hwsolvers\usersub\c_src\include.
9.
Build the project
Appendix A
This section discusses the access functions CoSimAPI_SimulinkRTW_Update_U(api,model,input) and
CoSimAPI_SimulinkRTW_Update_Y(api,model,output).
CoSimAPI_SimulinkRTW_Update_U(void *api, const RT_MODEL_x x_M,
ExternalInputs_x &x_U)
This method updates the input data structure in the RTW generated code with the output from MotionSolve.
The first argument requests a pointer to the API ID. The API ID is passed from the model XML in the line
usrsub_param_string
= "USER (987654320)". The first parameter in the USER() string is always the
ID of the API. The MotionSolve API provides the method void * CoSimAPI_Get_API_Ptr(int api_id)to get
the API pointer, where the api_id is the number specified in the XML file in the USER() string.
The second argument requests data structure x_M related with the generated RTW model information, where ‘x’ is the
name of the model. The x_M data structure is inherent to the RTW code.
The last argument requests input x_U where x_U is the data structure used by the RTW code to store the external
inputs. (See Appendix B).
CoSimAPI_SimulinkRTW_Update_Y(void *api, const RT_MODEL_x x_M, const
ExternalOutputs_x x_y)
This method updates the input for the MotionSolve solver with output from the RTW generated code.
The first and second arguments are the same as described in the previous section.
The last argument requests RTW output x_Y, which is deposited to MotionSolve for that current time step, where x_Y
is the data structure used by the RTW code to store the external outputs. (See Appendix B).
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
361
Appendix B
This section describes the data structure that the MATAB/Simulink RTW generated code uses for representing the
external input/output ports. In the following lines, the name of the model is assumed to be rtw_MS.
Typically, the RTW generated code (RTWGC) uses the following notations:
Input port to RTW with single channel
rtw_MS_U.In1, rtw_MS_U.In2, ...
Output port from RTW with single channel
rtw_MS_Y.Out1, rtw_MS_Y.Out2, ...
Input port with multiple channels
rtw_MS_U.In1[0], rtw_MS_U.In1[1], ...
Output port with multiple channels
rtw_MS_Y.Out1[0], rtw_MS_Y.Out1[1], ...
For example, for a model with two Control_PlantInput (CPI) elements, where the first has three channels and the
second has two channels, the corresponding data structure in the RTW code would be:
CPI #1: rtw_MS_U.In1[0], rtw_MS_U.In1[1] and rtw_MS_U.In1[2]
CPI #2: rtw_MS_U.In2[0] and rtw_MS_U.In2[1]
The same scheme is applicable for the data structure that handles Control_PlantOutput ports.
Note:
If the SIMULINK model has labels defined for the input and output links, then these labels will replace In
and Out in the data structure described above. In and Out are the default names used by SIMULINK in
case the links are not named. In this scenario, you need to change the first input variable name specified in
the RTW API function template CoSimAPI_SimulinkRTW_Update_U(api,model,input)into the one
you specified. For example, if you name the first input to be myIn instead of In1, you need to make the
following change to that function template:
double *u_ptr = (double *)&u.myIn;
to replace the original code:
double *u_ptr = (double *)&u.In1;
362
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
MV-7006: Python UserSub for MotionSolve
In this tutorial, you will learn how to:
Use Python to make a user subroutine for MotionSolve. It is assumed that you are familiar with Python and
MotionSolve XML syntax.
Convert a model with six SFOSUBs, written in C, into a Python usersub.
Using scripting language such as Python gives you power with reduced complexity. These scripts are interpreted and
do not require compiling. Therefore, you do not need a building tool to ‘build’ subroutines. Furthermore, scripts are
easier to read and understand, and can be used for faster prototyping.
If you do not have much programming experience, writing scripts for user-subroutines is simpler than writing C code.
For a C user, the usage is even simpler. Besides following the language syntax of Python, you only need to follow the
rules to convert the C code into Python scripts.
Rules for Written Python User Subroutines
It is easy to understand the usage for py_* utility functions from the usage of their c_* counterparts, with the help of
the following rules:
1. The output arguments should be moved to the left-hand-side.
c_datout(&istat);
becomes
istat = py_datout()
In C utility functions, the input and output arguments are combined in an argument list. In Python, the arguments
of the py_* utility functions are strictly the input arguments. All output arguments should be moved to the left-side
as return values of the function call.
2.
In C utility functions, any input or output array argument is generally followed by an integer argument for the array
size. In Python utility functions, the integer argument for the array size is removed because it is not necessary.
ipar[0] = (int)par[0];
ipar[1] = (int)par[1];
c_sysfnc("DM", ipar, 2, &dm, &errflg);
simply becomes
[dm, errflg] = py_sysfnc("DM", [par[0],par[1]])
and
ipar[0] = (int)par[1];
ipar[1] = (int)par[0];
c_sysary("TDISP", ipar, 2, u1, &nstates, &errflg);
becomes
[u1, errflg] = py_sysary("TDISP", [par[1],par[0]])
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
363
3.
Change the function name from c_* to py_*.
c_rcnvrt(sys1, coord1, sys2, coord2, &istate);
becomes
[coord2, istate] = py_rcnvrt(sys1, coord1, sys2)
Step 1: Convert C sub into Python sub.
1.
In this example, the model uses six SFOSUBs written in C code as shown below:
DLLFUNC void STDCALL SFOSUB (int *id, double *time, double *par,
int *npar, int *dflag, int *iflag, double *result)
{
// --- Add your local definitions here --------------------double vector[3],dm,vm;
int ipar[2], iord;
int errflg;
// --- Add your executable code here ----------------------int itype = (int)par[0];
iord = 0;
if (itype==50)
{
ipar[0] = (int)par[1];
ipar[1] = (int)par[2];
c_sysfnc("DM", ipar, 2, &dm, &errflg);
ipar[0] = (int)par[3];
ipar[1] = (int)par[4];
c_sysfnc("VM", ipar, 2, &vm, &errflg);
c_impact(dm, vm, par[5], par[6], par[7], par[8], par[9], iord,
vector, &errflg);
*result = vector[0];
}
}
2.
Following the rules specified in last section, the corresponding Python script is shown as:
def SFOSUB(id, time, par, npar, dflag, iflag):
[dm, errflg] = py_sysfnc("DM", [par[0],par[1]])
[vm, errflg] = py_sysfnc("VM", [par[2],par[3]])
[vector, errflg] = py_impact(dm, vm, par[4], par[5], par[6], par[7],
par[8], 0)
return vector[0]
3.
Besides the Python scripts, you also need to specify in the XML model the Python scripts that are used in the
user subroutine. MotionSolve provides this definition through two attributes in the corresponding elements that
uysrsub can be defined.
1. interpreter = "Python"
2. script_name = "script_name.py"
This combination replaces the attribute “usrsub_dll_name” in that element.
364
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
4.
The following image shows the difference between using C user sub and Python user sub in this example:
5.
In the original model, there are six Force_Scalar_TwoBody elements that use SFOSUB written in C:
<Force_Scalar_TwoBody
id
= "30701"
type
= "Force"
i_marker_id
= "30701010"
j_marker_id
= "30701011"
usrsub_param_string = "USER
(50,30301010,30401010,30301010,30401010,10,10,2.0,0.001,0.01)"
usrsub_dll_name
= "NULL"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "30801"
type
= "Force"
i_marker_id
= "30801010"
j_marker_id
= "30801011"
usrsub_param_string = "USER
(50,30301010,30501010,30301010,30501010,10,10,2.0,0.001,0.01)"
usrsub_dll_name
= "NULL"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "30901"
type
= "Force"
i_marker_id
= "30901010"
j_marker_id
= "30901011"
usrsub_param_string = "USER
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
365
(50,30301010,30601010,30301010,30601010,10,10,2.0,0.001,0.01)"
usrsub_dll_name
= "NULL"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "31001"
type
= "Force"
i_marker_id
= "31001010"
j_marker_id
= "31001011"
usrsub_param_string = "USER
(50,30401010,30501010,30401010,30501010,10,10,2.0,0.001,0.01)"
usrsub_dll_name
= "NULL"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "31101"
type
= "Force"
i_marker_id
= "31101010"
j_marker_id
= "31101011"
usrsub_param_string = "USER
(50,30401010,30601010,30401010,30601010,10,10,2.0,0.001,0.01)"
usrsub_dll_name
= "NULL"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "31201"
type
= "Force"
i_marker_id
= "31201010"
j_marker_id
= "31201011"
usrsub_param_string = "USER
(50,30501010,30601010,30501010,30601010,10,10,2.0,0.001,0.01)"
usrsub_dll_name
= "NULL"
usrsub_fnc_name
= "SFOSUB"
/>
6.
After changing C SFOSUB into Python SFOSUB, the XML content above is replaced with the following:
<Force_Scalar_TwoBody
id
= "30701"
type
= "Force"
i_marker_id
= "30701010"
j_marker_id
= "30701011"
usrsub_param_string = "USER
(30301010,30401010,30301010,30401010,10,10,2.0,0.001,0.01)"
interpreter
= "Python"
script_name
= "script/sfosub.py"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "30801"
type
= "Force"
i_marker_id
= "30801010"
j_marker_id
= "30801011"
usrsub_param_string = "USER
366
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
Altair Engineering
(30301010,30501010,30301010,30501010,10,10,2.0,0.001,0.01)"
interpreter
= "Python"
script_name
= "script/sfosub.py"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "30901"
type
= "Force"
i_marker_id
= "30901010"
j_marker_id
= "30901011"
usrsub_param_string = "USER
(30301010,30601010,30301010,30601010,10,10,2.0,0.001,0.01)"
interpreter
= "Python"
script_name
= "script/sfosub.py"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "31001"
type
= "Force"
i_marker_id
= "31001010"
j_marker_id
= "31001011"
usrsub_param_string = "USER
(30401010,30501010,30401010,30501010,10,10,2.0,0.001,0.01)"
interpreter
= "Python"
script_name
= "script/sfosub.py"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "31101"
type
= "Force"
i_marker_id
= "31101010"
j_marker_id
= "31101011"
usrsub_param_string = "USER
(30401010,30601010,30401010,30601010,10,10,2.0,0.001,0.01)"
interpreter
= "Python"
script_name
= "script/sfosub.py"
usrsub_fnc_name
= "SFOSUB"
/>
<Force_Scalar_TwoBody
id
= "31201"
type
= "Force"
i_marker_id
= "31201010"
j_marker_id
= "31201011"
usrsub_param_string = "USER
(30501010,30601010,30501010,30601010,10,10,2.0,0.001,0.01)"
interpreter
= "Python"
script_name
= "script/sfosub.py"
usrsub_fnc_name
= "SFOSUB"
/>
7.
With these changes (C code into Python code and XML model change), the model with Python user subroutines
are ready to run with MotionSolve.
Altair Engineering
MotionView 11.0 Tutorials
Proprietary Inform ation of Altair Engineering
367
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement