programmer's documentation
cs_cdofb_navsto.h
Go to the documentation of this file.
1 #ifndef __CS_CDOFB_NAVSTO_H__
2 #define __CS_CDOFB_NAVSTO_H__
3 
4 /*============================================================================
5  * Build an algebraic CDO face-based system for the Navier--Stokes system
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2018 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 #include "cs_defs.h"
31 
32 /*----------------------------------------------------------------------------
33  * Standard C library headers
34  *----------------------------------------------------------------------------*/
35 
36 /*----------------------------------------------------------------------------
37  * Local headers
38  *----------------------------------------------------------------------------*/
39 
40 #include "cs_base.h"
41 #include "cs_cdo_connect.h"
42 #include "cs_cdo_quantities.h"
43 #include "cs_equation_common.h"
44 #include "cs_equation_param.h"
45 #include "cs_field.h"
46 #include "cs_matrix.h"
47 #include "cs_mesh.h"
48 #include "cs_navsto_param.h"
49 #include "cs_source_term.h"
50 #include "cs_time_step.h"
51 
52 /*----------------------------------------------------------------------------*/
53 
55 
56 /*============================================================================
57  * Macro definitions
58  *============================================================================*/
59 
60 /*============================================================================
61  * Type definitions
62  *============================================================================*/
63 
64 /*============================================================================
65  * Public function prototypes
66  *============================================================================*/
67 
68 /*----------------------------------------------------------------------------*/
81 /*----------------------------------------------------------------------------*/
82 
83 void
85  const cs_cdo_connect_t *connect,
86  const cs_time_step_t *time_step,
87  const cs_matrix_structure_t *sms,
88  const cs_matrix_structure_t *vms);
89 
90 /*----------------------------------------------------------------------------*/
98 /*----------------------------------------------------------------------------*/
99 
100 void
102  const void *nsc_input);
103 
104 /*----------------------------------------------------------------------------*/
112 /*----------------------------------------------------------------------------*/
113 
114 void
116  const void *nsc_input);
117 
118 /*----------------------------------------------------------------------------*/
124 /*----------------------------------------------------------------------------*/
125 
126 void
128 
129 /*----------------------------------------------------------------------------*/
140 /*----------------------------------------------------------------------------*/
141 
142 void
144  double dt_cur,
145  const cs_navsto_param_t *nsp,
146  void *nsc_input);
147 
148 /*----------------------------------------------------------------------------*/
159 /*----------------------------------------------------------------------------*/
160 
161 void
163  double dt_cur,
164  const cs_navsto_param_t *nsp,
165  void *nsc_input);
166 
167 /*----------------------------------------------------------------------------*/
173 /*----------------------------------------------------------------------------*/
174 
175 cs_real_t *
177 
178 /*----------------------------------------------------------------------------*/
184 /*----------------------------------------------------------------------------*/
185 
186 cs_real_t *
188 
189 /*----------------------------------------------------------------------------*/
201 /*----------------------------------------------------------------------------*/
202 
203 void
205  const cs_real_t *rhs,
206  const cs_equation_param_t *eqp,
208  void *data,
209  cs_real_t *field_val);
210 
211 /*----------------------------------------------------------------------------*/
218 /*----------------------------------------------------------------------------*/
219 
220 void
222 
223 /*----------------------------------------------------------------------------*/
224 
226 
227 #endif /* __CS_CDOFB_NAVSTO_H__ */
Store common elements used when building an algebraic system related to an equation.
Definition: cs_equation_common.h:63
time step descriptor
Definition: cs_time_step.h:51
void cs_cdofb_navsto_init_ac_vpp_context(const cs_navsto_param_t *nsp, const void *nsc_input)
Initialize a cs_cdofb_navsto_t structure storing in the case of an Artificial Compressibility - VPP a...
Definition: cs_cdofb_navsto.c:282
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:159
void cs_cdofb_navsto_init_proj_context(const cs_navsto_param_t *nsp, const void *nsc_input)
Initialize a cs_cdofb_navsto_t structure storing in the case of an incremental Projection approach...
Definition: cs_cdofb_navsto.c:318
void cs_cdofb_navsto_init_common(const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step, const cs_matrix_structure_t *sms, const cs_matrix_structure_t *vms)
Set shared pointers from the main domain members for CDO face-based schemes.
Definition: cs_cdofb_navsto.c:249
#define BEGIN_C_DECLS
Definition: cs_defs.h:462
void cs_cdofb_navsto_proj_compute(const cs_mesh_t *mesh, double dt_cur, const cs_navsto_param_t *nsp, void *nsc_input)
Solve the Navier-Stokes system with a CDO face-based scheme using an incremental correction-projectio...
Definition: cs_cdofb_navsto.c:415
Definition: cs_cdo_connect.h:74
Structure storing the parameters related to the resolution of the Navier-Stokes system.
Definition: cs_navsto_param.h:141
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
void cs_cdofb_navsto_ac_vpp_compute(const cs_mesh_t *mesh, double dt_cur, const cs_navsto_param_t *nsp, void *nsc_input)
Solve the Navier-Stokes system with a CDO face-based scheme using an Artificial Compressibility - VPP...
Definition: cs_cdofb_navsto.c:381
Definition: cs_cdo_quantities.h:94
Definition: cs_mesh.h:63
void cs_cdofb_navsto_set_zero_mean_pressure(cs_real_t values[])
Update the pressure field in order to get a field with a zero-mean average.
Definition: cs_cdofb_navsto.c:511
cs_real_t * cs_cdofb_navsto_get_face_velocity(void)
Retrieve the values of the velocity on the faces.
Definition: cs_cdofb_navsto.c:444
cs_real_t * cs_cdofb_navsto_get_face_pressure(void)
Retrieve the values of the pressure on the faces.
Definition: cs_cdofb_navsto.c:461
void cs_cdofb_navsto_free_context(const cs_navsto_param_t *nsp)
Destroy a cs_cdofb_navsto_t structure.
Definition: cs_cdofb_navsto.c:351
#define END_C_DECLS
Definition: cs_defs.h:463
void cs_cdofb_navsto_update_fields(const cs_real_t *solu, const cs_real_t *rhs, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_real_t *field_val)
Store solution(s) of the linear system into a field structure Update extra-field values if required (...
Definition: cs_cdofb_navsto.c:484
Structure and routines handling the specific settings related to a cs_equation_t structure.
struct _cs_matrix_structure_t cs_matrix_structure_t
Definition: cs_matrix.h:86
Definition: mesh.f90:26