0% found this document useful (0 votes)
95 views

Tutorial 1: Getting Started

Uploaded by

ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Tutorial 1: Getting Started

Uploaded by

ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

by

Tutorial 1
Getting Started

Objective

The following tutorial is a step-by-step introduction to the basics of • Introduction to


SimulationX. You will first get an overview of the graphical user interface the graphical user
(GUI) with the help of an example model which you can open on your com- interface
puter. In the second part, you will learn in seven steps how to create a simple
model as the basis for the third part explaining in eleven steps how to extend • Working with
and modify existing models (including post-processing). existing example
models

Prerequisites • Creating your own


model
The following explanations and screenshots are based on the default set-
tings of a newly installed trial version of SimulationX Professional Edition. You • Running a
can reproduce all further steps with this version on your screen. simulation

Part I: If you are using a commercial license, make sure to have the libraries • Extending and
MBS Mechanics (3D) and Hydraulics installed. Otherwise, simply read through modifying exist-
Part I or view the sample model with the Viewer Edition. ing models and
parameters
Parts II and III: Apart from the Basic Module, no other modules are required.
The models in Part II and III can also be created with the Student Edition. The • Viewing results
Viewer and Student Editions are both available for free and can be downloaded
in the Customer Center (www.simulationx.com/customer-center). • Post-processing
To change the edition, go to: Extras  Options  Licensing

Used symbols

Left mouse Right mouse Middle mouse Mouse wheel


button button button
SimulationX 3.8 – Tutorial 1: Getting Started 2 | 12

I. Graphical User Interface (GUI)


Upon installing SimulationX on your computer for the first time, the following window appears after the
first start. The Sample Browser provides a comprehensive collection of sample models from different
applications and domains.

Here, you can choose the model


to be loaded by double-clicking or
pressing Open once selected.

To show the examples of the multi-


body mechanics domain, select Me-
chanics (MBS) in the Sample Brows-
er’s tree view. Double-click on
Bucket Cylinder Hydraulics and close
the Sample Browser by pressing the
button Close . (You can open
the Sample Browser later on again
by clicking on an element in the
library bar, selecting Samples…, and Fig. 1: Sample Browser with examples from SimulationX Professional Edition
the Sample Browser opens with a pre-selected sample model containing the selected element.)

The following view (with default GUI of SimulationX) and a result window appears on your screen:

menu bar

diagram view
3D view
components
bar

library bar
parameter table

result table

output area

Fig. 2: Default GUI of SimulationX Professional Edition with a model (Bucket Cylinder Hydraulics) from the SimulationX Sample
Browser

Menu bar: Provides tools to create models and to control the simulation.

Library bar: Provides access to the element types installed and grouped into different topical libraries
in a hierarchical order.

Output area: Displays notifications, warning messages and errors. The content of the output area can
be saved, exported as text and printed.

Parameter table, result table and the components bar: Contains the properties of your model and the
results displayed. (In order to have values displayed in the parameters and result tables as shown in
figure 2, click on an element in the diagram view).
SimulationX 3.8 – Tutorial 1: Getting Started 3 | 12

Diagram view: Shows the logical structure of the


simulation model. In order to create a system mod-
el, model elements are connected with each other
through connection lines. Additional information,
such as graphical elements and text, can also be
added.
MBS connections
3D view: Shows a three-dimensional visualization
of the model. Some libraries (e.g. Mechanics MBS)
allow you to build models also interactively in 3D. MBS mechanics
For the navigation in the 3D view and diagram element
views, see the table below.
Table 1: Hotkeys for the navigation in the diagram and 3D view
1D mechanical
Action Hotkey connection

hydraulic
Diagram

Move model view Hold + drag connection


view

Zoom model view Ctrl + hydraulic


signal element
connection
Rotate model view Hold + drag
Move model view Shift + hold + drag
view
3D

Ctrl + hold + drag


Zoom model view
alternatively:
signal element

Result window: Shows selected results in a dia-


Fig. 3: Complete diagram view of the model shown in
gram. Values can be read out and further analyses figure 2
of the simulation results can be performed.

Figure 3 shows the principal structure of a network


model consisting of model elements from different
libraries and physical domains. Different kinds of
connections link these model elements through
specific connectors.
For performing your first simulation, press (Start)
in the menu bar. You then see the results in the
result window (see figure 4), the effects in the 3D
view and the current simulation time in the bottom
right corner.
Close the model by clicking on the tab of the
sample model either in the diagram (see figure 5)
or 3D view and select Close Model. When asked
wether you want to save changes, select No.

