7.3
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-2022 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_system.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 /*----------------------------------------------------------------------------*/
60 /*----------------------------------------------------------------------------*/
61 
62 typedef void
64  const cs_equation_t *eq,
65  bool cur2prev,
66  void *input,
67  cs_gwf_darcy_flux_t *darcy);
68 
75 
104 
107 
108 };
109 
110 
120 typedef struct {
121 
134 
147 
160 
182 
188 
197 typedef struct {
198 
210 
223 
245 
285 
287 
293 
331 typedef struct {
332 
333  /* Set of equations associated to this modelling */
334 
347 
355 
362 
370 
377 
394 
436 
438 
442 
445 
473 
585 
587 
592 
595 
598 
599  /* These arrays are not always allocated. It depends on the numerical
600  settings */
601 
607 
654 
699 
703 
705 
711 
712 
720 typedef struct {
721 
741 
762 
774 
779 } cs_gwf_t;
780 
781 /*============================================================================
782  * Public function prototypes
783  *============================================================================*/
784 
785 /*----------------------------------------------------------------------------*/
793 /*----------------------------------------------------------------------------*/
794 
797 
798 /*----------------------------------------------------------------------------*/
804 /*----------------------------------------------------------------------------*/
805 
806 void
808 
809 /*----------------------------------------------------------------------------*/
815 /*----------------------------------------------------------------------------*/
816 
817 void
819 
820 /*----------------------------------------------------------------------------*/
834 /*----------------------------------------------------------------------------*/
835 
836 void
838  const cs_cdo_quantities_t *quant,
839  cs_param_space_scheme_t space_scheme,
840  void *update_context,
842  cs_gwf_darcy_flux_t *darcy);
843 
844 /*----------------------------------------------------------------------------*/
855 /*----------------------------------------------------------------------------*/
856 
857 void
859  const cs_cdo_quantities_t *quant,
860  const cs_equation_param_t *eqp,
861  cs_gwf_darcy_flux_t *darcy);
862 
863 /*----------------------------------------------------------------------------*/
864 
866 
867 #endif /* __CS_GWF_PRIV_H__ */
cs_gwf_darcy_update_t * update_func
Definition: cs_gwf_priv.h:106
cs_real_t * l_saturation_submesh
Definition: cs_gwf_priv.h:605
cs_property_t * moisture_content
Definition: cs_gwf_priv.h:159
bool use_properties_on_submesh
Consider a submesh to define the liquid saturation.
Definition: cs_gwf_priv.h:697
cs_adv_field_t * adv_field
Definition: cs_gwf_priv.h:100
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:308
cs_iter_algo_param_t nl_algo_param
Definition: cs_gwf_priv.h:701
cs_real_t * l_rel_permeability
Definition: cs_gwf_priv.h:596
cs_real_t * boundary_flux_val
Definition: cs_gwf_priv.h:103
Definition: cs_advection_field.h:150
cs_gwf_model_type_t model
Definition: cs_gwf_priv.h:738
cs_real_t * g_rel_permeability
Definition: cs_gwf_priv.h:597
cs_property_t * soil_porosity
Definition: cs_gwf_priv.h:760
cs_property_t * diff_wl_pty
Definition: cs_gwf_priv.h:435
Field descriptor.
Definition: cs_field.h:130
cs_param_nl_algo_t nl_algo_type
Definition: cs_gwf_priv.h:700
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:186
cs_property_t * diff_hg_pty
Definition: cs_gwf_priv.h:440
void() cs_gwf_darcy_update_t(const cs_real_t t_eval, const cs_equation_t *eq, bool cur2prev, void *input, cs_gwf_darcy_flux_t *darcy)
Update the advection field/arrays related to the Darcy flux.
Definition: cs_gwf_priv.h:63
void * model_context
Definition: cs_gwf_priv.h:773
void * update_input
Definition: cs_gwf_priv.h:105
Structure storing all the parameters to drive the algorithm called Anderson acceleration.
Definition: cs_iter_algo.h:177
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:495
bool use_coupled_solver
When a model relies on several coupled equations, there are two main options to build and solve the s...
Definition: cs_gwf_priv.h:695
cs_property_t * reac_hg_pty
Definition: cs_gwf_priv.h:441
cs_gwf_darcy_flux_t * g_darcy
Definition: cs_gwf_priv.h:393
cs_property_t * soil_capacity
Definition: cs_gwf_priv.h:244
cs_param_nl_algo_t
Class of non-linear iterative algorithm.
Definition: cs_param_types.h:546
Structure to handle the modelling of miscible or immiscible two-phase flows in a porous media...
Definition: cs_gwf_priv.h:331
cs_property_t * time_wg_pty
Definition: cs_gwf_priv.h:437
#define BEGIN_C_DECLS
Definition: cs_defs.h:512
bool use_explicit_dsldt_liquid
Consider an explicit treatment of the time derivative of the liquid saturation in the mass conservati...
Definition: cs_gwf_priv.h:698
cs_field_t * c_pressure
Definition: cs_gwf_priv.h:470
cs_real_t * diff_hg_array
Definition: cs_gwf_priv.h:589
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:285
cs_real_t * time_wg_array
Definition: cs_gwf_priv.h:586
Definition: cs_cdo_connect.h:61
cs_real_t g_viscosity
Definition: cs_gwf_priv.h:648
cs_real_t * time_wl_array
Definition: cs_gwf_priv.h:582
cs_gwf_darcy_flux_t * l_darcy
Definition: cs_gwf_priv.h:392
cs_real_t w_molar_mass
Definition: cs_gwf_priv.h:650
cs_real_t * srct_wl_array
Definition: cs_gwf_priv.h:584
cs_iter_algo_t * nl_algo
Definition: cs_gwf_priv.h:704
cs_gwf_model_type_t
Type of system of equation(s) to consider for the physical modelling.
Definition: cs_gwf_param.h:118
cs_real_t * g_cell_pressure
Definition: cs_gwf_priv.h:604
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
cs_real_t * flux_val
Definition: cs_gwf_priv.h:102
Definition: cs_cdo_quantities.h:132
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:339
cs_property_t * time_hg_pty
Definition: cs_gwf_priv.h:439
cs_equation_t * richards
Definition: cs_gwf_priv.h:209
cs_real_t henry_constant
Definition: cs_gwf_priv.h:653
cs_real_t l_diffusivity_h
Definition: cs_gwf_priv.h:649
cs_field_t * permeability_field
Definition: cs_gwf_priv.h:180
cs_property_t * moisture_content
Definition: cs_gwf_priv.h:243
Set of common parameters to manage an iterative algorithm.
Definition: cs_iter_algo.h:101
cs_flag_t post_flag
Definition: cs_gwf_priv.h:740
cs_equation_t * richards
Definition: cs_gwf_priv.h:133
Structure to handle the Darcy flux.
cs_field_t * l_saturation
Definition: cs_gwf_priv.h:469
cs_real_t * l_capacity
Definition: cs_gwf_priv.h:602
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:207
cs_property_t * time_wl_pty
Definition: cs_gwf_priv.h:434
cs_real_t * diff_wl_array
Definition: cs_gwf_priv.h:583
cs_real_t * srct_hg_array
Definition: cs_gwf_priv.h:591
cs_real_t l_viscosity
Definition: cs_gwf_priv.h:647
cs_equation_system_t * system
Definition: cs_gwf_priv.h:376
Main set of parameters/structures to manage the groundwater flow (GWF) module. This is an explicit de...
Definition: cs_gwf_priv.h:720
cs_equation_t * wl_eq
Definition: cs_gwf_priv.h:346
cs_field_t * capacity_field
Definition: cs_gwf_priv.h:283
cs_equation_t * hg_eq
Definition: cs_gwf_priv.h:354
Structure to handle the modelling of a single-phase flows in a porous media considered as saturated...
Definition: cs_gwf_priv.h:120
cs_real_t l_mass_density
Definition: cs_gwf_priv.h:646
Structure to handle the modelling of a single-phase flows in a porous media considered as saturated o...
Definition: cs_gwf_priv.h:197
Main structure to handle a set of coupled equations.
Definition: cs_equation_system.h:123
cs_property_t * time_hl_pty
Definition: cs_gwf_priv.h:443
cs_field_t * pressure_head
Definition: cs_gwf_priv.h:181
bool use_incremental_solver
When a model includes non-linearities it can be useful to formulate the problem using increment and t...
Definition: cs_gwf_priv.h:696
cs_property_t * abs_permeability
Definition: cs_gwf_priv.h:761
cs_equation_param_t * wg_eqp
Definition: cs_gwf_priv.h:361
cs_real_t * head_in_law
Definition: cs_gwf_priv.h:286
#define END_C_DECLS
Definition: cs_defs.h:513
cs_real_t * time_hg_array
Definition: cs_gwf_priv.h:588
unsigned short int cs_flag_t
Definition: cs_defs.h:324
cs_real_t * l_saturation_submesh_pre
Definition: cs_gwf_priv.h:606
cs_equation_param_t * hl_eqp
Definition: cs_gwf_priv.h:369
cs_iter_algo_param_aa_t anderson_param
Definition: cs_gwf_priv.h:702
Definition: cs_iter_algo.h:53
cs_flag_t flag
Definition: cs_gwf_priv.h:739
cs_field_t * g_pressure
Definition: cs_gwf_priv.h:472
cs_gwf_darcy_flux_t * darcy
Definition: cs_gwf_priv.h:146
cs_gwf_darcy_flux_t * darcy
Definition: cs_gwf_priv.h:222
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:368
cs_property_t * permeability
Definition: cs_gwf_priv.h:242
cs_flag_t flux_location
Definition: cs_gwf_priv.h:101
cs_field_t * pressure_head
Definition: cs_gwf_priv.h:284
cs_real_t h_molar_mass
Definition: cs_gwf_priv.h:651
Main structure to handle the discretization and the resolution of an equation.
Definition: cs_gwf_priv.h:74
cs_real_t * time_hl_array
Definition: cs_gwf_priv.h:593
cs_real_t * reac_hg_array
Definition: cs_gwf_priv.h:590
Structure associated to the definition of a property relying on the cs_xdef_t structure.
cs_field_t * moisture_field
Definition: cs_gwf_priv.h:282
cs_field_t * permeability_field
Definition: cs_gwf_priv.h:281
cs_field_t * l_pressure
Definition: cs_gwf_priv.h:471
cs_real_t ref_temperature
Definition: cs_gwf_priv.h:652
cs_real_t * capillarity_cell_pressure
Definition: cs_gwf_priv.h:603
cs_property_t * diff_hl_pty
Definition: cs_gwf_priv.h:444
cs_real_t * diff_hl_array
Definition: cs_gwf_priv.h:594