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.
-
From the Simulation Applications section of the action bar, click Systems Simulation
and drop it on the process diagram.
-
Double-click Systems Simulation
.
-
From the Systems Simulation Editor that appears,
select the Input tab and configure the input
options.
For more information, see Configuring the Input Options.
-
Select the Run tab.
-
To select the Dymola behavior library containing the functions and scripts
to run, do the following:
-
Select Content.
-
Click Search in the dialog, and select the library.
Note:
When searching, search for objects of the type
Behavior Library Reference.
-
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.
-
Optional: Expand and configure the Execution
Options.
For more information, see Configuring the Execution Options.
-
Select the Output tab, and configure the output
options.
For more information, see Configuring the Output Options.
-
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.
-
From the Simulation Applications section of the action bar, click Systems Simulation
and drop it on the process diagram.
-
Double-click Systems Simulation
.
-
From the Systems Simulation Editor that appears,
select the Input tab and configure the input
options.
For more information, see Configuring the Input Options.
-
Select the Run tab.
-
To select the System Behavior Simulation object to run, do either of the
following:
- Select Content, and do any of the following:
- Select Parameter, and select an object
parameter that refers to a System Behavior Simulation object.
- 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.
-
Optional: Expand and configure the Execution
Options.
For more information, see Configuring the Execution Options.
-
Select the Output tab, and configure the output
options.
For more information, see Configuring the Output Options.
-
Click OK.
|