< Back to News & Blog

Dymola tips and tricks series (I)

Maria Henningsson January 20, 2015

Have you been working with Dymola for a while but still feel that you are not using it as effectively as you could be?  In this series of posts, I’ll share tips and tricks that I have picked up along the way.

Part I: Get your Dymola workflow going

An effective workflow is the key to getting your work done. Without it, a lot of effort gets wasted navigating between windows and views to keep track of the right information. With a good workflow in place, you can focus your time and energy on the real work: creative solutions to challenging engineering problems.

Set up a project start script

Starting Dymola should not be a hassle. Create a script for your project that opens Dymola, loads the right libraries, and makes the correct settings:y. 

If you have multiple versions of Dymola installed, you can associate the right one with the script. Right-click the script icon and select Properties/Opens with – Change and select the Dymola executable of the version you want to use.

Place a shortcut for the script on your desktop and you’re good to go.

Set Dymola working directory

Dymola creates a massive amount of files in the working directory during translation and simulation. These files are occasionally useful, but most of the time they only clutter up your file system. By explicitly setting the working directory, the clutter gets confined to one place where you can go find it if needed.

Add the line “cd MyDymolaDirectory” to your start script to change your working directory automatically:

I will talk more about how and when to check out these files in a later post on troubleshooting.

Switching between models

Browsing between models in Dymola is not as straightforward as I would have liked (why can’t the forward and backward arrows in the toolbar be used for that?). Still, you can access the previously open models through the icon to the left of the arrows:

Simulation icons in the Modeling view

In all software development, it is good practice to frequently check that the code still works after modifications. In Dymola, the check button is one tool to accomplish this, but sometimes the model check is successful while the model still fails to translate or simulate.

I find it useful to add the simulation icons to the toolbar in the modeling view to make it easier to frequently check translation and simulation. Right-click empty space on the toolbar and select Simulation:


It took me a while to find out that Dymola actually has auto-completion. It’s not flawless, but still quite useful. In the text layer, start typing and hit ctrl+space for suggestions:

Browse result variables

Learn to master the variable browser. To find the right variables, use regular expressions:

pipe*.p allow any strings between pipe and .p by using wildcard *
pipe*summary.p reduce the set to include only variables in summary records
pipe{2,8}*.summary.T show all variables starting with T in summary records for pipe 2 and 8
pipe{2,8}*.summary.T{^[} show all variables starting with T in summary records for pipe 2 and 8 excluding those that match T[

To see numerical values of the variables, type the time instant in the Time field.

Do you have tips to share or an issue you would like addressed? Please post a comment so we can spread the knowledge!

Contact Us

Request Information

  • *Field required