Code_Saturne development version for code/code coupling

A development version of Code_Saturne enables the code to be coupled with itself, via a chimera-like method.


The goal of this coupling is manifold:

  • to alleviate some meshing issues by separating the mesh in several parts that can overlap.
  • to have one mesh moving relatively to the others (not available at the moment).
  • to have two or more different turbulence models for different parts of the flow. At the moment, only the coupling between two (or more) RANS models or two (or more) LES models is available, except for the v2-f model that can only be coupled with itself. This means that the code cannot handle RANS - LES coupling.
  • ...

This coupling version is based on the latest production version of Code_Saturne : Code_Saturne 1.3.3. Thus, it should be linked with BFT 1.0.7, FVM 0.11.0 and the Preprocessor 1.3.3 (go to the Code_Saturne website to download them). The graphical user interface has not yet been modified to handle coupled calculations.

Modified and added files

All the C source files needed by this coupling method begin with cs_sat_coupling whereas the Fortran source files begin with csc (where csc stands for Code_Saturne coupling)


The following scripts should be used in order to set up a coupling study:

  • cree_sat.coupling: management of the study creation (type cree_sat.coupling -h for more information)
  • lance.coupling: launch script (should be adapted if one needs to couple more than two instances of Code_Saturne)
  • it helps with finding out the best way to launch the calculation according to the MPI distribution that is used (might need to be adapted as well)

Added files

  • cs_sat_coupling.c: management of the communications between two instances of Code_Saturne (via the FVM API)
  • cs_sat_coupling.h: corresponding headers

  • cplsat.h: header containing Fortran commons, related to coupling

  • cscini.F: initialization of the coupling structures
  • cscloc.F: localization of the overlapping areas (boundary faces or cells) between two meshes (wrapper around the call to USDCSC)

  • cscpfb.F: preparation of the variables being sent to other instances (for the boundary faces), for a given coupling number
  • csc2cl.F: translation of the variables received into boundary conditions of the local instance, for a given coupling number
  • cscfbr.F: wrapper around the calls to the CSCPFB and CSC2CL subroutines

  • cscpce.F: preparation of the variables being sent to other instances (for the cells) when the meshes overlap, for a given coupling number
  • csc2ts.F: translation of the variables received into source terms of the local instance, for a given coupling number
  • csccel.F: wrapper around the calls to the CSCPE and CSC2TS subroutines

  • memcs1.F: memory management
  • memcs2.F: ditto

  • usdcsc.F: user subroutine for boundary faces and cells selection, related to coupling

Modified files

  • caltri.F: call to CSCINI
  • iniini.F: initializations relative to code coupling functionality
  • navsto.F: modified stop of the Navier-Stokes solver when code coupling is activated
  • preduv.F: call to CSCCEL (wrapper for cell-based coupling, i.e. via a source term)
  • tridim.F: call to CSCLOC and call to CSCFBR (wrapper for face-based coupling, i.e. via boundary conditions)
  • typecl.F: output of the mass fluxes at the coupled boundaries

Current Tags:
create new tag
, view all tags
Topic attachments
I Attachment Action Size Date Who Comment
ziptgz ncs-13-coupling.tgz manage 12468.0 K 2008-09-05 - 10:18 DavidMonfort Kernel with code coupling capabilities (based on 1.3 version)
Topic revision: r4 - 2010-05-06 - 11:28:37 - JuanUribe
Saturne Web
19 Sep 2020
Test Cases

tip Saturne Tip of the Day
No graphical interface
To not use the graphical interface, create the cases with the noihm flag, i.e. cree sat STUDY CASE ... Read on Read more


Code_Saturne collaborative website
@ the University of Manchester
Copyright & by the contributing authors. Unless noted otherwise, all material on this web site is the property of the contributing authors.