# Would a Co-simulation orchestrator work when a model uses a variable step size integrator

In every paper i was able to find, detailling the process of writing a co-simulation orchestrator (either Jacobi or Gauss-siedel), the paper assumed that both models were to compute their outputs on at a specific time "H", then, depending on the orchestrator, they would rollback and transpit their outputs to the other model for interpolation.

Example:

However, one of the main reasons i'm interested in co-simulation is for mixing schemes such as:

• RK4 (or higher)
• Leapfrog (or higher)
• RK4,5

Using the notations from the figure, the RK45 will obviously prevent Models S1 and S2 to step to the same time t + H and the Leapfrog scheme will yield the first and second state variables on different times, so at least one will not match the outputs of S1

Is there an algorithm already studied in litterature and if not is it reasonnable to perform something such as: -Choose S1 as any model, run it once, to T = H -Run S2 until it's internal time reaches or goes beyond H -Then interpolate S2's outputs to S1 and run S1 to T = T + 2H, then interpolate it's outputs to S2, --

etc...

This would technically look very similar to the graphs except that S1 would always step once. This would look like this:

I guess the gauss siedel is even superior in this case as it prevents extrapolation of the outputs. However i'm still curious as whether the Jacobi method would still work (for parallelization purposes)

In your case, your RK4- end RK45-integrated systems could be integrated with varying stepsizes so that they exactly end up at $$t+H$$ as required by the orchestrator. Maybe you wish to maintain a constant stepsize for your Leapfrog scheme so as to preserve its discrete Hamiltonian. Hence, you would have to choose its step size $$\Delta t_{LF}$$ and make sure that the coupling time step $$H$$ is a multiple of it.