Planar Mechanical Library

Planar Mechanical Library
Version 4.2 – September 2004
®
Copyright  IMAGINE S.A. 1995-2004
AMESim® is the registered trademark of IMAGINE S.A.
AMESet® is the registered trademark of IMAGINE S.A.
ADAMS is a registered United States trademark of Mechanical Dynamics,
Incorporated.
ADAMS/Solver and ADAMS/View are trademarks of Mechanical Dynamics,
Incorporated.
MATLAB and SIMULINK are registered trademarks of the Math Works, Inc.
Netscape and Netscape Navigator are registered trademarks of Netscape
Communications Corporation in the United States and other countries. Netscape’s logos
and Netscape product and service names are also trademarks of Netscape
Communications Corporation, which may be registered in other countries.
PostScript is a trademark of Adobe Systems Inc.
UNIX is a registered trademark in the United States and other countries exclusively
licensed by X / Open Company Ltd.
Windows, Windows NT, Windows 2000 and Windows XP are registered trademarks of
the Microsoft Corporation.
X windows is a trademark of the Massachusetts Institute of Technology.
All other product names are trademarks or registered trademarks of their respective
companies.
TABLE OF CONTENTS
1. Introduction...........................................................................................................7
2. Tutorial example ...................................................................................................8
2.1. How to use this manual ..................................................................................8
2.2. Getting started with the Planar Mechanical Library.....................................10
3. Additional examples ...........................................................................................19
3.1. Example using the prismatic joint ................................................................19
3.2. Planar mechanisms connected to hydraulic components .............................25
3.2.1. Arm model combined with standard hydraulic components................25
3.2.2. Arm model combined with HCD library models.................................33
3.3. Pivot and prismatic joint actuated by hydraulic servo-hydraulic cylinders..36
4. Reference section for the library .......................................................................45
4.1. Introduction..................................................................................................45
4.2. The joints......................................................................................................46
4.2.1. Introduction .........................................................................................46
4.2.2. Pivot joint ............................................................................................47
4.2.2.1. Introduction .............................................................................................. 47
4.2.2.2. Non driven pivot joint PLMPIV00 ........................................................... 49
4.2.2.3. Driven pivot joint PLMPIV10: ................................................................. 50
4.2.3. Prismatic joint......................................................................................52
4.2.3.1. Introduction .............................................................................................. 52
4.2.3.2. Non driven prismatic joint PLMTRA00 ................................................... 55
4.2.3.3. Driven prismatic joint PLMTRA10 .......................................................... 57
4.2.4. The slotted link joint PLMTRPI00 ......................................................60
4.2.4.1. Introduction .............................................................................................. 60
4.2.4.2. Parameters ................................................................................................ 62
4.2.4.3. Example .................................................................................................... 62
4.2.5. Driven composite joint PLMJ00..........................................................64
4.2.5.1. Introduction .............................................................................................. 64
4.2.5.2. Parameters ................................................................................................ 65
4.2.5.3. Example .................................................................................................... 66
4.3. The bodies ....................................................................................................68
4.3.1. Description of the body model ............................................................68
4.3.2. Coordinate system ...............................................................................69
4.3.3. Parameters ...........................................................................................70
4.3.4. Imposing constraints to a body ............................................................73
4.3.5. Example...............................................................................................75
4.4. The assembly icon........................................................................................77
4.5. The sources ..................................................................................................79
4.5.1. Zero force source PLMZER00 ............................................................79
4.5.2. Torque and force sources PLMFOR00................................................79
4.5.3. The zero velocity source or ground PLMEMB01................................81
4.6. The 1D 2D transformers...............................................................................83
4.6.1. The PLMT01D transformer.................................................................83
4.6.2. The PLMT01D01 transformer .............................................................84
4.7. The sensors...................................................................................................86
4.8. Coordinate calculator ...................................................................................87
September 2004
Table of Contents
1/107
5. Using AMEAnimation ........................................................................................89
5.1. Description of the AMEAnimation interface ...............................................89
5.1.1. Starting AMEAnimation ...................................................................89
5.1.2. The toolbars ......................................................................................90
5.1.3. The menu bar ....................................................................................90
5.1.4. Description of the Options dialog box ..........................................93
5.2. Example of a double pendulum....................................................................94
September 2004
Table of Contents
2/107
September 2004
Table of Contents
3/107
List of the icons available in the library with their name
Models available
PLMASSEMBLY
Assembly model used to calculate the initial condition
of a mechanism Page 77 § 4.4.
PLMCALCUL
Model used resembling a calculator to change
coordinate system from absolute to relative and vise
versa Page 87 § 4.8.
PLMZER00
Model of a zero force source Page 79 § 4.5.1.
PLMEMB01
Model of a zero velocity source Page 81 § 4.5.3.
PLMFOR00
Source of forces and torque Page 79 § 4.5.2.
PLMT01D
1D to 2D connector used to connect inertia from a
planar mechanism to a one dimensional mechanical
spring Page 83 § 4.6.1.
PLMT01D01
1D to 2D connector used to connect inertia from a
planar mechanism to a one dimensional mechanical
mass Page 83 § 4.6.2.
PLMFT11
Force plus torque sensor Page 86 § 4.7.
PLMVT11
Linear and rotary velocity sensor Page 86 § 4.7.
September 2004
Table of Contents
4/107
PLMDT11
Linear and rotary position sensor Page 86 § 4.7.
PLMAT11
Linear and rotary acceleration sensor Page 86 § 4.7.
PLMTRA00
Prismatic joint Page 55 § 4.2.3.2.
PLMPIV00
Pivot joint Page 49 § 4.2.2.2.
PLMTRPI00
Slotted link joint Page 60 § 4.2.4.
PLMPIV10
Driven pivot joint Page 50 § 4.2.2.3.
PLMTRA10
Driven prismatic joint Page 64 § 4.2.3.3.
PLMJ00
Driven composite joint Page 64 § 4.2.5.
PLMBOD01
One port inertia Page 68 § 4.3.
PLMBOD02
Two port inertia Page 68 § 4.3.
September 2004
Table of Contents
5/107
PLMBOD03
Three port inertia Page 68 §4.3.
PLMBOD04
Four port inertia Page 68 § 4.3.
PLMBOD05
Five port inertia Page 68 § 4.3.
PLMBOD06
Six port inertia. Page 68 § 4.3.
PLMBOD10
Ten port inertia Page 68 § 4.3.
Table 1:List of the icons available in the library
September 2004
Table of Contents
6/107
Using the
Planar Mechanical Library
1. Introduction
As part of our library development and improvement, it was decided after analyzing the
need of the users to extend the features of the standard one-dimensional library to a twodimensional library. Very often it is necessary to represent a body with two or three
degrees of freedom moving in a plane. This requires writing the equations by hand and
translating these equations using a bloc diagram and the signal library of AMESim. If you
are more comfortable with C code you can also use AMESet to implement your equations.
This approach requires some knowledge in mechanics and even for somebody
experienced, it is time consuming to develop, debug and maintain these specific models.
To avoid this, the Planar mechanical library of AMESim as been developed. This library
can be used for any type of planar mechanical system using pivot joints, translation joints
and/or a combination of both.
The mechanical library deals with rigid bodies and perfect joints. It is based on the
mathematical constraint equation from mechanics. The body submodels use differential
equations to calculate the generalized coordinates. The joint submodels use the Baumgarte
stabilization schemes applied to the geometric, kinematic and acceleration constraint
equation.
This library can be used alone or can be coupled with any AMESim library including
components with one-dimensional mechanical ports like the standard mechanical library,
hydraulic library, the HCD library, the Pneumatic library or the Thermal Hydraulic
library. The dynamic interaction between these different areas of physics and a planar
mechanical system can now be done in the AMESim environment.
In order to make the library easier to use, a visualization module named
“AMEAnimation” has been developed. This feature is very useful to check the bodies’
initial positions; it is also possible to use it to animate the mechanical system after the
AMESim simulation run. This visualization module allows three-dimensional
visualization even if the model is a two-dimensional system.
Before describing in detail the submodels of the library, we present some tutorial
examples. In section two is a simple example that shows you the steps in building and
running a planar system. Section three presents additional examples, which include
components from the hydraulic domain. Section four is a reference guide for the library.
Section five describes AMEAnimation in detail.
It is assumed that the reader is familiar with the use of AMESim. If this is not the case,
we suggest that you do the tutorial exercises of the AMESim manual before attempting
the examples below.
September 2004
Using the Planar Mechanical Library
7/107
2. Tutorial example
2.1. How to use this manual
Before starting to read this manual, please read the recommendations below to assist you
in better use of this manual and the demo files.
-
All the examples of this manual related to an AMESim model list the file name
in the figure title.
-
If you get a tutorial example from the demo area, all the default parameters for
the examples can be reloaded at any time using the “Load system parameter
set” in the “Parameter” menu. The parameters used for the examples are saved
with the name “default”.
Parameter ► load system parameter set.
-
This library includes a very specific icon that does not exist in any other
AMESim library; it is the assembly icon. This is used to initialize each body of
a system in the right position. For a first introduction to this model we strongly
recommend going through the tutorial example of paragraph 2.2 (see also 4.4
page 77).
For more explanation see paragraph 4.4 page 77.
-
It is very important to understand how to calculate the degrees of freedom
available in a system. Two paragraphs can assist you: § 4.2.1 page 46 and § 4.3.1
page 68. An example is also given paragraph in 4.3.4 page 73.
-
For people who have to connect their system to hydraulic actuators we
recommend review of the example in paragraph 3.2 page 25.
-
The animation tool used to visualize a mechanical system “AMEAnimation” has
a color code. We recommend looking at the associated documentation before
using this tool (see § 5
September 2004
Using the Planar Mechanical Library
8/107
Using AMEAnimation).
-
In the title of submodels parameters and variables a center of gravity is
denoted by G.
-
O0 corresponds to the absolute reference origin of a mechanical system.
-
O1 corresponds to the local reference origin of a body.
-
In appendix 1 some rotary inertia equations are provided for common shapes.
September 2004
Using the Planar Mechanical Library
9/107
2.2. Getting started with the Planar Mechanical Library
Objectives:
•
Construct a very simple planar system (double pendulum)
•
Introduce the concept of assembling a planar mechanical system
•
Use animation to view the system
The Planar mechanical library includes a set of basic components from which it is easy
to: build a planar mechanical model, set the parameters, run a simulation and visualize the
results in AMEAnimation. The purpose of this example is to demonstrate the possibilities
of this library and to understand the different steps necessary to setup a model.
The system we are going to model is a double pendulum. See Figure 1 Body 1 is
connected to the ground at point O0 through a pivot joint (pivot joint 1). It is also
connected to body 2 with the pivot joint 2 at point P12. Body 2 is only connected to body 1
by pivot joint 2 at point P12. The system will be released from the position shown and will
fall due to gravity.
Pivot junction 2 (P12)
y2
y1
y0
θ2=0°
Body 2
Body 1
G2
x1
x2
θ1=45°
G1
Pivot junction 1
O0
x0
Figure 1: representation of a double pendulum
Step 1: Data Required
Body 1
Mass = 10 kg
Moment of inertia around Z axis = 0.01 kgm2
The coordinates of the pivot joints (O0 and P12) are given in the x1, y1 reference. The
origin of this reference is also the center of gravity of the body.
September 2004
Using the Planar Mechanical Library
10/107
O0: x1_O0 = -0.5 m ; y1_O0 = 0 m
P12: x1_P12 = 0.5 m ; y1_P12 = 0 m
The initial angular position (θ1) is set to 45°.
Body 2
Mass = 10 kg
Moment of inertia around Gz axis = 0.01 kgm2
The coordinates of the pivot joints (P12) are given in the x2, y2 reference. The origin of this
reference is also the center of gravity of this body.
P12: x2_P12 = -1 m ; y2_P12 = 0 m
The initial angular position (θ2) is set to 0°.
Step 2: Constructing the sketch
Select the Planar mechanical library category icon shown in Figure 2. If you do not have
this category in your list, check if the Planar mechanical library is in your AMESim path
list (to set up the path list refer to your AMESim manual).
Figure 2: Planar mechanical library category icon
This will produce the dialog box shown in Figure 3. The icons shown with a red rectangle
correspond to the icons necessary to model the system presented in Figure 1.
Figure 3: components of the Planar mechanical library
September 2004
Using the Planar Mechanical Library
11/107
You can now build the system as shown in Figure 4. Six components are necessary: one
assembly icon (1), one ground (2), two pivots joint (3 and 5), one 2 port body (4) and one
1 port body (6).
Figure 4: model of a double pendulum (see “DoublePendulum.ame”)
For those familiar with AMESim and the hydraulic library, the assembly icon (see (1)
Figure 4) can be compared to the fluid properties icon of a hydraulic circuit. It is used to
set-up the bodies at the right position in the absolute reference (x0, y0). This model
(PLMASSEMBLY) initializes the mechanical system geometrically and kinematically
according to the constraints that have been defined by the user. In our example, we want
the first body to start at 45° and the second one at 0° (Figure 1). Only geometrical
constraints have been defined. The velocities are all set to zero.
-
The model is now setup up in Sketch mode
-
Then enter Submodel mode
and click on the Premier
submodel mode button from the horizontal toolbar
-
.
.
Enter the Parameter mode
. We will assume the system is
saved under the name “DoublePendulum.ame”.
Step 3: Setting the parameters
Table 2 of Figure 4 shows the parameters that have to be set for each model. We consider
for this first run the constant gravity value = 9.81m/s/s set to 0 (model 7 “GRAV0”).
Submodel name and type
2
3
PLMEMB01
end restraint
PLMPIV00
Pivot joint
September 2004
Belongs to
category
Planar Mechanical
Planar Mechanical
Principal simulation parameters
absolute x position = 0 m
absolute y position = 0 m
spring stiffness = 0 Nm/degree
damping coefficient = 1 Nm/(rev/min)
Using the Planar Mechanical Library
12/107
4
PLMBOD02
Two ports body
5
PLMPIV00
Pivot joint
PLMBOD01
One port body
6
7
GRAV0
Gravity
Planar Mechanical
initial absolute angular position = 45°
G: x position = 0.0
x position at port 1 = -0.5
x position at port 2 = 0.5
Mass = 10kg
moment of inertia around Gz axis = 0.01
Kgm^2
Planar Mechanical
spring stiffness = 0 Nm/degree
damping coefficient = 1 Nm/(rev/min)
Planar Mechanical
G: x position = 0.0
x position at port 1 = -1.0
Mass = 10kg
moment of inertia around Gz axis = 0.01
Kgm^2
Mechanical
constant gravity value = 0m/s/s
Table 2: model parameters
The parameters set are not consistent with Figure 1. For instance the position of each body
in the plane are not initialized to have body 1 and body 2 in the assembled position. It is
possible to calculate the position of the bodies reference (see Figure 1 point G1 and G2)
and provide the model with the right initial position of body 1 and body 2.
Body 1: Absolute position of the center of gravity
Xg = 0.5 * cos(45°) = 0.35355339m
Yg = 0.5 * sin(45°) = 0.35355339m
Angle = 45°
Body 2: Absolute position of the center of gravity
Xg = 1 * cos(45°) + 0.5= 1. 70710678m
Yg = 1 * sin(45°) = 0.70710678m
Angle = 0°
It is not always easy to calculate the body’s initial position manually, indeed most of the
time it is rather difficult. For that reason the assembly module has been added to this
library to help the user (model 1 Figure 4 PLMASSEMBLY). In the body models the
origin of the body reference is defined by point O:
“O: initial absolute x position”
“O: initial absolute y position”
It is not necessary to set-up the initial absolute position of the body “O: initial absolute x
position” and “O: initial absolute y position”. The assembly module does it
automatically (see § 4.4). These two parameters will be used when the position set by the
assembly module is not exactly the one desired or if the assembly icon has some
discrepancies when assembling the system. From our experience, the initial angular
position of the body “initial absolute angular position “ is more often used to help the
assembly icon do its work.
Step 4: Running the simulation
September 2004
Using the Planar Mechanical Library
13/107
Enter the Simulation mode
.
You are now ready to run the simulation. The initial simulation parameters can be set to
their initial values. Only the final time will be changed to 40 seconds (see Figure 5).
Figure 5: simulation parameters
You are now ready to run the simulation. Click on the Start Run
a run.
button to initiate
Step 5: Analysis of the results
After the simulation run you will see that the bodies initial angular positions are not the
same as those we set. In simulation mode the body angle is named “absolute angular
position” (models (4) and (6) Figure 4). The first body (body 1 see Figure 1) has an
angular position of 68.1934° instead of 45°. The second body (body 2 see Figure 2) has an
angular position of –25.7586°. The explanation and the correction of that problem are
shown in the next step.
Another interesting tool for the verification of the assembly is AMEAnimation. This
module allows the visualization of any mechanical system modeled with the Planar
mechanical library.
Visualization of the pendulum using AMEAnimation:
.A
• Click on the AMEAnimation button in the horizontal toolbar
new window like the one here after appears. It asks you which graphic
library you want to use. Select the default option “OpenGL”. If
“OpenGL” doesn’t work launch AMEAnimation again and select the
“GDI” button.
• Type Crtl+O, or
• Select Edit ► Open.
September 2004
Using the Planar Mechanical Library
14/107
• Use the Browser to reach the directory where the AMESim double
pendulum model is located.
• Select the “.result” file corresponding to the double pendulum model.
This file contains all the information to visualize the double pendulum.
The visualization of our system in AMEAnimation is given in Figure 6. The visualization
confirms the incorrect initial conditions. AMEAnimator marks the joint connected to the
ground with red and joints not connected to the ground in blue.
For more information about AMEAnimation please check the documentation associated
with this module.
Figure 6: visualization of the mechanical system within AMEAnimation
Step 6: Explanation of the problem and correction
The first issue concerning the result obtained in Figure 6 is that body 1 and body 2 are
correctly connected together and body 1 is correctly connected to the ground. The
assembly model has done its work. However, the bodies are not at the correct initial
angular position.
The double pendulum system is a two degrees of freedom system. Two rotations are
allowed: one around the first pivot joint (see (3) Figure 4) and one around the second
pivot joint (see (5) Figure 4). The number of degrees of freedom gives the number of
constraints that can be set by the user. Two geometric constraints and two kinematics
constraints can be set. In the initialization phase the assembly module can block 2 degrees
of freedom among the 6 degrees of freedom available when the bodies are independent.
List of the parameters that can be constrained:
The constraints variable corresponds to the state variables of a body. They correspond to
the velocities and the position at the center of gravity. The list for one body is given
below.
September 2004
Using the Planar Mechanical Library
15/107
-
absolute angular velocity
absolute angular position
G: absolute x position
G: absolute y position
G: absolute x velocity
G: absolute y velocity
All parameter above are in the body icon (PLMBOD01 (6) or PLMBOD02 (4)).
How to constrain a variable to follow an initial condition
To start the simulation at the correct initial position, the lock states feature of AMESim is
used. Figure 7 shows how to lock a degree of freedom.
Either in parameter or in simulation mode, right click on body 1 icon (see 4 Figure 4).
Select “View lock states”, a window similar to one shown in Figure 7 allows you to
select the variables to be locked (see AMESim user manual for locked states). In our
example we want to constrain the angular position as a starting position: select “absolute
angular position”. Repeat the same procedure for body 2 (see 6 Figure 4). In this
example we do not constrain the velocities.
Figure 7: locked states status
Verification of the results
September 2004
•
Run the simulation using the same parameters as before.
•
The “absolute angular position” of body 1 is now at the right
angular position of 45° and the “absolute angular position” of
body 2 is at the right angular position of 0°.
Using the Planar Mechanical Library
16/107
•
Visualization in AMEAnimation: Select the AMEAnimator
Window if it is still open.
•
Reload the result file by clicking on
•
The visualization confirms that the bodies are correctly initialized
(see Figure 8).
.
Figure 8: visualization of the double pendulum initial position
If you compare the center of gravity position of both bodies to the values calculated
manually at Step 3 you will find the same results. To check these positions select the
bodies icons and look at “G: absolute x position” and “G: absolute y position”.
Step 7: Experimenting with the model
Set the constant gravity value to 9.81m/s/s in GRAV0.
Once the simulation is done you will have access to the following information: forces,
velocities, acceleration, position.
With the body icons you will have access to:
-
Velocities (rotary and linear),
Acceleration (rotary and linear),
Position (rotary and linear).
These information are available at the center of gravity and at the ports.
With the rotary joint icons you will have access to:
-
Forces in the joint,
Torque in the joint,
Relative acceleration in the joint,
Relative velocity in the joint,
Relative position in the joint,
The ground icon (PLMEMB01) and the assembly icon (PLMASSEMBLY) do not
provide any interesting data for the analysis of the results.
September 2004
Using the Planar Mechanical Library
17/107
The next two curves correspond respectively to the force in the pivot joint (3) and (5) (see
Figure 4). The two bodies are almost in a vertical position. Their absolute angle is at –
90°. The vertical force (y direction) in the grounded pivot joint corresponds to the mass of
both bodies which is 9.81*(10Kg+10Kg)~200N (see Figure 9). The vertical force in the
second pivot joint is half of this value (see Figure 10). In both pivot joints, the force in the
x direction is null at the equilibrium.
Figure 9: force in the grounded pivot joint (3) in x and y direction
Figure 10: force in the pivot joint connecting body 1 and 2 in x and y direction
September 2004
Using the Planar Mechanical Library
18/107
3. Additional examples
This section concentrates on the relationship between assembly and stabilizing runs. The
examples will be multidomain containing components from the hydraulic, hydraulic
component design, signal as well as the Planar mechanical library.
Typically an assembly is performed and it is necessary to adapt the components from the
other domains to be in equilibrium with planar mechanical part in its stabilized position.
3.1. Example using the prismatic joint
Objectives:
•
Learn how to use the driven and non-driven prismatic joint,
•
Learn how to use the stabilizing run mode to calculate the
equilibrium point of a model including a translation joint.
The system to be modeled is a mass spring plus damper system that is set in the vertical
direction. The gravity influences the static force in the spring. This example shows the
different possible configurations to model such a system. Some recommendations are
provided to choose the correct model when a stabilizing run is required (Note: stabilizing
run is a mode used in AMESim to calculate the equilibrium of a system).
Step 1: Data Required
Mass:
M : Mass
G
M=20 Kg
y0
Spring stiffness:
K : Spring
stiffness
K=10000N/m
O0
Viscous damping:
R : Viscous
damping
x0
R=2*0.7*sqrt(1000*20)=197.98N/(m/s)
Step 2: Constructing the sketch
Select the Planar mechanical library category icon shown in Figure 2. If you do not have
this category in your list, check if the Planar mechanical library is in your AMESim path
list (to set up the path list refer to your AMESim manual). This will produce the dialog
box shown in Figure 3.
You can now build the system as shown in Figure 11. Three different models are built; the
first one “System 1” uses the non-driven prismatic joint PLMTRA00. This model
September 2004
Using the Planar Mechanical Library
19/107
includes a spring plus damper in its parameters. The second one “System 2” uses the
driven prismatic joint combined with a spring plus damper model coming from the onedimensional library of AMESim. The spring submodel used is SD0000; it has a state
variable in the spring model. Finally the last model “System 3” is very similar to “System
2”. The difference is the spring model coming from the one-dimensional library. The last
model “system 3” does not use any state variable in the spring model.
Figure 11: example of a mass plus spring system using PLMTRA00 model (see
“PrismaticJoint.ame”)
•
The model is now setup up in Sketch mode
•
Then enter Submodel mode
.
and click on the Premier
submodel mode button from the horizontal toolbar
.
•
Change the default spring submodel of system 2 by SD0000
•
. We will assume the system is
Enter the Parameter mode
saved under the name “PrismaticJoint”.
Step 3: Setting the parameters
Table 3 of Figure 11 shows the parameters that need to be set for each submodel. The first
column gives the submodel name. The other columns correspond respectively to the
parameters of “System 1”, “System 2” and “System 3”.
spring stiffness
free length of spring
September 2004
System 1
PLMTRA00
10000 N/m
0.5 m
System 2
PLMTRA00
0 N/m
0m
Using the Planar Mechanical Library
System 3
PLMTRA00
0 N/m
0m
20/107
damping coefficient
197.98N/(m/s)*
spring force
spring force with
displacements zero
spring rate
0 N/(m/s)
SD0000
ON
both
damper rating
GRAV0
constant gravity value
absolute angular position of x
axis
absolute x position at port 1
absolute y position at port 1
coordinates reference
use optional contour file
initial
absolute
angular
position
O: initial absolute x position
O: initial absolute y position
x position at port 1
mass
0 N/(m/s)
SD000A
0.5*10000N
10000N/m
10000N/m
197.98N/(m/s)
197.98N/(m/s)
9.81 m/s/s
PLMEMB01
90°
9.81 m/s/s
PLMEMB01
90°
9.81 m/s/s
PLMEMB01
90°
0m
0m
PLMB0D01
relative
no
0 degree
0.5 m
0m
PLMB0D01
relative
no
0 degree
1.0 m
0m
PLMB0D01
relative
no
0 degree
0m
1m
-0.5 m
20 kg
0.5 m
1m
-0.5 m
20 kg
1m
1m
-0.5 m
20 kg
Table 3: model parameters
The current system has one degree of freedom. The reference of the main body is set to 1
meter (“O: initial absolute y position”). If we want to respect this initial position at 1m it
is necessary to impose a constraint on the y direction of the body absolute reference (see
§4.3.4 for more detail about constraints).
Constraining the main body to start at 1m in the y direction:
Either in parameter
or in simulation
mode, right click on the body icon
(system 1). Select “View lock states”, a window similar to one shown in Figure 12 allows
you to select the variables to be locked. In our example we want to constrain the position
in the y direction: select “G: absolute y position”. Repeat the same procedure for body 2
and body 3. The constraints are now correctly setup. The initial vertical position should
be set to 1m.
Figure 12: Locked state status of body 1 to 3
September 2004
Using the Planar Mechanical Library
21/107
Step 4: Running the simulation
.
Enter the Simulation mode
Enter the Run parameters setup
and change the following parameters:
General Parameters
-
Final time 1 sec
Communication interval 0.001 sec
Standard options
-
Run mode: Dynamic
You are now ready to run the simulation. Click on the Start Run
a run.
button to initiate
Step 5: Analysis of the results
The body positions in the y direction are going to be used to analyze the results. In
simulation
mode select body 1 (see “system 1”) then click on “G: absolute y
position” and click on the plot button to plot it. Repeat the same procedure with body 2
and body 3. Using the plot facility of AMESim (see AMESim documentation) you can
organize the plot as shown in Figure 13.
For the initial position of the three bodies, as specified the bodies starts at the height of 1
meter. Then the three masses fall because of the gravity. The static position can be
calculated by hand. Considering a mass of 20Kg and a spring stiffness of 10000N/m, the
mass displacement is:
∆y = 20 * 9.81 / 10000 = 0.01962m
The absolute mass position at the equilibrium is:
Y_mass = 1 - ∆y = 0.98038m
This value corresponds to the one calculated by AMESim (see Figure 13).
These results are interesting but some users will need to automatically calculate the
equilibrium of this system in order to have no displacement of the mass. It is possible to
do so with the Stabilizing + Dynamic run mode. The results of this calculation are
presented on step 6.
September 2004
Using the Planar Mechanical Library
22/107
Figure 13: body position; simulation done with NO stabilizing RUN
Step 6: Running the simulation with stabilizing mode
Enter the Simulation modes
.
Enter the Run parameters setup
and change the following parameters:
Standard options
-
Run mode: Stabilizing + Dynamic
You are now ready to run the simulation. Click on the Start Run
a run.
button to initiate
Figure 14 shows the results obtained with this new run. We can observe that only one
model (System 2) provides the desired result. This model is the only one that includes in
the spring model one state variable for the spring force calculation.
The first model uses the spring included in the prismatic joint PLMTRA00. The spring
force calculated in this model uses the relative displacement of the prismatic joint and
September 2004
Using the Planar Mechanical Library
23/107
multiplies this displacement by the spring stiffness to get the spring force. It is exactly the
same with the model “System 3” that uses the SD0000A spring model. The spring model
SD0000A uses the relative displacement of the spring sent to its ports to calculate the
spring force. The spring model used in “System 2” SD0000 is a little bit different. This
model does not have any displacement at its ports. Only the force and velocities are
available at its ports. It is necessary to calculate the delta of velocity between the two
ports. Then this ∆V is integrated and multiplied by the spring stiffness.
Why does AMESim correctly calculate the equilibrium with the model “System 2”?
Because of the state variable available in the spring model SD0000, the linearization
module of AMESim has ONE state variable to play with in order to get the correct
equilibrium. For the two other models, the number of combinations for the position of
each port that respect the equilibrium is infinite. The solver does not have a unique
solution. The initial values for the models “Solution 1” and “Solution 3” are set to their
original value. For these two models, the run is similar to the one with no stabilizing
mode.
REMARK:
This example points out an important rule for the use of the AMESim’s Stabilizing mode
when the Planar mechanical library is involved: An equilibrium point for the mechanical
system can be found only when the actuators have state variables in their model.
Figure 14: body position; simulation done WITH stabilizing RUN
September 2004
Using the Planar Mechanical Library
24/107
3.2. Planar mechanisms connected to hydraulic components
3.2.1. Arm model combined with standard hydraulic components
Objectives:
•
Learn how to use the Planar mechanical library combined with
hydraulic systems,
•
Learn how to use the stabilizing run mode to calculate the
equilibrium point of a model including planar mechanical
submodels and hydraulic ones.
The system to be modeled is a horizontal arm attached to the ground on the left with a
pivot joint and attached to a hydraulic jack on the middle of the arm. The gravity
influences the static force in the jack and the chambers’ pressures. The main requirement
of this example is to start the system at a given position. This means that AMESim will
have to find the correct pressure in the hydraulic circuit to keep the system in the
static position determined by assembly.
Step 1: Data Required
Figure 15 provides the drawing of the system to be modeled. The parameters necessary to
setup the mechanical parts and the hydraulic cylinder are provided in this figure. A servovalve is used to actuate this cylinder. Its parameters are given in step 3. Two hydraulic
lines submodels are included in-between the jack and the servo-valve. The parameters of
these lines are also given in step 3.
0.2m
0.8m
0.5m
P02
y1
y0
x1
O1
O0
0.25m
x0
P01
M*g
θ=20°
Mass=100Kg
J=0.01kg.m2
Piston diameter = 50mm
Rod diameter = 30mm
Stroke = 350mm
Figure 15: mechanical arm actuated by a servo-hydraulic actuator
September 2004
Using the Planar Mechanical Library
25/107
Step 2: Constructing the sketch
Select the Planar mechanical library category icon shown in Figure 2. If you do not have
this category in your list, check if the Planar mechanical library is in your AMESim path
list (to set up the path list refer to your AMESim manual). This will produce the dialog
box shown in Figure 3.
You can now build the system as shown in Figure 16. Three different AMESim libraries
are used: Planar Mechanical, Hydraulic and Signal. Each submodel of this system has a
number. This number is used in step 3 to setup the parameters. Figure 16 includes a
picture of the mechanical system similar to the diagrams from AMEAnimation. The body
is represented by a blue rectangle; the hydraulic cylinder is in red1 and the pivot
connecting the body to the ground is represented by a red1 circle.
Figure 16: mechanical arm actuated by a hydraulic cylinder with servo-valve (see
“ConnectPlmHyd.ame”)
•
The model is now setup up in Sketch mode
•
Then enter Submodel mode
.
and click on the Premier
submodel mode button from the horizontal toolbar
.
•
Change the default line submodel (15) by the line submodel HL04
•
. We will assume the system is
Enter the Parameter mode
saved under the name “ConnectPlmHyd.ame”.
1
red means connection to the ground
September 2004
Using the Planar Mechanical Library
26/107
Step 3: Setting the parameters
Table 4 of Figure 16 shows the parameters that have to be set for each model. The first
column gives a number corresponding to the submodels of Figure 16; the second column
gives the submodel name; the third column gives the library name and the last column
gives the numerical value of the parameter with its units. A total of fifteen submodels
have to be setup.
Submodel name and type
2b
5
7
8
9
10
GRAV0
Gravity
PLMBOD03
Three ports body
Belongs to
category
Mechanical
Planar Mechanical
PLMJ00
Driven composite
joint
PLMEMB01
Ground
HJO20
Hydraulic actuator
with single shaft
Planar Mechanical
UD00
Linear signal source
Signal Control and
Observers
Planar Mechanical
Hydraulic
Signal Control and
GA00
Gain
Observers
Hydraulic
12
SV00
Electrically operated 3
position 4 port
hydraulic servo valve
11
13
14
PS00
Hydraulic pressure
source
TK000
Hydraulic Tank
Hydraulic
Hydraulic
Principal simulation parameters
constant gravity value = 9.81m/s/s
coordinates reference = relative
initial absolute angular position = 20degree
x position at port 1 = 0.2m
x position at port 2 = -0.5m
x position at port 3 = -0.8m
mass = 100 Kg
free length of the actuator = 0.22m
piston diameter (for AMEViewer) = 0.05m
diameter of rod (for AMEViewer) = 0.07m
absolute y position at port 1 = -0.25 m
pressure at port 2 = 5bar
use initial displacement = no
piston diameter = 50mm
rod diameter = 30mm
length of stroke = 0.35m
viscous friction coefficient = 1000
damping coefficient on endstops = 1000
duration of stage 1= 0.5 s
output at end of stage 2 = 1 null
duration of stage 2 = 0.5 s
output at start of stage 3 = 1 null
output at end of stage 3 = 1 null
duration of stage 3 = 0.5 s
output at start of stage 4 = 1 null
duration of stage 4 = 1 s
value of gain = -0.2
ports P to A flow rate = 20 L/min
ports B to T flow rate = 20 L/min
ports P to B flow rate = 20 L/min
ports A to T flow rate = 20 L/min
valve rated current = 1 mA
valve natural frequency = 20 Hz
pressure at start of stage 1 = 30 bar
pressure at end of stage 1 = 30 bar
tank pressure = 5 bar
Table 4: model parameters
September 2004
Using the Planar Mechanical Library
27/107
Applying constraints to the system:
The main objective of this example is to learn how to start a planar mechanical system
connected to a hydraulic circuit in a unique steady state position. First of all we need to
know the number of degrees of freedom of the system (see also §4.3.1):
F = 3 * N – M = 3 * 1 – 2 * 1 = 1 DOF
F: number of DOF of a planar mechanical system,
N: number of bodies (1)
M: number of constraint equations (see Table 7 and definition of M in §4.2.1)
-
2 DOF are constraint with the pivot joint
The current model has one degree of freedom. It corresponds to the rotation of the body
around the grounded pivot joint. This means that only one state variable can be locked.
The parameter table shows that we want the body to start with an angle of 20° with the
horizontal (see submodel number 5 Table 4). The angular state variable of the body has to
be locked.
Either in parameter
or in simulation
mode, right click on body icon (5).
Select “View lock states”, a window similar to one shown in Figure 17 allows you to
select the variables to be locked. In our example we want to constrain the state variable
named “absolute angular position”.
Figure 17: body angular position locked
The necessary state variable has been locked on the mechanical part. We now have to
think about the hydraulic part. On the hydraulic part we have four states variables
corresponding to pressures in volumes:
-
One state variable for the volume in chamber 1 of the jack
One state variable for the volume in chamber 2 of the jack
One state variable for the volume line attached to chamber 1 of the jack
One state variable fot the volume line attached to chamber 2 of the jack
We are going to separate the hydraulic circuit into two parts: One for the circuit belonging
to chamber 1 side of the jack (circuit 1); one for the circuit belonging to chamber 2 side
of the jack (circuit 2). If we look at these two circuits we have an infinite number of
September 2004
Using the Planar Mechanical Library
28/107
pressure combination that correspond to an equilibrium point for the system. The
solution is not unique AMESim will not find an equilibrium; the simulation will be
started with the pressures setup by the user or fall.
If we want to find an equilibrium point we need to have a unique solution for the
AMESim solver. The solution is to lock one of the pressures in one of the two circuits
(circuit 1 or circuit 2). It is recommended to lock the pressure in the chamber that will
have the lowest pressure. In our example the circuit connected to chamber 2 is the one
with the lowest pressure2. Each circuit (circuit 1 or circuit 2) contains two state variables
only one of these two state variables has to be locked. The pressure in the jack circuit 2
has been chosen to have the locked state variable.
Either in parameter
or in simulation
mode, right click on the jack icon (9).
Select “View lock states”, a window similar to one shown in Figure 18 allows you to
select the variables to be locked. In our example we want to constrain the state variable
named “pressure at port 2”. The initial pressure in the chamber has been set up to 5 bar
(see number (9) Table 4).
Figure 18: pressure at port 2 locked
Step 4: Running the simulation
Enter the Simulation mode
Enter the Run parameters setup
.
and change the following parameters:
General Parameters
2
If you don’t know which chamber has the lowest pressure then run the simulation with
out the stabilizing run mode and check the pressure value in each chamber
September 2004
Using the Planar Mechanical Library
29/107
- Final time 4sec
- Communication interval 0.005sec
Standard options
- Run mode: Stabilizing (NO DYNAMIC)
You are now ready to run the simulation. Click on the Start Run
a run.
button to initiate
Step 5: Analysis of the results
The run parameters specified previously are for the static run; the calculation is done at
t=0. The purpose of this run is to verify the values calculated by AMESim when body 1
has an absolute angle of 20°. Four parameters are checked:
-
Angular position of the body (model PLMBOD03): calculated value = 20°
Pressure chamber 2 (model HJ020): calculated value = 5bar
Pressure chamber 1 (model HJ020): calculated value = 27.25bar
Force in the actuator (model PLMJ00): calculated value = 4723N
The results above show that the constraints on the angular position of the body and the
initial pressure in chamber 2 are respected (20° angle for the body and 5bar in chamber
2). A force of 4723N is necessary to maintain the body to its equilibrium point. The
pressure in chamber 1 is 27.25bar. This value takes into account the static force
(4722.3N) and the counter pressure of 5bar.
Verification with an analytical calculation:
The verification of the static force is done using the drawing presented on Figure 19.
According to the geometry of the system and the initial angular position of the beam (20°
inclination) the direction of the force coming from the jack can be analytically calculated.
The hand calculation gives 51.35° between the jack force and the horizontal (see Figure
19). In that condition the force in the jack can be calculated using the equation
corresponding to the sum of the torques around the point O0.
∑ Torques O0 = 0
⇒ Fjx ·(-Py + Px ·tg(β )) − Μ ⋅ g ⋅ .8 ⋅ cos(20°) = 0
Tg (β ) =
⇒ Fjx =
Fjy
Fjx
β = 51.35°
M ⋅ g ⋅ 0.8 ⋅ cos(20°)
100 ⋅ 9.81 ⋅ 0.8 ⋅ cos(20°)
=
= 2951N
(− 0.3 ⋅ sin(20°) + 0.3 ⋅ cos(20°) ⋅ tg(β)
− Py + Px ⋅ tg(β )
(
)
⇒ Fjy = Fjy ⋅ tg(β ) = 2951 ⋅ tg(51.35° ) = 3690 N
Fjack = 29512 + 36902 = 4724 N
The analytical calculation confirms the static result provided by AMESim. The static
force in the jack is ~4723N for an inclination of the beam of 20°.
September 2004
Using the Planar Mechanical Library
30/107
0.8m
Fjy
Jack Force
G1
0.3m
M·g
y0
Fjx
P
20°
β=51.35°
x0
O0
With position of P in absolute reference : P=[Px ; Py]’O0’
P=[0.3·cos(20°) ; 0.3·sin(20°)]
Figure 19: static calculation of the force on the beam for a 20° inclination
Step 6: Running the simulation on a complete cycle
Enter the Simulation mode
.
Enter the Run parameters setup
and change the following parameters:
General Parameters
-
Final time 4sec
Communication interval 0.005sec
Standard options
-
Run mode: Stabilizing + Dynamic
You are now ready to run the simulation. Click on the Start Run
a run.
button to initiate
Step 7: Analysis of the results
The run consists on opening the valve and close it in order to move the arm down from its
original angular position (20°) to the minimum displacement of the jack. Curve A/ of
Figure 20 shows the servo-valve input reference. The valve is maintained in a closed
position for 0.5s before starting the cycle. Curve C/ gives the jack displacement. It starts
at ~0.23m and finishes to its minimum displacement on the end stops.
September 2004
Using the Planar Mechanical Library
31/107
Curves B/ and D/ give the pressures in both jack chambers. Curve D/ gives the pressure in
the chamber where the state variable has been locked to 5bar. During the first part of the
simulation; when the valve is maintained to zero displacement the pressure stays at 5bar.
This example should help the users to better understand when the locked state variable is
used: Either to initialize the mechanical system to a given position and/or to force
AMESim to calculate the steady state of the system.
Figure 20: servovalve reference, cylinder position, cylinder pressures
September 2004
Using the Planar Mechanical Library
32/107
3.2.2. Arm model combined with HCD library models
Objectives:
•
Combine model from the Planar mechanical library and model
from HCD,
•
Use the stabilizing run mode to calculate the equilibrium position
of the system.
The model presented in this paragraph is very similar to the one presented in §3.2.1. The
difference is the jack that is modeled with HCD components. All the data required for this
model can be found in the previous paragraph (see step1 of §3.2.1). We strongly
recommend starting with the example of paragraph 3.2.1 before starting this example. The
model is presented on Figure 21.
Step 1: Open the previous model (see Figure 16) and save it under a new name;
“ConnectPlmHCD.ame” for example
Remove the jack model from the system and built up a new actuator using the HCD
models as shown on Figure 21. The actuator end-stops are also taken into account. They
are represented with models coming from the one-dimensional mechanical library.
Figure 21: mechanical arm actuated by a HCD hydraulic cylinder plus servo-valve
(see “ConnectPlmHCD.ame”)
September 2004
Using the Planar Mechanical Library
33/107
Step 2: Setting the parameters
All the parameters of Table 4 except the one related to the jack (HJO20) are identical.
The following table provides the parameters corresponding to the models used to
represent the new actuator.
Submodel name and type
9
9’
BAP12
Piston
BAP11
Piston
Belongs to
category
HCD
HCD
BCH11
Hydraulic Volume
17
BCH11
Hydraulic Volume
18
MCLC0AA
Elastic double endstop
HCD
16
HCD
Mechanical
Principal simulation parameters
piston diameter = 50 mm
rod diameter = 0 mm
piston diameter = 50 mm
rod diameter = 30 mm
chamber length at zero displacement = 350 mm
pressure port 1 = 5 bar
dead volume = 50 cm3
dead volume = 50 cm3
port 1 gap or clearance with both displacements
zero = 350 mm
port 2 gap or clearance with both displacements
zero = 0 mm
contact stiffness = 1e8 N/m
contact damping = 1000 N/(m/s)
Table 5: model parameters
Applying constraint to the system:
The difference between this new model and the previous one is the constraints applied to
the actuator (locked state). The pressure to be constrained is still the pressure in the small
chamber of the actuator; the model is now model (16) of Figure 21. Use the information in
Figure 21 to set the locked states in hydraulic chamber (“pressure port 1”).
Step 3: Running the simulation on a complete cycle
Enter the Simulation mode
.
Enter the Run parameters setup
and change the following parameters:
General Parameters
- Final time 4sec
- Communication interval 0.005sec
Standard options
- Run mode: Stabilizing + Dynamic
September 2004
Using the Planar Mechanical Library
34/107
You are now ready to run the simulation. Click on the Start Run
a run.
button to initiate
Step 4: Analysis of the results
The simulation run on this example is the same as the one run in paragraph 3.2.1. The
input reference for the servo-valve is the same. Consequently the results are the same.
The plots associated with this simulation are presented on Figure 22. The comments are
the same as the one provided at step7 of paragraph 3.2.1. This example shows that
components from HCD library (THCD, PCD and all the xCD AMESim library types) can
also be connected to the Planar mechanical library.
Figure 22: servo-valve reference, cylinder position, cylinder pressures
September 2004
Using the Planar Mechanical Library
35/107
3.3. Pivot and prismatic joint actuated by hydraulic servohydraulic cylinders
Objectives:
•
•
•
Learn how to use the prismatic joint combined with hydraulic
circuit,
Learn how to use the stabilizing run mode to calculate the
equilibrium point of a model including a prismatic joint and pivot
joints.
Use the Planar mechanical library combined with hydraulic
models.
The system used for this example is an extension of the system presented in paragraph
3.2.1. From the previous system that represents a horizontal arm attached to the ground on
the left with a pivot joint and attached to a actuator on the middle of the arm, we connect
the current body to a second body with a driven prismatic joint. The objective is to start
the mechanical system at a given position and to calculate the steady state of the whole
system connected to the actuators. This means that AMESim will have to find the correct
pressures in the hydraulic circuit to keep the system in a static position.
Step 1: Data Required
Figure 23 provides the drawing of the system to be modeled. Some parameters necessary
to setup the mechanical parts and the hydraulic cylinders are provided in Figure 23. Both
actuators are the same. Two hydraulic lines are included in-between the jacks and the
servo-valves. The parameters of these lines are given in step 3 of this paragraph.
When a prismatic joint is used, we recommend using the ABSOLUTE coordinate system
for both bodies attached to it. It helps to setup the different bodies at the right position.
Concerning the other bodies of the system it doesn’t matter; either the absolute or the
relative coordinate system can be used. For more details about the absolute and relative
coordinate options available in the bodies take a look at paragraph 4.3.2 and 4.3.3.
y0
O0 O1
Prismatic joint actuated by a
servo hydraulic cylinder
x0
M
0.25m
Mass=100Kg
J=0.01kg m2
Piston diameter = 50mm
Rod diameter = 30mm
Stroke = 350mm
Figure 23: mechanical arm actuated by two servo-hydraulic actuators
September 2004
Using the Planar Mechanical Library
36/107
The following figure gives the position of each connection point for body (5) and body
(17) in the absolute coordinate system. We assume the system to be in the horizontal
position in order to facilitate the parameter set-up. This doesn’t means that the simulation
will start with the system in this position. The parameters can be entered in a position that
is convenient for the parameter set-up and the simulation can start in another position.
AMESim will calculate at the initialization of the model to the right position according to
the value set in the “initial absolute angular position” parameter of the body model. For
more details about how to use absolute and relative coordinate system take a look at the
example of paragraph 4.3.5.
Use the following figure when you reach step 3 (Setting the parameters).
Absolute reference
0.1
0
0.2
0.3
0.4 0.5
0.6
0.7
0.8
[m]
0.9
1
1.1
1.2
1.3
1.4
1.5
COGbody1
Port 3
Port 2
Port 1
y0
O1O0
BODY 1
x0
Port 1
COGbody2
Port 2
y0
y0
O0 x0
O1
BODY 2
x0
Local reference
0
0.1
0.2
0.3
0.4 0.5
0.6
0.7
0.8
0.9
1
[m
]
Figure 24: definition of the absolute coordinate of body (5) and body (17)
September 2004
Using the Planar Mechanical Library
37/107
Step 2: Constructing the sketch
Select the Planar mechanical library category icon shown in Figure 2. If you do not have
this category in your list, check if the Planar mechanical library is in your AMESim path
list (to set up the path list refer to your AMESim manual). This will produce the dialog
box shown in Figure 3.
You can now build the system as shown in Figure 25. Three different AMESim libraries
are used: Planar Mechanical, Hydraulic and Signal. Each submodel of this system has a
number. This number is used in step 3 to setup the parameters. Figure 25 includes a
picture of the mechanical system similar to the diagram from AMEAnimation. The bodies
are represented by blue rectangles; the hydraulic cylinder is in red3 the pivot connecting
the body to the ground is represented by a red1 circle and the prismatic joint connecting
both bodies is represented is light blue4.
Figure 25: double arm model (see “DoubleArm.ame”)
-
The model is now setup up in Sketch mode
-
Then enter Submodel mode
and click on the Premier
submodel mode button from the horizontal toolbar
-
.
.
Enter the Parameter mode
. We will assume the system is
saved under the name “DoubleArm.ame”.
3
red is used for joints connecting a body to the ground,
light blue is used for joints connecting two bodies.
September 2004
Using the Planar Mechanical Library
4
38/107
Step 3: Setting the parameters
In order to simplify the parameters set-up, most of the parameters of the system presented
in this paragraph are identical to the parameters of the example presented in paragraph
3.2.1. All the parameters of Table 4 have the same ± sign as in the model of Figure 25.
When some modifications are necessary compared to the original data of Table 4, they are
listed in Table 6. For example, body (5) requires the use of the ABSOLUTE coordinate
system. The new parameter set is listed in Table 6. It is the same for models 10bis and
11bis. Two additional models are used in the models for Figure 25. They correspond to
the ‘driven prismatic joint’ (16) and to the second body (17). Their parameters are listed in
Table 6.
Submodel name and type
Belongs to
category
Planar Mechanical
5
PLMBOD03
Three ports body
10bis
UD00
Linear signal
source
Signal Control and
Observers
11bis
GA00
Gain
PLMBOD02
Two ports body
Signal Control and
Observers
PLM
17
Principal simulation parameters
coordinates reference = absolute
initial absolute angular position = 20deg
G: x position = 0.4m
x position at port 1 = 0.2m
x position at port 2 = 0.3m
mass = 100 Kg
duration of stage 1= 0.5 s
output at end of stage 2 = 1 null
duration of stage 2 = 0.5 s
output at start of stage 3 = 1 null
output at end of stage 3 = 1 null
duration of stage 3 = 0.5 s
output at start of stage 4 = 1 null
duration of stage 4 = 0.5s
value of gain = 0.1
coordinates reference = absolute
initial absolute angular position = 20°
G: x position = 0.9 m
x position at port 1 = 0.4 m
x position at port 2 = 1.4 m
mass = 100 Kg
Table 6: model parameters
Applying constraint to the system:
One of the objectives of this example is to learn how to start a planar mechanical system
connected to a hydraulic circuit in a steady state position. First of all we need to know the
number of degrees of freedom of the system (see also §4.3.1):
F = 3 * N – M = 3 * 2 – (2 * 1 – 2*1) = 2 DOF
F: number of DOF of a planar mechanical system,
N: number of bodies (2)
M: number of constraint equations (see Table 7 and definition of M in §4.2.1)
-
Two DOF constrain for the pivot joint,
-
Two DOF constrain for the prismatic joint.
September 2004
Using the Planar Mechanical Library
39/107
The system like it is now has two degrees of freedom. Two degrees of freedom allows
locking two state variables (for the planer mechanical part of the system). We have one
rotation around the z-axis and one translation in-between the two bodies. Automatically
one rotary state variable and one state variable in translation can be locked (we can not
locked two rotations or two translations in that example). The parameter table (Table 6)
shows that we want the body (5) to start with an angle of 20° from the horizontal. The
angular state variable of the body has to be locked. The second constraint has to be set for
body (17). We have decided to lock the translation of body (17) in the x direction.
Either in parameter
or in simulation
mode, right click on body (5) icon.
Click on “View lock states”, and then select “absolute angular position”. Repeat this
procedure with body (17) and lock the state variable named “G: absolute x position”. Take
a look at Figure 26 and check if you set the locked variable as is shown in this figure.
Figure 26: body (5) angular position and body (17) y position are locked
The necessary state variable has been locked on the mechanical part. We now have to
think about the hydraulic part. On the hydraulic part we have four states variables
corresponding to pressures in volumes:
-
One state variable for the volume in chamber 1 of the jack (9)
-
One state variable for the volume in chamber 2 of the jack (9)
-
One state variable in the volume line attached to chamber 1 of the jack (15)
-
One state variable in the volume line attached to chamber 2 of the jack (15)
We are going to separate the hydraulic circuit of each actuator in two parts: One for the
circuit belonging to chamber 1 side of the jack (circuit 1 see Figure 27); one for the
circuit belonging to chamber 2 side of the jack (circuit 2 see Figure 27). If we look at
these two circuits we have an infinite number of pressure combinations that
correspond to an equilibrium point for the system. The solution is not unique.
AMESim will not find equilibrium; the simulation will be started with the pressures setup
by the user or fail.
September 2004
Using the Planar Mechanical Library
40/107
Circuit 1
Circuit 2
Circuit 2
Circuit 1
Figure 27: the hydraulic circuit of each actuator is divided in two circuits one for
chamber 1 (left) and one for chamber 2 (right)
If we want to find an equilibrium point we need to have a unique solution for the
AMESim solver. The solution is to lock one of the pressures in one of the two circuits
(circuit 1 or circuit 2). It is recommended to lock the pressure in the chamber that will
have the lowest pressure. In our example the circuit connected to chamber 2 is the one
with the lowest pressure1. Each circuit (circuit 1 or circuit 2) contains two state variables;
only one of these two state variables has to be locked. The pressure in the jack (circuit 2)
has been chosen for the locked state variable.
1
If you don’t know which chamber has the lowest pressure then run the simulation
without stabilizing run mode and check the pressure value in each chamber.
Either in parameter
or in simulation
mode, right click on one of the jack
icon (9). Click on “View lock states”, and then select “pressure at port 2”. Repeat this
procedure with the second jack icon. Take a look at Figure 28 and check if you set the
locked variable as is shown in this figure.
Figure 28: pressure at port 2 on both jack is locked
Step 4: Running the simulation
Enter the Simulation modes
September 2004
.
Using the Planar Mechanical Library
41/107
Enter the Run parameters setup
and change the following parameters:
General Parameters
- Final time 4sec
- Communication interval 0.005sec
Standard options
- Run mode: Stabilizing (NO DYNAMIC)
You are now ready to run the simulation. Click on the Start Run
a run.
button to initiate
Step 5: Analysis of the results
The run specified previously is a static run; the calculation is done at t=0. The purpose of
this run is to verify the values calculated by AMESim when body (5) has an absolute
angle of 20° and when the center of gravity of body (17) is at 0.9m from the absolute
origin on the x-axis. Six parameters are checked; the numerical value underlined
corresponds to the state variable that have been locked:
Bodies
-
Angular position of the body (model PLMBOD03): calculated value = 20°
G: absolute x position (model PLMBOD02): calculated value = 0.9m
Actuator located on the left (connected to ground and to body (5))
-
Pressure at port 2 (HJ020-2) jack on the left: calculated value = 5bar
Pressure at port 1 (model HJ020-2): calculated value = 44bar
Force in the actuator (model HJ020-2): calculated value = 8014N
Actuator located on the right (connecting body (5) and body (17))
-
Pressure at port 2 (HJ020-1) jack on the left: calculated value = 5bar
Pressure at port 1 (model HJ020-1): calculated value = 4.9bar
Force in the actuator (model HJ020-1): calculated value = 335N
The results above shows that the constraint imposed to the state variables have been
respected by the AMESim solver. The initial value of 20° for the absolute angle of body
(5) is respected; the initial absolute position of body (17) in the x-axis is respected (0.9m);
the initial pressures in the small chamber of the jacks are respected (5bar). To get these
initial values, AMESim found a force of 8014N in the first jack (connection between
ground and body (5)) and a force of 335N in the second jack (connection between body
(5) and body (17)).
September 2004
Using the Planar Mechanical Library
42/107
Step 6: Running the simulation on a complete cycle
Enter the Simulation modes
.
Enter the Run parameters setup
and change the following parameters:
General Parameters
- Final time 4sec
- Communication interval 0.005sec
Standard options
- Run mode: Stabilizing + Dynamic
You are now ready to run the simulation. Click on the Start Run
a run.
button to initiate
Step 7: Analysis of the results
The run consists of opening the valves and closing them in order to move the arms (5) and
(17) down from their original angular position (20°) and to expand the second arm (17).
Curve A/ and C/ of Figure 29 shows the servo-valves input reference. The valves are
maintained in a closed position for 0.5s before starting their cycle. Curve B/ and D/
presents the displacements of both jacks. The jack that controls the angle (5) is contracting
(B/) and the jack that controls the expansion of the second arm (17) is expanding (D/).
Figure 30 gives the pressures and the forces in the cylinders. The force in the jack
controlling the angle decreases because the distance between the COG and the rotating
point (point O0 see Figure 23) get smaller. Less torque has to be provided so less force is
necessary for the jack. The force is always positive (C/ Figure 30). This means that the
jack is always in compression. Concerning the second jack the force starts at ~320N and
ends at ~-600N. At the beginning when the angle is positive; the jack is under
compression (positive force) when the angle reduces the force becomes negative. The jack
is under extension; the small chamber has a bigger pressure compared to the big chamber
(B/).
September 2004
Using the Planar Mechanical Library
43/107
Figure 29: servovalve reference and jack displacement
Figure 30: jack pressures and force
September 2004
Using the Planar Mechanical Library
44/107
4. Reference section for the library
4.1. Introduction
This section is the reference section for the Planar mechanical library. It is design to
work with the index. There is a description of the main submodel in the library. To
support each description there is a small example to illustrate. If you have done the
previous tutorial examples you will know how to build a planar mechanical model. Hence
for the tutorial example in the section we recommend you load the prebuilt models using
Help ► AMESim\Demo and help …\Libraries\PlanarMechanical. If you do prefer to
build these yourself a table of the default parameters is provided for each example.
The description for all the planar mechanical submodels can also be obtained using the
standard online help for submodels.
The Planar mechanical library of AMESim has a collection of twenty-five icons and a
total of twenty eight submodels. These icons can be divided into six categories:
1.
2.
3.
4.
5.
6.
The joints
The bodies
The assembly icon
The sources
The transformers
The sensors
3
4
6
5
1
6
1
2
Figure 31: Planar mechanical library
The following paragraphs describe the six categories of icons presented above. It is most
important to master the joints and the bodies in this library. In addition, it is important to
understand how the assembly icon works. For the bodies, the user will have to keep in
mind two features to setup the parameters: the coordinates of joints described in the body
September 2004
Using the Planar Mechanical Library
45/107
icon can be either in relative or absolute coordinates. The axis coordinate system
considers the body moving in translation in the [x ; y] plane and in rotation around the z
axis.
y
z
x
Figure 32 : axis coordinate system of the Planar mechanical library
Four types of ports are used: the signal port ( ), the rotary one-dimensional port ( ), the
translation one-dimensional port ( ) and the two-dimensional mechanical port ( ).
4.2. The joints
4.2.1. Introduction
The joint elements of the Planar mechanical library make the link between the body or
bodies and the ground. All the inertia effects are calculated in the body model, the joint
models are used to solve the constraint equation between two bodies or between one body
and the ground. A joint receives positions, velocities and accelerations and provides a
force. Figure 33 shows the causality rules of this type of element.
N & N.m
N & N.m
m & rd
Body
model
or
Ground
m & rd
Joint
model
m/s & rd/s
m/s/s &rd/s/s
m/s & rd/s
m/s/s &rd/s/s
Body
model
or
Ground
Figure 33: causality of a joint model
There are three types of joints: the pivot, the prismatic and the slotted link. Additionally,
the composite joint is a combination of the pivot and the prismatic joint. This joint is
used to model a cylinder with two pivots and one prismatic joint. Each basic joint allows
and constrains certain degrees of freedom. The following table (Table 7) summarizes the
degrees of freedom for the three joints.
Joint type
Degrees Of Freedom (DOF)
Pivot
ONE DOF
(Around the z axis)
ONE DOF
(Along the prismatic axis)
TWO DOF
(One in rotation, one in translation)
Prismatic
Slotted link
Constraint
DOF
2
2
1
Table 7: degrees of freedom of the three basic joints
From Table 7 we can specify the number of constraint equation of the three types of
joints. Two translations are constrained by the pivot joint; one in the x direction and one
September 2004
Using the Planar Mechanical Library
46/107
in the y direction. The prismatic joint constrains one rotation and one translation. Finally
the slotted link constrains one translation.
The number of degrees of freedom that are constrained is defined by the following
formula:
M = NPV * 2 + NPR * 2 + NSL
NPV number of pivot joint
NPR number prismatic joint
NSL number of slotted joint
The link between the joints and the other libraries of AMESim is possible. Additional
models have been developed: driven joints. The pivot joint and the prismatic joint exist
in driven and non-driven configuration. The composite joint is also a driven joint. The
next paragraph explains in detail how to use the joints.
4.2.2. Pivot joint
4.2.2.1. Introduction
The pivot joint allows one rotation around the z axis and blocks the two translations on the
x and y axes. The standard ISO 3952 representation is shown in Figure 34 and the
AMESim representation is show in Figure 35.
S1
S2
or
Figure 34 : representation of a normalized pivot joint (ISO 3952)
Non driven:
; Driven:
Figure 35 : representation of the AMESim pivot joint
The equation of constraint:
The constraint equation calculates the coordinate of point P (see Figure 36) of body 1 and
point P of body 2 in order to get P of 1 equal to P of 2 in the absolute coordinate system.
The mathematical equation is below:
O0 Port1 = O0 Port 2
With :
September 2004
Port 1 = (xr1 , yr1)
Port 2 = (xr2 , yr2)
Using the Planar Mechanical Library
47/107
y2
y0
O2
x2
θ2
Port 2
O0
y1
P
x0
O1
x1
Port 1
Figure 36: representation of a pivot joint in between two bodies
Calculation of the expression of O0Port1 and O0Port2 :
O 0 Port1 = O0O1 + O1Port1
 xo 
O 0 Port1 =  1 
 yo1  Ro
x 
+  r1 
 y r1  R1
 xo + x * cos(θ1) − yr1 * sin(θ1)  (a)

O0Port1 =  1 r1
 yo1 + x r1 * sin(θ1) + yr1 * cos(θ1) Ro (b)
O 0 Port 2 = OO 2 + O 2 Port 2
O 0 Port 2
 xo 
=  2 
 yo2  Ro
x 
+  r 2 
 yr2 R 2
 xo + x r2 * cos(θ2 ) − yr 2 * sin(θ2 )  (c)

O0Port2 =  2
 yo2 + x r 2 * sin(θ2 ) + yr 2 * cos(θ2 )  Ro (d)
The sum of the two previous relations (a+c) and (b+d) has to be null. These new equations
(1) and (2) are the equation of constraint of the pivot joint.
 xo1 + xr1 * cos(θ 1 ) − y r1 * sin(θ1 ) − xo2 − xr 2 * cos(θ 2 ) + y r 2 * sin(θ 2 ) = 0  (1)


 yo1 + xr1 * sin(θ1 ) + y r1 * cos(θ1 ) − yo2 − xr 2 * sin(θ 2 ) − y r 2 * cos(θ 2 ) = 0 (2)
September 2004
Using the Planar Mechanical Library
48/107
4.2.2.2. Non driven pivot joint PLMPIV00
4.2.2.2.1. Description
The pivot joint model PLMPIV00 is a two port model. This model can be connected to
PLMEMB00 the ground; it can be connected to any inertia model from the one port body
model to the ten port one PLMBOD01..PLMBOD10; it can be connected to any sensor
from the Planar mechanical library (PLMFT11 PLMVT11, PLMDT11, PLMAT11).
PM Port
PM Port
Figure 37: PLMPIV00 model connection
In parameter mode, the user can enter a rotary spring stiffness and a rotary dissipation. An
additional parameter for AMEAnimation can be set. It corresponds to the pin diameter
connecting two bodies together or one body to the ground. Figure 38 presents the menu
associated with the PLMPIV00 model.
Figure 38 : parameters of a pivot joint
4.2.2.2.2. Example:
Figure 39 shows an example of the pivot joint used to model a single pendulum. The
associated model is available in the “AMESim demo help” (See AMESim help menu).
Figure 39: using the PLMPIV00 model (see “PLMPIV00.ame”)
September 2004
Using the Planar Mechanical Library
49/107
Parameter settings:
Submodel name and type
2
4
5
GRAV0
Gravity
PLMPIV00
Pivot joint
PLMBOD01
Pivot joint
Belongs to
category
Mechanical
Principal simulation parameters
constant gravity value = 9.81 m/s/s
Planar Mechanical
damping coefficient = 0.1 Nm/(rev/min)
Planar Mechanical
x position at port 1 = -0.5m
Table 8: “PLMPIV00.ame” parameter settings
4.2.2.3. Driven pivot joint PLMPIV10:
Description
The pivot joint model PLMPIV10 is a three port model. For the ports connected to the
Planar mechanical library it has the same characteristic as PLMPIV0. The difference is
the additional port. This port allows the connection between the Planar mechanical
library and the rotary mechanical ports of AMESim. On this port, it is possible to connect
any source of torque coming from any AMESim library.
PM Port
PM Port
1D rotary mechanical port
rev/min
degree
rev/min/min
Nm
Figure 40: PLMPIV10 model connection
The driven and the non-driven pivot joint require the same parameters to be set. Figure 38
presents the menu associated to the PLMPIV10 model.
Example
To illustrate the use of the PLMPIV10 model, a rotary inertia (around z axis) with an
eccentric center of gravity is modeled. A constant torque is applied to the pivot joint on
the 1D mechanical port. The system parameter is given by Figure 41 and the model is
presented in Figure 42. This model is available in the “AMESim demo help” (See
AMESim help menu).
September 2004
Using the Planar Mechanical Library
50/107
y
R = 50mm
COG: 1mm
eccentricity
x
G
Mass = 10 Kg
Moment of inertia = 1/2*M*R2 = 0.5*10*(50e-3)^2 = 0.0125Kg*m2
Rotary dissipation in the joint = 1Nm/(rev/min)
Figure 41: example of centrifugal force on a bearing
The constant torque of 1000N.m combined with a rotary viscous friction of
1Nm/(rev/min) in the pivot joint gives almost a constant rotary speed of 1000rev/min. The
eccentricity effect (1mm) of the inertia generates forced oscillation in the shaft. The forces
in the rotary joint in both absolute directions (x and y) are plotted in Figure 42. A
stabilization run was used to generate the curves shown in Figure 42.
Figure 42: using the PLMPIV10 model (see “PLMPIV10.ame”)
Parameter settings:
Submodel name and type
1
2
5
Belongs to
category
Planar Mechanical
PLMASSEMBLY
Generate the assembly
Mechanical
GRAV0
Gravity
Planar Mechanical
PLMBOD01
Pivot joint
6
TROQC
Convert Sign 2 Torque
7
CONS0
Signal Control
Principal simulation parameters
No parameter to set
constant gravity value = 9.81 m/s/s
Signal Control
x position at port 1 = 0.001 m
moment of inertia around Gz axis =
0.5*10*(50e-3)^2 kgm**2
No parameter to set
Signal Control
constant value = 1000null
Table 9: “PLMPIV10.ame” parameter settings
September 2004
Using the Planar Mechanical Library
51/107
4.2.3. Prismatic joint
4.2.3.1. Introduction
The prismatic joint has one degree of freedom. It allows one translation. The
displacement perpendicular to the translation is blocked and the rotation around the z axis
is also blocked. The standard ISO 3952 representation is shown in Figure 43 and the
AMESim representation is shown in Figure 44.
S1
S2
or
Figure 43 : representation of a normalized prismatic joint
; Driven:
Non driven:
Figure 44 : representation of the AMESim prismatic joint
The equation of constraint:
Two degrees of freedom have to be blocked; we need two equations of constraint.
Mathematically the rotation is constrained by:
θ1 + α1 − θ 2 − α 2 = 0 (3)
With:
-
θ1 the absolute angular position of the body attached to port 1.
-
α1 the relative angular position of the prismatic axis on port 1.
-
θ2 the absolute angular position of the body attached to port 2.
-
α2 the relative angular position of the prismatic axis on port 2.
Figure 45 shows each of these angles.
September 2004
Using the Planar Mechanical Library
52/107
y2
Port 2
x2
G2
u2
θ2
α2
y1
Port 1
G1
x1
y0
u1
α1
θ1
x0
O0
Figure 45: definition of the equation of constraint
α1 and α2 are defined in the body models by the joint relative angular position. In the
ground model, the angle is defined as an absolute angle.
Figure 46: angle αi set in the body model (PLMBODxx)
Figure 47: angle θi set in the ground model (PLMEMB01)
The second equation of constraint that corresponds to the translation is mathematically
defined by:
r
( Port 1Port 2 ∧ u1 ) ⋅ z = 0
(4)
u1 = u 2
Port 1Port 2 = Port 1G1 + G1O 0 + O 0 G 2 + G 2 Port 2
Port1 Port 2 = − xr1 x1 − y r1 y1 − x1 x0 − y1 y0 + x2 x0 + y 2 y0 + xr 2 x2 + y r 2 y 2
September 2004
Using the Planar Mechanical Library
53/107
− sin θ 2 
cos θ 2 
 x2 − x1 
− sin θ1 
cos θ1 








Port1 Port 2 = − xr1  sin θ1  − y r1  cos θ1  +  y 2 − y1  + xr 2  sin θ 2  + y r 2  cos θ 2 
 0  R
 0  R
 0  R  0  R
 0  R
0
0
0
0
0
Equation (4) becomes:
r
( Port1 Port 2 ∧ ui ) ⋅ z =
 − xr1 * cos(θ1 ) + y r1 * sin(θ1 ) + x2 − x1 + xr 2 cos(θ 2 ) − y r 2 sin(θ 2 )  cos(θ1 + α 1 ) 0
− x * sin(θ ) − y * cos(θ ) + y − y + x sin(θ ) + y cos(θ ) ∧  sin(θ + α )  ⋅ 0
1
r1
1
2
1
r2
2
r2
2 
1
1   
 r1


 
 1
0
0
The second equation of constraint is defined by the following expression:
− x r1 sin(α1 ) + y r1 cos(α1 ) + ( x 2 − x1 ) sin(θ1 + α1 ) − ( y 2 − y1 ) cos(θ1 + α1 )
+ x r 2 sin(θ1 + α1 − θ2 ) − y r 2 cos(θ1 + α1 − θ 2 ) = 0( 2)
y2
Port 1
Port 2
x2
y1
α2
y0
G1 x
1
O0
G2
θ2
x0
Figure 48: prismatic joint after the constraint equation is solved
Important information
Some rules have to be respected when using the prismatic joint. A singular point is
reached when the distance between both points of the prismatic joint becomes zero
(distance between port1 and port2 (see Figure 48)). This distance has to be different
from zero. To avoid this situation, it is important to correctly setup the position of
each body connected to the translation joint.
September 2004
Using the Planar Mechanical Library
54/107
4.2.3.2. Non driven prismatic joint PLMTRA00
Description
The prismatic joint model PLMTRA00 is a two port model. This model can be connected
to PLMEMB00, the ground; it can be connected to any inertia model from the one port
body model to the ten port one PLMBOD01..PLMBOD10; it can be connected to any
sensor from the Planar mechanical library (PLMFT11 PLMVT11, PLMDT11,
PLMAT11).
PM Port
PM Port
Figure 49: PLMTRA00 joint model
In parameter mode, the user can enter a linear spring stiffness and a linear dissipation.
Figure 50 shows the menu associated with the PLMTRA00 model.
Figure 50: parameters of a prismatic joint
Example
The system parameter of PLMTRA00 model is very simple. One stiffness and a
dissipation can be set for this prismatic joint. The difficulty comes from the elements that
are connected to the PLMTRA00 model. As explained earlier in this paragraph, the
angles α1 and α2 (see equation of the prismatic joint above) are defined in the relative or
absolute reference. The following example illustrates the different configurations.
ALPHA1 in Figure 51 is an absolute angle and ALPHA2 is a relative angle. For
additional information about these angle rules check § 4.5.3 and § 4.3.
Figure 51: using the PLMTRA00 model (see “PLMTRA00.ame”)
September 2004
Using the Planar Mechanical Library
55/107
Parameter settings:
Submodel name and type
1
2
3
4
5
Belongs to
category
Planar Mechanical
PLMASSEMBLY
Generate the assembly
Mechanical
GRAV0
Gravity
Planar Mechanical
PLMEMB01
Ground
Planar Mechanical
PLMTRA00
Pivot joint
Planar Mechanical
PLMBOD01
Pivot joint
Principal simulation parameters
No parameter to set
constant gravity value = 0 m/s/s
absolute angular position of x axis =
ALPHA1
Default
x position at port 1= -0.5m
joint relative angular position at port 1=
ALPHA2
Table 10: “PLMTRA00.ame” parameter settings
Numerical values tested for ALPHA1 and ALPHA2:
Example 1 (Figure 52)
Example 2 (Figure 53)
Example 3 (Figure 54)
Example 4 (Figure 55)
ALPHA1
0°
0°
20°
-20°
ALPHA2
0°
-45°
0°
-45°
Table 11: set of parameters for ALPHA1 and ALPHA2 angles
Figure 52: ALPHA1 = 0°; ALPHA2 = 0°
ALPHA2=-45°
Figure 53: ALPHA1 = 0°; ALPHA2 = -45°
September 2004
Using the Planar Mechanical Library
56/107
ALPHA1=+20
Figure 54: ALPHA1 = 20°; ALPHA2 = 0°
ALPHA1=-20
ALPHA2=-45°
Figure 55: ALPHA1 = -20°; ALPHA2 = -45°
4.2.3.3. Driven prismatic joint PLMTRA10
Description
The prismatic joint model PLMTRA10 is a three port model. For the ports connected to
the Planar mechanical library it has the same characteristic as PLMTRA00. The
difference has to do with the additional port. This port allows the connection between the
Planar mechanical library and the linear mechanical ports of AMESim. At this port it is
possible to connect any source of force coming from any AMESim library.
N
m
m/s
m/s/s
1D linear mechanical port
PM Port
PM Port
Figure 56: PLMTRA10 model connection
The driven and the non-driven pivot joint require the same parameters to be set. Figure 50
shows the menu associated with the PLMTRA10 & PLMTRA00 model.
September 2004
Using the Planar Mechanical Library
57/107
Example
This example shows how to use the prismatic joint to model a mass plus spring system on
a slope. The one dimensional port of the prismatic joint model is connected in the example
to a mass plus spring model from the standard mechanical library of AMESim (1D). This
port can accept any model delivering a force. In many applications it could be a jack from
the hydraulic library.
M=20Kg
J=0.01Kg.m2
O1
K=10000N/m
α = [0, 30°, 60°, 90°]
y0
O0
x0
Damping coefficient40%
Figure 57: mass on a slope
The associated AMESim model is presented on Figure 58. This model
(“PLMTRA10.ame”) is available in the AMESim demo help. A batch run has been setup
to run the model for different inclinations.
Figure 58: model of a mass on a slope using the PLMTRA10 model combined with a
spring plus damper model (see “PLMTRA10.ame”)
September 2004
Using the Planar Mechanical Library
58/107
Parameter settings:
Submodel name and type
2
3
4
5
6
GRAV0
Gravity
PLMEMB01
Ground
PLMTRA10
Pivot joint
PLMBOD01
Pivot joint
SD0000
Mechanical spring
Belongs to
category
Mechanical
Planar Mechanical
Planar Mechanical
Planar Mechanical
Mechanical
Principal simulation parameters
constant gravity value = 9.81 m/s/s
absolute angular position of x axis =
ALPHA
damping coefficient = 0N/(m/s)
O: initial absolute x position = 0.1m
x position at port 1 = 0.1m
mass = 20kg
spring rate = 10000N/m
damper rating =
2*0.4*sqrt(10000*20)N/(m/s)
Table 12: “PLMTRA10.ame” parameter settings
The following figure shows the results of a batch run. Four runs were completed, each
corresponding to a different inclination [0°, 30°, 60°, 90°] of the mass plus spring system.
The inclination has been setup in the ground model (PLMEMB01).
The analytic calculation of the spring force is Fspring = M*g*sin(α). With a mass of
20Kg we get the following static forces:
Fspring(0°)=0N ; Fspring(30°)=98.1N ; Fspring(60°)=169.91N ; Fspring(90°)=196.2N
The dynamic response of the model is given in Figure 59.
Figure 59: spring force for four slope angles
September 2004
Using the Planar Mechanical Library
59/107
4.2.4. The slotted link joint PLMTRPI00
4.2.4.1. Introduction
The slotted joint is a combination of one pivot joint and one prismatic joint. It allows two
degrees of freedom, one in the direction of the prismatic joint and one rotation in the pivot
joint. The translation perpendicular to the prismatic joint is not allowed; it corresponds to
the degree of freedom that is blocked. This model exists only in a non-driven version. Its
name is PLMTRPI00. A typical use of it is the connection between a piston and a
connecting rod. We need a prismatic joint on the piston side and a pivot one on the
connecting rod side. The AMESim representation of this model is shown in Figure 60.
Non driven:
Figure 60: representation of the AMESim slotted joint
The equation of constraint:
The joint has one degree of freedom blocked; we need one equation of constraint. The
mathematical expression of this constraint is given by equation (5):
( Port1Port 2 ⋅ u i ) = 0
(5)
The following figure gives the parameters necessary to write the equation of constraint.
y2
Port 2
x2
θ2
G2
y1
G1
Port 1
x1
y0
ui
α1
θ1
O0
x0
Figure 61: definition of the equation of constraint
September 2004
Using the Planar Mechanical Library
60/107
With:
-
θ1 the absolute angular position of the body attached to port 1.
-
α1 the relative angular position of the prismatic axis on port 1.
-
θ2 the absolute angular position of the body attached to port 2.
Port 1Port 2 = Port 1G1 + G1O 0 + O 0 G 2 + G 2 Port 2
Port1 Port 2 = − xr1 x1 − y r1 y1 − x1 x0 − y1 y0 + x2 x0 + y 2 y0 + xr 2 x2 + y r 2 y 2
cos θ1 
− sin θ1 
 x2 − x1 
cos θ 2 
− sin θ 2 








Port1 Port 2 = − xr1  sin θ1  − y r1  cos θ1  +  y2 − y1  + xr 2  sin θ 2  + yr 2  cos θ 2 
 0  R
 0  R  0  R
 0  R
 0  R
0
0
0
0
0
Equation (5) becomes:
( Port1 Port 2 ⋅ u i ) =
 − x r1 * cos(θ1 ) + y r1 * sin(θ1 ) + x 2 − x 1 + x r 2 cos(θ 2 ) − y r 2 sin(θ 2 ) cos(θ1 + α1 )
 − x * sin(θ ) − y * cos(θ ) + y − y + x sin(θ ) + y cos(θ )  ⋅  sin(θ + α ) 
1
r1
1
2
1
r2
2
r2
2  
1
1 
 r1

 

0
0
The equation of constraint is then:
− x r1 sin( α1 ) + y r1 cos( α1 ) + ( x 2 − x 1 ) sin( θ1 + α1 ) − ( y 2 − y1 ) cos( θ1 + α1 ) + x r 2 sin( θ1 + α1 − θ 2 )
− y r 2 cos( θ1 + α1 − θ 2 ) = 0
y2
Port 1
y1
Port 2
x2
x1
y0
G2
θ2
G1
x0
α1
O0
Figure 62: slotted joint
On the prismatic side, the joint respects the same rules as the prismatic joint. The
definition of the angle α1 or θ1 depends on the connected element: body or ground model
(see Figure 46 and Figure 47).
September 2004
Using the Planar Mechanical Library
61/107
4.2.4.2. Parameters
The slotted joint model PLMTRPI00 is a two port model. This model can be connected
to PLMEMB00, the ground; it can be connected to any inertia model from the one port
body model to the ten port one PLMBOD01..PLMBOD10; it can be connected to any
sensor from the Planar mechanical library (PLMFT11 PLMVT11, PLMDT11,
PLMAT11).
PM Port
PM Port
Figure 63: PLMTRPI00 joint model
In parameter mode, the user can enter a linear spring plus damper on the translation side
of the joint and a rotary spring plus damper on the pivot joint side. Figure 64 shows the
menu associated with the PLMTRPI00 model.
Figure 64: parameters of a slotted link
4.2.4.3. Example
This example is used to illustrate the use of the slotted joint model PLMTRPI00 and is
shown in Figure 65. The slotted joint is connected to ground on the prismatic side and to a
body on the pivot side. The body consists of a bar connected to the slotted joint. A torque
is applied on one end of the bar in order to create a rotary displacement of the body. The
torque also creates a displacement of the bar in the direction of the prismatic joint.
September 2004
Using the Planar Mechanical Library
62/107
40mm
y0
Mouvement :
25mm
x0
O0
T: constant torque
Mass=10kg
J=0.01kgm2
T
50mm
y1
x1
cog
A
Figure 65: two degrees of freedom exist with one translation and one rotation
The AMESim model of the system above is shown in the following figure
(“PLMTRPI00.ame”). This model is available in the AMESim demo help.
Figure 66: model of a mass attached to a slotted joint PLMTRPI00 (see
“PLMTRPI00.ame”)
The following picture shows the displacement of point A Figure 65 in the xy plane. The
slotted joint allows the two degrees of freedom we were expecting.
Parameter settings:
Submodel name and type
2
4
GRAV0
Gravity
PLMTRPI00
Pivot joint
September 2004
Belongs to
category
Mechanical
Planar Mechanical
Principal simulation parameters
constant gravity value = 9.81 m/s/s
damping coefficient (prismatic joint) =
5N/(m/s)
damping coefficient (revolute joint) =
5N/(m/s)
Using the Planar Mechanical Library
63/107
5
PLMBOD01
Pivot joint
Planar Mechanical
6
PLMFOR00
Mechanical spring
SIN0
Mechanical spring
CONS0
Mechanical spring
CONS0
Mechanical spring
Planar Mechanical
7
8
9
initial absolute angular position = -110
degree
O: initial absolute x position = 0.04m
G: x position = 0.025m
x position at port 2 = 0.05m
mass = 10kg
Default
Signal
sine wave amplitude = 100null
Signal
constant value = 0null
Signal
constant value = 0null
Table 13: “PLMTRPI00.ame” parameter settings
Figure 67: displacement of point A in the xy plane
4.2.5. Driven composite joint PLMJ00
4.2.5.1. Introduction
The composite joint PLMJ00 is used to model a jack. It is a three port model. Two ports
are dedicated to the Planar mechanical library and one port is used for the connection to
the standard AMESim mechanical submodels. The planar mechanical ports can be
connected to a body model (PLMBOD01 …PLMBOD10) or to the ground
(PLMEMB01). The inputs on the planar mechanical ports are the velocity, position and
acceleration of the bodies in the direction of the cylinder displacement.
September 2004
Using the Planar Mechanical Library
64/107
From this information, the model calculates the relative velocities, positions and
acceleration of the jack. This information is then sent to the one dimensional port (‘linear
mechanical port’ see Figure 68). The input from the linear mechanical port is a force
that is sent to the two planar mechanical ports.
N
m
m/s
m/s/s
1D linear mechanical port
PM Port
PM Port
Figure 68: PLMJ00 model connection
4.2.5.2. Parameters
Three parameters have to be set for this model. The first one ‘free length of the actuator’
corresponds to the distance in between the two connection points of the cylinder when the
rod is all the way in (see Figure 69). If this parameter is set to 0, then the distance sent to
the linear mechanical port is the distance between the two connection points of the
cylinder. If the parameter is different from zero then the distance sent to the linear
mechanical port is the current distance between both cylinder connection ports minus the
value set in ‘free length of the actuator’. This parameter is also used for the visualization
tool to draw a cylinder. Two other parameters have to be set. They correspond to the
‘piston diameter’ and the ‘rod diameter’. They are only used for the visualization tool
AMEAnimation. It is important to understand that these last two parameters are not used
for modeling calculations.
‘rod diameter (for AMEAnimation)’
‘piston diameter (for AMEAnimation)’
Free length of the actuator
Figure 69: definition of the composite joint parameter
Figure 70 shows the parameters of the PLMJ00 model. The ‘piston diameter’ will be
drawn on port 3 side of the icon and the ‘diameter or rod’ will be drawn on the port 1 side.
September 2004
Using the Planar Mechanical Library
65/107
‘diameter of rod’
defined for port 1
‘piston diameter’
defined for port 3
Figure 70: parameters of an actuator
4.2.5.3. Example
The example used to illustrate the use of the slotted joint model PLMJ00 is shown in
Figure 71. It is a horizontal arm attached to the ground on the left with a pivot joint and
attached to spring that is used to compensate the gravitational force.
0.2m
0.8m
0.5m
P02
y1
y0
x1
O1
O0
0.25m
x0
P01
M*g
θ=20°
Mass=100Kg
J=0.01kg.m2
Figure 71: mechanical arm represented by a spring
The model of the system in Figure 71 is shown in Figure 72. . The composite joint
PLMJ00 is used to model the force in the direction of the spring. The stiffness is modeled
by a standard AMESim spring plus damper model. It is recommended to use the
“SD0000” model that includes a state variable. An example on how to combine the
Planar mechanical library and the standard one-dimensional library is presented in
paragraph 3.1. In the current example a stabilizing run has been used to calculate the
equilibrium of the system in its initial position (body angle =0°). A force of 4086.32N is
necessary to represent the arm at its initial position.
September 2004
Using the Planar Mechanical Library
66/107
Figure 72: model of a mechanical arm using the composite joint PLMJ00 (see
“PLMJ00.ame”)
Parameter settings:
Submodel name and type
2
4
5
6
7
8
GRAV0
Gravity
PLMJ00
Driven composite
joint
PLMBOD03
Three ports body
PLMPIV00
Pivot joint
PLMEMB01
Ground
SD0000
Mechanical spring
Belongs to
category
Mechanical
Planar Mechanical
Principal simulation parameters
constant gravity value = 9.81 m/s/s
Planar Mechanical
free length of the actuator = 0.2m
piston diameter (for animation) = 0.05m
rod diameter (for animation) = 0.07m
x position at port 1 = 0.2m
x position at port 2 = -0.5m
x position at port 3 = -0.8m
mass = 100kg
Default
Planar Mechanical
absolute y position at port 1 = -0.25m
Planar Mechanical
Signal
spring rate = 100000N/m
damper rating = 4000N/(m/s)
Table 14: “PLMTJ00.ame” parameter settings
The following figure shows the visualization of the model (‘PLMJ00.ame’) above. The
animation of this mechanism will provide no movement of the body if the stabilizing run
option is selected.
Static force calculated
by AMESim=4086.32N
Figure 73: visualization of the previous model inside AMEAnimation
September 2004
Using the Planar Mechanical Library
67/107
4.3. The bodies
4.3.1. Description of the body model
The body model of the Planar mechanical library computes (in translation and rotation):
the velocities, the accelerations and the positions according to the forces and torques
applied on it (Newton’s law). The two equations computed in this model are shown
below. Figure 74 shows the causality rules of this type of element.
r
∑ FExternal _ Forces =M ⋅ γ
Nb _ ports
∑ (− Fx i ⋅ Yi + Fy i ⋅ X i ) = J ⋅ &θ&
(6)
i =1
N & N.m
N & N.m
m & rd
Joint
m & rd
m/s & rd/s
Body
model
m/s/s &rd/s/s
m/s & rd/s
Joint
m/s/s &rd/s/s
Figure 74 : causality of a body model
Seven models of bodies are available in the library from the one port to the six ports and
an additional one with ten ports (PLMBOD0X to PLMBOD10 see Table 1). Each port
can be used either as a pure external force on the body or can be connected to any type of
joint (see §4.2). The information needed by the model to specify a port is the x and y
position of the port in a local or absolute reference (see §4.3.2). The coordinate system has
been defined to have the translations in the [x, y] plane and the rotation around the z axis
(see Figure 32). Two inertia inputs are necessary for the model: the mass and the moment
of inertia at the center of gravity around the Z axis. The gravity is also a parameter that
can be changed using the zero port icon “GRAV0” from the standard one dimensional
mechanical library. It is very useful to set it to zero for kinematic or geometric analysis.
The gravity is always defined on the y Axis.
Each body has three degrees of freedom, two in translation and one in rotation. The total
number of DOF if the system has no constraint (no joint) is:
Number_of_DOF = 3·Number_of_Bodies
The total number of DOF of a planar mechanical system depends on the number of bodies
and the type of joint. In paragraph 4.2.1 we have seen how to define the number of DOF
constrained by the joints.
F = 3·N – M
(2)
F: number of DOF of a planar mechanical system,
N: number of bodies
M: number of constraint equations (see Table 7 and definition of M in §4.2.1)
September 2004
Using the Planar Mechanical Library
68/107
It is very important to know the number of DOF of your system in order to correctly setup the constraints (see § 4.3.4). If too many constraints are set-up, the assembly module of
the Planar mechanical library could have problems finding a solution or no solution will
be found.
4.3.2. Coordinate system
Two types of coordinate systems are used in the Planar mechanical library. One is the
absolute coordinate system defined by the x0, y0 axis and its origin O0 (see Figure 75). The
second origin is the one that is attached to the body(OI). The body coordinate system is
defined by the xi, yi axis and its origin Oi. The position of Oi is always defined in the
absolute coordinate system (O0). On Figure 75 the position of the body origin is defined
by xOi and yOi. The angular position of the body reference is also defined in the absolute
coordinate system by θi.
yi
xi
G
Oi
θi
y0
yOi
xOi
x0
O0
Figure 75: definition of the body origin in the absolute coordinate system
The position of the body reference has been defined ([xOi; yOi; θi]). Now we are going to
explain how to define the coordinate of the connecting points of a body. Each connecting
point corresponds to a port of a body icon. It is defined by two coordinates: x and y. The
user has two options to define the coordinates of a body connecting point. It can be
defined in relative coordinates as in Figure 76 or in absolute coordinates as in Figure 77.
yi
Port 2
yi1
xi
Oi
G
θi
y0
yi2
yiG
xiG
Port 1
xi1
xi2
O0
x0
Figure 76: connecting points coordinates in the body reference (relative coordinate)
In relative coordinates, the ports and the COG are defined in the Oi [xi ; yi] reference
frame (see Figure 76). In absolute coordinates, they are defined in the O0 [x0 ; y0]
reference frame. The choice of relative or absolute coordinates for the definition of the
connecting points depends on the data available. If the user has a blue print of each
September 2004
Using the Planar Mechanical Library
69/107
separate part, it will be easier to set up the dimension into the body icon in relative
coordinates. If the data available is the drawing of the assembled system, with all the
information given in one reference, it will be easier to set up the data using the absolute
coordinate facilities. The Oi origin is then not used anymore. The position of Oi can be set
to zero. The angle is still used to orient the body.
x02
yi
Port 2
Port 1
xi
Oi
G
θi
y0
y02
y01
x0G
y0G
x01
O0
x0
Figure 77: definition of the connecting points coordinate in the absolute reference
(absolute coordinate)
4.3.3. Parameters
This paragraph explains the different parameters to be set in the body models. Table 15
includes a list of these parameters. The first column gives the title, the second one the
default value, the third the units. The fifth column does not appear in the AMESim
dialog box window as it is only used to help the explanation. As mentioned previously,
seven models of bodies are available. All of these models have the same parameters.
Their numbers vary only with the number of ports. In other words the more connecting
points you have on a body the more coordinates you have to set-up.
Body models: PLMBOD01, 02, 03, 04, 05, 06, 10
Title
#artificial depth (Z) for AMEViewer
reference frame index
use optional contour file
coordinates reference
absolute starting angular position
initial absolute angular position
O: initial absolute x position
O: initial absolute y position
initial absolute angular velocity
O: initial absolute x velocity
O: initial absolute y velocity
G: x position
G: y position
x position at port 1
y position at port 1
joint relative angular position at port 1
…
x position at port n
y position at port n
joint relative angular position at port n
mass
moment of inertia around Gz axis
filename for contour
September 2004
Value
0
0
yes / no
Relat/absol
0
0
0
0
0
0
0
0
0
0
0
0
…
0
0
0
1
0.01
contour.dat
Unit
m
null
null
null
degree
degree
m
m
rad/s
m/s
m/s
m
m
m
m
degree
…
m
m
degree
kg
kgm**2
Table 15: parameters to be set in a body model
Using the Planar Mechanical Library
1
Not used
2
3
4
5
6 port 1
6 port n
7
8
2’
70/107
As noted previously, the library includes seven body models. The only difference between
those models is the number of ports. The description of the port parameters is done once.
It will be the same for the other ports. The body parameters defined in Table 15 can be
divided into height topics (1 … 8). These topics are presented below.
1 Although the Planar mechanical library is used to model mechanical systems in two
dimensions, the visualization tool of AMESim (AMEAnimation) has the capability to
draw a system in three dimensions. The first parameter “artificial depth (Z) for
AMEAnimation” is used to draw a body in a plane parallel to the standard x, y plane
of the Planar mechanical library. It is very useful when several bodies are close to
each other to correctly visualize each of them.
x0
O0
z0
Artificial depth (Z direction) for
Used with AMEAnimation
Figure 78: effect of the “artificial depth …” parameter in AMEAnimation
The “artificial depth (Z) for AMEAnimation” parameter is also used in the ground
model PLMEMB01.
2 Topic number two is also used for the AMEAnimation. It allows entering a contour for
the body shape. When “use optional contour file” is set to “no” then the contour of
the body is automatically done using the connecting point of the body. In some cases
the shape found by the algorithm is not acceptable. In that case the user can specify a
contour. The parameter “use optional contour file” is then set to “yes”. By selecting
“yes” a new parameter is added at the end of the parameter list (see last line of Table
15). This parameter is named “filename for contour”. The user will have to enter the
coordinates of the contour in a text file or using the AMESim table editor facility in
the horizontal tool bar
AMEsim manual.
. For more details about the table editor refer to the
Example:
Step 1: define a set of points using the AMESim table editor as shown in Table 16
Table 16: using the table editor to define a body contour
September 2004
Using the Planar Mechanical Library
71/107
It is important to know that the contour origin is considered at the body reference
(see point Oi Figure 74). If an initial angle is set for the body, (see topic 3) then the
contour points will be rotated as well.
Step 2: Save the coordinates of the contour in a data file using the save facility of the
table editor and give a name such as “contour.dat” to this file.
Step 3: In your AMESim model select the body you want to apply this contour to.
Turn the “use optional contour file” parameter to “yes” as shown below.
Step 4: In the last parameter of the body parameter list “filename for contour”
select the contour filename “contour.dat” created in step 1.
Step 5: You can now run the simulation of your system and open the
. Then select using file menu the
“AMEAnimation” module of AMESim
“.result” file associated with your AMESim model (for more information about
“AMEAnimation” refer to its documentation § 0). Figure 79 shows the body shape
you will obtain in “AMEAnimation”.
Figure 79: example of the body contour facility
3 The topic number three includes three parameters. These determine the type of
coordinate system the user can select.
The first parameter “coordinates reference” is set to “relative” (default value). The
relative coordinate system is then selected; the connecting points of the body and the
center of gravity are defined in the body reference (see Figure 76). In that
configuration the second parameter of the topic 3 “absolute starting angular
position” does not appear in the menu, the initial angular position of the body is then
defined by the third parameter of the topic 3 “initial absolute angular position”.
September 2004
Using the Planar Mechanical Library
72/107
Figure 80: menu corresponding to option set to “relative”
If the parameter “coordinates reference” is set to “absolute” the absolute coordinate
system is activated. Then the second parameter is used to orient the body reference.
We recommend to look at the examples presented Figure 87 to Figure 91.
When drawing data is available in the absolute reference, then the body angular
position is often not available or it is not the one desired by the user. In that case; the
third parameter of the topic 3 “absolute starting angular position” is then used to
orient the body in the desired angular position.
The use of the relative coordinate system is quite simple. When using the absolute
coordinate system it can be a little bit confusing. In order to help the user to
understand; an example with all the possible configurations is given in §4.3.5. This
example is associated with the model “PLMBOD02.ame” of the Planar mechanical
library demo help.
4 Topic four has five parameters. The first two parameters correspond to the position of
the body reference (see Oi Figure 75). These two parameters are only available when
using the relative coordinate system. The three other parameters correspond to the
initial velocities at the body origin. One rotary velocity around the z axis and two
linear velocities one on the x axis; the other one on the y axis.
5 Topic five corresponds to the position of the center of gravity (COG). This position can
be defined either in relative or absolute coordinates.
6 Topic six corresponds to the parameters to be set for the connecting points (ports of the
model). Three parameters have to be set per connecting point. Each connecting point
corresponds to a port. The first two parameters correspond to the coordinates of the
connecting point; it can be defined either in relative or absolute coordinates. The third
one is used when a prismatic joint is connected to the port. It allows input of an
angle between the body reference and the prismatic joint. An example is shown in
§4.2.3.2 Figure 51 to Figure 55.
7 Topic seven corresponds to the mass of the body in kg.
8 Topic eight corresponds to the rotary inertia of the body around the z axis. Inertia
formulas for basic shapes are provided in the appendix of this document.
We strongly recommend looking at the examples in §4.3.5 to get more comfortable with
the body models.
4.3.4. Imposing constraints to a body
The constraint corresponds to the state variable we can block or leave free. Each body has
six state variables: two linear displacements and one angular displacement; two linear
velocities and one angular one. The state variables of a body are calculated at the center of
gravity. The parameters used to setup the state variables are shown in Figure 81. The blue
frame corresponds to the velocities and the red to the displacements.
September 2004
Using the Planar Mechanical Library
73/107
Figure 81: the accessible initial conditions are shown in the boxes
It is very important to understand that it is not possible to respect all the initial conditions
set in the parameter mode. Actually the number of state variables that can be respected is
limited by the degrees of freedom of the system. If we take, as an example, a single
pendulum, we have three degree of freedom for the body, but the pivot joint constrains
two of these DOF. In that case only one state variable can be locked. The principal is the
same for the velocities; only one velocity state variable can be locked. In order to indicate
to AMESim which state variable to lock, use the “View lock state” feature of AMESim.
or in Simulation
mode, right click on body model and
Either in Parameter
select the “View lock state” (see also Figure 82).
Six state variables per body
Figure 82: state variable lockable
If the number of constraints (locked states) is more than the DOF of the system, then the
system is over constrained. Another example is the QUADRORHOMB mechanism. This
mechanism has 13 bodies and 19 pivot joints. The number of DOF is given by equation
(6) § 4.3.1.
F = 3·N – M
F = 3 · 13 - 2 · 19 = 1
This QUADRORHOMB model has one degree of freedom. One constraint in angle has
been set and one in rotary velocity. Figure 83 presents the QUAQRORHOM model; the
horizontal bar is the one that has the two constraints. The velocities of each body ( θ& , x& , y& )
depends on the rotary velocity set on the horizontal bar. The QUAQRORHOM can be
loaded in the demo help section of the Planar mechanical library.
September 2004
Using the Planar Mechanical Library
74/107
Figure 83: lock state example using the QUADRORHOMB model in the application
demo help menu of AMESim (see “Quadrorhomb.ame”)
4.3.5. Example
The purpose of this example is to introduce the different ways of using the relative and
absolute coordinate systems of the Planar mechanical library. The example used is a
single pendulum model. The drawing of this system is shown in Figure 84. The data to be
set in the relative coordinate system are in blue. The data to be set in absolute coordinates
are in green. For all the simulations done with this model, the angular position state
variable is locked (see “absolute angular position” Figure 82). All the following
examples can be loaded from the Planar mechanical library demo help (model
“PLMBOD02.ame”).
0.5m
y0
y1
Mass=100kg
J=0.01kgm2
y1
O1
O0
x1
x0
xO1 = 0.5·cos(20°)
x1
M*g
yO1
θ1 = 20°
yO1 = 0.5·sin(20°)
Figure 84: single pendulum model used to explain the relative and absolute
coordinate system rules
Objective:
From the data available in Figure 84 we want to start the pendulum in an angular position
corresponding to θ1=45°. Also we assume the center of gravity to be at the same place as
point O1.
Relative coordinate:
Figure 85 gives the parameter set for the relative coordinate system. The body origin O1
can be set to (xO1, y01). The position of port 1 in the x direction is –0.5m and the angular
position of the body (+45° see Figure 87). In this figure the two parameters used are
marked with a red circle. With this set of parameters, we get the result presented on Figure
September 2004
Using the Planar Mechanical Library
75/107
91 “Example 1”. The body has an angle of 45° with the x0 axis and the local reference
(see yellow arrow on the Figure 91) has an inclination of 45°.
Figure 85: setting the parameters in the relative coordinate system (see
“PLMBOD02.ame”)
Absolute coordinate:
Now we are going to see how to set up the body data in absolute coordinates. In order to
see the influence of the different parameters we are going to reach the target (target =
initial angular position of the body at 45°) step by step. First we are going to set the
position of the system. As it is shown in Figure 84 the data we have gives an angle of 20°
between the x1 axis and the absolute x0 axis. Figure 86 shows that port 1 is connected to
the pivot joint. The coordinates of this port are the same as the ground (xPort1=0 ;
yPort1=0). The position of port 2 is assumed to be at the same place as the center of
gravity they both get the value of x01 and y01 see Figure 84. The body origin is not used
when the absolute coordinate system is selected.
Figure 86: setting the parameters in the absolute coordinate system (see
“PLMBOD02.ame”)
The parameter “coordinates reference” is set to “ABSOLUTE”. If we set the angles as
shown in Figure 88 we get results corresponding to “example2” of Figure 91. The
dimensions of the body are correct and the starting angle corresponds to 20° like the one
defined on the initial drawing. We can see that the body reference located at the center of
gravity has no inclination. This is because of the “absolute starting angular position”
that is set to zero degrees. If we set this value to 20° as was done in Figure 89 we get the
result presented by “example 3”. The reference of the body is now collinear with the
beam x1 axis (see Figure 84) but the “initial absolute angular position” constraint the
body to zero degree. The correct answer is: “absolute starting angular position” is set to
20° and the “initial absolute angular position” is set to 45°. The set of parameters given
by Figure 87 and the one given by Figure 90 provides the same initial conditions for the
body. The difference comes from the parameter settings.
Obviously the relative coordinate system is easier to understand. Nevertheless when all
the data available are in absolute reference, as is often the case in automotive industries,
the absolute coordinate system avoids a lot of manual calculation.
September 2004
Using the Planar Mechanical Library
76/107
Figure 87: relative coordinate (example 1)
Figure 88: absolute coordinate (example 2)
Figure 89: absolute coordinate (example 3)
Figure 90: absolute coordinate (example 4)
Example 1
Example 2
Example 3
Example 4
Figure 91: example of the Relative/Absolute coordinate system (see
“PLMBOD02.ame”)
4.4. The assembly icon
The assembly submodel “PLMASSEMBLY” is associated with the zero port icon shown
in Figure 92. This submodel is used to calculate the position of each body according to the
type of joints in between the bodies (see § 4.2) and the type of constraint (state variables
locked see § 4.3.4). It also calculates the animation of the mechanical system according to
the rotary and linear velocity constraints. When the absolute coordinate system is selected,
the joint coordinates entered in each body correspond automatically to the system in its
assembled configuration. In that case the assembly model is not really necessary. The
assembly module is very important when the relative coordinate system is selected. In this
case only the coordinates of the connecting points have to be set. It is not necessary to
provide the absolute coordinates of the body origin (see point Oi Figure 75). The assembly
module locates it and sends the correct initial position and velocities back to each body
model. The assembly icon does not require any parameter. It just has to be on the model
sketch.
September 2004
Using the Planar Mechanical Library
77/107
Figure 92: assembly submodel “PLMASSEMBLY”
The bodies’ initial position and initial velocities are calculated with a Newton-Raphson
method. A Jacobien matrix has to be built. Its parameters are constant and depend on the
geometry of the system and the constraints (geometric and kinematic). Before going
through any submodel initialization, as is the case in the standard AMESim procedure, the
assembly icon communicates with the Planar mechanical library submodels. In this first
step the assembly module retrieves information from the Planar mechanical library
submodels such as the number of bodies; the position of the connecting points; the type of
connections in-between each body; the position of the different grounds and a list of the
variables that have been constrained by the user. The blue arrows on Figure 93 represent
this first step of the assembly. From these data we build the Jacobien. Before solving the
system the assembly module checks if the system has: sufficient constraint, insufficient
constraint or redundant constraint. If the system has sufficient constraint, then this means
that the number of constraints is equal to the number of DOF. The system is then easy to
solve. If the system has insufficient constraints, it is possible to solve the system but the
initial position found by the Generalized Newton could be surprising in some cases. In
that case it is recommended to help the assembly module to find a solution in the desired
position by setting up the bodies’ angle close to where they should be (our experience
shows that the position of Oi can be set to O0). If the system has redundant constraints, it
is not possible to solve it and an error message appears. Figure 94 shows the error
message that is returned when too many constraints are set for a pendulum example.
In blue each icon of the PLM library sends information to the Assembly module.
In red the assembly module send the right body position and angle.
Figure 93: communication between the assembly icon and the Planar mechanical
library models
The pendulum has one degree of freedom and three constraints are imposed. The error
message returned is: ”There are 2 redundant constants” (see Figure 94). Once the
Newton-Raphson has been solved the initial positions (x and y) of the COG and the
angular position of the body are send back to the bodies (see red arrow on Figure 93). The
initial values set by the user are not used anymore. The standard AMESim run is then
started.
September 2004
Using the Planar Mechanical Library
78/107
Figure 94: example of a system with redundant constraints (see
“PLMASSEMBLY.ame”)
4.5. The sources
Like the one-dimensional library of AMESim, the Planar mechanical library contains two
types of sources. There are two models for force sources and one model for velocity
source. The PLMZER00 and PLMFOR00 sources correspond to force sources and the
PLMEMB01 model is a velocity source.
4.5.1. Zero force source PLMZER00
The PLMZER00 submodel is a zero force source. Its icon is shown in Figure 95. No
parameters are necessary for this model. This model provides a zero force source on the x
and y direction and a zero torque source on the z axis. This model can be directly
connected to a body or to any sensors.
Icon:
Causality:
Figure 95: AMESim icon of the zero force source
4.5.2. Torque and force sources PLMFOR00
Compared to the previous model PLMZER00, the PLMFOR00 model provides a nonnull force or torque source. The forces on the x and y axis and the torque on the z axis can
be provided by an external signal. The icon of this model is shown in Figure 96. On one
side (port 1, 2 and 3) the model is connected to models coming from the signal library of
September 2004
Using the Planar Mechanical Library
79/107
AMESim. On the other side (port 4) the icon is connected to the Planar mechanical
library, to bodies or sensors.
Icone:
Causality:
Figure 96: AMESim icon used to transfer three signals into one torque and two
forces
Two parameters can to be set for this model. Both of these parameters concern the forces.
The external forces can be set in the absolute or relative reference. Figure 97 shows the
two parameters to be set.
Figure 97: parameters of a null to torque and force source
The first parameter gives two options. If this parameter is set to zero then the force is
applied in the absolute reference. The force on x will be horizontal and the one on y will
be vertical. No options are given concerning to the angular position of the force direction.
This means that the second option is not used when the first parameter is set to zero.
If the first parameter is set to one then the force is applied in the body reference (see
Figure 76). If no angle is provided to the second parameter (0°) the force Fx is applied on
the body reference in the x axis direction and the Fy force in the y axis direction of the
body reference. If one angle is set then both forces inputs will be rotated in the local body
reference. Four tests are used to illustrate the use of the different parameters. These tests
are summarized in the following table. We consider a force different than zero on the xaxis and zero force on the y-axis input of the model.
0 for projection in absolute, 1 for projection in relative frame
offset for relative frame rotation
A
0
0
B
1
0
C
1
45
D
1
90
Table 17: four configurations to check the parameters (A, B, C, D)
The force Fx corresponding to the A, B, C and D setting is shown in Figure 98. This force
is shown as blue. If we consider the case D, we could set the first parameter “0 for
projection in absolute, 1 for projection in relative frame” to one and the second one to
90° with a force applied on the Fy input of the model.
September 2004
Using the Planar Mechanical Library
80/107
A
B
y0
y0
O1
FxO1
O1
FxO0
x0
x0
Point where the external force is applied
C
D
FxO1
FxO1
y0
y0
θ1 = 45°
O1
θ1 = 90°
O1
x0
x0
Figure 98: example used to explain the parameters of PLMFOR00 submodel
4.5.3. The zero velocity source or ground PLMEMB01
The PLMEMB01 submodel (see Figure 99) is a source model. This model provides a
zero velocity source and zero acceleration source to the model attached to its port. The
position of the ground is set by the user in the parameter mode of AMESim. It is also
possible to set an angular position of the ground. This value will be taken into account
only when the ground model is connected to a prismatic joint (model PLMTRA00
§4.2.3.2 or PLMTRA10 §4.2.3.3) or a slotted joint (model PLMTRPI00 §4.2.4). If the
ground is connected to a rotary joint then the angle is not taken into account.
Figure 99: AMESim icon of the zero force source
The following table gives the parameters of this model. These parameters are explained
later (see points 1 2 3).
Ground models: PLMEMB01
Title
Value
Unit
# absolute angular position of x axis
0
degree
# absolute x position at port 1
0
m
# absolute y position at port 1
0
m
# artificial depth (Z) for animation
0
m
1
2
3
Table 18: parameter to be set in the ground icon
September 2004
Using the Planar Mechanical Library
81/107
1 The first parameter “# absolute angular position of x axis” has an effect on the
simulation when the ground is connected to a translation joint (PLMTRA00,
PLMTRA10, PLMTRPI00). An example is given in paragraph 0 page 58. Figure 51
to Figure 55 give an explanation of how to use this parameter.
2 The second parameter set “# absolute x position at port 1” and “# absolute y position
at port 1” is used to give the position of the ground icon in the x, y plane. On the
following figure the model has two grounds. One is located on the absolute origin; the
values are x=0 and y=0. The second ground icon is located at x=0.05m and y=-0.25m.
Figure 100: example of the ground parameter settings (see “PLMEMB01.ame”)
Parameter settings: (Table 19 gives modification compare to the parameters of Table 14)
Submodel name and type
3
5
7
PLMEMB01
Ground
PLMBOD03
Three ports body
PLMEMB01
Ground
Belongs to
category
Planar Mechanical
Planar Mechanical
Planar Mechanical
Principal simulation parameters
Default
x position at port 2 = -0.5m
x position at port 3 = -0.8m
mass = 100kg
absolute x position at port 1 = -0.05m
absolute y position at port 1 = -0.25m
Table 19: “PLMTRPI00.ame” parameter settings
3 The third parameter “# artificial depth (Z) for AMEAnimation” is used to draw a
body in a plane parallel to the standard x, y plane of the Planar mechanical library. It
is very useful when several bodies or grounds are close to each other to correctly
visualize each of them. An example of how to use this parameter is shown in Figure
78.
September 2004
Using the Planar Mechanical Library
82/107
4.6. The 1D 2D transformers
The 1D 2D transformers are used to connect models from the Planar mechanical library
and models from the other libraries of AMESim through a mechanical port. Two models
are available with two different causalities. PLMT01D provides a force to the Planar
mechanical library and is connected to bodies. PLMT01D01 provides a velocity to the
Planar mechanical library and is connected to the joints’ elements. These two models are
described below.
4.6.1. The PLMT01D transformer
The PLMT01D model allows the user to separate each of the three directions of a body (x
and y translation and the rotation around the z axis) port and connect the three dimensions
to one-dimensional elements. Figure 101 shows the causality of this model. Port 1 is a
one-dimensional port corresponding to the y direction. This port can be connected to a
spring model. It receives the absolute velocity of a body connected to port 3 in the y
direction and sends back to this body model a force in the absolute y direction. The
principal is the same for port 2 that corresponds to the x direction (force and linear
velocity) and for port 4 that corresponds to the rotation (torque and rotary velocity). Port 3
is a regular Planar mechanical library port.
Figure 101: AMESim icon of the 2D to 1D connected body transformer
The PLMT01 model does not contain any parameters. A mass plus spring model is shown
below to illustrate the use of the PLMT01D model.
Example:
Figure 102 : mass on a spring using the PLMTO1D model (see “PLMT01D.ame”)
September 2004
Using the Planar Mechanical Library
83/107
Parameter settings:
Submodel name and type
1
4
SD0000
Mechanical spring
PLMZER00
Zero force source
Belongs to
category
Mechanical
Planar Mechanical
Principal simulation parameters
spring rate = 100000N/m
2*0.1*sqrt(10*100000)N/(m/s)
O: initial absolute y position = -0.1m
y position at port 1 = 0.1m
y position at port 2 = -0.1m
mass = 10kg
Table 20: “PLMTJ00.ame” parameter settings
4.6.2. The PLMT01D01 transformer
The PLMTO1D01 submodel is a transfer between the 1D mechanical library and the
Planar mechanical library. In Figure 103 we can see the AMESim representation of this
submodel and its causality.
Figure 103: AMESim icon for the 2D to 1D connected joint transformer
On the planar side we connect it to a joint and on the other side we connect it to a 1D
mechanical system. The displacements are generated by the 1D mechanical element and
this will be influenced by the forces coming from the Planar mechanical library.
In the parameter list you have to include the absolute position of the considered joint,
because in the assembly phase we assume this submodel is like a ground so that it can’t be
affected by the assembly. This is also true for the angular position of the effect coming
from the 1D axis, and the relative angular slope of the connected prismatic joint. The
parameter window is shown in Figure 104.
September 2004
Using the Planar Mechanical Library
84/107
Figure 104 : parameter of the 1D to 2D transfer connected to a joint
For more explanation please refer to the different examples in this manual and to the
Online Help.
Example:
Figure 105: using the PLMT01D01 model (see “PLMT10D01.ame”)
Parameter settings:
Submodel name and type
2
3
4
5
6
GRAV0
Gravity
V001
Mechanical spring
MAS002
2 port mass
PLMT01D01
1D to 2D connector
PLMTRA00
Prismatic joint
September 2004
Belongs to
category
Mechanical
Mechanical
Mechanical
Planar Mechanical
Planar Mechanical
Principal simulation parameters
constant gravity value = 9.81m/s/s
contact stiffness = 1e8N/m
contact damping =
2*0.2*sqrt(1e8*100)N/(m/s)
Mass = 100kg
absolute x position of the transfert point =
0.1m
spring stiffness = 100000N/m
free length of spring = 0.4m
damping coefficient = 100N/(m/s)
Using the Planar Mechanical Library
85/107
7
PLMBOD02
Two port body
Planar Mechanical
8
CONS0
Constant signal
CONS0
Constant signal
CONS0
Constant signal
Signal
constant value = 0 null
Signal
constant value = -1000 null
Signal
constant value = 0 null
9
10
O: initial absolute x position = 0.5m
x position at port 1 = -0.1m
x position at port 2 = 0.2m
Table 21: “PLMT01D01.ame” parameter settings
4.7. The sensors
The sensors included in the Planar mechanical library are similar to the ones included in
the standard mechanical library. The Planar mechanical library sensors have two 2D
mechanical ports and one signal port. Three parameters are required; the first one is used
to specify the direction to be measured. If the value is set to one then the output is a rotary
signal around the z-axis. If the value is set to two then the signal output is a linear signal
in the x direction. Finally if the value is set to three then the output is a linear signal in the
y direction. The four sensors available in the Planar mechanical library are shown in
Figure 106. The first icon is a displacement sensor, the second one is a velocity sensor, the
third one is a force/torque sensor and the last one is an acceleration sensor. These sensors
can be connected to any type of model from the Planar mechanical library. The dialogue
boxes of each of these sensors are presented below (see Figure 107). Two other
parameters can be set: an offset and a gain. The offset is subtracted to the measured signal
and then multiplied by a gain (output_signal=Gain*(Input_signal-Offset).
Figure 106: AMESim planar mechanical sensors representation
September 2004
Using the Planar Mechanical Library
86/107
Figure 107: sensor model PLMDT11, PLMVT11, PLMFT11, PLMAT11
4.8. Coordinate calculator
PLMCALCUL is a calculation submodel based on the rotation matrix from a relative in
an absolute reference and from an absolute in a relative reference. PLMCALCUL
calculates the relative coordinates from points defined in the absolute reference frame, and
also the reverse the absolute coordinates from points defined in the relative reference with
the coordinates of the relative reference in the absolute one.
Case 1 Relative to absolute
To pass from the relative in the absolute reference the option flag must be 0, in that case
the following equations are used:
xa = xo + (x) * cos(-theta) - (y) * sin(-theta);
ya = yo + (x) * sin(-theta) + (y) * cos(-theta);
The definition of the considered angle must be set in that way from the relative to the
absolute reference. In this example the angle Figure 108 must be negative.
xa
yr
y1
y
x
y0
xr
ya
x1
x0
O0
theta
Inputs
Theta=-30°
X=0.2m
Y=0.1m
X0=1m
Y0=0.5m
Results
Xa=1.12321m
Ya=0.686603m
y0
x0
Figure 108: parameter for Relative to Absolute (see “PLMCALCUL.ame”)
Case 2 Absolute to relative
And to pass from the absolute in the relative reference the option flag must be 1, and the
following equations are used:
xr = (x-xo) * cos(theta) + (y-yo) * sin(theta);
yr = -(x-xo) * sin(theta) + (y-yo) * cos(theta);
September 2004
Using the Planar Mechanical Library
87/107
The definition of the considered angle must be set in that way from the absolute to the
relative reference. In this case the angle must be positive.
x
yr
y1
yr
xr
y0
xr
x1
x0
O0
x0
theta
y
Inputs
Theta= 30°
X=1.5m
Y=0.75m
X0=1m
Y0=0.5m
Results
Xr=0.558013m
Yr=-0.03349m
y0
Figure 109: parameter for Absolute to Relative (see “PLMCALCUL.ame”)
September 2004
Using the Planar Mechanical Library
88/107
5. Using AMEAnimation
AMEAnimation is a tool designed to work with the Planar mechanical library. Using this
tool you can:
•
Verify that the assembly was performed successfully,
•
Perform an animation of a dynamic run.
5.1. Description of the AMEAnimation interface
In this section you will learn how to start AMEAnimation and you will find a presentation
of the main elements of the interface like the menu bar, the toolbar and the shortcuts.
5.1.1. Starting AMEAnimation
To start AMEAnimation , you can either:
1. Click on the AMEAnimation
button or,
Use the menu Tools X Start AMEAnimation...
The first time you use AMEAnimation, you will get dialog box appears asking you
which graphic library you want to use, GDI or OpenGL.
2 Select OpenGL.
During the use of AMEAnimation , if the visualization is not correct, you can select the
GDI library.
An empty window appears like in Figure 110.
Figure 110: Empty window
September 2004
Using the Planar Mechanical Library
89/107
Note the 3D axes in the left bottom corner of the window. The axes allow you to visualize
the orientation of the model when you cannot see it clearly on the model itself.
The AMEAnimation functionalities are available through the menus and the toolbars.
5.1.2. The toolbars
Each toolbar is related to a corresponding menu. In this section, we will only give the
name of each button. For more information, please refer to “The menu bar” section.
File toolbar
Clear
Reload
Open
Camera mode toolbar
The options of this toolbar are available in the View menu.
Pan
Object information
Orbit
Zoom
Zoom to window
View toolbar
Zoom to
extents
Right
Isometric
Front
Back Top Bottom
Left
Animate toolbar
Jump to start
Jump to end
Step Backwards
Play
Stop
Step Forwards
5.1.3. The menu bar
To select a functionality through a menu, you can click on the menu and select an option
in the list:
Figure 111: menu bar
The following sections detail the options available in each menu.
September 2004
Using the Planar Mechanical Library
90/107
File menu
With this option...
Clear
You can...
Empty the window.
Open...
Open a .results file with a browser.
Reload
Reload the system at the starting point of the animation.
Exit
Close the window.
Edit menu
With this option...
Options
You can...
Open the Options dialog box to modify options of use of the
AMEAnimation window.
View menu
With this option...
You can...
Camera mode
Reach the functions which allow you to visualize the model
in various manners.
Render
Reach the functions allowing you to display the surface of
the bodies or the frames.
Zoom to extents
Return to the original extent view.
Isometric
View three faces of the model.
Front
View the front surface of the model.
Back
View the back surface of the model.
Top
View the top surface of the model.
Bottom
View the bottom surface of the model.
Left
View the left surface of the model.
Right
View the right surface of the model.
Animate menu
With this option...
You can...
Jump to start
Jump to the original position of the model, at the beginning
of the animation.
Step backwards
Go back in the animation according to the interval you have
specified in the Options dialog box.
Play
Start the animation.
Stop
Stop the animation.
Step forwards
Go on in the animation according to the interval specified in
the Options dialog box.
Jump to end
Jump to the end of the animation.
Loop
Continuous run
September 2004
Using the Planar Mechanical Library
91/107
Help menu
With this option...
You can...
Online
Open the online help of AMESim .
About
Display the version of AMEAnimation tool.
Shortcuts
Press...
If you want to...
Ctrl+N
Clear the window.
Ctrl+O
Open a .results file.
Ctrl+R
Reload the .results file if you have cleared the window.
Ctrl+Q
Quit.
Ctrl+A
Jump to the start of the animation.
Ctrl+B
Step backwards the animation according to the interval
specified in the Options dialog box.
Ctrl+P
Start playing the animation.
Ctrl+S
Stop the animation.
Ctrl+F
Step forwards the animation according to the interval
specified in the Options dialog box.
Ctrl+E
Jump to the end of the animation.
September 2004
Using the Planar Mechanical Library
92/107
5.1.4. Description of the Options dialog box
The Options dialog box contains three tabs allowing you to set up your own options for
the background color, the animation and the graphic library.
Figure 112: options dialog box
Background color
To set a new background color, click on the coloured area corresponding to the Main
color . A Select color dialog box appears to allow you to select the color of your choice.
This dialog box is detailed in Chapter 11 of the AMESim manual.
Animation
The Animation tab allows you to set up the values for the Refresh rate and the Fast
forward step.
Figure 113: animation tab
The default values can be inapropriate for the animation of your own model. It is a good
idea to test the animation with different values and then to animate the model to see the
differences.
September 2004
Using the Planar Mechanical Library
93/107
Graphic tab
When you start AMEAnimation you are asked which graphic library you want to use. You
can disable this option by unticking the check box of the Graphic tab.
Figure 114: graphic tab
Note:
The two graphic libraries are dependant on the hardware you use. Select
OpenGL but if the display is not correct on your screen, then, try the GDI
graphic library.
5.2. Example of a double pendulum
In this example, you are going to use an AMESim demo to learn how to:
•
Open a .results file,
•
Display the assembly correctly to visualize the whole movement,
•
Use the zoom,
•
Start again the animation,
•
Use the different views,
•
Break down the movement of the assembly using the Animate buttons.
The system you are going to use for this example is a double pendulum as shown in
Figure 115.
Figure 115: AMEAnimation main interface
September 2004
Using the Planar Mechanical Library
94/107
The model is made of two bodies connected by a pivot joint:
•
Body 1 is connected to the ground at point O0 through a pivot joint (pivot
joint 1). It is also connected to body 2 with the pivot joint 2 at point P12.
•
Body 2 is only connected to body 1 by pivot joint 2 at point P12.
Pivot junction 2 (P12)
y2
y1
θ2=0°
Body 2
Body 1
G2
x1
x2
θ1=45°
y0
G1
Pivot junction 1
x0
O0
Figure 116: representation of a double pendulum
Create a .results file
1. First, you must open the system using the menu Help X Get AMESim demo...
2. In the Choose demo browser, select Libraries X Planar mechanical library X
DoublePendulum.ame .
In this example, the aim is to use the AMEAnimation tool and then, you will not modify
anything in the system.
3. Go to Run mode and do a run in order to create a .results file.
Display the assembly
1. Start AMEAnimation by clicking on the
button or using the menu Tools X Start AMEAnimation...
AMESim asks you which graphic library you want to use, GDI or OpenGL.
2. Select OpenGL.
An empty window appears as shown in Figure 117.
Figure 117: empty window of AMEAnimation
September 2004
Using the Planar Mechanical Library
95/107
3.
Open the .results file by:
Clicking on the Open
button or,
• Using File X Open or,
• Type Ctrl+O .
A browser appears.
4.
Select the DoublePendulum_.results file.
5.
Click on Open .
The model is displayed as shown in Figure 115.
Place the assembly correctly in the window so that you can see the whole movement
during the animation.
If you do not modify the display of the model you
will not see the whole movement of the bodies
during the animation.
See the picture in the right: the bodies have fallen
below the red pivot which is fixed. The red pivot is
in the bottom of the display then the bodies are not
visible any more in the window.
To correct this and visualize the whole movement, you have to place the model in the top
of the window so that there is enough place to visualize the whole movement when the
bodies fall. You will use also the zoom to reduce the size of the bodies.
To reduce the model:
1. Click on the Zoom
button.
2. Click on the model and keep pressing the mouse left button.
3. Move down the cursor to reduce the model or move up the cursor to enlarge
the model.
To move the model:
1. Click on the Pan
button or,
Use the menu View X Camera mode X Pan .
2. Use the cursor to move the model and put it in the upper part of the window.
Now, the display should be as follows:
September 2004
Using the Planar Mechanical Library
96/107
Figure 118: New display
From now, you will be able to see the whole movement of the bodies.
Start the animation
1. Click on the Play
button.
The animation starts. You can see the movement of the model.
Break down the movement of the bodies
If you want to break down the movement, you can use the
buttons of the Animate toolbar.
The Animate toolbar is detailed in Animate toolbar.
1. To stop the animation, click on
.
2. To start again the animation, click on
3. To go back, click on
.
.
4. To start at the beginning of the animation, click on
September 2004
.
Using the Planar Mechanical Library
97/107
Note: The interval set by default for the step forwards and the step backwards can be too
high to allow you to visualize anything. To change the interval, use the Options
dialog box available in through the Options menu.
Use the different views of the model
If you want to view the model from up, down, left
side, right side, you can use the View toolbar.
Use the axes available in the left bottom of the window to see the orientation
of the view if it is not clear while viewing the model.
September 2004
Using the Planar Mechanical Library
98/107
September 2004
Using the Planar Mechanical Library
99/107
Appendix 1 Inertia Calculation
Slender Rod
z
h
2
 mh 2

 12

IG =  0
 0



y
G
h
2
x

0


0
0


 ( x ; y ;z )
0
mh 2
12
0
Solid Cylinder or Disc
z
h
2
G
h
2
[
y
m 2 2
12 3R + h

0
IG = 


0

]
0
[
m 2 2
3R + h
12
0
]

0 

0 

mR2 
2  ( x; y;z )
x
September 2004
Using the Planar Mechanical Library
100/107
Hollow Cylinder
R
z
r
h
2
G
[(
y
h
2
) ]
m

2 2
2
0
0
12 3⋅ R +r +h



m
IG = 
0
3⋅ R2 + r2 +h2
0

12


m 2 2

0
0
R +r


2
(x;y;z)
[(
) ]
[
]
x
Thin-walled hollow Cylinder
z
y
G
R
 mR 2

 2
IG =  0

 0



0 

0 

2
mR

 ( x; y ; z )
0
mR 2
2
0
x
Rectangular Plane
z
c
G
y
a
[
m 2 2
12 b + c

IG = 
0


0

]
0
[
m 2 2
a +c
12
0




0

m 2 2
a +b

12
( x; y; z )
0
]
[
b
x
September 2004
Using the Planar Mechanical Library
101/107
]
Solid Sphere
z
y
G
2
2
 5 mR

IG =  0

 0

0
2
mR 2
5
0



0 

2
mR 2 

5
( x; y;z )
0
R
x
Thin-walled hollow Sphere
z
G
x
September 2004
y
2
2
 3 mR

IG =  0

 0

0
2
mR 2
3
0
R
Using the Planar Mechanical Library
102/107



0 

2
mR 2 

3
( x; y ; z )
0
September 2004
Using the Planar Mechanical Library
103/107
Appendix 2Reporting Bugs and using the Hotline Service
AMESim is a complex software containing many hundreds of thousands of lines of code.
With software of this size it is inevitable that it contain some errors. Naturally we hope
you do not encounter any of these but if you use AMESim extensively at some stage,
sooner or later, you may find a problem.
Bugs may occur in the pre- and post-processing facilities of AMESim, AMESet or in one
of the interfaces with other software. Usually it is quite clear when you have encountered
a bug of this type.
Bugs can also occur when running a simulation of a model. Unfortunately it is not
possible to say that, for any model, it is always possible to run a simulation. The
integrators used in AMESim are robust but no integrator can claim to be perfectly
reliable. From the view point of an integrator, models vary enormously in their difficulty.
Usually when there is a problem it is because the equations being solved are badly
conditioned. This means that the solution is ill-defined. It is possible to write down sets of
equations that have no solution. In such circumstances it is not surprising that the
integrator is unsuccessful. Other sets of equations have very clearly defined solutions.
Between these extremes there is a whole spectrum of problems. Some of these will be the
marginal problems for the integrator.
If computers were able to do exact arithmetic with real numbers, these marginal problems
would not create any difficulties. Unfortunately computers do real arithmetic to a limited
accuracy and hence there will be times when the integrator will be forced to give up.
Simulation is a skill which has to be learned slowly. An experienced person will be aware
that certain situations can create difficulties. Thus very small hydraulic volumes and very
small masses subject to large forces can cause problems. The State count facility can be
useful in identifying the cause of a slow simulation. An eigenvalue analysis can also be
useful.
The author remembers spending many hours trying to understand why a simulation failed.
Eventually he discovered that he had mistyped a parameter. A hydraulic motor size had
been entered making the unit about as big as an ocean liner! When this parameter was
corrected, the simulation ran fine.
In follows that you must spend some time investigating why a simulation runs slowly or
fails completely. However, it is possible that you have discovered a bug in an AMESim
submodel or utility. If this is the case, we would like to know about it. By reporting
problems you can help us make the product better.
On the next page is a form. When you wish to report a bug please photocopy this form
and complete it. Even if you telephone us, having the filled out form in front of you means
you have the information we need.
To report a bug you have three options:
fax the form
reproduce the same information as an email
telephone the details
Use the fax number, telephone number or email address of your local distributor.
September 2004
Using the Planar Mechanical Library
104/107
September 2004
Using the Planar Mechanical Library
105/107
HOTLINE REPORT
Creation date:
Created by:
Company:
Contact:
Keywords (at least one):
Problem type:
Bug
Improvement
Other
Summary:
Description:
Involved operating system(s):
All
Unix (all)
PC (all)
HP
Windows 2000
IBM
Windows NT
SGI
Windows XP
SUN
Linux
Other:
Other:
Involved software version(s):
All
AMESim (all)
AMERun (all)
AMESet (all)
AMECustom (all)
AMESim 4.0
AMERun 4.0
AMESet 4.0
AMECustom 4.0
AMESim 4.0.1
AMERun 4.0.1
AMESet 4.0.1
AMECustom 4.0.1
AMESim 4.0.2
AMERun 4.0.2
AMESet 4.0.2
AMECustom 4.0.2
AMESim 4.0.3
AMERun 4.0.3
AMESet 4.0.3
AMECustom 4.0.3
AMESim 4.1
AMERun 4.1
AMESet 4.1
AMECustom 4.1
September 2004
Using the Planar Mechanical Library
106/107
September 2004
Using the Planar Mechanical Library
107/107
Web Site
http://www.amesim.com
FRANCE - ITALY - SWITZERLAND SPAIN – PORTUGAL - BENELUX SCANDINAVIA
S.A.
5, rue Brison
42300 ROANNE - FRANCE
Tel. : 04-77-23-60-30
Tel. : (33) 4-77-23-60-37
Fax : (33) 4-77-23-60-31
E.Mail : [email protected]
UK
Park Farm Technology Centre
Kirtlington, Oxfordshire
OX5 3JQ
ENGLAND
Tel. : +44 (0) 1869 351 994
Fax : +44 (0) 1869 351 302
E.Mail : [email protected]
USA - CANADA - MEXICO
Software, Inc.
44191 Plymouth Oak Blvd – Suite 900
PLYMOUTH (MI) 48170 - USA
Tel. : (1) 734-207-5557
Fax : (1) 734-207-0117
E.Mail : [email protected]
GERMANY - AUSTRIA
Software GmbH
Elsenheimerstr. 15
D - 80687 München - DEUTSCHLAND
Tel: +49 89 / 548495-35
Fax: +49 89 / 548495-11
E.Mail : [email protected]
JAPAN
Rikei Corporation
AMESim Technical Center
1-26-2, Nishi-Shinjuku, Shinjuku-ku
TOKYO 163-0535 - JAPAN
Tel. : (81)-3-3345-2149
Fax : (81)-3-3345-2165
E.Mail : [email protected]
SOUTH KOREA
SHINHO Systems Co., Ltd.
#702
Ssyongyong IT Twin Tower
442-5, Sangdaewon-dong
Jungwon-gu
Seongnam-si
Gyeonggi
Korea <462-723 >
Tel. : 82-31-608-0434
Fax : 82-31-608-0439
E.Mail : [email protected]
BRAZIL
KEOHPS
CELTA – Parc Tec ALFA
Rod. SC 401-km 01 – CEP 88030-000
FLORIANOPOLIS – SC BRAZIL
Tel. : (55) 48 239 – 2281
Fax : (55) 48 239 – 2282
E.Mail : [email protected]
HUNGARY
Budapest University of
Technology & Economics
Department of Fluid Mechanics
H-1111 BUDAPEST, Bertalan L. U. 4- 6 HUNGARY
Tel. : (36) 1 463 4072 / 463 2464
Fax : (36) 1 463 3464
E.Mail : [email protected]
CHINA
United Right Technology
Room 716-717
North Office Tower Beijing, New World Center
No.3-B Chong Wen MenWai dajie,
Postal Code: 100062, BEIJING, P.R CHINA
Tel: (86) 10-67082450(52)(53)(54)
Fax: (86) 10-67082449
E.Mail: [email protected]