![]() |
programmer's documentation
|
The Hydrogeology module of is a numerical model for water flow and solute transport in continuous porous media. The flow part is based on the Richards equation, derived from the Darcy law and the conservation of mass. The transport part is based on the the classical advection-diffusion equation, slightly modified to account the specificities of underground transport.
This module can be used to simulate transferts of water and solutes in several saturated and/or unsaturated porous media. The flow part can be steady or unsteady, with scalar or tensorial permeabilities and allows any type of soil water retention model, such as the van Genuchten model. The transport part considers dispersion, sorption and radioactive decay.
Physical concepts and equations are presented in the theory guide.
The groundwater flow module is recent, and thus, has few limitations:
The module can be activated in the usppmo routine in cs_user_parameters.f90. The corresponding keyword is idarcy in the Module for calculation options module:
Note that the activation of the module requires to desactivation the turbulent model in usipph routine in cs_user_parameters.f90 file:
When the module is activated, its specific input parameters should be set in the user_darcy_ini1 routine of cs_user_parameters.f90 file. An example is given in cs_user_parameters-richards.f90.
The permeability can be isotropic (scalar) or anisotropic (tensor) but all soils will be treated in the same way (isotropic or anisotropic):
The primary variable of the groundwater flow module is the hydraulic head H=h+z. In order to switch easily to the pressure head, the keyword darcy_gravity can be used and the value darcy_gravity_x/y/z will defined the direction:
The convergence criteron of the Newton scheme can be set over pressure or over velocity. It is recommended to keep the criteron over pressure:
The dispersion can be isotropic (scalar) or anisotropic (tensor) but all solutes will be treated in the same way (isotropic or anisotropic):
The transient transport can be based on a steady or unsteasy darcian velocity field:
Specific numerical parameters can be set in usipsu routine of cs_user_parameters.f90 file. An example is given in cs_user_parameters-richards.f90:
In the case of soils of very different permeabilities, the resolution of the Richards equation requires a weighted gradient computation for tetrahedral meshes. This option is only available for soils with isotropic permeabilities (darcy_anisotropic_permeability = 0) for now. It as to be coupled with the standard least squares gradient recontruction.
It is recommended to choose low criteria for gradient reconstruction in order to obtain a smooth darcian velocity field for the transport part. For instance:
In the case of soils of very different diffusion (dispersion or molecular diffusion), the resolution of the transport equation requires a weighted gradient computation for tetrahedral meshes. This option is only available for soils with isotropic dispersion (darcy_anisotropic_diffusion = 0) for now. It as to be coupled with the standard least squares gradient recontruction.
The total number of iterations and the reference time step are also set in this routine.
However, the time step can be modified in cs_user_extra_operations.f90 (see cs_user_extra_operations-flux.f90) in order to modif the time step with time:
Physical parameters can be set in usphyv routine of cs_user_physical_properties.f90 file. This section presents two examples that can be found in in cs_user_physical_properties-richards_sat.f90 and cs_user_physical_properties-richards_unsat.f90.
Note that, in the flow part, depending on the variable darcy_anisotropic_permeability, the permeability storage table is permeability (iostropic case) or tensor_permeability (aniotropic case). For the transport part, the isotropic part of the diffusion (molecular diffusion and isotropic dispersion) is always stored in cpro_vscalt. Only anisotropic dispersion (i.e. darcy_anisotropic_diffusion = 1) is stored in the tensor visten.
This example shows how to set physical parameters for two fully saturated soils (isotropic or anisotropic permeability) and several solutes with isotropic dispersion:
For every solute, the isotropic permeability and the delay should be set in all soils. For instance:
This example shows how to set physical parameters for a single variably saturated soil (isotropic or anisotropic permeability) and a single solute with molecular diffusion, anisotropic dispersivity and sorption. The van Genuchten model, coupled with the Mualem condition, is used to determine the relation between the moisture content and the presure head (h).
First the permeability and the van Genuchten parameters are set:
As the van Genuchten law is based on the pressure head (h), the gravity term is added if necessary:
In order to compute the capacity, the saturation and the permeability, the saturated and the unsaturated parts are treated differently.
In the saturated part (h>=0), the water content is equal to the saturated water content, the permeability is equal to the saturated permeability and the capacity is equal to zero:
In the unsaturated part (h<0), the water content, the capacity and the permeability are function of the pressure head. They are determined thanks to the van Genuchten law:
First, the values of the longitudinal and transversal dispersivity as well as the molecular diffusion of the single solute are set as follow:
The molecular diffusion (isotropic term) is stored in cpro_vscalt and computed as:
The anisotropic dispersion is stored in visten and computed as:
Note that the sorption is considered as a delay with the K_d hypothesis. It is then computed as follow:
The radioactive decay is treated as a source term in the transport equation. An example can be found in cs_user_source_terms-richards_decay.f90:
The initialisation of the variables required for the flow part (hydraulic head H) and transport part (concentration c) can be done globally:
or by selecting a precise soil:
For groundwater flows of water and solutes, the undefined type face iindef is used to impose Dirichlet, Neumann and mixte boundary conditions on hydraulic head H (here pressure) and solutes. Several examples can be found in cs_user_boundary_conditions-richards.f90.
Dirichlet boundary conditions can be used to impose a value for the hydraulic head H and the concentration c at a given boundary face:
It can also be used to impose a hydraulic head profile at another face:
Neumann boundary conditions can be used to impose fluxes at boundaries:
Note that, for the transport part, Neumann boundary conditions can only be used for boundary surface with outward or null normal flow. In both cases, the prescribed flux is the diffusive flux.
The mixte boundary conditions (Robin) can be used to impose a concentration flux at an entrance (inward normal flow at a boundary face). The following example explains how to determine the two parameters of the mixte boundary in order to impose a total flux:
In order to compute fluxes at innner or boundary surfaces, the file cs_user_extra_operations.f90 can be used. An example can be found in cs_user_extra_operations-richards_flux.f90. It shows how to compute the total fluxes at to different surface and how to write the evolution with time: