8.1
general documentation
cs_gwf_priv.h
Go to the documentation of this file.
1 #ifndef __CS_GWF_PRIV_H__
2 #define __CS_GWF_PRIV_H__
3 
4 /*============================================================================
5  * Structures/types related to the groundwater flow module
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2023 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  * Local headers
30  *----------------------------------------------------------------------------*/
31 
32 #include "cs_advection_field.h"
33 #include "cs_equation.h"
34 #include "cs_gwf_param.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*============================================================================
41  * Macro definitions
42  *============================================================================*/
43 
44 /*============================================================================
45  * Type definitions
46  *============================================================================*/
47 
49 
50 /*----------------------------------------------------------------------------*/
64 /*----------------------------------------------------------------------------*/
65 
66 typedef void
68  const cs_cdo_quantities_t *cdoq,
69  const cs_real_t *dof_values,
70  const cs_real_t *cell_values,
71  cs_real_t t_eval,
72  bool cur2prev,
73  cs_gwf_darcy_flux_t *darcy);
74 
81 
114 
119 
122 
123 };
124 
125 /*============================================================================
126  * Public function prototypes
127  *============================================================================*/
128 
129 /*----------------------------------------------------------------------------*/
138 /*----------------------------------------------------------------------------*/
139 
140 void
142  cs_real_t **p_dof_vals,
143  cs_real_t **p_cell_vals);
144 
145 /*----------------------------------------------------------------------------*/
153 /*----------------------------------------------------------------------------*/
154 
157 
158 /*----------------------------------------------------------------------------*/
164 /*----------------------------------------------------------------------------*/
165 
166 void
168 
169 /*----------------------------------------------------------------------------*/
175 /*----------------------------------------------------------------------------*/
176 
177 void
179 
180 /*----------------------------------------------------------------------------*/
194 /*----------------------------------------------------------------------------*/
195 
196 void
198  const cs_cdo_quantities_t *quant,
199  cs_param_space_scheme_t space_scheme,
200  void *update_context,
201  cs_gwf_darcy_update_t *update_func,
202  cs_gwf_darcy_flux_t *darcy);
203 
204 /*----------------------------------------------------------------------------*/
215 /*----------------------------------------------------------------------------*/
216 
217 void
219  const cs_cdo_quantities_t *quant,
220  const cs_equation_param_t *eqp,
221  cs_gwf_darcy_flux_t *darcy);
222 
223 /*----------------------------------------------------------------------------*/
234 /*----------------------------------------------------------------------------*/
235 
236 void
238  const cs_equation_t *eq,
239  cs_adv_field_t *adv);
240 
241 /*----------------------------------------------------------------------------*/
253 /*----------------------------------------------------------------------------*/
254 
255 void
257  const cs_cdo_quantities_t *cdoq,
258  cs_real_t *cell_vel,
259  cs_adv_field_t *adv);
260 
261 /*----------------------------------------------------------------------------*/
275 /*----------------------------------------------------------------------------*/
276 
277 void
278 cs_gwf_update_head(const cs_cdo_connect_t *connect,
279  const cs_cdo_quantities_t *cdoq,
280  const cs_equation_t *richards,
281  cs_flag_t option_flag,
282  cs_field_t *pressure_head,
283  cs_real_t head_in_law[],
284  bool cur2prev);
285 
286 /*----------------------------------------------------------------------------*/
287 
289 
290 #endif /* __CS_GWF_PRIV_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:515
unsigned short int cs_flag_t
Definition: cs_defs.h:321
void cs_gwf_darcy_flux_update_on_boundary_wo_eq(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_real_t *cell_vel, cs_adv_field_t *adv)
Compute the associated Darcy flux over the boundary of the domain for each vertex of a boundary face ...
Definition: cs_gwf_priv.c:588
void cs_gwf_get_value_pointers(const cs_equation_t *eq, cs_real_t **p_dof_vals, cs_real_t **p_cell_vals)
Retrieve the values of (potential) fields needed for the update of the Darcy velocity/fluxes.
Definition: cs_gwf_priv.c:162
void cs_gwf_darcy_flux_update_on_boundary(cs_real_t t_eval, const cs_equation_t *eq, cs_adv_field_t *adv)
Compute the associated Darcy flux over the boundary of the domain for each vertex of a boundary face....
Definition: cs_gwf_priv.c:551
void cs_gwf_darcy_flux_define(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_param_space_scheme_t space_scheme, void *update_context, cs_gwf_darcy_update_t *update_func, cs_gwf_darcy_flux_t *darcy)
Set the definition of the advection field attached to a cs_gwf_darcy_flux_t structure If the function...
Definition: cs_gwf_priv.c:288
cs_gwf_darcy_flux_t * cs_gwf_darcy_flux_create(cs_flag_t loc_flag)
Allocate and initialize a cs_gwf_darcy_flux_t structure.
Definition: cs_gwf_priv.c:205
void cs_gwf_darcy_flux_free(cs_gwf_darcy_flux_t **p_darcy)
Free a cs_gwf_darcy_flux_t structure.
Definition: cs_gwf_priv.c:228
void() cs_gwf_darcy_update_t(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_real_t *dof_values, const cs_real_t *cell_values, cs_real_t t_eval, bool cur2prev, cs_gwf_darcy_flux_t *darcy)
Update the advection field/arrays related to the Darcy flux. cell_values could be set to NULL when th...
Definition: cs_gwf_priv.h:67
void cs_gwf_darcy_flux_balance(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_equation_param_t *eqp, cs_gwf_darcy_flux_t *darcy)
Operate the balance by zone (relying on the splitting arising from the boundary settings) for the adv...
Definition: cs_gwf_priv.c:414
void cs_gwf_darcy_flux_log(cs_gwf_darcy_flux_t *darcy)
Log a cs_gwf_darcy_flux_t structure.
Definition: cs_gwf_priv.c:259
void cs_gwf_update_head(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_equation_t *richards, cs_flag_t option_flag, cs_field_t *pressure_head, cs_real_t head_in_law[], bool cur2prev)
Update head values (pressure head or head values for laws) Up to now, this is only used for single-ph...
Definition: cs_gwf_priv.c:643
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:211
Definition: cs_gwf_priv.h:80
cs_real_t * boundary_flux_val
Definition: cs_gwf_priv.h:117
void * update_input
Definition: cs_gwf_priv.h:120
cs_real_t * flux_val
Definition: cs_gwf_priv.h:116
cs_adv_field_t * adv_field
Definition: cs_gwf_priv.h:113
cs_gwf_darcy_update_t * update_func
Definition: cs_gwf_priv.h:121
cs_flag_t flux_location
Definition: cs_gwf_priv.h:115
bool simplified_boundary_update
Definition: cs_gwf_priv.h:118
Definition: cs_advection_field.h:150
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:137
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
Structure to handle the Darcy flux.