170 #define CS_GWF_POST_SOIL_CAPACITY (1 << 0) 171 #define CS_GWF_POST_LIQUID_SATURATION (1 << 1) 172 #define CS_GWF_POST_PERMEABILITY (1 << 2) 173 #define CS_GWF_POST_DARCY_FLUX_BALANCE (1 << 3) 174 #define CS_GWF_POST_DARCY_FLUX_DIVERGENCE (1 << 4) 175 #define CS_GWF_POST_DARCY_FLUX_AT_BOUNDARY (1 << 5) 185 typedef struct _gwf_t cs_gwf_t;
342 const char *var_name);
363 const char *var_name,
491 const cs_gwf_tracer_t *tracer,
void cs_gwf_init_setup(void)
Predefined settings for the Richards equation and the related equations defining the groundwater flow...
Definition: cs_gwf.c:2368
Two phase flow modelling (gaz and liquid phases) in porous media.
Definition: cs_gwf.h:88
time step descriptor
Definition: cs_time_step.h:64
void cs_gwf_extra_op(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
Predefined extra-operations for the groundwater flow module.
Definition: cs_gwf.c:2706
Single phase (liquid phase) modelling in a porous media.
Definition: cs_gwf.h:77
void cs_gwf_log_setup(void)
Summary of the main cs_gwf_t structure.
Definition: cs_gwf.c:1896
Definition: cs_advection_field.h:149
cs_adv_field_t * cs_gwf_get_adv_field(void)
Retrieve the advection field related to the Darcy flux in the liquid phase.
Definition: cs_gwf.c:2107
void cs_gwf_compute_steady_state(const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
Compute the steady-state of the groundwater flows module. Nothing is done if all equations are unstea...
Definition: cs_gwf.c:2537
cs_gwf_model_type_t model
Definition: cs_gwf_priv.h:501
cs_flag_t cs_gwf_option_flag_t
Definition: cs_gwf.h:94
cs_flag_t cs_gwf_tracer_model_t
Definition: cs_gwf_tracer.h:47
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
cs_real_t cs_gwf_integrate_tracer(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_gwf_tracer_t *tracer, const char *z_name)
Compute the integral over a given set of cells of the field related to a tracer equation. This integral turns out to be exact for linear functions.
Definition: cs_gwf.c:2673
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_t * cs_gwf_activate(cs_property_type_t pty_type, cs_gwf_model_type_t model, cs_gwf_option_flag_t option_flag)
Initialize the module dedicated to groundwater flows.
Definition: cs_gwf.c:1775
void cs_gwf_set_post_options(cs_flag_t post_flag, bool reset)
Set the flag dedicated to the post-processing of the GWF module.
Definition: cs_gwf.c:2063
Definition: cs_cdo_connect.h:79
cs_flag_t post_flag
Definition: cs_gwf_priv.h:503
Main structure to handle a soil in the groundawater flow module. Store a set of parameters and pointe...
Definition: cs_gwf_soil.h:221
Gravitation effects are taken into account in the Richards equation.
Definition: cs_gwf.h:110
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Compute the mean-value of the hydraulic head field and subtract this mean-value to get a field with z...
Definition: cs_gwf.h:127
Single phase (liquid phase) modelling in a porous media.
Definition: cs_gwf.h:63
Definition: cs_cdo_quantities.h:129
void cs_gwf_extra_post_sspf(void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step)
Predefined post-processing output for the groundwater flow module in case of saturated single-phase f...
Definition: cs_gwf.c:2762
void cs_gwf_finalize_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
Last initialization step of the groundwater flow module. At this stage, the mesh quantities are defin...
Definition: cs_gwf.c:2408
void cs_gwf_extra_post_uspf(void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step)
Predefined post-processing output for the groundwater flow module in case of unsaturated single-phase...
Definition: cs_gwf.c:2901
bool cs_gwf_is_activated(void)
Check if the groundwater flow module has been activated.
Definition: cs_gwf.c:1754
void cs_gwf_compute(const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
Compute the system related to groundwater flows module.
Definition: cs_gwf.c:2596
void cs_gwf_update(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, bool cur2prev)
Update the groundwater system (pressure head, head in law, moisture content, darcian velocity...
Definition: cs_gwf.c:2475
cs_gwf_tracer_t * cs_gwf_add_user_tracer(const char *eq_name, const char *var_name, cs_gwf_tracer_setup_t *setup, cs_gwf_tracer_add_terms_t *add_terms)
Add a new equation related to the groundwater flow module This equation is a particular type of unste...
Definition: cs_gwf.c:2275
cs_gwf_soil_t * cs_gwf_add_soil(const char *z_name, double bulk_density, double sat_moisture, cs_gwf_soil_hydraulic_model_t soil_model)
Create and add a new cs_gwf_soil_t structure. An initialization by default of all members is performe...
Definition: cs_gwf.c:2160
Activate a treatment to enforce a Darcy flux to be divergence-free.
Definition: cs_gwf.h:133
void cs_gwf_extra_post_mtpf(void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step)
Predefined post-processing output for the groundwater flow module in case of miscible two-phase flows...
Definition: cs_gwf.c:2984
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
Even if the Richards equation is steady-state, this equation is solved at each iteration.
Definition: cs_gwf.h:119
cs_gwf_model_bit_t
Elemental modelling choice either from the physical viewpoint or the numerical viewpoint.
Definition: cs_gwf.h:102
cs_gwf_soil_hydraulic_model_t
Predefined hydraulic model of soils used in the groundwater flow module.
Definition: cs_gwf_soil.h:119
#define END_C_DECLS
Definition: cs_defs.h:511
unsigned short int cs_flag_t
Definition: cs_defs.h:324
cs_flag_t cs_property_type_t
Definition: cs_property.h:102
void cs_gwf_add_tracer_terms(void)
Add new terms if needed (such as diffusion or reaction) to tracer equations according to the settings...
Definition: cs_gwf.c:2346
cs_gwf_t * cs_gwf_destroy_all(void)
Free all structures related to groundwater flows.
Definition: cs_gwf.c:1832
cs_gwf_tracer_t * cs_gwf_add_tracer(cs_gwf_tracer_model_t tr_model, const char *eq_name, const char *var_name)
Add a new equation related to the groundwater flow module This equation is a particular type of unste...
Definition: cs_gwf.c:2215
void cs_gwf_set_two_phase_model(cs_real_t l_mass_density, cs_real_t l_viscosity, cs_real_t g_viscosity, cs_real_t l_diffusivity_h, cs_real_t w_molar_mass, cs_real_t h_molar_mass, cs_real_t ref_temperature, cs_real_t henry_constant)
Set the parameters defining the two-phase flow model. Use SI unit if not prescribed otherwise...
Definition: cs_gwf.c:2013
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 * cs_gwf_get_uspf_head_in_law(void)
Retrieve the head used in soil updates when an unsaturated single-phase flow is considered. These values are located at cells.
Definition: cs_gwf.c:2127
cs_gwf_tracer_t * cs_gwf_tracer_by_name(const char *eq_name)
Retrieve the pointer to the cs_gwf_tracer_t structure associated to the name given as parameter...
Definition: cs_gwf.c:2319
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