This is the second in the Dymola Basics series of blog posts that go over some basic principles and features within Dymola. It follows on from the first post about the Component Browser within the modelling window.
Dymola has several layers that describe different elements of a model that can be accessed within the modelling window in the top bar as shown below. The buttons on the left of the layer buttons are used to help navigate through models. The far left button Recent Model displays the previous model and the Forward and Back buttons are used when exploring the levels of a model, the back arrow moves up the level to the top level and forward moves down a previously viewed level of a model.
Figure 1: Layer View Bar
In Figure 1 to the right of the text layer button there is the Used Classes button that extends the text layer to include all the text layers of the components used within the model. This only allows the viewing of the text but does not allow modifications to be made to any level of the text.
When navigating between models, the default layer that is opened is the Diagram layer unless otherwise specified, but when a model is open in a separate tab then the last viewed layer of that model would be displayed.
The Text Layer contains the parameter declarations, variable declarations, sub-model use (hidden by default) and the equations defining how the model works. Figures 2 and 3 show the collapsed and expanded text layer for the Double Pendulum example that is being used throughout this series, found in the Modelica Standard Library: Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum.
Figure 2: Collapsed Double Pendulum Text Layer
Figure 3: Expanded Double Pendulum Text Layer
The Diagram layer graphically shows components used within the model and the connections between the various components. Occasionally drawing objects can also be added on this level to annotate the diagram which aids understanding or used to describe the model if no components are used.
Figure 4: Diagram Layer of Double Pendulum
The Icon layer is where the graphical representations are created, which indicate what a model does. An example of the revolute joint icon that is used in Figure 4 is shown below in Figure 5.
Figure 5: Icon of Revolute Joint
The Documentation layer of a model can be used to store information about the model, such as how the model can be used; it can contain text, images and hyperlinks to other models. It contains 2 sections, one that is created by the user at the top of Figure 6 and an automatically generated section that describes some basic elements of the model at the bottom.
Figure 6: Revolute Joint Documentation Layer
Written by: David Briant – Project Engineer