programmer's documentation
Macros | Functions | Variables
cs_gwf.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <ctype.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_cdo.h"
#include "cs_field.h"
#include "cs_hodge.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_mesh_location.h"
#include "cs_parall.h"
#include "cs_param.h"
#include "cs_post.h"
#include "cs_reco.h"
#include "cs_gwf.h"
Include dependency graph for cs_gwf.c:

Macros

#define CS_GWF_DBG   0
 

Functions

static void _set_tracer_param (cs_gwf_tracer_t *tp, double wmd, double alpha_l, double alpha_t, double bulk_density, double distrib_coef, double reaction_rate)
 Set a cs_gwf_tracer_t structure. More...
 
static int _get_tracer_id (const cs_gwf_t *gw, int tracer_eq_id)
 Get the id in a cs_gwf_t structure from the tracer equation id. More...
 
static void _get_tracer_time_coeff (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t theta[], const void *tracer_struc, cs_real_t *result)
 Define the coefficient appearing in time-dependent term of the simulation of tracer equations This function fits the generic prototype of cs_onevar_law_func_t. More...
 
static void _get_tracer_reaction_coeff (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t theta[], const void *tracer_struc, cs_real_t *result)
 Define the coefficient appearing in reaction term for the simulation of tracer equations This function fits the generic prototype of cs_onevar_law_func_t. More...
 
static void _get_tracer_diffusion_tensor (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t theta[], const cs_real_t velocity[], const void *tracer_struc, cs_real_t *result)
 Define the coefficient appearing in the diffusion term of the tracer equation This function fits the generic prototype of cs_twovar_law_func_t. More...
 
static void _genuchten_permeability_from_c_head (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t h_vals[], const void *soil_struc, cs_real_t *result)
 Define the permeability (or hydraulic conductivity) using the van Genuchten-Mualen law One assumes that pressure head is located at cells This function fits the generic prototype of cs_onevar_law_func_t. More...
 
static void _genuchten_moisture_from_c_head (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t h_vals[], const void *soil_struc, cs_real_t result[])
 Define the moisture content using the Van Genuchten law This function fits the generic prototype of cs_onevar_law_func_t. More...
 
static void _genuchten_capacity_from_c_head (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t h_vals[], const void *soil_struc, cs_real_t result[])
 Define the moisture content using the Van Genuchten law This function fits the generic prototype of cs_onevar_law_func_t. More...
 
static void _tracy_permeability_from_c_head (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t h_vals[], const void *soil_struc, cs_real_t result[])
 Define the permeability (or hydraulic conductivity) using the Tracy law This function fits the generic prototype of cs_onevar_law_func_t. More...
 
static void _tracy_moisture_from_c_head (cs_lnum_t n_elts, const cs_lnum_t elt_ids[], const cs_real_t h_vals[], const void *soil_struc, cs_real_t result[])
 Define the moisture content using the Tracy law This function fits the generic prototype of cs_onevar_law_func_t. More...
 
static void _update_system (const cs_cdo_quantities_t *cdoq, const cs_cdo_connect_t *connect, const cs_equation_t *richards, bool cur2prev, cs_gwf_t *gw)
 Update the groundwater system (pressure head, head in law, moisture content, darcian velocity) More...
 
static cs_gwf_soil_t * _init_soil (cs_gwf_t *gw, const char *ml_name, cs_gwf_hydraulic_model_t model, double theta_s, double rho)
 Initialize a cs_gwf_soil_t structure (already allocated) More...
 
cs_gwf_t * cs_gwf_create (void)
 Create a structure dedicated to manage groundwater flows. More...
 
cs_gwf_t * cs_gwf_finalize (cs_gwf_t *gw)
 Free the main structure related to groundwater flows. More...
 
int cs_gwf_get_n_soils (const cs_gwf_t *gw)
 Get the number of requested soils. More...
 
void cs_gwf_set_gravity_vector (cs_gwf_t *gw, const cs_real_3_t gvec)
 Activate the gravity and set the gravitaty vector. More...
 
