Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

4.

Getting Started: Pendulum Model 14

4. Getting Started: Pendulum Model

4.1 Setting up the Model

In this lesson you will learn how to create and develop a model. You will learn how
to:

Create and work with reference frames, bodies, joints and markers
Create the 3D graphical representation of the physical parts
Use the more advanced model and file management features
Use SIMPACK to integrate the differential equations generated from the
model data. Subsequently you will learn how to calculate measurements and
animate the model from the simulation results
Manipulate the view of the model in the Model Setup window

You will build a relatively simplistic model of a pendulum which will be developed into
a double-pendulum with a substructure (chapter 5. and 6.). Figure 4.1. shows the
pendulum which you will create in this section.

Figure 4.1.: Pendulum Model

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 15

4.2 Data for the Mechanical System Pendulum

Body pendulum:

mass = 4.0 [ kg ]

centre of gravity (x,y,z) = ( 0, 0, -0.25 ) [m]

10 0 0

inertia tensor I = 0 10 0 [ kgm ]
0 0 1.0

Joint:

joint mobility = rotation about x-axis


(01: Revolute Joint al)

initial joint state = 0.707 [ rad ]

initial angular velocity = 0.0 [ rad/s ]

Gravity:

acceleration due to gravity along z-axis,


g = -9.81 [ m/s ]

Geometric data for the pendulum:

Prism, representing the pendulum:


y z

0.1 0.0
coordinates of the prism = 0.0 0.1 [m]

0.1 0.0
0.0 0.7

thickness = 0.05 [m]

Cylinder, representing the rotational axis:

length = 0.2 [m]

diameter = 0.05 [m]

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 16

4.3 Opening the Model

Start a SIMPACK session and click on the Open Model toolbar button or
on File Open Model from the Graphic User Interface.

The open model dialogue box will appear:

Figure 4.2.: The Open Model Dialogue Box

You must now select a directory in which you want to create the new model.

Click on New and enter the model name pendulum. Hit Return to accept.
When a new model is created, SIMPACK automatically create a default model with the
following parameters: Inertia reference frame, one body with a marker, one joint, one sensor,
a default gravity vector and a default 3D-geometry.

Hint: For a better overview it is advisable to create an own folder for each
new model. Therefore click on and enter a name (model name and
folder name should be equal).

To start the Model Setup either click on or


Pre-Processor Model Setup.
Two windows will appear on the screen. The 3D Model Setup window (figure
2.3.) and the Echo Area (figure 2.4.).

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 17

4.4 Modeling the Pendulum

4.4.1 Creating the Pendulum Body

Select either Bodies from the toolbar or from the pull-down menu
Elements Bodies.
The Bodies list box will appear on the screen.

Figure 4.3.: Bodies list box

Select $B_Body1 and click . Enter the new name pendulum.

Double click on $B_pendulum or select it with the mouse and then click on
.
The MBS Define Body dialogue box appears. For this model you will enter the
data by hand, but it is even possible to get it from the database. Within this
dialogue box you can enter the physical attributes of the body. These include
the mass, centre of mass and the inertia-tensor.
You should now enter the data from 4.2 for the body.
Figure 4.4. shows how the MBS Define Body dialogue box should look.

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 18

Figure 4.4. MBS Define Body dialogue box

You will now change the body from a cuboid to a prism to look like the hand of
a clock. Click on and the 3D geometry window appears.

Within this window you will find the default ensemble $E_pendulum and the
default primitives of this ensemble. There is the primitive
$P_pendulum_cuboid.

Select the cuboid and click on and change the name to


$P_pendulum_hand.

Click on to change the primitive parameters of the hand. The


Primitive Definition window appears.

