Expert Insights

Dymola Basics 2: Layers of a Model within Dymola

Written by David Briant | Aug 4, 2026, 2:42:17 PM

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.

Layer Navigation

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 Model buttons are used to help navigate through models. There are a Graphics, Documentation and Text groups of layers, all accessible from the different tabs at the top of the Dymola window.

In all layers 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 view level of a model.

Figure 1 shows the different text layers, The Modelica Text view is the full raw text of the model; the Mathematical Notation button shows the text layer in formatted view but resolves the equations in a mathematical view; 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. Flat Modelica shows the full model including extensions and sub classes in Modelica code.

 

The Graphics group of layers, shown below, allow you to access the Icon and Diagram layers, where you build the icon which viewable from higher levels and build the model from components respectively. This tab also includes Fit to Screen and the Zoom drop down which is used to resize the window.

The documentation layers include different viewing types, Formatted allows you see an unmodifiable version with formatted text; Info Editor shows you the basic text and images of the documentation, allowing you to modify it; Info Source shows the raw HTML version of the documentation. Revision Editor and Revision Source are access to the basic and source code versions respectively of a secondary layer, normally used to contain Copyright data; Meta Data button allows you to access the Meta Data stored for this model.

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.

Text Layer

The Text layer contains the parameter declarations, variable declarations, sub-model use (hidden by default) and the equations defining how the model works. Figure 4 and 5 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.

 

Diagram 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.

Icon Layer

 

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 6 is shown below in Figure 7.

 

Documentation Layer

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 8 and an automatically generated section that describes some basic elements of the model at the bottom.

While the model can be added to or modified in certain respects from respective layers, as described above, all details are automatically generated in the correct location and in in correct Modelica language within the text layer. This allows all aspects of the model to be modified from the text layer as long as the modifications adhere to the Modelica language. The Icon and documentation details are contained within the annotation of the model; these are collapsed in Figure 3 and represented by the green a above the “end DoublePendulum;” declaration.