void cs_gwf_set_darcian_flux_location (cs_gwf_t *gw, cs_flag_t location_flag)
 Advanced setting: indicate where the darcian flux is stored cs_cdo_primal_cell is the default setting cs_cdo_dual_face_byc is a valid choice for vertex-based schemes. More...
 
void cs_gwf_summary (const cs_gwf_t *gw)
 Summary of a cs_gwf_t structure. More...
 
cs_equation_t * cs_gwf_initialize (int richards_eq_id, int n_soils, int n_tracer_eqs, cs_property_t *permeability, cs_property_t *soil_capacity, cs_adv_field_t *adv_field, cs_gwf_t *gw)
 Initialize the module dedicated to groundwater flows. More...
 
void cs_gwf_add_iso_soil_by_value (cs_gwf_t *gw, cs_gwf_hydraulic_model_t model, const char *ml_name, double k_s, double theta_s, double rho)
 Add a new soil attached to an isotropic permeability. More...
 
void cs_gwf_add_ortho_soil_by_value (cs_gwf_t *gw, cs_gwf_hydraulic_model_t model, const char *ml_name, cs_real_t *ks, double theta_s, double rho)
 Add a new soil attached to an orthotropic permeability. More...
 
void cs_gwf_add_aniso_soil_by_value (cs_gwf_t *gw, cs_gwf_hydraulic_model_t model, const char *ml_name, cs_real_t *ks, double theta_s, double rho)
 Add a new soil attached to an orthotropic permeability. More...
 
void cs_gwf_set_soil_param (cs_gwf_t *gw, const char *ml_name, cs_gwf_soilkey_t key, const cs_real_t val)
 Set parameters related to a cs_gwf_t structure. More...
 
cs_equation_t * cs_gwf_add_tracer (cs_gwf_t *gw, int tracer_eq_id, const char *eqname, const char *varname)
 Add a new equation related to the groundwater flow module This equation is a specific unsteady advection/diffusion/reaction eq. Tracer is advected thanks to the darcian velocity which is given by the resolution of the Richards equation. Diffusion and reaction parameters result from a physical modelling. More...
 
void cs_gwf_set_tracer_param (cs_gwf_t *gw, int tracer_eq_id, const char *ml_name, double wmd, double alpha_l, double alpha_t, double distrib_coef, double reaction_rate)
 Add a new equation related to the groundwater flow module This equation is a specific unsteady advection/diffusion/reaction eq. Tracer is advected thanks to the darcian velocity which is given by the resolution of the Richards equation. Diffusion/reaction parameters result from a physical modelling. More...
 
void cs_gwf_richards_setup (cs_gwf_t *gw, cs_equation_t *richards)
 Predefined settings for the Richards equation. More...
 
bool cs_gwf_tracer_needs_reaction (const cs_gwf_t *gw, int eq_id)
 Check if one needs to add a reaction term for a given tracer. More...
 
bool cs_gwf_tracer_needs_diffusion (const cs_gwf_t *gw, int eq_id)
 Check if one needs to add a diffusion term for a given tracer. More...
 
void cs_gwf_tracer_setup (int tracer_eq_id, cs_equation_t *eq, cs_gwf_t *gw)
 Predefined settings for a tracer equation. More...
 
void cs_gwf_final_initialization (const cs_cdo_connect_t *connect, int n_equations, cs_equation_t **equations, cs_gwf_t *gw)
 Last initialization step of the groundwater flow module. More...
 
void cs_gwf_compute (const cs_mesh_t *mesh, const cs_time_step_t *time_step, double dt_cur, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_equation_t *eqs[], cs_gwf_t *gw)
 Compute the system related to groundwater flows module. More...
 
void cs_gwf_extra_post (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 prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t) More...
 

Variables

static const char _err_empty_gw []
 

Macro Definition Documentation

◆ CS_GWF_DBG

#define CS_GWF_DBG   0

Function Documentation

◆ _genuchten_capacity_from_c_head()

static void _genuchten_capacity_from_c_head ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
const cs_real_t  h_vals[],
const void *  soil_struc,
cs_real_t  result[] 
)
static