Fig. 4: Result window of the model shown in figure 2 with


cylinder stroke over time (top) and cylinder force
over time (bottom)

Fig. 5: Tabulator of the model in the diagram view


SimulationX 3.8 – Tutorial 1: Getting Started 4 | 12

II. Creating a simple model


In this chapter, you will learn about the basic structure of a network model as well as setting and
changing parameters while creating a simple model of a one-mass oscillator. Furthermore, you will run
a simulation and evaluate the results in a graphical result window.

1 Creating a model file

Click the button New in the menu bar or go to File  New. A new, empty diagram view appears.
(To open an existing file, click the button Open in the menu bar or File  Open…)

2 Dragging model elements into the diagram view

Go to Mechanics  Linear Mechanics in the library bar. Click on Spring, hold the mouse button and
drag the element into the diagram view. Release the mouse button.

Fig. 6: Placing an element from the library bar in the diagram view by drag and drop
For information about a model element’s physics, click on (Direct Help) in the menu bar. The cur-
sor will change to . Click on spring1 in the diagram view or on Spring in the library bar. A window
will pop up with detailed information about the model element Spring. Close the Help with (Close)
to proceed with the tutorial.
Now, drag the element Mass from the library Linear Mechanics in the diagram view and drop it there.
Your diagram view should look as follows:

Fig. 7: Diagram view with two unconnected model elements (Spring and Mass from the library Linear Mechanics)
SimulationX 3.8 – Tutorial 1: Getting Started 5 | 12

3 Connecting elements

In order for the elements to be able to interact with each other, they have to be linked through connec-
tions. Activate (Pin Labels) in the menu bar to display the names of the connectors in the diagram
view.

Place the cursor over ctr2 (connector 2) of spring1. The connector turns red and the cursor changes
to . Press , hold the mouse button and drag the connection towards ctr1 of mass1 as shown in
figure 8.

Fig. 8: Connecting spring1 and mass1

Now, place a model element of type Damper from Mechanics  Linear Mechanics in the diagram view.
Connect the model element damper1 with the existing structure as shown in figure 9. You will notice
that you can also connect a connector with an existing connection.

Fig. 9: Connecting a model element to another connection

With the created structure, it is already possible to simulate a simple one-mass-oscillator.

4 Entering Parameters

The diagram view only shows the interaction of the


different model elements with each other. In order
to determine the properties of each individual ele-
ment, it is necessary to specify the parameters.
Double-click on the element mass1 in the dia- Fig. 10: Setting parameters of mass1
gram view to open the properties window of this
element. Click on the tab Parameters and set the
value for Mass to 5 kg and for Initial Displacement to
20 mm. As m is the default unit for Initial Displace-
ment, choose the unit mm in the tab next to the
value as shown in figure 10. (Note: If you change
the unit from m to mm, SimulationX will adapt the Fig. 11: Setting parameters of spring1
value accordingly [20 m  20000 mm]. By holding
shift while changing the unit, you can change only
the parameter’s unit and not its value [20  m 
20  mm].) Now, you can close the properties win-
dow of mass1.

Set the properties for spring1 and damper1 in the


same fashion as shown in figures 11 and 12. Fig. 12: Setting parameters of damper1
SimulationX 3.8 – Tutorial 1: Getting Started 6 | 12

5 Selecting results to be logged and displayed

Before starting a simulation, it is necessary to


choose which specific results – out of all possible
outputs – should be logged for later analyses.

Open the properties window of mass1 again and


go to the Results tab. Choose Displacement and Ve-
locity as the results to be recorded by clicking on
Fig. 13: Properties - mass1: Result logging
the corresponding symbol . It will change to .
Change the unit of Displacement to mm and close
the properties window (see figure 13).

6 Starting the simulation

To control the simulation and specify its settings, open the Properties dialog in the simulation control
section (see figure 14) in the menu bar.

Simulation mode Start simulation Simulation properties


Fig. 14: Simulation control bar

Define the time period of the simulation by setting


Stop Time to 2 s as shown in figure 15 (with the de-
fault Start Time at 0 s, the system will be simulated
for two seconds).
Press (Start) to start the simulation.

7 Working with graphical results

In order to display the recorded results as graph-


