6.2
general documentation
cs_cdofb_ac.h
Go to the documentation of this file.
1 #ifndef __CS_CDOFB_AC_H__
2 #define __CS_CDOFB_AC_H__
3 
4 /*============================================================================
5  * Build an algebraic CDO face-based system for the Navier-Stokes equations
6  * and solved it with an artificial compressibility algorithm
7  *============================================================================*/
8 
9 /*
10  This file is part of Code_Saturne, a general-purpose CFD tool.
11 
12  Copyright (C) 1998-2020 EDF S.A.
13 
14  This program is free software; you can redistribute it and/or modify it under
15  the terms of the GNU General Public License as published by the Free Software
16  Foundation; either version 2 of the License, or (at your option) any later
17  version.
18 
19  This program is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22  details.
23 
24  You should have received a copy of the GNU General Public License along with
25  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26  Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 */
28 
29 /*----------------------------------------------------------------------------*/
30 
31 #include "cs_defs.h"
32 
33 /*----------------------------------------------------------------------------
34  * Standard C library headers
35  *----------------------------------------------------------------------------*/
36 
37 /*----------------------------------------------------------------------------
38  * Local headers
39  *----------------------------------------------------------------------------*/
40 
41 #include "cs_base.h"
42 #include "cs_cdo_connect.h"
43 #include "cs_cdo_quantities.h"
44 #include "cs_equation.h"
45 #include "cs_mesh.h"
46 #include "cs_navsto_coupling.h"
47 #include "cs_navsto_param.h"
48 #include "cs_source_term.h"
49 #include "cs_time_step.h"
50 
51 /*----------------------------------------------------------------------------*/
52 
54 
55 /*============================================================================
56  * Macro definitions
57  *============================================================================*/
58 
59 /*============================================================================
60  * Type definitions
61  *============================================================================*/
62 
63 /*============================================================================
64  * Inline static function prototypes
65  *============================================================================*/
66 
67 /*----------------------------------------------------------------------------*/
75 /*----------------------------------------------------------------------------*/
76 
77 inline static cs_real_t *
78 cs_cdofb_ac_get_face_velocity(bool previous)
79 {
81  previous);
82 }
83 
84 /*============================================================================
85  * Public function prototypes
86  *============================================================================*/
87 
88 /*----------------------------------------------------------------------------*/
96 /*----------------------------------------------------------------------------*/
97 
98 void
100  const cs_cdo_connect_t *connect,
101  const cs_time_step_t *time_step);
102 
103 /*----------------------------------------------------------------------------*/
113 /*----------------------------------------------------------------------------*/
114 
115 void *
117  cs_boundary_type_t *fb_type,
118  void *nsc_input);
119 
120 /*----------------------------------------------------------------------------*/
128 /*----------------------------------------------------------------------------*/
129 
130 void *
131 cs_cdofb_ac_free_scheme_context(void *scheme_context);
132 
133 /*----------------------------------------------------------------------------*/
142 /*----------------------------------------------------------------------------*/
143 
144 void
146  void *context);
147 
148 /*----------------------------------------------------------------------------*/
158 /*----------------------------------------------------------------------------*/
159 
160 void
162  const cs_navsto_param_t *nsp,
163  void *scheme_context);
164 
165 /*----------------------------------------------------------------------------*/
176 /*----------------------------------------------------------------------------*/
177 
178 void
180  const cs_navsto_param_t *nsp,
181  void *scheme_context);
182 
183 /*----------------------------------------------------------------------------*/
184 
186 
187 #endif /* __CS_CDOFB_AC_H__ */
void cs_cdofb_ac_init_common(const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step)
Set shared pointers from the main domain members.
Definition: cs_cdofb_ac.c:848
time step descriptor
Definition: cs_time_step.h:64
int cs_boundary_type_t
Definition: cs_boundary.h:65
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
void cs_cdofb_ac_set_sles(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when an AC algorithm is used to couple the system...
Definition: cs_cdofb_ac.c:1018
Definition: cs_cdo_connect.h:76
Structure storing the parameters related to the resolution of the Navier-Stokes system.
Definition: cs_navsto_param.h:462
double cs_real_t
Floating-point value.
Definition: cs_defs.h:307
Definition: cs_cdo_quantities.h:124
Definition: cs_mesh.h:74
void * cs_cdofb_ac_init_scheme_context(const cs_navsto_param_t *nsp, cs_boundary_type_t *fb_type, void *nsc_input)
Initialize a cs_cdofb_ac_t structure.
Definition: cs_cdofb_ac.c:876
void cs_cdofb_ac_compute_implicit_nl(const cs_mesh_t *mesh, const cs_navsto_param_t *nsp, void *scheme_context)
Solve the unsteady Navier-Stokes system with a CDO face-based scheme using a Artificial Compressibili...
Definition: cs_cdofb_ac.c:1239
cs_real_t * cs_equation_get_face_values(const cs_equation_t *eq, bool previous)
For a given equation, retrieve an array of values related to each face of the mesh for the unknowns...
Definition: cs_equation.c:2720
#define END_C_DECLS
Definition: cs_defs.h:496
void cs_cdofb_ac_compute_implicit(const cs_mesh_t *mesh, const cs_navsto_param_t *nsp, void *scheme_context)
Solve the unsteady Navier-Stokes system with a CDO face-based scheme using a Artificial Compressibili...
Definition: cs_cdofb_ac.c:1083
void * cs_cdofb_ac_free_scheme_context(void *scheme_context)
Destroy a cs_cdofb_ac_t structure.
Definition: cs_cdofb_ac.c:988
Routines to handle structures used as a context when solving the Navier-Stokes equations. Structures are cast on-the-fly according to the type of coupling. Routines to handle the settings of coupling algorithms.
Definition: mesh.f90:26
cs_equation_t * cs_equation_by_name(const char *eqname)
Find the cs_equation_t structure with name eqname Return NULL if not find.
Definition: cs_equation.c:353