Define the moisture content using the Van Genuchten law This function fits the generic prototype of cs_onevar_law_func_t.

Parameters
[in]n_eltsnumber of elements to treat
[in]elt_idslist of element ids (NULL if no indirection)
[in]h_valsvalues of the pressure head
[in]soil_strucpointer to a soil structure
[in,out]resultarray storing the result

◆ _genuchten_moisture_from_c_head()

static void _genuchten_moisture_from_c_head ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
const cs_real_t  h_vals[],
const void *  soil_struc,
cs_real_t  result[] 
)
static

Define the moisture content using the Van Genuchten law This function fits the generic prototype of cs_onevar_law_func_t.

Parameters
[in]n_eltsnumber of elements to treat
[in]elt_idslist of element ids (NULL if no indirection)
[in]h_valsvalues of the pressure head
[in]soil_strucpointer to a soil structure
[in,out]resultarray storing the result

◆ _genuchten_permeability_from_c_head()

static void _genuchten_permeability_from_c_head ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
const cs_real_t  h_vals[],
const void *  soil_struc,
cs_real_t result 
)
static

Define the permeability (or hydraulic conductivity) using the van Genuchten-Mualen law One assumes that pressure head is located at cells This function fits the generic prototype of cs_onevar_law_func_t.

Parameters
[in]n_eltsnumber of elements to treat
[in]elt_idslist of element ids (NULL if no indirection)
[in]h_valsvalues of the pressure head
[in]soil_strucpointer to a soil structure
[in,out]resultarray storing the result

◆ _get_tracer_diffusion_tensor()

static void _get_tracer_diffusion_tensor ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
const cs_real_t  theta[],
const cs_real_t  velocity[],
const void *  tracer_struc,
cs_real_t result 
)
static

Define the coefficient appearing in the diffusion term of the tracer equation This function fits the generic prototype of cs_twovar_law_func_t.

Parameters
[in]n_eltsnumber of elements to treat
[in]elt_idslist of element ids (NULL if no indirection)
[in]thetavalues of the moisture content
[in]velocityvalues of the local velocity
[in]tracer_strucpointer to a soil structure
[in,out]resultarray storing the result

◆ _get_tracer_id()

static int _get_tracer_id ( const cs_gwf_t *  gw,
int  tracer_eq_id 
)
inlinestatic

Get the id in a cs_gwf_t structure from the tracer equation id.

Parameters
[in]gwpointer to a cs_gwf_t structure
[in]tracer_eq_idtracer equation id
Returns
an id related to this tracer equation id

◆ _get_tracer_reaction_coeff()

static void _get_tracer_reaction_coeff ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
const cs_real_t  theta[],
const void *  tracer_struc,
cs_real_t result 
)
inlinestatic

Define the coefficient appearing in reaction term for the simulation of tracer equations This function fits the generic prototype of cs_onevar_law_func_t.

Parameters
[in]n_eltsnumber of elements to treat
[in]elt_idslist of element ids (NULL if no indirection)
[in]thetavalues of the moisture content
[in]tracer_strucpointer to a soil structure
[in,out]resultarray storing the result

◆ _get_tracer_time_coeff()

static void _get_tracer_time_coeff ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
const cs_real_t  theta[],
const void *  tracer_struc,
cs_real_t result 
)
inlinestatic

Define the coefficient appearing in time-dependent term of the simulation of tracer equations This function fits the generic prototype of cs_onevar_law_func_t.

Parameters
[in]n_eltsnumber of elements to treat
[in]elt_idslist of element ids (NULL if no indirection)
[in]thetavalues of the moisture content
[in]tracer_strucpointer to a soil structure
[in,out]resultarray storing the result

◆ _init_soil()

static cs_gwf_soil_t* _init_soil ( cs_gwf_t *  gw,
const char *  ml_name,
cs_gwf_hydraulic_model_t  model,
double  theta_s,
double  rho 
)
static