ical representation, open the Properties window of
mass1  Results (see figure 13), drag the symbol
for Displacement and drop it somewhere in the di-
agram view.
Fig. 15: Simulation control window
A result window as shown in figure 16 appears.

It shows the graphical analysis of the displacement


of mass1 over time.

Fig. 16: Result window – Displacement of mass1


SimulationX 3.8 – Tutorial 1: Getting Started 7 | 12

III. Model extensions, further adjustments and


post-processing
Applying the methods shown in chapter II, you will create a two-mass oscillator and learn about further
adjustments and modification methods as well as post-processing.

1 Create an alternative model structure

Place the element Spring-Damper Backlash and the element Mass from the library Linear Me-
chanics in the diagram view beside your model from chapter II and connect both new elements.

Fig. 17: Diagram view with two new elements

As you will see in the following steps, the element type Spring-Damper Backlash can represent the same
physical correlation as the single elements spring and damper (depending on the parameters).

2 Change parameters using the parameters table

Select springDamper1 in the diagram view. Its pa-


rameters are now displayed in the parameters ta-
ble (see figure 18).
Fig. 18: Setting parameters of springDamper1 via the
Change their values by double-clicking in the box parameters table
with the corresponding value and set the stiffness
of springDamper1 to 20000 N/m and damping to
20 Ns/m. Table 2: Parameters of mass2

Change the properties of mass2 in the same man- model element parameter value
ner with the values given in table 2.
mass2 Mass (m) 5 kg
SpringDamper1 has now the same properties as
Initial 0 mm
the connected elements spring 1 and damper 1.
Dis­place­ment (x0)

3 Restart calculation and compare the two models

Select mass2 and click on the result window


symbol for the displacement in the results table
(figure 19), it will change to . Now drag and drop
the result window symbol for the displacement
onto the diagram view.
Fig. 19: Results table of mass2
SimulationX 3.8 – Tutorial 1: Getting Started 8 | 12

As the new model has not yet been simulated, no simulation results are available in the result window.
Reset the previous calculation by clicking (Back to Start) in the menu bar. Restart the simulation
with (Start). You can now compare the displacements of mass1 and mass2. The results should be
identical.

Fig. 20: Result window of mass1 and mass 2

4 Copy and paste several elements and extend your model

Select springDamper1 and mass2 by drawing a rectangle in the diagram view holding . Releasing the
mouse button selects all marked model elements.

Fig. 21: Selecting the model structure in the diagram view

Copy the model structure of the one-mass oscillator by dragging one of the selected elements while
pressing and holding ctrl + and drop it in a position as shown in figure 22.

Fig. 22: Copying a model structure by drag and drop


SimulationX 3.8 – Tutorial 1: Getting Started 9 | 12

As you can see in the corresponding properties


windows, the copied model elements have the
same settings (parameters, results, ) as their cor-
responding archetypes. Link springDamper2 and
mass2 and the structure will look like the one in
figure 23.
Fig. 23: Model structure of a two-mass oscillator

5 Customize the appearance of your network


model
Table 3: Parameters of springDamper2 and mass3

Model element Parameter Value


Activate the connection between mass2 and spring-
Damper2 by clicking on the connection. springDamper2 Stiffness (k) 1000 N/m

Change the routing of the connection between springDamper2 Damping (b) 2 Ns/m
those two elements by grabbing a control point
(see figure 24 – the cursor will change to ) and mass3 Initial 0 mm
Dis­place­ment (x0)
drag it to a different position.
Mass (m) 1 kg
In order to delete the connection between mass2
and SpringDamper2, press Shift while hovering over
the connector. As soon as the symbol appears
next to the cursor (see figure 25), click and the
connection with the next element will be deleted.
(Please note: If a selected connection is deleted with
Del, not only the connection between one element
and the next one is deleted, but also all selected Fig. 24: Changing the position of a connection point
connection lines are deleted.)

(Alternatively: Press (Undo) in order to undo


this change.)

In order to simply move a line parallelly, you can


also grab the line (instead of a point) by hovering
over the selected connection and as soon as the
cursor changes to , you can move the line to a
parallel position (see figure 26). Fig. 25: Cutting a connection between two model elements

Please note: The cursor will only be available if


there are two rectangular bends in this connec-
tion, before the next model element or node (see
figure 27).

6 Parameterize the copied structure and set simu-


lation parameters through the paramters table
Fig. 26: Moving a connection parallely

Change the parameters of springDamper2 and


