You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

On this page

Simulation supports integration with Dymola (2021x and later), the outstanding Modelica and simulation technology. Integrating Simulation with Dymola allows you to specify Dymola as a language of Opaque expressions. You can download and install Dymola from https://www.3ds.com/products-services/catia/products/dymola/ and set up your modeling tool to allow integrating with Dymola.

After successful integration, Dymola will be listed where language selection is available, e.g., through the language option in the Simulation Console pane. Simulation will then be able to process Modelica commands from the Simulation Console pane as the image below.

Simulation processes Modelica commands after the successful integration with Dymola.

Integrating Simulation with Dymola

To integrate Simulation with Dymola


  1. On the modeling tool main menu, select Tools > Integrations. The Integrations dialog opens.



  2. Select Dymola (the Not Integrated status by default) and click Integrate/Remove Integration.
  3. The Dymola directory selection dialog opens. Click Browse to select the Dymola home directory and click OK.



  4. The Dymola integration dialog will be shown. Click OK. The Dymola integration status will change to Integrated.



  5. Restart the modeling tool to complete the integration.

Note

  • Dymola integration does not support Linux or Mac operating systems (only Windows).
  • For Teamwork Cloud projects, the model file must be attached only to the project so that the working directory of Dymola will be automatically set to the temp folder of the modeling tool, e.g., C:\Users\ABC1\AppData\Local\.magicdraw \2021x\tmp\2020-11-23-13-32-34\attachedFiles.

Using Simulation with Dymola

After the successful integration, you can use Simulation with Dymola through a Behavior. For example, you can create an OpaqueBehavior and use it as a CallBehaviorAction in the Activity diagram by doing the following steps


  1. Create an OpaqueBehavior, e.g., simulateExtendedModel with Language as Dymola and Body as valid Modelica script. The OpaqueBehavior must contain all required in/out Parameters with valid Type and Multiplicity as shown below.



  2. Create a CallBehaviorAction in the Activity diagram of a Block, e.g., Modelica and provide valid in/out Parameters through in/out Pins as shown below.



  3. Specify values of Parameters, e.g., InstanceSpec and run the simulation. You can get the results from Dymola back to Simulation as shown below.