Initialize a cs_gwf_soil_t structure (already allocated)

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]ml_namename of the mesh location
[in]modelhydraulic modelling for this soil
[in]tetha_ssaturated moisture
[in]rhobulk density
Returns
a pointer to an initialized cs_gwf_soil_t structure

◆ _set_tracer_param()

static void _set_tracer_param ( cs_gwf_tracer_t *  tp,
double  wmd,
double  alpha_l,
double  alpha_t,
double  bulk_density,
double  distrib_coef,
double  reaction_rate 
)
inlinestatic

Set a cs_gwf_tracer_t structure.

Parameters
[in,out]tppointer to a cs_gwf_tracer_t structure
[in]wmdvalue of the water molecular diffusivity
[in]alpha_lvalue of the longitudinal dispersivity
[in]alpha_tvalue of the transversal dispersivity
[in]bulk_densityvalue of the bulk density
[in]distrib_coefvalue of the distribution coefficient
[in]reaction_ratevalue of the first order rate of reaction

◆ _tracy_moisture_from_c_head()

static void _tracy_moisture_from_c_head ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
const cs_real_t  h_vals[],
const void *  soil_struc,
cs_real_t  result[] 
)
static

Define the moisture content using the Tracy law This function fits the generic prototype of cs_onevar_law_func_t.

Parameters
[in]n_eltsnumber of elements to treat
[in]elt_idslist of element ids (NULL if no indirection)
[in]h_valsvalues of the pressure head
[in]soil_strucpointer to a soil structure
[in,out]resultarray storing the result

◆ _tracy_permeability_from_c_head()

static void _tracy_permeability_from_c_head ( cs_lnum_t  n_elts,
const cs_lnum_t  elt_ids[],
const cs_real_t  h_vals[],
const void *  soil_struc,
cs_real_t  result[] 
)
inlinestatic

Define the permeability (or hydraulic conductivity) using the Tracy law This function fits the generic prototype of cs_onevar_law_func_t.

Parameters
[in]n_eltsnumber of elements to treat
[in]elt_idslist of element ids (NULL if no indirection)
[in]h_valsvalues of the hydralic head
[in]soil_strucpointer to a soil structure
[in,out]resultarray storing the result

◆ _update_system()

static void _update_system ( const cs_cdo_quantities_t cdoq,
const cs_cdo_connect_t connect,
const cs_equation_t *  richards,
bool  cur2prev,
cs_gwf_t *  gw 
)
static

Update the groundwater system (pressure head, head in law, moisture content, darcian velocity)

Parameters
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]connectpointer to a cs_cdo_connect_t structure
[in]richardspointer to the Richards equation structure
[in]cur2prevtrue or false
[in,out]gwpointer to a cs_gwf_t structure

◆ cs_gwf_add_aniso_soil_by_value()

void cs_gwf_add_aniso_soil_by_value ( cs_gwf_t *  gw,
cs_gwf_hydraulic_model_t  model,
const char *  ml_name,
cs_real_t ks,
double  theta_s,
double  rho 
)

Add a new soil attached to an orthotropic permeability.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]modeltype of modeling for the hydraulic behavior
[in]ml_namename of the mesh location related to this soil
[in]k_svalue of the saturated permeability
[in]theta_ssaturated moisture
[in]rhobulk density

◆ cs_gwf_add_iso_soil_by_value()

void cs_gwf_add_iso_soil_by_value ( cs_gwf_t *  gw,
cs_gwf_hydraulic_model_t  model,
const char *  ml_name,
double  k_s,
double  theta_s,
double  rho 
)

Add a new soil attached to an isotropic permeability.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]modeltype of modeling for the hydraulic behavior
[in]ml_namename of the mesh location related to this soil
[in]k_svalue of the saturated permeability
[in]theta_ssaturated moisture
[in]rhobulk density

◆ cs_gwf_add_ortho_soil_by_value()

void cs_gwf_add_ortho_soil_by_value ( cs_gwf_t *  gw,
cs_gwf_hydraulic_model_t  model,
const char *  ml_name,
cs_real_t ks,
double  theta_s,
double  rho 
)

