Search code examples
modelicadymola

How to set the default solver in Dymola?


The default solver in Dymola is DASSL, how could I change the default solver in Dymola environment? Another question is : If I want to set a default solver for a particular model, how could I use annotation to do this?

enter image description here


Solution

  • I don't know a way to change the default solver in Dymola.

    For a particular model you can either add the following annotation manually

     annotation (experiment(__Dymola_Algorithm="Radau"));
    

    or use the UI, more specifically the simulation setup. The button "Store in Model" at the bottom left of the UI will generate the annotation shown above. Actually, having the flag next to it active, it should not even be necessary to click the "Store in Model" button.

    Dymola - Simulation Setup dialog

    Clicking "Store in Model" will open another dialog asking you which parts of the simulation setup shall be stored in the model. This refers to the tabs and should be self-explanatory.