Introduction
C user functions for code coupling.
Several functions are present in the file, each specific to different kind of couplings.
Global options for coupling
One can define global options for coupling with the user function cs_user_coupling . These options allow defining the time step synchronization policy, as well as a time step multiplier.
{
}
void cs_coupling_set_ts_multiplier(double m)
Define a time step multiplier for external couplings.
Definition cs_coupling.c:386
Code coupling with SYRTHES
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.
Example 1
{
int verbosity = 1, plot = 1;
float tolerance = 0.1;
bool allow_nonmatching = false;
"3",
NULL,
' ',
allow_nonmatching,
tolerance,
verbosity,
plot);
}
void cs_syr_coupling_define(const char *syrthes_name, const char *boundary_criteria, const char *volume_criteria, char projection_axis, bool allow_nonmatching, float tolerance, int verbosity, int visualization)
Define new SYRTHES coupling.
Definition cs_syr_coupling.c:801
Example 2
{
int verbosity = 1, plot = 1;
float tolerance = 0.1;
bool allow_nonmatching = false;
"Wall",
NULL,
'z',
allow_nonmatching,
tolerance,
verbosity,
plot);
}
Example 3
{
int verbosity = 1, plot = 1;
float tolerance = 0.1;
bool allow_nonmatching = false;
NULL,
"box[0., 0., 0., 1., 1., 1.]",
' ',
allow_nonmatching,
tolerance,
verbosity,
plot);
}
Code coupling with other instances of Code_Saturne
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.
Example 1
{
int verbosity = 1;
"3 or 4",
NULL,
NULL,
"all[]",
verbosity);
}
void cs_sat_coupling_define(const char *saturne_name, const char *boundary_cpl_criteria, const char *volume_cpl_criteria, const char *boundary_loc_criteria, const char *volume_loc_criteria, int verbosity)
Define new Code_Saturne coupling.
Definition cs_sat_coupling.c:1895
Example 2
{
int verbosity = 1;
"coupled_faces",
"all[]",
NULL,
"all[]",
verbosity);
}