Executing Modelica Functions and Scripts and CATIA System Behavior Simulations

You use the Systems Simulation adapter to run Modelica functions and Modelica scripts from a Dymola behavior library created in the CATIA Dymola Behavior Modeling app. You can also run a System Behavior simulation created with the CATIA Behavior Experience app from the Dymola behavior library.

This task shows you how to:

Executing Only the Modelica Functions and Modelica Scripts

You can run Modelica scripts and Modelica functions of a Dymola behavior library without creating a System Behavior Simulation object from the library. In this case only the scripts and functions can run, not any model of the library.

  1. From the Simulation Applications section of the action bar, click Systems Simulation and drop it on the process diagram.
  2. Double-click Systems Simulation .
  3. From the Systems Simulation Editor that appears, select the Input tab and configure the input options.

    For more information, see Configuring the Input Options.

  4. Select the Run tab.
  5. To select the Dymola behavior library containing the functions and scripts to run, do the following:
    1. Select Content.
    2. Click Search in the dialog, and select the library.

      Note: When searching, search for objects of the type Behavior Library Reference.

  6. Under Systems Simulation Batch Execution Options, specify the Modelica script paths and the Modelica function calls.

    For example:

    Input Box Path or Call
    Script file name modelica://MyLib/MyScript.mos
    Modelica function name MyLib.MyFunction("Modelica.Electrical.Analog.Examples.CauerLowPassAnalog", "R1.i", "E:/temp/MyPlot2.png")

    For more information about the underlying example of script and function used here, see 3D Modeling | Systems Modeling and Execution | Dymola Behavior Modeling | Dymola Behavior Modeling | Performing a Virtual Execution | Scripting | Running Script Files and Functions with Batch.

  7. Optional: Expand and configure the Execution Options.

    For more information, see Configuring the Execution Options.

  8. Select the Output tab, and configure the output options.

    For more information, see Configuring the Output Options.

  9. Click OK.

Executing a CATIA System Behavior Simulation

You can use the Systems Simulation adapter to run a System Behavior Simulation created by the CATIA Behavior Experience app. If the behavior library containing the model used to create the simulation contains Modelica functions and Modelica scripts, they can also be run.

  1. From the Simulation Applications section of the action bar, click Systems Simulation and drop it on the process diagram.
  2. Double-click Systems Simulation .
  3. From the Systems Simulation Editor that appears, select the Input tab and configure the input options.

    For more information, see Configuring the Input Options.

  4. Select the Run tab.
  5. To select the System Behavior Simulation object to run, do either of the following:
    • Select Content, and do any of the following:
      • Select a System Behavior Simulation object in the workflow
      • Click Search in the dialog box, and select a System Behavior Simulation object
        Note: Search for objects of type Simulation (abstract).
    • Select Parameter, and select an object parameter that refers to a System Behavior Simulation object.
  6. Optional: If the model or library used to create the System Behavior Simulation contains Modelica functions or Modelica scripts, they can also be run by specifying the Modelica script paths and the Modelica function calls, under Systems Simulation Batch Execution Options.

    For example:

    Input Box Path or Call
    Script file name modelica://MyLib/MyScript.mos
    Modelica function name MyLib.MyFunction("Modelica.Electrical.Analog.Examples.CauerLowPassAnalog", "R1.i", "E:/temp/MyPlot2.png")

    For more information about the underlying example of script and function used here, see 3D Modeling | Systems Modeling and Execution | Dymola Behavior Modeling | Dymola Behavior Modeling | Performing a Virtual Execution | Scripting | Running Script Files and Functions with Batch.

    Note: To also have a System Behavior Simulation to run, you must create such simulation from the model in the behavior library. For details about this, see the tip in 3D Modeling | Systems Modeling and Execution | Behavior Experience | Behavior Experience | Running a Simulation | Running a Behavior Experience with Batch.

  7. Optional: Expand and configure the Execution Options.

    For more information, see Configuring the Execution Options.

  8. Select the Output tab, and configure the output options.

    For more information, see Configuring the Output Options.

  9. Click OK.