My Project
programmer's documentation
Data Structures | Typedefs | Enumerations | Functions
cs_gwf_soil.h File Reference
#include "cs_base.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_quantities.h"
#include "cs_mesh.h"
#include "cs_property.h"
#include "cs_volume_zone.h"
Include dependency graph for cs_gwf_soil.h:

Go to the source code of this file.

Data Structures

struct  cs_gwf_soil_genuchten_param_t
 
struct  cs_gwf_genuchten_update_input_t
 
struct  cs_gwf_soil_saturated_param_t
 
struct  cs_gwf_saturated_update_input_t
 
struct  cs_gwf_soil_t
 

Typedefs

typedef void() cs_gwf_soil_update_t(const cs_real_t t_eval, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_real_t *head_values, const cs_zone_t *zone, void *input)
 Generic function to update the physical properties related to a hydraulic model. At least, moisture content and permeability are updated. If the simulation is time-depedent, then the soil capacity can be updated also. More...
 
typedef void() cs_gwf_soil_finalize_t(void *input)
 Generic function to set free the input of a soil structure. More...
 

Enumerations

enum  cs_gwf_soil_hydraulic_model_t { CS_GWF_SOIL_GENUCHTEN, CS_GWF_SOIL_SATURATED, CS_GWF_SOIL_USER, CS_GWF_SOIL_N_HYDRAULIC_MODELS }
 

Functions

void cs_user_gwf_get_soil_density (const cs_gwf_soil_t *soil, cs_real_t *density)
 Retrieve the bulk density related to a soil structure. More...
 
cs_gwf_soil_tcs_gwf_soil_add (const char *z_name, cs_gwf_soil_hydraulic_model_t model)
 Create and add a new cs_gwf_soil_t structure. A first initialization of all members by default is performed. More...
 
void cs_gwf_soil_free_all (void)
 Free all cs_gwf_soil_t structures. More...
 
int cs_gwf_get_n_soils (void)
 Get the number of allocated soils. More...
 
cs_gwf_soil_tcs_gwf_soil_by_id (int id)
 Retrieve a soil structure from its id. More...
 
cs_gwf_soil_tcs_gwf_soil_by_name (const char *name)
 Retrieve a soil structure from its name. More...
 
cs_real_t cs_gwf_soil_get_bulk_density (const cs_gwf_soil_t *soil)
 Retrieve the bulk density associated to the given soil structure. More...
 
void cs_gwf_set_iso_saturated_soil (cs_gwf_soil_t *soil, double k_s, double theta_s, double rho)
 Set a soil defined by a saturated hydraulic model and attached to an isotropic permeability. More...
 
void cs_gwf_set_aniso_saturated_soil (cs_gwf_soil_t *soil, double *k_s, double theta_s, double rho)
 Set a soil defined by a saturated hydraulic model and attached to an isotropic permeability. More...
 
void cs_gwf_set_iso_genuchten_soil (cs_gwf_soil_t *soil, double k_s, double theta_s, double theta_r, double rho)
 Set a soil defined by a Van Genuchten hydraulic model and attached to an anisotropic permeability. More...
 
void cs_gwf_set_aniso_genuchten_soil (cs_gwf_soil_t *soil, double *k_s, double theta_s, double theta_r, double rho)
 Set a soil defined by a Van Genuchten hydraulic model and attached to an anisotropic permeability. More...
 
void cs_gwf_set_user_soil (cs_gwf_soil_t *soil, void *input, cs_gwf_soil_update_t *update_func, cs_gwf_soil_finalize_t *free_func)
 Set a soil defined by a user-defined hydraulic model and attached to an anisotropic permeability. More...
 
void cs_gwf_soil_set_all_saturated (cs_property_t *permeability, cs_property_t *moisture_content, cs_field_t *moisture_field)
 Set the properties of the groundwater flow module all soils are considered as saturated. More...
 
void cs_gwf_build_cell2soil (cs_lnum_t n_cells)
 Build an array storing the associated soil for each cell. More...
 
const short int * cs_gwf_get_cell2soil (void)
 Get the array storing the associated soil for each cell. More...
 
