My Project
programmer's documentation
Loading...
Searching...
No Matches
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 * Routines to handle structures used as a context when solving the
6 * Navier-Stokes equations. Structures are cast on-the-fly according to the
7 * type of coupling.
8 *============================================================================*/
9
10/*
11 This file is part of Code_Saturne, a general-purpose CFD tool.
12
13 Copyright (C) 1998-2019 EDF S.A.
14
15 This program is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License as published by the Free Software
17 Foundation; either version 2 of the License, or (at your option) any later
18 version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23 details.
24
25 You should have received a copy of the GNU General Public License along with
26 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
27 Street, Fifth Floor, Boston, MA 02110-1301, USA.
28*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "cs_equation.h"
35#include "cs_field.h"
36#include "cs_navsto_param.h"
37#include "cs_param.h"
38
39/*----------------------------------------------------------------------------*/
40
42
57/*============================================================================
58 * Macro definitions
59 *============================================================================*/
60
61/*============================================================================
62 * Type definitions
63 *============================================================================*/
64
65/* Predefined context structures depending on the settings */
66/* ======================================================= */
67
83
103
114
146
164
165/*============================================================================
166 * Public function prototypes
167 *============================================================================*/
168
169/*----------------------------------------------------------------------------*/
179/*----------------------------------------------------------------------------*/
180
181void *
184
185/*----------------------------------------------------------------------------*/
195/*----------------------------------------------------------------------------*/
196
197void *
199 void *context);
200
201/*----------------------------------------------------------------------------*/
210/*----------------------------------------------------------------------------*/
211
212void
214 void *context);
215
216/*----------------------------------------------------------------------------*/
227/*----------------------------------------------------------------------------*/
228
229void
231 const cs_cdo_quantities_t *quant,
232 const cs_navsto_param_t *nsp,
233 void *context);
234
235/*----------------------------------------------------------------------------*/
244/*----------------------------------------------------------------------------*/
245
248
249/*----------------------------------------------------------------------------*/
259/*----------------------------------------------------------------------------*/
260
261void *
264
265/*----------------------------------------------------------------------------*/
275/*----------------------------------------------------------------------------*/
276
277void *
279 void *context);
280
281/*----------------------------------------------------------------------------*/
290/*----------------------------------------------------------------------------*/
291
292void
294 void *context);
295
296/*----------------------------------------------------------------------------*/
307/*----------------------------------------------------------------------------*/
308
309void
311 const cs_cdo_quantities_t *quant,
312 const cs_navsto_param_t *nsp,
313 void *context);
314
315/*----------------------------------------------------------------------------*/
324/*----------------------------------------------------------------------------*/
325
327cs_navsto_ac_get_momentum_eq(void *context);
328
329/*----------------------------------------------------------------------------*/
339/*----------------------------------------------------------------------------*/
340
341void *
344
345/*----------------------------------------------------------------------------*/
355/*----------------------------------------------------------------------------*/
356
357void *
359 void *context);
360
361/*----------------------------------------------------------------------------*/
370/*----------------------------------------------------------------------------*/
371
372void
374 void *context);
375
376/*----------------------------------------------------------------------------*/
387/*----------------------------------------------------------------------------*/
388
389void
391 const cs_cdo_quantities_t *quant,
392 const cs_navsto_param_t *nsp,
393 void *context);
394
395/*----------------------------------------------------------------------------*/
405/*----------------------------------------------------------------------------*/
406
409
410/*----------------------------------------------------------------------------*/
420/*----------------------------------------------------------------------------*/
421
422void *
425
426/*----------------------------------------------------------------------------*/
435/*----------------------------------------------------------------------------*/
436
437void *
439 void *context);
440
441/*----------------------------------------------------------------------------*/
450/*----------------------------------------------------------------------------*/
451
452void
454 void *context);
455
456/*----------------------------------------------------------------------------*/
467/*----------------------------------------------------------------------------*/
468
469void
471 const cs_cdo_quantities_t *quant,
472 const cs_navsto_param_t *nsp,
473 void *context);
474
475/*----------------------------------------------------------------------------*/
484/*----------------------------------------------------------------------------*/
485
488
489/*----------------------------------------------------------------------------*/
500/*----------------------------------------------------------------------------*/
501
502void *
505
506/*----------------------------------------------------------------------------*/
515/*----------------------------------------------------------------------------*/
516
517void *
519 void *context);
520
521/*----------------------------------------------------------------------------*/
532/*----------------------------------------------------------------------------*/
533
534void
536 int loc_id,
537 bool has_previous,
538 void *context);
539
540/*----------------------------------------------------------------------------*/
551/*----------------------------------------------------------------------------*/
552
553void
555 const cs_cdo_quantities_t *quant,
556 const cs_navsto_param_t *nsp,
557 void *context);
558
559/*----------------------------------------------------------------------------*/
568/*----------------------------------------------------------------------------*/
569
572
573/*----------------------------------------------------------------------------*/
574
576
577#endif /* __CS_NAVSTO_COUPLING_H__ */
#define BEGIN_C_DECLS
Definition cs_defs.h:467
double cs_real_t
Floating-point value.
Definition cs_defs.h:302
#define END_C_DECLS
Definition cs_defs.h:468
cs_equation_t * cs_navsto_ac_vpp_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.c:754
void * cs_navsto_ac_vpp_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to an Artificial Compressibility with the VPP approach.
Definition cs_navsto_coupling.c:612
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.c:524
void * cs_navsto_monolithic_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to a monolithic approach.
Definition cs_navsto_coupling.c:825
void * cs_navsto_ac_vpp_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artific...
Definition cs_navsto_coupling.c:547
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.c:963
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.c:1190
void cs_navsto_projection_init_setup(const cs_navsto_param_t *nsp, int loc_id, 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.c:1085
void cs_navsto_ac_vpp_init_setup(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when an Artificial Compressibility with VPP algorithm is...
Definition cs_navsto_coupling.c:637
void * cs_navsto_projection_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an increme...
Definition cs_navsto_coupling.c:987
void cs_navsto_projection_last_setup(const cs_cdo_connect_t *connect, 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.c:1133
void cs_navsto_monolithic_last_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, 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.c:927
void cs_navsto_ac_vpp_last_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, 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.c:711
void * cs_navsto_uzawa_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to an Uzawa-Augmented Lagrangian approach.
Definition cs_navsto_coupling.c:160
void cs_navsto_monolithic_init_setup(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when a monolithic algorithm is used to coupled the syste...
Definition cs_navsto_coupling.c:850
void * cs_navsto_uzawa_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Uzawa-A...
Definition cs_navsto_coupling.c:110
void cs_navsto_ac_last_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, 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.c:483
void * cs_navsto_ac_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to an Artificial Compressibility approach.
Definition cs_navsto_coupling.c:384
void cs_navsto_uzawa_last_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
Finalize the setup for the Navier-Stokes equations when an Uzawa Augmented Lagrangian algorithm is us...
Definition cs_navsto_coupling.c:272
void * cs_navsto_projection_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to a Projection approach.
Definition cs_navsto_coupling.c:1056
void * cs_navsto_ac_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artific...
Definition cs_navsto_coupling.c:337
void cs_navsto_uzawa_init_setup(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when a Uzawa Augmented Lagrangian algorithm is used to c...
Definition cs_navsto_coupling.c:185
void * cs_navsto_monolithic_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using a monolith...
Definition cs_navsto_coupling.c:780
void cs_navsto_ac_init_setup(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when an Artificial Compressibility algorithm is used to ...
Definition cs_navsto_coupling.c:409
cs_equation_t * cs_navsto_uzawa_get_momentum_eq(void *context)
Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of Uzawa...
Definition cs_navsto_coupling.c:314
cs_param_bc_type_t
Definition cs_param.h:302
Definition cs_cdo_connect.h:74
Definition cs_cdo_quantities.h:94
Main structure to handle the discretization and the resolution of an equation.
Field descriptor.
Definition cs_field.h:124
Set of parameters specific for solving the Navier-Stokes system with the "artificial compressibility"...
Definition cs_navsto_coupling.h:75
cs_equation_t * momentum
Definition cs_navsto_coupling.h:77
cs_property_t * zeta
Definition cs_navsto_coupling.h:79
Set of parameters specific for solving the Navier-Stokes system with the "artificial compressibility"...
Definition cs_navsto_coupling.h:91
cs_equation_t * momentum
Definition cs_navsto_coupling.h:93
cs_equation_t * graddiv
Definition cs_navsto_coupling.h:94
cs_property_t * zeta
Definition cs_navsto_coupling.h:98
Set of parameters specific for solving the Navier-Stokes system with a fully coupled monolithic algor...
Definition cs_navsto_coupling.h:109
cs_equation_t * momentum
Definition cs_navsto_coupling.h:111
Structure storing the parameters related to the resolution of the Navier-Stokes system.
Definition cs_navsto_param.h:255
Set of parameters specific for solving the Navier-Stokes system with an incremental projection algori...
Definition cs_navsto_coupling.h:122
cs_equation_t * correction
Definition cs_navsto_coupling.h:126
cs_field_t * predicted_velocity
Definition cs_navsto_coupling.h:143
cs_equation_t * prediction
Definition cs_navsto_coupling.h:124
cs_real_t * bdy_pressure_incr
Definition cs_navsto_coupling.h:137
cs_real_t * div_st
Definition cs_navsto_coupling.h:132
Set of parameters specific for solving the Navier-Stokes system with a fully coupled algorithm using ...
Definition cs_navsto_coupling.h:155
cs_equation_t * momentum
Definition cs_navsto_coupling.h:157
cs_equation_t * energy
Definition cs_navsto_coupling.h:158
cs_property_t * zeta
Definition cs_navsto_coupling.h:160
Definition cs_property.h:104