Add a new soil attached to an orthotropic permeability.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]modeltype of modeling for the hydraulic behavior
[in]ml_namename of the mesh location related to this soil
[in]ksvalue of the saturated permeability
[in]theta_ssaturated moisture
[in]rhobulk density

◆ cs_gwf_add_tracer()

cs_equation_t* cs_gwf_add_tracer ( cs_gwf_t *  gw,
int  tracer_eq_id,
const char *  eqname,
const char *  varname 
)

Add a new equation related to the groundwater flow module This equation is a specific unsteady advection/diffusion/reaction eq. Tracer is advected thanks to the darcian velocity which is given by the resolution of the Richards equation. Diffusion and reaction parameters result from a physical modelling.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]tracer_eq_idid related to the tracer equation
[in]eqnamename of the equation
[in]varnamename of the related variable
Returns
a pointer to a new allocated equation structure (Tracer eq.)

◆ cs_gwf_compute()

void cs_gwf_compute ( const cs_mesh_t mesh,
const cs_time_step_t time_step,
double  dt_cur,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t cdoq,
cs_equation_t *  eqs[],
cs_gwf_t *  gw 
)

Compute the system related to groundwater flows module.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]time_steppointer to a cs_time_step_t structure
[in]dt_curcurrent value of the time step
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in,out]eqsarray of pointers to cs_equation_t structures
[in,out]gwpointer to a cs_gwf_t structure

◆ cs_gwf_create()

cs_gwf_t* cs_gwf_create ( void  )

Create a structure dedicated to manage groundwater flows.

Returns
a pointer to a new allocated cs_gwf_t structure

◆ cs_gwf_extra_post()

void cs_gwf_extra_post ( 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 prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t)

Parameters
[in,out]inputpointer to a optional structure (here a cs_gwf_t structure)
[in]mesh_idid of the output mesh for the current call
[in]cat_idcategory id of the output mesh for this call
[in]ent_flagindicate global presence of cells (ent_flag[0]), interior faces (ent_flag[1]), boundary faces (ent_flag[2]), particles (ent_flag[3]) or probes (ent_flag[4])
[in]n_cellslocal number of cells of post_mesh
[in]n_i_faceslocal number of interior faces of post_mesh
[in]n_b_faceslocal number of boundary faces of post_mesh
[in]cell_idslist of cells (0 to n-1)
[in]i_face_idslist of interior faces (0 to n-1)
[in]b_face_idslist of boundary faces (0 to n-1)
[in]time_steppointer to a cs_time_step_t struct.

◆ cs_gwf_final_initialization()

void cs_gwf_final_initialization ( const cs_cdo_connect_t connect,
int  n_equations,
cs_equation_t **  equations,
cs_gwf_t *  gw 
)

Last initialization step of the groundwater flow module.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]n_equationsnumber of equations in the list
[in,out]equationspointer to a list of cs_equation_t structures
[in,out]gwpointer to a cs_gwf_t structure

◆ cs_gwf_finalize()

cs_gwf_t* cs_gwf_finalize ( cs_gwf_t *  gw)

Free the main structure related to groundwater flows.

Parameters
[in,out]gwpointer to a cs_gwf_t struct. to free
Returns
a NULL pointer

◆ cs_gwf_get_n_soils()

int cs_gwf_get_n_soils ( const cs_gwf_t *  gw)

Get the number of requested soils.

Parameters
[in]gwpointer to a cs_gwf_t structure
Returns
the number of requested soils

◆ cs_gwf_initialize()

cs_equation_t* cs_gwf_initialize ( int  richards_eq_id,
int  n_soils,
int  n_tracer_eqs,
cs_property_t permeability,
cs_property_t soil_capacity,
cs_adv_field_t adv_field,
cs_gwf_t *  gw 
)

Initialize the module dedicated to groundwater flows.

Parameters
[in]richards_eq_idid related to the Richards equation
[in]n_soilsnumber of soils to consider
[in]n_tracersnumber of tracers to consider
[in,out]permeabilitypointer to a property structure
[in,out]soil_capacitypointer to a property structure
[in,out]adv_fieldpointer to a cs_adv_field_t structure
[in,out]gwpointer to a cs_gwf_t structure
Returns
a pointer to a new allocated equation structure (Richards eq.)