void cs_gwf_soil_set_by_field (cs_property_t *permeability, cs_field_t *permea_field, cs_property_t *moisture_content, cs_field_t *moisture_field, cs_property_t *soil_capacity, cs_field_t *capacity_field)
 Set the properties of the groundwater flow module thanks to cs_field_t structure. The consequence is that the related cs_property_t structure relies on only one definition (i.e. for the whole mesh). Fields are updated by using the update function pointer associated to each soil. More...
 
void cs_gwf_soil_log_setup (void)
 Summary of the settings related to all cs_gwf_soil_t structures. More...
 

Typedef Documentation

◆ cs_gwf_soil_finalize_t

typedef void() cs_gwf_soil_finalize_t(void *input)

Generic function to set free the input of a soil structure.

Parameters
[in,out]inputpointer to a structure cast on-the-fly

◆ cs_gwf_soil_update_t

typedef void() cs_gwf_soil_update_t(const cs_real_t t_eval, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_real_t *head_values, const cs_zone_t *zone, void *input)

Generic function to update the physical properties related to a hydraulic model. At least, moisture content and permeability are updated. If the simulation is time-depedent, then the soil capacity can be updated also.

Parameters
[in]t_evaltime at which one performs the evaluation
[in]meshpointer to a cs_mesh_t structure
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]head_in_lawarray of values for head used in law
[in]zonepointer to a cs_zone_t
[in,out]inputpointer to a structure cast on-the-fly

Enumeration Type Documentation

◆ cs_gwf_soil_hydraulic_model_t

Enumerator
CS_GWF_SOIL_GENUCHTEN 
CS_GWF_SOIL_SATURATED 
CS_GWF_SOIL_USER 
CS_GWF_SOIL_N_HYDRAULIC_MODELS 

Function Documentation

◆ cs_gwf_build_cell2soil()

void cs_gwf_build_cell2soil ( cs_lnum_t  n_cells)

Build an array storing the associated soil for each cell.

Parameters
[in]n_cellsnumber of cells

◆ cs_gwf_get_cell2soil()

const short int* cs_gwf_get_cell2soil ( void  )

Get the array storing the associated soil for each cell.

◆ cs_gwf_get_n_soils()

int cs_gwf_get_n_soils ( void  )

Get the number of allocated soils.

Returns
the number of allocated soils

◆ cs_gwf_set_aniso_genuchten_soil()

void cs_gwf_set_aniso_genuchten_soil ( cs_gwf_soil_t soil,
double *  k_s,
double  theta_s,
double  theta_r,
double  rho 
)

Set a soil defined by a Van Genuchten hydraulic model and attached to an anisotropic permeability.

Parameters
[in,out]soilpointer to a cs_gwf_soil_t structure
[in]k_svalue of the anisotropic saturated permeability
[in]theta_ssaturated moisture
[in]theta_rresidual moisture
[in]rhobulk density

◆ cs_gwf_set_aniso_saturated_soil()

void cs_gwf_set_aniso_saturated_soil ( cs_gwf_soil_t soil,
double *  k_s,
double  theta_s,
double  rho 
)

Set a soil defined by a saturated hydraulic model and attached to an isotropic permeability.

Parameters
[in,out]soilpointer to a cs_gwf_soil_t structure
[in]k_svalue of the anisotropic saturated permeability
[in]theta_ssaturated moisture
[in]rhobulk density

◆ cs_gwf_set_iso_genuchten_soil()

void cs_gwf_set_iso_genuchten_soil ( cs_gwf_soil_t soil,
double  k_s,
double  theta_s,
double  theta_r,
double  rho 
)

Set a soil defined by a Van Genuchten hydraulic model and attached to an anisotropic permeability.

Parameters
[in,out]soilpointer to a cs_gwf_soil_t structure
[in]k_svalue of the isotropic saturated permeability
[in]theta_ssaturated moisture
[in]theta_rresidual moisture
[in]rhobulk density

◆ cs_gwf_set_iso_saturated_soil()

void cs_gwf_set_iso_saturated_soil ( cs_gwf_soil_t soil,
double  k_s,
double  theta_s,
double  rho 
)

