1 #ifndef __CS_GWF_SOIL_H__
2 #define __CS_GWF_SOIL_H__
359 void *hydraulic_context);
#define BEGIN_C_DECLS
Definition: cs_defs.h:509
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_gwf_model_type_t
Type of system of equation(s) to consider for the physical modelling.
Definition: cs_gwf_param.h:118
cs_gwf_soil_model_t
Predefined hydraulic model of soils used in the groundwater flow module.
Definition: cs_gwf_param.h:256
cs_real_t cs_gwf_soil_get_saturated_moisture(int soil_id)
Get the saturated moisture for the given soil id.
Definition: cs_gwf_soil.c:306
void cs_gwf_soil_set_shared_properties(cs_property_t *abs_permeability, cs_property_t *soil_porosity)
Set the definition of the soil porosity and absolute porosity (which are properties always defined)....
Definition: cs_gwf_soil.c:932
void cs_gwf_soil_iso_update_itpf_terms(cs_gwf_two_phase_t *mc)
Update arrays associated to the definition of terms involved in the immiscible two-phase flow model....
Definition: cs_gwf_soil.c:1188
void cs_gwf_soil_iso_update_mtpf_terms(cs_gwf_two_phase_t *mc)
Update arrays associated to the definition of terms involved in the miscible two-phase flow model....
Definition: cs_gwf_soil.c:1105
int cs_gwf_get_n_soils(void)
Get the number of allocated soils.
Definition: cs_gwf_soil.c:241
void cs_gwf_soil_build_cell2soil(cs_lnum_t n_cells)
Build an array storing the associated soil for each cell The lifecycle of this array is managed by th...
Definition: cs_gwf_soil.c:565
void cs_gwf_soil_free_all(void)
Free all cs_gwf_soil_t structures.
Definition: cs_gwf_soil.c:713
const short int * cs_gwf_soil_get_cell2soil(void)
Get the array storing the associated soil for each cell.
Definition: cs_gwf_soil.c:612
void cs_gwf_soil_iso_update_itpf_terms_incr(const cs_time_step_t *ts, cs_gwf_two_phase_t *mc)
Update arrays associated to the definition of terms involved in the immiscible two-phase flow model....
Definition: cs_gwf_soil.c:1321
void cs_gwf_soil_tpf_set_property(cs_gwf_two_phase_t *mc)
Set the definition of some property(ies) in specific situations for the two-phase flow models This re...
Definition: cs_gwf_soil.c:1021
void cs_gwf_soil_set_genuchten_param(cs_gwf_soil_t *soil, double theta_r, double alpha, double n, double L)
Set a soil defined by a Van Genuchten-Mualen model.
Definition: cs_gwf_soil.c:859
cs_gwf_soil_t * cs_gwf_soil_by_id(int id)
Retrieve a soil structure from its id.
Definition: cs_gwf_soil.c:257
void cs_gwf_soil_check(void)
Check that at least one soil has been defined and the model of soil exists. Raise an error if a probl...
Definition: cs_gwf_soil.c:380
void cs_gwf_soil_update(cs_real_t time_eval, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant)
Update the soil properties.
Definition: cs_gwf_soil.c:1059
const double * cs_gwf_soil_get_dual_porous_volume(void)
Get the array storing the dual volume weighted by the soil porosity Array of size n_vertices.
Definition: cs_gwf_soil.c:701
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_zone_t *zone, cs_gwf_soil_t *soil)
Generic function to update the properties related to a hydraulic model given the soil model....
Definition: cs_gwf_soil.h:74
void cs_gwf_soil_saturated_set_property(cs_property_t *moisture_content)
Set the definition of the soil porosity and absolute porosity (which are properties always defined)....
Definition: cs_gwf_soil.c:984
cs_gwf_soil_t * cs_gwf_soil_create(const cs_zone_t *zone, cs_gwf_model_type_t hydraulic_model, cs_gwf_soil_model_t model, cs_property_type_t perm_type, double k_abs[3][3], double porosity, double bulk_density, void *hydraulic_context)
Create a new cs_gwf_soil_t structure and add it to the array of soils. An initialization by default o...
Definition: cs_gwf_soil.c:437
void cs_gwf_soil_build_dual_porous_volume(const cs_cdo_quantities_t *cdoq, const cs_cdo_connect_t *connect)
Build an array storing the dual volume associated to each vertex taking into account the porosity of ...
Definition: cs_gwf_soil.c:632
int cs_gwf_soil_get_permeability_max_dim(void)
Retrieve the max dim (aniso=9; iso=1) for the absolute permeability associated to each soil.
Definition: cs_gwf_soil.c:326
cs_gwf_soil_t * cs_gwf_soil_by_name(const char *name)
Retrieve a soil structure from its name.
Definition: cs_gwf_soil.c:276
void cs_gwf_soil_set_user(cs_gwf_soil_t *soil, void *param, cs_gwf_soil_update_t *update_func, cs_gwf_soil_free_param_t *free_param_func)
Set a soil defined by a user-defined model.
Definition: cs_gwf_soil.c:902
bool cs_gwf_soil_all_are_saturated(void)
Check if all soils have been set as CS_GWF_SOIL_SATURATED.
Definition: cs_gwf_soil.c:358
void cs_gwf_soil_iso_update_itpf_terms_incr_submesh(const cs_time_step_t *ts, const cs_cdo_connect_t *connect, cs_gwf_two_phase_t *mc)
Update arrays associated to the definition of terms involved in the immiscible two-phase flow model....
Definition: cs_gwf_soil.c:1450
void cs_gwf_soil_log_setup(void)
Summary of the settings related to all cs_gwf_soil_t structures.
Definition: cs_gwf_soil.c:768
void() cs_gwf_soil_free_param_t(void **p_param)
Generic function to set free the parameter structure associated to a soil.
Definition: cs_gwf_soil.h:91
cs_flag_t cs_property_type_t
Definition: cs_property.h:117
double precision, dimension(ncharm), save alpha
Definition: cpincl.f90:99
Main structure to handle a soil in the groundwater flow module.
Definition: cs_gwf_soil.h:145
double abs_permeability[3][3]
Definition: cs_gwf_soil.h:229
cs_gwf_soil_free_param_t * free_model_param
Definition: cs_gwf_soil.h:237
void * model_param
Definition: cs_gwf_soil.h:232
double porosity
Definition: cs_gwf_soil.h:227
cs_gwf_soil_model_t model
Definition: cs_gwf_soil.h:231
void * hydraulic_context
Definition: cs_gwf_soil.h:223
int abs_permeability_dim
Definition: cs_gwf_soil.h:228
cs_gwf_soil_update_t * update_properties
Definition: cs_gwf_soil.h:236
double bulk_density
Definition: cs_gwf_soil.h:226
cs_gwf_model_type_t hydraulic_model
Definition: cs_gwf_soil.h:222
int id
Definition: cs_gwf_soil.h:219
int zone_id
Definition: cs_gwf_soil.h:220
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:137
Structure to handle the Van Genuchten-Mualen model of soil.
Definition: cs_gwf_soil.h:106
double tortuosity
Definition: cs_gwf_soil.h:131
double residual_moisture
Definition: cs_gwf_soil.h:126
double m
Definition: cs_gwf_soil.h:129
double scale
Definition: cs_gwf_soil.h:130
double n
Definition: cs_gwf_soil.h:128
Structure to handle the modelling of miscible or immiscible two-phase flows in a porous media.
Definition: cs_gwf_priv.h:332
Structure associated to the definition of a property relying on the cs_xdef_t structure.
time step descriptor
Definition: cs_time_step.h:64