◆ cs_gwf_richards_setup()

void cs_gwf_richards_setup ( cs_gwf_t *  gw,
cs_equation_t *  richards 
)

Predefined settings for the Richards equation.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in,out]richardspointer to the related cs_equation_t structure

◆ cs_gwf_set_darcian_flux_location()

void cs_gwf_set_darcian_flux_location ( cs_gwf_t *  gw,
cs_flag_t  location_flag 
)

Advanced setting: indicate where the darcian flux is stored cs_cdo_primal_cell is the default setting cs_cdo_dual_face_byc is a valid choice for vertex-based schemes.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]location_flagwhere the flux is defined

◆ cs_gwf_set_gravity_vector()

void cs_gwf_set_gravity_vector ( cs_gwf_t *  gw,
const cs_real_3_t  gvec 
)

Activate the gravity and set the gravitaty vector.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]gvecvalues of the gravity vector

◆ cs_gwf_set_soil_param()

void cs_gwf_set_soil_param ( cs_gwf_t *  gw,
const char *  ml_name,
cs_gwf_soilkey_t  key,
const cs_real_t  val 
)

Set parameters related to a cs_gwf_t structure.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]ml_namename of the mesh location associated to this soil
[in]keykey related to a member of the soil to set
[in]valvalue to set

◆ cs_gwf_set_tracer_param()

void cs_gwf_set_tracer_param ( cs_gwf_t *  gw,
int  tracer_eq_id,
const char *  ml_name,
double  wmd,
double  alpha_l,
double  alpha_t,
double  distrib_coef,
double  reaction_rate 
)

Add a new equation related to the groundwater flow module This equation is a specific unsteady advection/diffusion/reaction eq. Tracer is advected thanks to the darcian velocity which is given by the resolution of the Richards equation. Diffusion/reaction parameters result from a physical modelling.

Parameters
[in,out]gwpointer to a cs_gwf_t structure
[in]tracer_eq_idid related to the tracer equation
[in]ml_namename of the related mesh location
[in]wmdvalue of the water molecular diffusivity
[in]alpha_lvalue of the longitudinal dispersivity
[in]alpha_tvalue of the transversal dispersivity
[in]distrib_coefvalue of the distribution coefficient
[in]reaction_ratevalue of the first order rate of reaction

◆ cs_gwf_summary()

void cs_gwf_summary ( const cs_gwf_t *  gw)

Summary of a cs_gwf_t structure.

Parameters
[in]gwpointer to a cs_gwf_t struct. to summarize

◆ cs_gwf_tracer_needs_diffusion()

bool cs_gwf_tracer_needs_diffusion ( const cs_gwf_t *  gw,
int  eq_id 
)

Check if one needs to add a diffusion term for a given tracer.

Parameters
[in]gwpointer to a cs_gwf_t structure
[in]eq_idid of the equation related to this tracer
Returns
true or false

◆ cs_gwf_tracer_needs_reaction()

bool cs_gwf_tracer_needs_reaction ( const cs_gwf_t *  gw,
int  eq_id 
)

Check if one needs to add a reaction term for a given tracer.

Parameters
[in]gwpointer to a cs_gwf_t structure
[in]eq_idid of the equation related to this tracer
Returns
true or false

◆ cs_gwf_tracer_setup()

void cs_gwf_tracer_setup ( int  tracer_eq_id,
cs_equation_t *  eq,
cs_gwf_t *  gw 
)

Predefined settings for a tracer equation.

Parameters
[in]tracer_eq_idid of the equation related to this tracer
[in,out]eqpointer to the related cs_equation_t structure
[in,out]gwpointer to a cs_gwf_t structure

Variable Documentation

◆ _err_empty_gw

const char _err_empty_gw[]
static
Initial value:
=
" Stop execution. The structure related to the groundwater module is empty.\n"
" Please check your settings.\n"