7.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-2021 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_gwf.h"
34 
35 /*----------------------------------------------------------------------------*/
36 
38 
39 /*============================================================================
40  * Macro definitions
41  *============================================================================*/
42 
43 /*============================================================================
44  * Type definitions
45  *============================================================================*/
46 
52 typedef struct {
53 
76 
78 
79 
89 typedef struct {
90 
103 
116 
129 
145 
151 
160 typedef struct {
161 
173 
186 
208 
248 
250 
256 
284 typedef struct {
285 
286  /* Set of equations associated to this modelling */
287 
299 
306 
323 
352 
378 
422 
468 
474 
475 
483 struct _gwf_t {
484 
504 
519 
531 
558  cs_gwf_tracer_t **tracers;
561 
566 };
567 
568 /*============================================================================
569  * Public function prototypes
570  *============================================================================*/
571 
572 /*----------------------------------------------------------------------------*/
580 /*----------------------------------------------------------------------------*/
581 
584 
585 /*----------------------------------------------------------------------------*/
591 /*----------------------------------------------------------------------------*/
592 
593 void
595 
596 /*----------------------------------------------------------------------------*/
602 /*----------------------------------------------------------------------------*/
603 
604 void
606 
607 /*----------------------------------------------------------------------------*/
617 /*----------------------------------------------------------------------------*/
618 
619 void
621  const cs_cdo_quantities_t *quant,
622  cs_param_space_scheme_t space_scheme,
623  cs_gwf_darcy_flux_t *darcy);
624 
625 /*----------------------------------------------------------------------------*/
634 /*----------------------------------------------------------------------------*/
635 
636 void
638  const cs_equation_t *eq,
639  bool cur2prev,
640  cs_gwf_darcy_flux_t *darcy);
641 
642 /*----------------------------------------------------------------------------*/
653 /*----------------------------------------------------------------------------*/
654 
655 void
657  const cs_cdo_quantities_t *quant,
658  const cs_equation_param_t *eqp,
659  cs_gwf_darcy_flux_t *darcy);
660 
661 /*----------------------------------------------------------------------------*/
662 
664 
665 #endif /* __CS_GWF_PRIV_H__ */
cs_property_t * moisture_content
Definition: cs_gwf_priv.h:128
cs_real_t * l_rel_permeability
Definition: cs_gwf_priv.h:421
cs_equation_t * h_eq
Definition: cs_gwf_priv.h:305
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:161
Definition: cs_advection_field.h:149
cs_gwf_tracer_t ** tracers
Definition: cs_gwf_priv.h:558
cs_field_t * c_pressure
Definition: cs_gwf_priv.h:375
Field descriptor.
Definition: cs_field.h:125
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:177
void * model_context
Definition: cs_gwf_priv.h:530
cs_real_t h_molar_mass
Definition: cs_gwf_priv.h:465
cs_gwf_model_type_t model
Definition: cs_gwf_priv.h:501
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:430
cs_property_t * soil_capacity
Definition: cs_gwf_priv.h:207
cs_flag_t cs_gwf_option_flag_t
Definition: cs_gwf.h:94
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
cs_real_t l_viscosity
Definition: cs_gwf_priv.h:461
Main set of parameters/structures to manage the groundwater flow (GWF) module. This is an explicit de...
Definition: cs_gwf_priv.h:483
cs_gwf_model_type_t
Type of system of equation(s) to consider for the physical modelling.
Definition: cs_gwf.h:52
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:138
cs_equation_t * w_eq
Definition: cs_gwf_priv.h:298
cs_gwf_tracer_add_terms_t ** add_tracer_terms
Definition: cs_gwf_priv.h:560
cs_flag_t flux_location
Definition: cs_gwf_priv.h:73
cs_real_t w_molar_mass
Definition: cs_gwf_priv.h:464
Definition: cs_cdo_connect.h:79
cs_flag_t post_flag
Definition: cs_gwf_priv.h:503
cs_real_t * diff_hl_eq_array
Definition: cs_gwf_priv.h:419
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Definition: cs_cdo_quantities.h:129
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:192
cs_equation_t * richards
Definition: cs_gwf_priv.h:172
void cs_gwf_darcy_flux_update(const cs_real_t t_eval, const cs_equation_t *eq, bool cur2prev, cs_gwf_darcy_flux_t *darcy)
Update the advection field/arrays related to the Darcy flux.
Definition: cs_gwf_priv.c:326
cs_property_t * moisture_content
Definition: cs_gwf_priv.h:206
cs_real_t g_viscosity
Definition: cs_gwf_priv.h:462
cs_equation_t * richards
Definition: cs_gwf_priv.h:102
Structure to handle the Darcy flux.
Definition: cs_gwf_priv.h:52
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:180
cs_field_t * l_pressure
Definition: cs_gwf_priv.h:376
cs_real_t ref_temperature
Definition: cs_gwf_priv.h:466
cs_real_t henry_constant
Definition: cs_gwf_priv.h:467
cs_property_t * diff_w_eq_pty
Definition: cs_gwf_priv.h:348
cs_gwf_darcy_flux_t * g_darcy
Definition: cs_gwf_priv.h:322
cs_gwf_darcy_flux_t * l_darcy
Definition: cs_gwf_priv.h:321
cs_field_t * capacity_field
Definition: cs_gwf_priv.h:246
Structure to handle the modelling of a single-phase flows in a porous media considered as saturated...
Definition: cs_gwf_priv.h:89
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, cs_gwf_darcy_flux_t *darcy)
Set the definition of the advection field attached to a cs_gwf_darcy_flux_t structure.
Definition: cs_gwf_priv.c:217
Structure to handle the modelling of a single-phase flows in a porous media considered as saturated o...
Definition: cs_gwf_priv.h:160
cs_property_t * time_w_eq_pty
Definition: cs_gwf_priv.h:347
cs_field_t * pressure_head
Definition: cs_gwf_priv.h:144
int n_tracers
Definition: cs_gwf_priv.h:557
cs_adv_field_t * adv_field
Definition: cs_gwf_priv.h:72
cs_property_t * diff_hl_eq_pty
Definition: cs_gwf_priv.h:350
Structure to handle the modelling of miscible two-phase flows in a porous media.
Definition: cs_gwf_priv.h:284
cs_real_t * diff_hg_eq_array
Definition: cs_gwf_priv.h:420
cs_real_t * diff_w_eq_array
Definition: cs_gwf_priv.h:417
cs_real_t * head_in_law
Definition: cs_gwf_priv.h:249
#define END_C_DECLS
Definition: cs_defs.h:511
unsigned short int cs_flag_t
Definition: cs_defs.h:324
cs_real_t * time_h_eq_array
Definition: cs_gwf_priv.h:418
cs_property_t * diff_hg_eq_pty
Definition: cs_gwf_priv.h:351
cs_real_t l_mass_density
Definition: cs_gwf_priv.h:460
cs_gwf_darcy_flux_t * darcy
Definition: cs_gwf_priv.h:115
cs_gwf_option_flag_t flag
Definition: cs_gwf_priv.h:502
cs_gwf_tracer_setup_t ** finalize_tracer_setup
Definition: cs_gwf_priv.h:559
cs_gwf_darcy_flux_t * darcy
Definition: cs_gwf_priv.h:185
cs_real_t l_diffusivity_h
Definition: cs_gwf_priv.h:463
cs_field_t * l_saturation
Definition: cs_gwf_priv.h:374
cs_property_t * permeability
Definition: cs_gwf_priv.h:205
cs_field_t * pressure_head
Definition: cs_gwf_priv.h:247
Main structure to handle the discretization and the resolution of an equation.
cs_real_t * boundary_flux_val
Definition: cs_gwf_priv.h:75
cs_field_t * g_pressure
Definition: cs_gwf_priv.h:377
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:245
cs_field_t * permeability_field
Definition: cs_gwf_priv.h:244
cs_property_t * time_h_eq_pty
Definition: cs_gwf_priv.h:349
cs_property_t * abs_permeability
Definition: cs_gwf_priv.h:518
void() cs_gwf_tracer_add_terms_t(cs_gwf_tracer_t *tracer)
Generic function to update the terms to build in the algebraic system for a tracer equation according...
Definition: cs_gwf_tracer.h:271
cs_real_t * time_w_eq_array
Definition: cs_gwf_priv.h:416
cs_real_t * flux_val
Definition: cs_gwf_priv.h:74
void() cs_gwf_tracer_setup_t(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_adv_field_t *adv, const cs_real_t *l_saturation, cs_gwf_tracer_t *tracer)
Generic function to set the parameters related to a tracer equation.
Definition: cs_gwf_tracer.h:255