8.3
general documentation
cs_gwf_hydraulic_model.h
Go to the documentation of this file.
1#ifndef __CS_GWF_HYDRAULIC_MODEL_H__
2#define __CS_GWF_HYDRAULIC_MODEL_H__
3
4/*============================================================================
5 * Structures related to the hydraulic models available in the GWF module
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 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_defs.h"
33
34#include "cs_equation_system.h"
35#include "cs_gwf_priv.h"
36#include "cs_param_sles.h"
37
38/*----------------------------------------------------------------------------*/
39
41
42/*============================================================================
43 * Macro definitions
44 *============================================================================*/
45
46/*============================================================================
47 * Type definitions
48 *============================================================================*/
49
50/* ++++++++++++++++++++++++++++++++++++++++++++++ */
51/* Saturated single-phase flows in a porous media */
52/* ++++++++++++++++++++++++++++++++++++++++++++++ */
53
63typedef struct {
64
77
90
102
118
124
125/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
126/* Unsaturated single-phase flows in a porous media */
127/* ++++++++++++++++++++++++++++++++++++++++++++++++ */
128
137typedef struct {
138
150
163
185
222
224
230
231/* +++++++++++++++++++++++++++++++++ */
232/* Two-phase flows in a porous media */
233/* +++++++++++++++++++++++++++++++++ */
234
255typedef enum {
256
259
261
263
270typedef enum {
271
276
278
280
282
310typedef struct {
311
312 /* Set of equations associated to this modelling */
313
326
334
341
348
355
372
396
397 /* Properties associated to a discrete term in the system of equations
398 *
399 * \var time_wc_pty
400 * Property related to the unsteady term of the water conservation equation
401 * w.r.t. the capillarity pressure
402 *
403 * \var diff_wl_pty
404 * Property related to the diffusion term of the water conservation equation
405 * w.r.t. the pressure in the liquid phase
406 *
407 * \var time_hc_pty
408 * Property related to the unsteady term of the hydrogen conservation equation
409 * w.r.t. the capillarity pressure
410 *
411 * \var diff_hc_pty
412 * Property related to the diffusion term of the hydrogen conservation
413 * equation w.r.t. the capillarity pressure
414 *
415 * \var time_hl_pty
416 * Property related to the unsteady term of the hydrogen conservation equation
417 * w.r.t. the pressure in the liquid phase.
418 *
419 * \var diff_hl_pty
420 * Property related to the diffusion term of the hydrogen conservation
421 * equation w.r.t. the pressure in the liquid phase
422 *
423 * \var diff_g_pty
424 * Property used in the definition of the Darcy flux in the gas phase
425 */
426
429
432
435
437
479
502
541
549
600
605
607
613
614
622typedef struct {
623
648
669
682
687} cs_gwf_t;
688
689/*============================================================================
690 * Public function prototypes
691 *============================================================================*/
692
693/*----------------------------------------------------------------------------*/
694
696
697#endif /* __CS_GWF_HYDRAULIC_MODEL_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
unsigned short int cs_flag_t
Definition: cs_defs.h:344
cs_gwf_tpf_approx_type_t
Type of approximation used for the computation of unsteady or diffusion properties.
Definition: cs_gwf_hydraulic_model.h:270
@ CS_GWF_TPF_APPROX_PC_CELL_VERTEX_AVERAGE
Definition: cs_gwf_hydraulic_model.h:273
@ CS_GWF_TPF_N_APPROX
Definition: cs_gwf_hydraulic_model.h:279
@ CS_GWF_TPF_APPROX_PC_VERTEX_AVERAGE
Definition: cs_gwf_hydraulic_model.h:275
@ CS_GWF_TPF_APPROX_VERTEX_SUBCELL
Definition: cs_gwf_hydraulic_model.h:277
@ CS_GWF_TPF_APPROX_PC_CELL_AVERAGE
Definition: cs_gwf_hydraulic_model.h:272
@ CS_GWF_TPF_APPROX_PC_EDGE_AVERAGE
Definition: cs_gwf_hydraulic_model.h:274
cs_gwf_tpf_solver_type_t
Type of solver considered for a two-phase flow model.
Definition: cs_gwf_hydraulic_model.h:255
@ CS_GWF_TPF_SOLVER_PLPC_COUPLED
Definition: cs_gwf_hydraulic_model.h:257
@ CS_GWF_TPF_SOLVER_PLPC_COUPLED_INCR
Definition: cs_gwf_hydraulic_model.h:258
@ CS_GWF_TPF_N_SOLVERS
Definition: cs_gwf_hydraulic_model.h:260
cs_gwf_model_type_t
Type of system of equation(s) to consider for the physical modelling.
Definition: cs_gwf_param.h:127
Structure and routines handling the SLES ((Sparse Linear Equation Solver) settings stored inside a cs...
cs_param_nl_algo_t
Class of non-linear iterative algorithm.
Definition: cs_param_types.h:606
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:192
Main structure to handle a set of coupled equations.
Definition: cs_equation_system.h:125
Main structure to handle the discretization and the resolution of an equation.
Field descriptor.
Definition: cs_field.h:131
Structure to handle a Darcy flux.
Structure to handle the modelling of a single-phase flows in a porous media considered as saturated.
Definition: cs_gwf_hydraulic_model.h:63
cs_gwf_darcy_flux_t * darcy
Definition: cs_gwf_hydraulic_model.h:89
cs_equation_t * richards
Definition: cs_gwf_hydraulic_model.h:76
cs_property_t * moisture_content
Definition: cs_gwf_hydraulic_model.h:101
cs_field_t * pressure_head
Definition: cs_gwf_hydraulic_model.h:117
Main set of parameters/structures to manage the groundwater flow (GWF) module. This is an explicit de...
Definition: cs_gwf_hydraulic_model.h:622
cs_gwf_model_type_t model
Definition: cs_gwf_hydraulic_model.h:645
cs_flag_t flag
Definition: cs_gwf_hydraulic_model.h:646
cs_flag_t post_flag
Definition: cs_gwf_hydraulic_model.h:647
int verbosity
Definition: cs_gwf_hydraulic_model.h:644
cs_property_t * soil_porosity
Definition: cs_gwf_hydraulic_model.h:667
void * model_context
Definition: cs_gwf_hydraulic_model.h:681
cs_property_t * abs_permeability
Definition: cs_gwf_hydraulic_model.h:668
Structure to handle the modelling of miscible or immiscible two-phase flows in a porous media.
Definition: cs_gwf_hydraulic_model.h:310
double cell_weight
weight associated to the cell value w.r.t. to the values at vertices when a CS_GWF_TPF_APPROX_PC_CELL...
Definition: cs_gwf_hydraulic_model.h:598
cs_real_t henry_constant
Definition: cs_gwf_hydraulic_model.h:548
cs_real_t l_diffusivity_h
Definition: cs_gwf_hydraulic_model.h:545
cs_real_t h_molar_mass
Definition: cs_gwf_hydraulic_model.h:546
cs_property_t * diff_hl_pty
Definition: cs_gwf_hydraulic_model.h:434
cs_property_t * time_hc_pty
Definition: cs_gwf_hydraulic_model.h:430
cs_property_t * time_hl_pty
Definition: cs_gwf_hydraulic_model.h:433
cs_field_t * c_pressure
Definition: cs_gwf_hydraulic_model.h:473
cs_property_t * diff_wl_pty
Definition: cs_gwf_hydraulic_model.h:428
cs_param_nl_algo_t nl_algo_type
Definition: cs_gwf_hydraulic_model.h:601
cs_equation_param_t * b01_w_eqp
Definition: cs_gwf_hydraulic_model.h:340
cs_iter_algo_param_aac_t anderson_param
Definition: cs_gwf_hydraulic_model.h:604
cs_field_t * l_saturation
Definition: cs_gwf_hydraulic_model.h:476
cs_gwf_tpf_solver_type_t solver_type
Type of solver considered to solve the system of equations (choice of main unknowns and strategy of r...
Definition: cs_gwf_hydraulic_model.h:595
cs_real_t * srct_h_array
Definition: cs_gwf_hydraulic_model.h:500
double upwind_weight
weight associated to the upwind value w.r.t. to the centered value There is no effect when CS_GWF_TPF...
Definition: cs_gwf_hydraulic_model.h:599
cs_real_t l_mass_density
Definition: cs_gwf_hydraulic_model.h:542
cs_property_t * time_wc_pty
Definition: cs_gwf_hydraulic_model.h:427
int nl_algo_verbosity
Definition: cs_gwf_hydraulic_model.h:602
cs_equation_t * w_eq
Definition: cs_gwf_hydraulic_model.h:325
cs_property_t * lsat_pty
Definition: cs_gwf_hydraulic_model.h:394
cs_real_t ref_temperature
Definition: cs_gwf_hydraulic_model.h:547
cs_gwf_darcy_flux_t * g_darcy
Definition: cs_gwf_hydraulic_model.h:371
cs_equation_param_t * b10_h_eqp
Definition: cs_gwf_hydraulic_model.h:347
cs_real_t g_viscosity
Definition: cs_gwf_hydraulic_model.h:544
cs_field_t * g_pressure
Definition: cs_gwf_hydraulic_model.h:475
cs_real_t * srct_w_array
Definition: cs_gwf_hydraulic_model.h:499
cs_field_t * g_rho_h
Definition: cs_gwf_hydraulic_model.h:478
bool enforce_pg_positivity
Apply a rescaling on the gas pressure to avoid a negative value.
Definition: cs_gwf_hydraulic_model.h:596
cs_field_t * l_rho_h
Definition: cs_gwf_hydraulic_model.h:477
cs_property_t * krl_pty
Definition: cs_gwf_hydraulic_model.h:392
cs_gwf_darcy_flux_t * l_darcy
Definition: cs_gwf_hydraulic_model.h:370
cs_equation_system_t * system
Definition: cs_gwf_hydraulic_model.h:354
cs_property_t * krg_pty
Definition: cs_gwf_hydraulic_model.h:393
cs_iter_algo_t * nl_algo
Definition: cs_gwf_hydraulic_model.h:606
cs_param_convergence_t nl_cvg_param
Definition: cs_gwf_hydraulic_model.h:603
bool is_miscible
Definition: cs_gwf_hydraulic_model.h:540
cs_real_t * lsat_pre_array
Definition: cs_gwf_hydraulic_model.h:501
cs_gwf_tpf_approx_type_t approx_type
type of approximation used for the computation of diffusion, unsteady coefficients
Definition: cs_gwf_hydraulic_model.h:597
cs_property_t * lcap_pty
Definition: cs_gwf_hydraulic_model.h:395
cs_equation_t * h_eq
Definition: cs_gwf_hydraulic_model.h:333
cs_field_t * l_pressure
Definition: cs_gwf_hydraulic_model.h:474
cs_real_t l_viscosity
Definition: cs_gwf_hydraulic_model.h:543
cs_property_t * diff_hc_pty
Definition: cs_gwf_hydraulic_model.h:431
cs_property_t * diff_g_pty
Definition: cs_gwf_hydraulic_model.h:436
Structure to handle the modelling of a single-phase flows in a porous media considered as saturated o...
Definition: cs_gwf_hydraulic_model.h:137
cs_gwf_darcy_flux_t * darcy
Definition: cs_gwf_hydraulic_model.h:162
cs_field_t * moisture_field
Definition: cs_gwf_hydraulic_model.h:219
cs_equation_t * richards
Definition: cs_gwf_hydraulic_model.h:149
cs_property_t * soil_capacity
Definition: cs_gwf_hydraulic_model.h:184
cs_real_t * head_in_law
Definition: cs_gwf_hydraulic_model.h:223
cs_property_t * moisture_content
Definition: cs_gwf_hydraulic_model.h:183
cs_field_t * pressure_head
Definition: cs_gwf_hydraulic_model.h:221
cs_field_t * capacity_field
Definition: cs_gwf_hydraulic_model.h:220
cs_field_t * permeability_field
Definition: cs_gwf_hydraulic_model.h:218
cs_property_t * permeability
Definition: cs_gwf_hydraulic_model.h:182
Structure storing all the parameters to drive the algorithm called Anderson acceleration.
Definition: cs_iter_algo.h:138
Structure to handle the convergence of an iterative algorithm.
Definition: cs_iter_algo.h:290
Set of parameters to check the convergence (or the divergence) of an iterative process (tolerances or...
Definition: cs_param_types.h:558
Structure associated to the definition of a property relying on the cs_xdef_t structure.