Set a soil defined by a saturated hydraulic model and attached to an isotropic permeability.

Parameters
[in,out]soilpointer to a cs_gwf_soil_t structure
[in]k_svalue of the saturated permeability
[in]theta_ssaturated moisture
[in]rhobulk density

◆ cs_gwf_set_user_soil()

void cs_gwf_set_user_soil ( cs_gwf_soil_t soil,
void *  input,
cs_gwf_soil_update_t update_func,
cs_gwf_soil_finalize_t free_func 
)

Set a soil defined by a user-defined hydraulic model and attached to an anisotropic permeability.

Parameters
[in,out]soilpointer to a cs_gwf_soil_t structure
[in]inputpointer to a structure cast on-the-fly
[in]update_funcpointer to the function used for updating
[in]free_funcpointer to the function used for finalizing

◆ cs_gwf_soil_add()

cs_gwf_soil_t* cs_gwf_soil_add ( const char *  z_name,
cs_gwf_soil_hydraulic_model_t  model 
)

Create and add a new cs_gwf_soil_t structure. A first initialization of all members by default is performed.

Parameters
[in]z_namename of the volume zone corresponding to the soil
[in]modeltype of modeling for the hydraulic behavior
Returns
a pointer to the new allocated structure

◆ cs_gwf_soil_by_id()

cs_gwf_soil_t* cs_gwf_soil_by_id ( int  id)

Retrieve a soil structure from its id.

Parameters
[in]idid to look for
Returns
a pointer to a cs_gwf_soil_t structure

◆ cs_gwf_soil_by_name()

cs_gwf_soil_t* cs_gwf_soil_by_name ( const char *  name)

Retrieve a soil structure from its name.

Parameters
[in]namename to look for
Returns
a pointer to a cs_gwf_soil_t structure

◆ cs_gwf_soil_free_all()

void cs_gwf_soil_free_all ( void  )

Free all cs_gwf_soil_t structures.

◆ cs_gwf_soil_get_bulk_density()

cs_real_t cs_gwf_soil_get_bulk_density ( const cs_gwf_soil_t soil)

Retrieve the bulk density associated to the given soil structure.

Parameters
[in]soilpointer to a cs_gwf_soil_t structure
Returns

◆ cs_gwf_soil_log_setup()

void cs_gwf_soil_log_setup ( void  )

Summary of the settings related to all cs_gwf_soil_t structures.

◆ cs_gwf_soil_set_all_saturated()

void cs_gwf_soil_set_all_saturated ( cs_property_t permeability,
cs_property_t moisture_content,
cs_field_t moisture_field 
)

Set the properties of the groundwater flow module all soils are considered as saturated.

Parameters
[in,out]permeabilitypointer to a cs_property_t structure
[in,out]moisture_contentpointer to a cs_property_t structure
[in,out]moisture_fieldpointer to a cs_field_t structure

◆ cs_gwf_soil_set_by_field()

void cs_gwf_soil_set_by_field ( cs_property_t permeability,
cs_field_t permea_field,
cs_property_t moisture_content,
cs_field_t moisture_field,
cs_property_t soil_capacity,
cs_field_t capacity_field 
)

Set the properties of the groundwater flow module thanks to cs_field_t structure. The consequence is that the related cs_property_t structure relies on only one definition (i.e. for the whole mesh). Fields are updated by using the update function pointer associated to each soil.

Parameters
[in,out]permeabilitypointer to a cs_property_t structure
[in]permea_fieldpointer to a cs_field_t structure
[in,out]moisture_contentpointer to a cs_property_t structure
[in]moisture_fieldpointer to a cs_field_t structure
[in,out]soil_capacitypointer to a cs_property_t structure
[in]capacity_fieldpointer to a cs_field_t structure

◆ cs_user_gwf_get_soil_density()

void cs_user_gwf_get_soil_density ( const cs_gwf_soil_t soil,
cs_real_t density 
)

Retrieve the bulk density related to a soil structure.

Parameters
[in]soilpointer to a cs_gwf_soil_t structure
[out]densityreturn value for the density