Dymola Basics: 4. Diagram Layer in the Simulator Window

Written by: David Briant – Project Engineer

This is the fourth in a series of posts about the basics of Dymola, following on from the second blog about the Variable Browser. This post will describe the use of the Diagram Layer and its use in conjunction with the Variable Browser within the Simulation Window.

To aid navigation through a model and the results of a simulation, the model diagram layer can be viewed in the Simulation window. This allows the user to navigate through a model and review the model and the parameters of the simulated model.

To show the Diagram Layer there is a button along the top of the simulation window that is the same as the diagram layer button within the modelling window, as highlighted within the red box below in Figure 1.


Figure 1: Diagram Layer view button in Simulation Task Bar

This opens a window that shows the Diagram Layer of the model that is open within the Modelling window as shown in Figure 2, but this is not necessarily the model that has been simulated. The model below is the DoublePendulum model found within the Modelica Standard Library (MSL) with the path location Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.


Figure 2:  Diagram layer within the simulation window

Parameters can be changed through either double clicking a component or right clicking and selecting Parameters, however in the Diagram window connections cannot be made or changed. It also does not have the same effect as changing the parameter within the variable browser in the simulation window, as it requires the model to be re-initialised if any parameter is changed.

After simulating a model and having that model shown in the Diagram window, component variables can be found easily by right clicking on any active component within the diagram layer and selecting Show Variables. This opens the list of variables and sub-components from that component within the variable browser.

Figure 3 shows that when the revolute1 joint is selected and Show Variables is clicked, all the variables associated with revolute1 (highlighted) are then shown in the Variable Browser to then allow viewing in a Plot Window or editing within the browser itself. Editing the variables in this way allows modifications to parameters and then allows the model to be run again without needing to initialise as long as no changes to the model have been made to the model outside this browser.


Figure 3: Showing Revolute Variables from the Diagram Layer


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


© Copyright 2010-2024 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?