
Figure 1: Sequence of participant steps for a steady analysis

Figure 2: Sequence of participant steps for a transient analysis with iterations

Figure 3: Sequence of participant steps for a transient analysis without iterations As described in the introduction, co-simulation and mapping workflows can be combined. To perform mapping while doing the coupled analysis, an additional step, mapping setup, is required prior to heavyweight data access and initialization step. See details of the mapping setup step in Steps to perform mapping. Mapping will be performed during inputs update step, inside the coupled analysis loop.
Connect to System Coupling
The connection is established by providing the host name, port number, participant name, and build information. If running in parallel using a supported MPI distribution, MPI communicator should also be provided. See Execution in a parallel environment for more details.C++
C
Fortran
Python
Register heavyweight data access
Register access to the participant’s mesh and variable values. Register any other callback functions (for example a callback for creating a restart point). In the examples below,getSurfaceMesh, getInputScalarData, and createRestartPoint are functions that conform to provided prototypes that are to be implemented in the participant solver. See Access to heavyweight data and Creating restart points and restarting a coupled analysis for more details.
C++
C
Fortran
Python
Initialize the coupled analysis
Notify System Coupling that the analysis can be initialized. Note that if parameters are used, initial values for output parameters should be set prior to initializing the analysis. If no initial value is set, the parameter will be initialized to zero. See Parameter Data Access for more details.C++
C
Fortran
Python
Coupled analysis loop
Enter a coupled analysis loop until the analysis is complete. This step is different, depending on whether the analysis is steady or transient.- For steady analysis, there is the coupling iteration loop. The participant should enter the coupling iteration loop and exit it only when there are no more coupling iterations to be done.
-
For transient analysis, there are either one or two nested loops, depending on whether the participant uses implicit or explicit time integration.
- The outer loop is the coupling time step loop. The participant should enter the coupling time step loop and exit it only when there are no more coupling time steps to be done.
- The inner loop is the coupling iteration loop. The participant should enter the coupling iteration loop and exit it only when there are no more coupling iterations to be done within the current coupling time step. This loop is required for implicit time integration but is unnecessary if the time integration is explicit.
- Update Inputs. Notify System Coupling that inputs can be updated. After inputs update, the inputs are up-to-date for the current iteration. The participant solver can perform its solver iterations after inputs update.
- Update Outputs. Notify System Coupling that outputs are updated and provide solver convergence status. Before outputs update, the participant must update all output data so that it can be consumed by System Coupling.