C user functions for code coupling.
Several functions are present in the file, each specific to different kind of couplings.
One can define global options for coupling with the user function cs_user_parameters. using cs_coupling_set_sync_flag allows defining the time step synchronization policy:
A time step multiplier between coupled tools may also be defined. The apparent time step for the current instance times (as viewed by coupled codes) is equal to the true time step times this multiplier.
When coupling with SYRTHES, it is recommended to use the same multiplier here as for the thermal variable time step (this is not automated, so as to allow for more advanced combinations if necessary, so the user should ensure this when using a time step multiplier). For example:
The cs_user_syrthes_coupling subroutine defines a or multiple couplings between code_saturne and SYRTHES by calling the cs_syr_coupling_define function for each coupling to add.
The following lines of code show different examples of coupling with SYRTHES.
The cs_user_saturne_coupling allows one to couple different instances of code_saturne by calling the cs_sat_coupling_define function for each coupling to add.
Two examples are provided hereafter.