Change the Primitive type to `05: Prism by Coordinates'.

Back in the Primitive Definition window change the prism thickness to 0.05
and the No. of shape points to 4.

In the shape/line list box enter the four shape points as given in chapter 4.2

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 19

In the Model Setup window the cuboid should have changed to a prism with
the shape of a hand of a clock. To bring the body in the right position like it is
in figure 4.1. you have to rotate it. Therefore you have to edit the built-in
vector and rotation matrix:

- Rotate primitive - 90 on y-axis (Beta)


- Rotate primitive + 90 on z-axis (Gamma)

Figure 4.5. shows how the primitive dialogue box should look.

Figure 4.5.: Completed Body-Primitive Definition Window

Click three times on to get back to the Bodies window.

Hint: Because SIMPACK does not have an undo facility but only a reload facility it
is necessary to save your model from time to time (best after each
modification).
Therefore click on or select File Save from the pull-down menu.

If you want to remove a number of changes then you have to reload the
model from the last save. Either click on or File - Reload

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 20

4.4.2 Modifying the Reference Frame

Either click on Reference Frames or from the pull-down menu


Elements Reference Frames

The following dialogue box, figure 4.6. will appear:

Figure 4.6.: Reference Frames

From this dialogue box you should now either double click on the reference
frame $B_Isys or select it and then click on . The following
dialogue box, figure 4.7. will appear.

Figure 4.7.: Reference Frames Dialogue Box

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 21

Select . The 3D Geometry window appears. This windows


shows the ensembles and primitives that are associated with this reference
frame.

Under Primitives of Selected Ensembles click on .

In the input box that then appears you should enter the name Isys_axle
(remember: $P_ will be attached automatically). Then click on .

The Primitive Definition window appears. Change the type to 2: Cylinder.

You will now change the parameters diameter and length according to 4.2.

To rotate the cylinder in its right position you need to edit the build-in vector
matrix as follows:

- Rotate primitive + 90 on z-axis (Gamma)

The dialogue box should look like figure 4.8.

Figure 4.8.: Completed Primitive Definition Window

Click three times on to get back to the Reference Frames


window.

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 22

4.4.3 Modifying the Joint

Select Joints from the toolbar or from pull-down menu


Elements Joints

In the appearing dialogue box double click on $J_pendulum or click on


. The dialogue box MBS Define Joint will appear.

Here you will now define the markers which are associated with a joint. In this
case the is the default marker $M_Isys set by SIMPACK on
the reference frame. Select $M_pendulum, the default marker on the
pendulum, as .

It is necessary to select a joint type to allow defined degrees of freedom. Click


on and select 01: Revolute Joint al (rotation about x-axis)
from the Joint Type List. Press .

In the MBS Define Joint Dialogue box click on the first line (Rotation about al
[rad]) of the initial state box. In the following input window you can enter the
initial state of the joint in terms of both position and velocity.

Enter the following modifications into the input panel, as they are given in 4.2.

- Position = 0.707
- Velocity = 0

Click on . The MBS Define Joint window should look like figure
4.9.

Figure 4.9.: Completed MBS Define Joint Dialogue Box

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 23

The Pendulum is finished now and should look like Figure 4.10.

Figure 4.10.: Completed Pendulum

Congratulations you have just finished your first SIMPACK Model

The following steps will show you how to animate your model, change the
view and modify it to a double-pendulum.

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 24

4.5 Manipulating the View

You will learn, in this section, how to move the model within the 3D Model Setup
window. However, before changing the view you should save the model. To get back
to the original view settings you only need to reload the model.

Select View View Setup from the pull-down menu. The following dialogue
box figure 4.11. appears.

Figure 4.11.: Zoom/Translate/Rotate Figure 4.12.: Standard Views

In the dialogue box figure 4.11. you can use slider bars to zoom, translate and
rotate your model.

When you click on standard views as seen in figure 4.12. you can chose
between some isometric and parallel views.

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 25

Hint: You can even change the view by holding down the control key and one of
the three mouse keys and moving the mouse:

Left mouse button = zoom in / out


Middle mouse button = rotate
Right mouse button = translate

It is also possible to change the view with the toolbar buttons .

Note: When working with Simpack it could happens that the following window
appears.

In this case you will find a new file in your folder, which is called:
.S_sui_g3d_g3d.flag
It is necessary to delete this file to continue with SIMPACK.

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 26

4.6 Animate the Model

Before animating the model SIMPACK needs to form the equations of motion and
solve them. The integration of the differential equations can be done either off- or on-
line. On-line integration is when SIMPACK animates the model while performing the
integration process. Off-line integration means that SIMPACK integrates for a
defined start and end time. The animation of the model is performed after the
integration.

4.6.1 On-line Integration

The on-line integration is recommendable for small models with only a few degrees
of freedom like our pendulum.

Click on or select Calculation Time Integration from the pull-down


menu. The dialogue box figure 4.13. appears.

Figure 4.13.: On-Line Time Integration Window

Click on Go to start the on-line integration and animate the pendulum in the
model setup window.

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 27

4.6.2 Off-line Integration

Off-line integration is normally used for large complex models with a large number of
degrees of freedom. The CPU time required to integrate the equations may be high,
which makes it impossible to animate the model while performing the time
integration.

Before starting an off-line integration, SIMPACK must be told what to perform in the
integration. Important Values are the initial start time and the end time and the
numbers of communications points (these points determine how many times
SIMPACK writes data to the result files in the integration process). These
calculations are done in the GUI.

Select Calculation Time Integration Configure from the pull-down


menu. The time integration window will appear. Enter the following
parameters:

- Initial Time = 0.0


- End Time = 15.0
- Number of Communication Points = 1500

Click on and then .

Note: The example above leads to a communication step size of 0.01 s. Normally
the integrator chooses the integration stepsize during the integration
procedure and varies it due to the integration stability. It may be necessary to
define a maximum integration stepsize to guarantee that the dynamic answer
of all important eigenfrequencies is mapped.

Note: Before performing the time integration it is necessary to save the model
because SIMPACK reads the data from the model files while performing the
calculations.

Click on (in the GUI) or select


Calculation Time Integration Perform with Measurements
You can follow the integration process in the echo area. Enter Return to exit
the echo area when the process is finished.

In the model setup window select or chose Animation Time History.


The animation control window figure 4.14. appears

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle


4. Getting Started: Pendulum Model 28

Figure 4.14.: Animation Control Window

Click on to start the animation. Experiment with the pushbuttons to see


the effects they have on the animation. It is even possible to make short films
of the animation, which are saved in the model folder.

Vehicle Dynamics & Multi-Body Simulation Prof. Dr.-Ing. Michael Wahle

You might also like