Dymola Basics: 5. Variable Browser

Written by: David Briant – Project Engineer

This is the fifth in a series of the Basics of Dymola following on from the first blog post about the Component Browser. This post will be describing the Variable Browser in the Simulation window and the features surrounding the use of it to evaluate simulation results.
The Variable Browser is the location that a user can view all the variables that are used and calculated, both inputs and outputs, within a simulation and is highlighted below in Figure 1. A simulation of the DoublePendulum example is shown which can be found in the Modelica Standard Library with the path: Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.

figure-1

Figure 1: Location of Variable Browser in Simulation Window

Once a model has been simulated all the variables are shown allowing them to be plotted, such as the variable angle in the joint revolute1 shown plotted above. The list of variables is stored under the name of the model run, in this case DoublePendulum, but when multiple simulations of the same model occur then they are displayed in numerical order according to the time they were run. If another DoublePendulum simulation was run, then it would appear as DoublePendulum 2 and the first would be DoublePendulum 1.

figure-2

Figure 2: Keeping Result sets within the Variable Browser

If a third simulation was run, then it would become DoublePendulum 2 and the second simulation would now appear as DoublePendulum 1, with the data from the first simulation removed from the Variable Browser. This can be stopped by right clicking on the model name, e.g. DoublePendulum, and selecting Keep Result, as shown in Figure 2. This stops the results from being overridden and is shown by the pin icon to the left of the name, this can be undone by repeating the process. In a similar way, a data set can be removed from the variable browser by selecting Close Result.

The Variable Browser also allows modification to values that are not constrained, in the case of the first image phi and w which is the initial angle and angular speed of the joint. If the variable has a unit associated with it then it is displayed alongside the variable with a description of the variable if made in the variable declaration. The modified variable values can be saved to the model and replace the starting model parameter inputs by selecting Save Start Values in Model from right clicking the name of the model with the preferred values.

While able to change the variable input after a simulation, a user can also change the initial conditions of a simulation after just translating the model by using the Translate button highlighted in Figure 3.

 figure-3Figure 3: Translate Model button in Simulation Taskbar

This shows a list of initial values of the model but as the model has not been simulated it only shows the list of variables able to be modified; as shown below these can be modified in the same way a simulated model can be in order to modify the conditions of the simulation.

figure-4

Figure 4: Initial Values of each Variable

Within the Variable Browser there is the ability to filter variables and there are also advanced plotting features that can be accessed by clicking Advanced tab shown at the bottom of Figure 4; this accesses the Advanced Mode menu as shown below.

figure-5

Figure 5: Advanced tab of the Variable Browser

The buttons control what is displayed within the Variable Browser:

table-1

Table 1: Table of Advanced Variable Browser controls

The checkboxes modify how the data is displayed in the plotting window:

table-2

Table 2: Advanced Variable Browser plotting checkboxes

The Search Filter allows the variables displayed in the Variable Browser to be searched through using either the name of the variable or the path of a variable or a component.
The Time input displays all the values of the variables within the Variable Browser at the time entered.

Figure 6 is an example of the use of the Advanced tab that searches for all variables starting with phi and then displays their values at the time of 1.5 seconds but does not display Constants. The Plotting window displays 2 variables (blue and red) and the difference between them (green) throughout the simulation.

figure-6

Figure 6: Using The Advanced Variable Browser Plotting features

There is an ability to further filter the search results within the advanced tab of the variable browser. The table below shows the different symbols and their effect on which variables are shown:

table-3

Table 3: Advanced filtering terms

CONTACT US

Got a question? Just fill in this form and send it to us and we'll get back to you shortly.

Sending

© Copyright 2010-2023 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?