Structure to handle the modelling of miscible or immiscible two-phase flows in a porous media. More...
#include <cs_gwf_hydraulic_model.h>
Data Fields | |
Equations and system of equations | |
| cs_equation_t * | w_eq |
| cs_equation_t * | h_eq |
| cs_equation_param_t * | b01_w_eqp |
| cs_equation_param_t * | b10_h_eqp |
| cs_equation_system_t * | system |
Darcy (advection) fields | |
| cs_gwf_darcy_flux_t * | l_darcy |
| cs_gwf_darcy_flux_t * | g_darcy |
| cs_gwf_darcy_flux_t * | t_darcy |
Properties related to the model | |
| cs_property_t * | krl_pty |
| cs_property_t * | krg_pty |
| cs_property_t * | lsat_pty |
| cs_property_t * | lcap_pty |
| cs_property_t * | time_wc_pty |
| cs_property_t * | diff_wl_pty |
| cs_property_t * | diff_wc_pty |
| cs_property_t * | diff_wg_pty |
| cs_property_t * | time_hc_pty |
| cs_property_t * | diff_hc_pty |
| cs_property_t * | time_hg_pty |
| cs_property_t * | diff_hg_pty |
| cs_property_t * | time_hl_pty |
| cs_property_t * | diff_hl_pty |
| cs_property_t * | reac_h_pty |
| cs_property_t * | diff_g_pty |
| cs_property_t * | diff_w_pty |
Additional fields | |
| cs_field_t * | c_pressure |
| cs_field_t * | l_pressure |
| cs_field_t * | g_pressure |
| cs_field_t * | l_saturation |
Additional arrays | |
| cs_real_t * | srct_w_array |
| cs_real_t * | srct_h_array |
Physical model parameters | |
| bool | is_miscible |
| cs_real_t | l_mass_density |
| cs_real_t | l_viscosity |
| cs_real_t | g_viscosity |
| cs_real_t | l_diffusivity_h |
| cs_real_t | h_molar_mass |
| cs_real_t | ref_temperature |
| cs_real_t | henry_constant |
Numerical parameters | |
| cs_gwf_tpf_approx_type_t | approx_type |
| type of approximation used for the computation of diffusion, unsteady coefficients | |
| double | cell_weight |
| weight associated to the cell value w.r.t. to the values at vertices when a CS_GWF_TPF_APPROX_PC_CELL_VERTEX_AVERAGE choice is set for 'approx_type'. If the value is < 0 or > 1, then the default settings is kept. | |
| double | upwind_weight |
| weight associated to the upwind value w.r.t. to the centered value There is no effect when CS_GWF_TPF_APPROX_VERTEX_SUBCELL is chosen to approximate coefficients. If the value is < 0 or > 1, then the default settings is kept. | |
| cs_gwf_tpf_solver_type_t | solver_type |
| Type of solver considered to solve the system of equations (choice of main unknowns and strategy of resolution (coupled/segregated)) | |
| bool | 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. | |
| bool | 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) | |
| bool | use_diffusion_view_for_darcy |
| Use a diffusion term for the discretization of the Darcy terms in the conservation equation for the mass of hydrogen. The default option is to consuder an advection term since it should be more robust as upwinding technique can be used. | |
| cs_param_nl_algo_t | nl_algo_type |
| int | nl_algo_verbosity |
| cs_real_t | nl_relax_factor |
| cs_param_convergence_t | nl_cvg_param |
| cs_iter_algo_param_aac_t | anderson_param |
| cs_iter_algo_t * | nl_algo |
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:
Notations are the following :
| cs_iter_algo_param_aac_t anderson_param |
Set of parameters to drive the Anderson acceleration (useful if the type of non-linear algorithm is set to the Anderson acceleration).
| cs_gwf_tpf_approx_type_t approx_type |
type of approximation used for the computation of diffusion, unsteady coefficients
| cs_equation_param_t* b01_w_eqp |
Parameters associated to the (0,1) block in the system of equations. Water conservation w.r.t. the capillarity pressure.
| cs_equation_param_t* b10_h_eqp |
Parameters associated to the (1,0) block in the system of equations. Conservation of the hydrogen w.r.t. the capillarity pressure.
| cs_field_t* c_pressure |
Pointer to a cs_field_t structure named "capillarity_pressure". Capillarity pressure 
| double cell_weight |
weight associated to the cell value w.r.t. to the values at vertices when a CS_GWF_TPF_APPROX_PC_CELL_VERTEX_AVERAGE choice is set for 'approx_type'. If the value is < 0 or > 1, then the default settings is kept.
| cs_property_t* diff_g_pty |
Property used in the definition of the Darcy flux in the gas phase
| cs_property_t* diff_hc_pty |
Property related to the diffusion term of the hydrogen conservation equation w.r.t. the capillarity pressure
| cs_property_t* diff_hg_pty |
Property related to the diffusion term of the hydrogen conservation equation w.r.t. the pressure in the gas phase
| cs_property_t* diff_hl_pty |
Property related to the diffusion term of the hydrogen conservation equation w.r.t. the pressure in the liquid phase
| cs_property_t* diff_w_pty |
Property related to the relative permeability in the liquid phase
| cs_property_t* diff_wc_pty |
Property related to the diffusion term of the water conservation equation w.r.t. the capillarity
| cs_property_t* diff_wg_pty |
Property related to the diffusion term of the water conservation equation w.r.t. the pressure in the gas phase
| cs_property_t* diff_wl_pty |
Property related to the diffusion term of the water conservation equation w.r.t. the pressure in the liquid phase
| cs_gwf_darcy_flux_t* g_darcy |
Pointer to a cs_gwf_darcy_flux_t structure. Darcy advective flux in the gas phase
| cs_field_t* g_pressure |
Pointer to a cs_field_t structure named "gas_pressure". Pressure in the gas phase is denoted by 
| cs_real_t g_viscosity |
Viscosity in the gas phase (assumed to be constant) in Pa.s
| cs_equation_t* h_eq |
Equation of mass conservation for (di)hydrogen. Hydrogen can be present in the liquid or in the gaseous phase. This corresponds to the M_10 and M_11 blocks in the system of equations along with the b_h right-hand side
| cs_real_t h_molar_mass |
Molar mass of the main component in the gas phase (e.g. hydrogen) in kg.mol^-1
| cs_real_t 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.
| bool is_miscible |
true or false. Some simplifications can be done if immiscible.
| cs_property_t* krg_pty |
Property related to the relative permeability in the gas phase
| cs_property_t* krl_pty |
Property related to the relative permeability in the liquid phase
| cs_gwf_darcy_flux_t* l_darcy |
Pointer to a cs_gwf_darcy_flux_t structure. Darcy advective flux in the liquid phase
| cs_real_t l_diffusivity_h |
Molecular diffusivity of the hydrogen in the liquid phase in m^2.s^-1
| cs_real_t 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
| cs_field_t* l_pressure |
Pointer to a cs_field_t structure named "liquid_pressure". Pressure in the liquid phase is denoted by 
| cs_field_t* l_saturation |
Pointer to a cs_field_t structure. Liquid saturation at cells. This quantity is denoted by 
| cs_real_t l_viscosity |
Viscosity in the liquid phase (assumed to be constant) in Pa.s
| cs_property_t* lcap_pty |
Property related to the liquid capacity (derivative of the liquid saturation w.r.t. the capillarity pressure)
| cs_property_t* lsat_pty |
Property related to the liquid saturation
| cs_iter_algo_t* nl_algo |
Structure used to manage the non-linearities
| cs_param_nl_algo_t nl_algo_type |
Type of algorithm to solve the non-linearities
| int nl_algo_verbosity |
Level of verbosity for the algorithm solving the non-linearities
| cs_param_convergence_t nl_cvg_param |
Set of parameters to drive the convergence of the non-linear solver
| cs_real_t nl_relax_factor |
Value of the relaxation factor in the non-linear algorithm. A classical choice is between 0.70 and 0.95
| cs_property_t* reac_h_pty |
Property related to the reaction term of the hydrogen conservation equation w.r.t. the pressure in the gas phase. Only used when a segregated solver is considered.
| cs_real_t 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.
| cs_gwf_tpf_solver_type_t solver_type |
Type of solver considered to solve the system of equations (choice of main unknowns and strategy of resolution (coupled/segregated))
| cs_real_t* srct_h_array |
Values of the source terms for the hydrogen conservation equation. Only used if a segregated solver is considered. Size = n_cells or c2v->idx[n_cells] if the definition relies on a submesh
| cs_real_t* srct_w_array |
Values of the source terms for the water conservation equation. Only used if a segregated solver is considered. Size = n_cells or c2v->idx[n_cells] if the definition relies on a submesh
| cs_equation_system_t* system |
System of equations (w_eq, h_eq and the cross-terms defined in the related cs_equation_param_t structures) used for the coupled approach
| cs_gwf_darcy_flux_t* t_darcy |
Pointer to a cs_gwf_darcy_flux_t structure. Darcy advective flux for the total flux (linear combination of the liquid/gas Darcy flux)
| cs_property_t* time_hc_pty |
Property related to the unsteady term of the hydrogen conservation equation w.r.t. the capillarity pressure
| cs_property_t* time_hg_pty |
Property related to the unsteady term of the hydrogen conservation equation w.r.t. the pressure in the gas phase
| cs_property_t* time_hl_pty |
Property related to the unsteady term of the hydrogen conservation equation w.r.t. the pressure in the liquid phase.
| cs_property_t* time_wc_pty |
Property related to the unsteady term of the water conservation equation w.r.t. the capillarity pressure
| double upwind_weight |
weight associated to the upwind value w.r.t. to the centered value There is no effect when CS_GWF_TPF_APPROX_VERTEX_SUBCELL is chosen to approximate coefficients. If the value is < 0 or > 1, then the default settings is kept.
| bool 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.
| bool use_diffusion_view_for_darcy |
Use a diffusion term for the discretization of the Darcy terms in the conservation equation for the mass of hydrogen. The default option is to consuder an advection term since it should be more robust as upwinding technique can be used.
| bool 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)
| cs_equation_t* w_eq |
Equation of mass conservation for water. Only the liquid phase is considered. One assumes no water vapour in the gaseous phase. This corresponds to the M_00 and M_01 blocks in the system of equations and to the b_w right-hand side.