Running a Co-Simulation between Partner Code and Simcenter STAR-CCM+
The following steps provide instructions for compiling and launching your program using the helper scripts provided in Simcenter STAR-CCM+. These instructions are not relevant if you are using Microsoft Visual Studio (on Windows). In this case, you specify compiling and launching details using a Property Sheet in Microsoft Visual Studio. For instructions, see Compiling and Launching the Partner Code Using Windows.
-
Before coupling to a
Simcenter STAR-CCM+ simulation, compile your code. You can use your own build system or the
buildapi helper script that is provided in the
Simcenter STAR-CCM+ installation. To use the
buildapi script:
- Launch the Simcenter STAR-CCM+ simulation that you want to couple with your program.
- Set up the simulation for Simcenter STAR-CCM+ to Simcenter STAR-CCM+ Co-Simulation. For more information, see STAR-CCM+ Co-Simulation Workflow.
- In the Simcenter STAR-CCM+ simulation, select the node and set Method to Launch Application via Command Line.
-
Select the
node. For the
Command Line property, enter:
- On Windows:
> <executable>
- On Linux:
% [INSTALLDIR]/star/bin/starapi <executable>
where <executable> specifies the path to the executable file created when compiling your code. See the section, Helper Scripts, for more information about the starapi script as well as additional options that you can use with this script. - On Windows:
-
Run the co-simulation from the
Simcenter STAR-CCM+ simulation.
Note Solution stepping is not allowed for co-simulation with external code through the Co-Simulation API.
Note | When using the Launch Application via Command Line method, the Simcenter STAR-CCM+ simulation and the Simcenter STAR-CCM+ API server share the same Simcenter STAR-CCM+ license, meaning that you require a single license to run the co-simulation. On the other hand, if you launch the partner program separately (for example running the starapi script in a command console) and then connect the Simcenter STAR-CCM+ simulation to the running program by specifying the partner program host and port, you require two Simcenter STAR-CCM+ licenses. |