Here are a couple more Dymola tips and tricks that you may want to incorporate into your daily Dymola work.
Mark a model as the ‘Simulation Model’
How often has this happened to you?
You’re modifying a sub-component of your simulation model and once you complete the change, quickly hit ctrl+s (enter), hop over to the Simulation tab and click ‘simulate’. After a few seconds you find yourself inundated with warning and error messages which leave you scratching your head about what you goofed up in your modification of the sub-component. After a little reading of the error messages you suddenly realize that you simply forgot to swap back to the ‘Simulation Model’ before clicking ‘solve? Doh!
If you’re anything like me… this has happened hundreds of times in your career. Since at least Dymola 2017, Dassault Systemes has implemented the ability to set a particular model as the ‘Simulation Model’. This, in effect, tells Dymola to always simulate this model rather than the model that is currently opened in the Modeling window.
To mark a model as the ‘Simulation Model’ simply right click on the tab for that model and select ‘Simulation Model’.
Once you’ve clicked on ‘Simulation Model’ you will notice that the name of the class (tab label) becomes bold font. This way it is easy to see which of your open models is set as the simulation model.
One word of warning: setting a particular simulation as your ‘Simulation Model’ will inevitably cause you to simulate a model that you didn’t expect to simulate at some point. Overall, I still find this feature useful and therefore worth mentioning.
Iteration variables in non-linear systems
Often times, when working on improving model efficiency, the user needs to understand the structure of the non-linear systems of equations in the simulation model. This may aide them in adjusting the model slightly in order to make it more efficient or just clarify the structure of the reduced model. In older versions of Dymola, the user had to open the dsmodel.c file in a text editor and search for the listing of the systems of non-linear equations to find this information. In the more recent versions of Dymola, the user can simply set this flag in the Sim Setup window.
After clicking solve, the log window will contain a sub category of the non-linear systems for the simulation (and initialization if they differ) along with a breakdown of the iteration variables in each system.
This is so much easier than digging through a massive text file to find the information! 🙂
As I’ve stated before, I often come across these little ‘gems’ when working with various people… sometimes during training courses and sometimes with Dassault Systemes employees. These Dymola tips and tricks have made me a little more efficient, and I hope they help you too.
Nate Horn – Vice President