My Project
programmer's documentation
|
Main functions dedicated to soil management in groundwater flows when using CDO schemes. More...
#include <assert.h>
#include <ctype.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <bft_mem.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_prototypes.h"
#include "cs_reco.h"
#include "cs_volume_zone.h"
#include "cs_gwf_soil.h"
Macros | |
#define | CS_GWF_SOIL_DBG 0 |
Functions | |
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... | |
Main functions dedicated to soil management in groundwater flows when using CDO schemes.
#define CS_GWF_SOIL_DBG 0 |
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 |