File: cs_user_coupling.h

package info (click to toggle)
code-saturne 7.0.2%2Brepack-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 62,868 kB
  • sloc: ansic: 395,271; f90: 100,755; python: 86,746; cpp: 6,227; makefile: 4,247; xml: 2,389; sh: 1,091; javascript: 69
file content (93 lines) | stat: -rw-r--r-- 3,559 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*============================================================================
 * Code_Saturne documentation page
 *============================================================================*/

/*
  This file is part of Code_Saturne, a general-purpose CFD tool.

  Copyright (C) 1998-2021 EDF S.A.

  This program is free software; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free Software
  Foundation; either version 2 of the License, or (at your option) any later
  version.

  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  details.

  You should have received a copy of the GNU General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
  Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/*-----------------------------------------------------------------------------*/

/*!
  \page user_coupling Code coupling

  \section cs_user_coupling_h_intro Introduction

  C user functions for code coupling.

  Several functions are present in the file, each specific to different
  kind of couplings.

  \section cs_user_coupling_h_cs_user_coupling  Global options for coupling

  One can define global options for coupling with the user function
  \ref cs_user_parameters. using \ref cs_coupling_set_sync_flag
  allows defining the time step
  synchronization policy:

  \snippet cs_user_parameters-coupling.c coupling_ts

  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:

  \snippet cs_user_parameters-coupling.c coupling_1

  \section cs_user_coupling_h_cs_user_syrthes_coupling Code coupling with SYRTHES

  The \ref cs_user_syrthes_coupling subroutine defines a or multiple couplings
  between Code_Saturne and SYRTHES by calling the \ref cs_syr_coupling_define
  function for each coupling to add.

  The following lines of code show different examples of coupling with SYRTHES.

  \subsection cs_user_coupling_h_cs_user_syrthes_coupling_example_1 Example 1

  \snippet cs_user_coupling-syrthes.c coupling_syrthes_1

  \subsection cs_user_coupling_h_cs_user_syrthes_coupling_example_2 Example 2

  \snippet cs_user_coupling-syrthes.c coupling_syrthes_2

  \subsection cs_user_coupling_h_cs_user_syrthes_coupling_example_3 Example 3

  \snippet cs_user_coupling-syrthes.c coupling_syrthes_3

  \section cs_user_coupling_h_cs_user_saturne_coupling Code coupling with other instances of Code_Saturne

  The \ref cs_user_saturne_coupling allows one to couple different instances of
  Code_Saturne by calling the \ref cs_sat_coupling_define function for each
  coupling to add.

  Two examples are provided hereafter.

  \subsection cs_user_coupling_h_cs_user_saturne_coupling_example_1 Example 1

  \snippet cs_user_coupling-saturne.c coupling_saturne_1

  \subsection cs_user_coupling_h_cs_user_saturne_coupling_example_2 Example 2

  \snippet cs_user_coupling-saturne.c coupling_saturne_2

*/