Structure to handle the modelling of miscible or immiscible two-phase flows in a porous media. More...
#include <cs_gwf_priv.h>
Structure to handle the modelling of miscible or immiscible two-phase flows in a porous media.
The model follows what is depicted in "Finite volume approximation of a diffusion-dissolution model and application to nuclear waste storage" O. Angelini, C. Chavant, E. Chénier, R. Eymard and S. Granet in Mathematics and Computers in Simulation (2011), 81 (10), pp. 2001–2017
Main assumptions are:
The two primitive variables are the liquid and gas pressures with a specific treatment in the saturated case to handle the gas pressure (cf. the cited article or Angelini's PhD thesis)
Notations are the following :
The resulting linear algebraic system (one applies a linearization) is defined as follows:
liquid gas
water conservation | M_wl | M_wg ||P_l| | b_w | |----—|---—||—| = |--—| hydrogen conservation | M_hl | M_hg ||P_g| | b_h |
This is coupled system. Coupling terms are collected inside M_wg and M_hl
anderson_param |
Set of parameters to drive the Anderson acceleration (useful if the type of non-linear algorithm is set to the Anderson acceleration).
c_pressure |
Pointer to a cs_field_t structure named "capillarity_pressure". Capillarity pressure
capillarity_cell_pressure |
Values in each cell of the capillarity pressure. This quantity is the one used to update the variable related to a soil model such as the liquid and gaseous relative permeabilities or the liquid saturation.
diff_hg_array |
Values in each cell of the coefficient appearing in the diffusion term in the hydrogen conservation equation w.r.t. to the pressure in the gaseous phase. This array is linked to the diff_hg_pty (size = n_cells)
diff_hg_pty |
Property related to the diffusion term of the hydrogen conservation equation w.r.t. the pressure in the gaseous phase
diff_hl_array |
Values in each cell of the coefficient appearing in the diffusion term in the hydrogen conservation equation w.r.t. the pressure in the liquid phase. This array is linked to the diff_hl_pty (size = n_cells)
diff_hl_pty |
Property related to the diffusion term of the hydrogen conservation equation w.r.t. the pressure in the liquid phase
diff_wl_array |
Values in each cell of the coefficient appearing in the diffusion term in the water conservation equation. This array is linked to the diff_wl_pty (size = n_cells)
diff_wl_pty |
Property related to the diffusion term of the water conservation equation w.r.t. the pressure in the liquid phase
g_cell_pressure |
Values in each cell of the gas pressure. This quantity is the one used to update the unsteady/diffusion term coefficients in the conservation equation for the gas component. This quantity can also be useful for post-processing purposes.
g_darcy |
Pointer to a cs_gwf_darcy_flux_t structure. Darcy advective flux in the gas phase
g_pressure |
Pointer to a cs_field_t structure named "gas_pressure". Pressure in the gas phase is denoted by .
g_rel_permeability |
Values in each cell of the relative permeability in the gas phase. This quantity is used either in the water conservation or in the hydrogen conservation. This enables also to recover the (full) permeability in the gas phase since permeability = abs_permeability * rel_l_permeability This quantity is defined by the soil model.
g_viscosity |
Viscosity in the gas phase (assumed to be constant) in Pa.s
h_molar_mass |
Molar mass of the main component in the gas phase (e.g. hydrogen) in kg.mol^-1
henry_constant |
Value of the Henry constant used in the Henry's law. Setting a very low value for this constant enables the model to degenerate into an immiscible model.
hg_eq |
Equation of conservation for the (di)hydrogen. Hydrogen can be present in the liquid or in the gaseous phase. This corresponds to the block (1,1) in the system of equations, i.e. the M_hg block and the b_g right-hand side
hl_eqp |
Parameters associated to the (h,l) block i.e. the (1,0) block in the system of equations. Conservation of the hydrogen w.r.t. the pressure in the liquid phase.
l_capacity |
Values in each cell of the soil capacity defined as This quantity is defined by the soil model.
l_darcy |
Pointer to a cs_gwf_darcy_flux_t structure. Darcy advective flux in the liquid phase
l_diffusivity_h |
Molecular diffusivity of the hydrogen in the liquid phase in m^2.s^-1
l_mass_density |
Mass density in the liquid phase. With the model assumptions, this corresponds to the mass density of the main component in the liquid phase (e.g. water) in kg.m^-3
l_pressure |
Pointer to a cs_field_t structure named "liquid_pressure". Pressure in the liquid phase is denoted by .
l_rel_permeability |
Values in each cell of the relative permeability in the liquid phase. This quantity is used either in the water conservation or in the hydrogen conservation. This enables also to recover the (full) permeability in the liquid phase since permeability = abs_permeability * rel_l_permeability This quantity is defined by the soil model.
l_saturation |
Pointer to a cs_field_t structure. Liquid saturation at cells. This quantity is denoted by and is defined by the soil model
l_saturation_submesh |
Array storing the current values of the liquid saturation on a submesh. This submesh corresponds to the subdivision of the primal mesh by the dual mesh associated to each vertex (scanned this array with the c2v adjacency structure). This array is allocated only if the option CS_GWF_LIQUID_SATURATION_ON_SUBMESH is swicth on.
l_saturation_submesh_pre |
Array storing the previous values of the liquid saturation on a submesh. This submesh corresponds to the subdivision of the primal mesh by the dual mesh associated to each vertex (scanned this array with the c2v adjacency structure). This array is allocated only if the option CS_GWF_LIQUID_SATURATION_ON_SUBMESH is swicth on.
l_viscosity |
Viscosity in the liquid phase (assumed to be constant) in Pa.s
nl_algo |
Structure used to manage the non-linearities
nl_algo_cvg |
Set of parameters to drive the convergence of the non-linear solver
nl_algo_type |
Type of algorithm to solve the non-linearities
reac_hg_array |
Values in each cell of the coefficient appearing in the reaction term in the hydrogen conservation equation w.r.t. to the pressure in the gaseous phase. This array is linked to the reac_hg_pty (size = n_cells)
reac_hg_pty |
Property related to the reaction term of the hydrogen conservation equation w.r.t. the pressure in the gaseous phase
ref_temperature |
Reference temperature used in the "perfect gas" law (this is used when no thermal equation is solved). One expects a temperature in Kelvin.
srct_hg_array |
Values in each vertex of the source term corresponding to a quantity proportional to the time evolution of the unsteady term in the hg equation. This term is allocated only if the optional parameter use_properties_on_submesh is activated
srct_wl_array |
Values in each cell of the source term corresponding to a quantity proportional to the time evolution of the liquid saturation
system |
System of equations (wl_eq, hg_eq and the cross-term defined in the related cs_equation_param_t structures) used for the coupled approach
time_hg_array |
Values in each cell of the coefficient appearing in front of the unsteady term in the hydrogen conservation equation w.r.t. the pressure in the gaseous phase. This array is linked to the time_hg_pty (size = n_cells)
time_hg_pty |
Property related to the unsteady term of the hydrogen conservation equation w.r.t. the pressure in the gaseous phase.
time_hl_array |
Values in each cell of the coefficient appearing in front of the unsteady term in the hydrogen conservation equation w.r.t. the pressure in the liquid phase. This array is linked to the time_hl_pty (size = n_cells)
time_hl_pty |
Property related to the unsteady term of the hydrogen conservation equation w.r.t. the pressure in the liquid phase.
time_wg_array |
Values in each cell of the coefficient appearing in front of the unsteady term in the water conservation equation w.r.t. the pressure in the gaseous phase. This array is linked to the time_wg_pty (size = n_cells)
time_wg_pty |
Property related to the unsteady term of the water conservation equation w.r.t. the pressure in the gaseous phase
time_wl_array |
Values in each cell of the coefficient appearing in front of the unsteady term in the water conservation equation for the liquid phase. This array is linked to the time_wl_pty (size = n_cells)
time_wl_pty |
Property related to the unsteady term of the water conservation equation w.r.t. the pressure in the liquid phase
use_coupled_solver |
When a model relies on several coupled equations, there are two main options to build and solve the system of equations. Either use a coupled solver (and thus build a coupled system) or use a segregated approach and an associated strategy to solve the sequence of equations and apply sub-iterations. The latter case (segregated solver) corresponds to the default choice. true if a coupled solver is used. Otherwise a segregated solver is considered.
use_explicit_dsldt_liquid |
Consider an explicit treatment of the time derivative of the liquid saturation in the mass conservation for the water equation.
use_incremental_solver |
When a model includes non-linearities it can be useful to formulate the problem using increment and to iterate on the non-linear process (for instance whith a Picard or Anderson acceleration)
use_properties_on_submesh |
Consider a submesh to define the liquid saturation.
w_molar_mass |
Molar mass of the main component in the liquid phase (e.g. water) in kg.mol^-1
wg_eqp |
Parameters associated to the M_wg block i.e. the (0,1) block in the system of equations. Water conservation w.r.t. the pressure in the gaseous phase.
wl_eq |
Equation of conservation for the water component. Only the liquid phase is considered. One assumes no water vapour in the gaseous phase. This corresponds to the M_wl block in the system of equations and to the b_w right-hand side.