8.3
general documentation
cs_navsto_coupling.h
Go to the documentation of this file.
1#ifndef __CS_NAVSTO_COUPLING_H__
2#define __CS_NAVSTO_COUPLING_H__
3
4/*============================================================================
5 * Functions and structures to handle the settings of different
6 * velocity/pressure coupling algorithms
7 * - Artificial Compressibility algorithm
8 * - Monolithic algorithm
9 * - Projection algorithm
10 *============================================================================*/
11
12/*
13 This file is part of code_saturne, a general-purpose CFD tool.
14
15 Copyright (C) 1998-2024 EDF S.A.
16
17 This program is free software; you can redistribute it and/or modify it under
18 the terms of the GNU General Public License as published by the Free Software
19 Foundation; either version 2 of the License, or (at your option) any later
20 version.
21
22 This program is distributed in the hope that it will be useful, but WITHOUT
23 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
24 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
25 details.
26
27 You should have received a copy of the GNU General Public License along with
28 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
29 Street, Fifth Floor, Boston, MA 02110-1301, USA.
30*/
31
32/*----------------------------------------------------------------------------
33 * Local headers
34 *----------------------------------------------------------------------------*/
35
36#include "cs_equation.h"
37#include "cs_field.h"
38#include "cs_navsto_param.h"
39
40/*----------------------------------------------------------------------------*/
41
43
44/*============================================================================
45 * Macro definitions
46 *============================================================================*/
47
48/*============================================================================
49 * Type definitions
50 *============================================================================*/
51
52/* Predefined context structures depending on the settings */
53/* ======================================================= */
54
62typedef struct {
63
72
74
75
81typedef struct {
82
86
87
95typedef struct {
96
108
115
122
128
134
136
137/*============================================================================
138 * Public function prototypes
139 *============================================================================*/
140
141/*----------------------------------------------------------------------------*/
151/*----------------------------------------------------------------------------*/
152
155 void *context);
156
157/*----------------------------------------------------------------------------*/
167/*----------------------------------------------------------------------------*/
168
169void *
171 cs_navsto_param_t *nsp);
172
173/*----------------------------------------------------------------------------*/
182/*----------------------------------------------------------------------------*/
183
184void *
185cs_navsto_ac_free_context(void *context);
186
187/*----------------------------------------------------------------------------*/
197/*----------------------------------------------------------------------------*/
198
199void
201 cs_adv_field_t *adv_field,
202 void *context);
203
204/*----------------------------------------------------------------------------*/
212/*----------------------------------------------------------------------------*/
213
214void
216 void *context);
217
218/*----------------------------------------------------------------------------*/
227/*----------------------------------------------------------------------------*/
228
230cs_navsto_ac_get_momentum_eq(void *context);
231
232/*----------------------------------------------------------------------------*/
242/*----------------------------------------------------------------------------*/
243
244void *
246 cs_navsto_param_t *nsp);
247
248/*----------------------------------------------------------------------------*/
256/*----------------------------------------------------------------------------*/
257
258void *
260
261/*----------------------------------------------------------------------------*/
271/*----------------------------------------------------------------------------*/
272
273void
275 cs_adv_field_t *adv_field,
276 void *context);
277
278/*----------------------------------------------------------------------------*/
286/*----------------------------------------------------------------------------*/
287
288void
290 void *context);
291/*----------------------------------------------------------------------------*/
300/*----------------------------------------------------------------------------*/
301
304
305/*----------------------------------------------------------------------------*/
316/*----------------------------------------------------------------------------*/
317
318void *
320 cs_navsto_param_t *nsp);
321
322/*----------------------------------------------------------------------------*/
330/*----------------------------------------------------------------------------*/
331
332void *
334
335/*----------------------------------------------------------------------------*/
346/*----------------------------------------------------------------------------*/
347
348void
350 cs_adv_field_t *adv_field,
351 bool has_previous,
352 void *context);
353
354/*----------------------------------------------------------------------------*/
364/*----------------------------------------------------------------------------*/
365
366void
368 const cs_navsto_param_t *nsp,
369 void *context);
370
371/*----------------------------------------------------------------------------*/
380/*----------------------------------------------------------------------------*/
381
384
385/*----------------------------------------------------------------------------*/
386
388
389#endif /* __CS_NAVSTO_COUPLING_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
void cs_navsto_ac_init_setup(const cs_navsto_param_t *nsp, cs_adv_field_t *adv_field, void *context)
Start setting-up the Navier-Stokes equations when an Artificial Compressibility algorithm is used to ...
Definition: cs_navsto_coupling.cpp:238
cs_equation_t * cs_navsto_ac_get_momentum_eq(void *context)
Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of artif...
Definition: cs_navsto_coupling.cpp:319
void * cs_navsto_projection_create_context(cs_param_bc_type_t bc, cs_navsto_param_t *nsp)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an increme...
Definition: cs_navsto_coupling.cpp:572
void * cs_navsto_projection_free_context(void *context)
Free the context structure related to a Projection approach.
Definition: cs_navsto_coupling.cpp:641
void cs_navsto_projection_last_setup(const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
Finalize the setup for the Navier-Stokes equations when a projection algorithm is used to coupled the...
Definition: cs_navsto_coupling.cpp:741
void * cs_navsto_ac_create_context(cs_param_bc_type_t bc, cs_navsto_param_t *nsp)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artific...
Definition: cs_navsto_coupling.cpp:170
cs_equation_t * cs_navsto_monolithic_get_momentum_eq(void *context)
Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a mon...
Definition: cs_navsto_coupling.cpp:548
cs_equation_t * cs_navsto_projection_get_momentum_eq(void *context)
Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a pro...
Definition: cs_navsto_coupling.cpp:797
void cs_navsto_monolithic_init_setup(const cs_navsto_param_t *nsp, cs_adv_field_t *adv_field, void *context)
Start setting-up the Navier-Stokes equations when a monolithic algorithm is used to coupled the syste...
Definition: cs_navsto_coupling.cpp:471
void cs_navsto_ac_last_setup(const cs_navsto_param_t *nsp, void *context)
Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is us...
Definition: cs_navsto_coupling.cpp:285
void * cs_navsto_ac_free_context(void *context)
Free the context structure related to an Artificial Compressibility approach.
Definition: cs_navsto_coupling.cpp:216
void * cs_navsto_monolithic_create_context(cs_param_bc_type_t bc, cs_navsto_param_t *nsp)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using a monolith...
Definition: cs_navsto_coupling.cpp:342
void * cs_navsto_monolithic_free_context(void *context)
Free the context structure related to a monolithic approach.
Definition: cs_navsto_coupling.cpp:449
void cs_navsto_monolithic_last_setup(const cs_navsto_param_t *nsp, void *context)
Finalize the setup for the Navier-Stokes equations when a monolithic algorithm is used to coupled the...
Definition: cs_navsto_coupling.cpp:526
void cs_navsto_projection_init_setup(const cs_navsto_param_t *nsp, cs_adv_field_t *adv_field, bool has_previous, void *context)
Start setting-up the Navier-Stokes equations when a projection algorithm is used to coupled the syste...
Definition: cs_navsto_coupling.cpp:667
cs_equation_param_t * cs_navsto_coupling_get_momentum_eqp(const cs_navsto_param_t *nsp, void *context)
Retrieve the cs_equation_param_t structure related to the momentum equation according to the type of ...
Definition: cs_navsto_coupling.cpp:116
cs_param_bc_type_t
Definition: cs_param_types.h:481
Definition: cs_advection_field.h:151
Definition: cs_cdo_quantities.h:139
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:192
Main structure to handle the discretization and the resolution of an equation.
Field descriptor.
Definition: cs_field.h:131
Set of parameters specific for solving the Navier-Stokes system with the "artificial compressibility"...
Definition: cs_navsto_coupling.h:62
cs_equation_t * momentum
Definition: cs_navsto_coupling.h:64
cs_property_t * zeta
Definition: cs_navsto_coupling.h:71
Set of parameters specific for solving the Navier-Stokes system with a fully coupled monolithic algor...
Definition: cs_navsto_coupling.h:81
cs_equation_t * momentum
Definition: cs_navsto_coupling.h:83
Structure storing the parameters related to the resolution of the Navier-Stokes system.
Definition: cs_navsto_param.h:263
Set of parameters specific for solving the Navier-Stokes system with an incremental projection algori...
Definition: cs_navsto_coupling.h:95
cs_equation_t * correction
Definition: cs_navsto_coupling.h:99
cs_field_t * phi
Definition: cs_navsto_coupling.h:127
cs_field_t * predicted_velocity
Definition: cs_navsto_coupling.h:121
cs_equation_t * prediction
Definition: cs_navsto_coupling.h:97
cs_field_t * pressure_incr_gradient
Definition: cs_navsto_coupling.h:133
cs_real_t * bdy_pressure_incr
Definition: cs_navsto_coupling.h:114
cs_real_t * div_st
Definition: cs_navsto_coupling.h:107
Structure associated to the definition of a property relying on the cs_xdef_t structure.