My Project
programmer's documentation
|
#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"
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_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. 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_t * | cs_gwf_soil_by_id (int id) |
Retrieve a soil structure from its id. More... | |
cs_gwf_soil_t * | cs_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 void() cs_gwf_soil_finalize_t(void *input) |
Generic function to set free the input of a soil structure.
[in,out] | input | pointer to a structure cast on-the-fly |
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.
[in] | t_eval | time at which one performs the evaluation |
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | head_in_law | array of values for head used in law |
[in] | zone | pointer to a cs_zone_t |
[in,out] | input | pointer to a structure cast on-the-fly |
void cs_gwf_build_cell2soil | ( | cs_lnum_t | n_cells | ) |
Build an array storing the associated soil for each cell.
[in] | n_cells | number of cells |
const short int* cs_gwf_get_cell2soil | ( | void | ) |
Get the array storing the associated soil for each cell.
int cs_gwf_get_n_soils | ( | void | ) |
Get the number of allocated soils.
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.
[in,out] | soil | pointer to a cs_gwf_soil_t structure |
[in] | k_s | value of the anisotropic saturated permeability |
[in] | theta_s | saturated moisture |
[in] | theta_r | residual moisture |
[in] | rho | bulk density |
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.
[in,out] | soil | pointer to a cs_gwf_soil_t structure |
[in] | k_s | value of the anisotropic saturated permeability |
[in] | theta_s | saturated moisture |
[in] | rho | bulk density |
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.
[in,out] | soil | pointer to a cs_gwf_soil_t structure |
[in] | k_s | value of the isotropic saturated permeability |
[in] | theta_s | saturated moisture |
[in] | theta_r | residual moisture |
[in] | rho | bulk density |
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.
[in,out] | soil | pointer to a cs_gwf_soil_t structure |
[in] | k_s | value of the saturated permeability |
[in] | theta_s | saturated moisture |
[in] | rho | bulk density |
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.
[in,out] | soil | pointer to a cs_gwf_soil_t structure |
[in] | input | pointer to a structure cast on-the-fly |
[in] | update_func | pointer to the function used for updating |
[in] | free_func | pointer to the function used for finalizing |
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.
[in] | z_name | name of the volume zone corresponding to the soil |
[in] | model | type of modeling for the hydraulic behavior |
cs_gwf_soil_t* cs_gwf_soil_by_id | ( | int | id | ) |
Retrieve a soil structure from its id.
[in] | id | id to look for |
cs_gwf_soil_t* cs_gwf_soil_by_name | ( | const char * | name | ) |
Retrieve a soil structure from its name.
[in] | name | name to look for |
void cs_gwf_soil_free_all | ( | void | ) |
Free all cs_gwf_soil_t structures.
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.
[in] | soil | pointer to a cs_gwf_soil_t structure |
void cs_gwf_soil_log_setup | ( | void | ) |
Summary of the settings related to all cs_gwf_soil_t structures.
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.
[in,out] | permeability | pointer to a cs_property_t structure |
[in,out] | moisture_content | pointer to a cs_property_t structure |
[in,out] | moisture_field | pointer to a cs_field_t structure |
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.
[in,out] | permeability | pointer to a cs_property_t structure |
[in] | permea_field | pointer to a cs_field_t structure |
[in,out] | moisture_content | pointer to a cs_property_t structure |
[in] | moisture_field | pointer to a cs_field_t structure |
[in,out] | soil_capacity | pointer to a cs_property_t structure |
[in] | capacity_field | pointer to a cs_field_t structure |
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.
[in] | soil | pointer to a cs_gwf_soil_t structure |
[out] | density | return value for the density |