mass3 in accordance with table 3.

Afterwards, change the parameters of the simula-


tion by clicking on an empty space in the diagram
view. The parameters for the simulation appear in Fig. 27: Precondition for parallel movement of a
the parameters table. Set the values as shown in connection
figure 28.

Fig. 28: Parameters table


SimulationX 3.8 – Tutorial 1: Getting Started 10 | 12

7 Run your extended model

Reset the calculation, by clicking (Back to Start) in the menu bar. Restart the simulation with
(Start). The result window mass2.x will change (see figure 29 [left]) due to the extension of the simula-
tion time in the step before. Click on mass3 and drag the result window symbol ( ) for the displace-
ment into the diagram view. The displacement of mass3 is displayed in a separate window (see figure
29 on the right).

Fig. 29: Displacements of mass2 and mass3 in separate windows

8 Merge result windows

For better comparison of the interaction between both masses, you can display both curves within one
diagram. In order to do this, grab the symbol of mass2.x in its result window and drop it near the center
of the result window of mass3.x as shown in figure 30. (Be careful not to drop mass2.x on one of the
operator buttons in the middle of the window as this will result in both functions to be merged.) Both
curves are now displayed within one diagram. As the graphs have the same units, both share the same
x and y axes.

Fig. 30: Merging two result windows

To change the settings of the result window, press


(Property Bar) in its menu bar. By selecting Pan-
el, you can specify settings like font, font size, line
width etc. of the diagram. To improve the contrast
between both graphs, select mass2.x and change
the color to dark blue (see figure 31).

Fig. 31: Customization of result windows settings


SimulationX 3.8 – Tutorial 1: Getting Started 11 | 12

9 Perform a Fast Fourier Transformation (FFT)

As you could see in figure 29, the vibrational behav-


ior of mass3 was influenced by eigenfrequencies. In
order to analyze the vibrational behavior of both
masses in the frequency domain, there is an option
to perform a Fast Fourier Transformation (FFT) in
the result window.
Click (Fast Fourier Transformation (FFT)) in the
menu bar of the result window. The appearance of
the result window changes as displayed in figure 32.

Fig. 32: Fast Fourier Transformation

10 Take measurements of the graph

Select to activate the frequency


spectrum of mass2. Click in the result window,
hold the mouse button and drag it towards the
blue graph. You will see a crosshair and the exact
values for x and y at the chosen point (see figure
33). As long as you keep the mouse button pushed,
the crosshair is attached to the graph and will fol-
low its course, while the corresponding values are
displayed in the box.

11 Compare different parameter settings

Click on (Freeze) in the result window to pin Fig. 33: Measurement of explicit values from the graph
an image of the diagram to the background of the
window. Change the stiffness k of springDamper1 to
40000 N/m. Reset the calculation to the start and
restart it. You will now see the results of the calcu-
lation with changed parameters in the foreground
and the ones from the previous calculation slightly
faded to the background (see figure 34).

Fig. 34: Two eigenfrequencies with values of a previous


calculation in the background
SimulationX 3.8 – Tutorial 1: Getting Started 12 | 12

Conclusion

In this tutorial, you have learned the basic concepts of building a model. The model’s system behavior
was simulated and analyzed. The presented example was taken from the mechanics domain, but the
general approach to creating and analyzing system models is the same for all other physical domains
in SimulationX. Depending on the user’s preferences and the specific requirements for each task, there
are often several ways to solve it. This introductional tutorial gave you a small insight into SimulationX’
various features.
If you want to learn more about how to use SimulationX, please take a look at

• SimulationX Help: Help  SimulationX Help; alternatively click on (Help) or press F1

• SimulationX User Manual and Library Manual (Help  Documents  User Manual/Library Manual)

• Further SimulationX tutorials (Help  Documents  Documents Online )

• SimulationX training courses: http://www.simulationx.com/academy

• Contact our global sales teams: www.simulationx.com/global

SimulationX is a registered trademark of ESI ITI GmbH Dresden. © ESI ITI GmbH, Dresden, Germany, 2016. All rights reserved.
Modelica® is a registered trademark of the Modelica Association.

ESI ITI GmbH • Schweriner Straße 1 • 01067 Dresden • Germany


[email protected] • T + 49 (0) 351.260 50 - 0 • F + 49 (0) 351.260 50 - 155
www.simulationx.com Doc.-Vers.: 03/2017

You might also like