What’s new in Dymola 2020?

With the release of the latest version of Dymola, 2020, comes a slew of new features. Notably, this version of Dymola arrives with the latest edition of the Modelica Standard Library, version 3.2.3. Here’s a selection of the highlights in Dymola 2020.

Plotting connector variables

Earlier, my colleague Alessandro wrote about the new ability in Dymola to plot variables directly from the modelling diagram layer in the simulation tab. As it turns out, in Dymola 2020 the user is able to specify not only the plotting of component variables, but also those from connectors. This is done in the same way as components, but by clicking the connect statement instead.

Figure 1: An example of how to plot connector variables from the Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum example model.
Figure 1: An example of how to plot connector variables from the Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum example model.

Favorites package

Found in the package browser, the favorites package provides a handy way of collecting all your most used components in a single package, making them easily accessible. If you find yourself repeatedly using the same components time and again, this new feature provides a way of avoiding having to scroll through many libraries to find specific components, or relying on using the search function. The favorites package is created in the Dymola working directory. For more info, see Dymola 2020 Release notes page 10.

Figure 2: The favourites package with a model placed within it. Image: Dymola/ 
Dassault Systemes
Figure 2: The favourites package with a model placed within it. Image: Dymola/
Dassault Systemes

Setting connector units from the GUI

Traditionally, parameter units could be selected from the dialog window of a component. Now, it is possible to select the units of a connector by right clicking. This action automatically generates the unit conversion text within the model for the connector. See page 17 of the Dymola 2020 release notes for more info.

Figure 3: The workflow and result of setting connector units from the GUI. Images: Dymola/Dassault Systemes

Figure 3: The workflow and result of setting connector units from the GUI. Images: Dymola/Dassault Systemes

Parameter logging

A new advanced flag provides the ability to log which variables are defined as parameters post translation. This is achieved by setting the flag:

Adavanced.Translation.LogParameters = true

With this flag set, a text file is generated in the working directory listing all the parameters in one column, with the alternatives (fixed, tunable or dependent) listed in a second column. The file generated is called parameters.log, and is not generated (flag is set to false) by default. See page 26 of the Dymola 2020 release notes for more details.

Event logging GUI

Chasing down and removing events is a key aspect of making Dymola models run efficiently. Dymola 2020 aids this task by introducing a user interface method of identifying these events, and where they are in the model code.

A new option under the Simulation menu on the task bar in the Simulation window called Analyze Numerics generates the Event Log window. This is provided that the simulation flags for logging events (during simulation/initialization) or states which dominate the error are enabled within the Simulation Setup. The Event Log details each event within the model, including the time, the expression(s) generating the events at that time step, the value triggering expression and any warning regarding Bifurcation, which refer to expression which almost trigger an event.

Figure 4: The Event Log showing event details. Image: Dymola/Dassault Systemes
Figure 4: The Event Log showing event details. Image: Dymola/Dassault Systemes

More details can be determined about each event, notably determining the code responsible. This can be done by right clicking an event in the log and selecting Show component. This provides the user with option to open the component containing the event expression, or to open the declaration directly.

Figure 5: How to find where in a model the expression triggering an event is located. Image: Dymola/Dassault Systemes.
Figure 5: How to find where in a model the expression triggering an event is located. Image: Dymola/Dassault Systemes.

For more details, see page 32 of the Dymola 2020 release notes.

Steady state initialization

Model initialization is an important topic in any dynamic simulation model. In Dymola, a model which initializes in as steady a state as possible will take less time to simulate, as well as being more robust. To support this, a flag was introduced in previous versions:

Advanced.DefaultSteadyStateInitialization

Setting this flag to true enables Dymola to utilize steady states to complete the initialization process (states with fixed=true are always initialized to their proscribed values regardless). In Dymola 2020 this flag has been improved to include more applications, including working better in combination with models featuring dynamic states.

Beyond this, a new built in function has been added, which enables the flag to be used within code:

steadyStateInitialization();

This function returns the setting of the advanced flag (true or false), so it can be used within the code. This means special settings can be programmed into models which only are enabled during steady-state initialization. To learn more about this, please see page 27 of the Dymola 2020 release notes.

Improved external function handling

Dymola 2020 now supports the exchanging of arrays (of 3 or more dimensions) with external Modelica function executables. For more details, please see page 61 of the Dymola 2020 release notes.

Nate Horn – Vice President 

Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion.

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-2019 Claytex Services Ltd All Rights Reserved. | Designed by CMA Marketing

Log in with your credentials

Forgot your details?