8.2
general documentation
Loading...
Searching...
No Matches
cs_gwf_tpf_t Struct Reference

Structure to handle the modelling of miscible or immiscible two-phase flows in a porous media. More...

#include <cs_gwf_hydraulic_model.h>

Collaboration diagram for cs_gwf_tpf_t:

Data Fields

Equations and system of equations
cs_equation_tw_eq
cs_equation_th_eq
cs_equation_param_tb01_w_eqp
cs_equation_param_tb10_h_eqp
cs_equation_system_tsystem
Darcy (advection) fields
cs_gwf_darcy_flux_tl_darcy
cs_gwf_darcy_flux_tg_darcy
cs_gwf_darcy_flux_tt_darcy
Properties related to the model
cs_property_tkrl_pty
cs_property_tkrg_pty
cs_property_tlsat_pty
cs_property_tlcap_pty
cs_property_ttime_wc_pty
cs_property_tdiff_wl_pty
cs_property_tdiff_wc_pty
cs_property_tdiff_wg_pty
cs_property_ttime_hc_pty
cs_property_tdiff_hc_pty
cs_property_ttime_hg_pty
cs_property_tdiff_hg_pty
cs_property_ttime_hl_pty
cs_property_tdiff_hl_pty
cs_property_treac_h_pty
cs_property_tdiff_g_pty
cs_property_tdiff_w_pty
Additional fields
cs_field_tc_pressure
cs_field_tl_pressure
cs_field_tg_pressure
cs_field_tl_saturation
Additional arrays
cs_real_tsrct_w_array
cs_real_tsrct_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_tnl_algo

Detailed Description

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:

  • No water in the gaseous phase
  • Incompressibility of the liquid phase
  • Hydrogen pressure is given by the "perfect gas" law in the gas phase and the Henry's law in the liquid phase (when a miscible model is used) The two primitive variables are the capillarity and liquid pressures with a specific treatment in the saturated case (cf. the cited article or Angelini's PhD thesis)

Notations are the following :

  • Two phases: Liquid phase denoted by "l" and gaseous phase denoted by "g"
  • indice "c" refers to the capillarity pressure
  • Two components: water denoted by "w" and a gaseous component (let's say hydrogen) denoted by "h". The gaseous component is present in the two phases whereas water is only considered in the liquid phase.

Field Documentation

◆ anderson_param

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).

◆ approx_type

type of approximation used for the computation of diffusion, unsteady coefficients

◆ b01_w_eqp

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.

◆ b10_h_eqp

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.

◆ c_pressure

cs_field_t* c_pressure

Pointer to a cs_field_t structure named "capillarity_pressure". Capillarity pressure $ P_c = P_g - P_l $

◆ cell_weight

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.

◆ diff_g_pty

cs_property_t* diff_g_pty

Property used in the definition of the Darcy flux in the gas phase

◆ diff_hc_pty

cs_property_t* diff_hc_pty

Property related to the diffusion term of the hydrogen conservation equation w.r.t. the capillarity pressure

◆ diff_hg_pty

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

◆ diff_hl_pty

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

◆ diff_w_pty

cs_property_t* diff_w_pty

Property related to the relative permeability in the liquid phase

◆ diff_wc_pty

cs_property_t* diff_wc_pty

Property related to the diffusion term of the water conservation equation w.r.t. the capillarity

◆ diff_wg_pty

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

◆ diff_wl_pty

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

◆ g_darcy

Pointer to a cs_gwf_darcy_flux_t structure. Darcy advective flux in the gas phase

◆ g_pressure

cs_field_t* g_pressure

Pointer to a cs_field_t structure named "gas_pressure". Pressure in the gas phase is denoted by $ P_g $.

◆ g_viscosity

cs_real_t g_viscosity

Viscosity in the gas phase (assumed to be constant) in Pa.s

◆ 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

◆ h_molar_mass

cs_real_t h_molar_mass

Molar mass of the main component in the gas phase (e.g. hydrogen) in kg.mol^-1

◆ henry_constant

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.

◆ is_miscible

bool is_miscible

true or false. Some simplifications can be done if immiscible.

◆ krg_pty

cs_property_t* krg_pty

Property related to the relative permeability in the gas phase

◆ krl_pty

cs_property_t* krl_pty

Property related to the relative permeability in the liquid phase

◆ l_darcy

Pointer to a cs_gwf_darcy_flux_t structure. Darcy advective flux in the liquid phase

◆ l_diffusivity_h

cs_real_t l_diffusivity_h

Molecular diffusivity of the hydrogen in the liquid phase in m^2.s^-1

◆ l_mass_density

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

◆ l_pressure

cs_field_t* l_pressure

Pointer to a cs_field_t structure named "liquid_pressure". Pressure in the liquid phase is denoted by $ P_l $.

◆ l_saturation

cs_field_t* l_saturation

Pointer to a cs_field_t structure. Liquid saturation at cells. This quantity is denoted by $ S_l $ and is defined by the soil model

◆ l_viscosity

cs_real_t l_viscosity

Viscosity in the liquid phase (assumed to be constant) in Pa.s

◆ lcap_pty

cs_property_t* lcap_pty

Property related to the liquid capacity (derivative of the liquid saturation w.r.t. the capillarity pressure)

◆ lsat_pty

cs_property_t* lsat_pty

Property related to the liquid saturation

◆ nl_algo

cs_iter_algo_t* nl_algo

Structure used to manage the non-linearities

◆ nl_algo_type

cs_param_nl_algo_t nl_algo_type

Type of algorithm to solve the non-linearities

◆ nl_algo_verbosity

int nl_algo_verbosity

Level of verbosity for the algorithm solving the non-linearities

◆ nl_cvg_param

cs_param_convergence_t nl_cvg_param

Set of parameters to drive the convergence of the non-linear solver

◆ nl_relax_factor

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

◆ reac_h_pty

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.

◆ ref_temperature

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.

◆ solver_type

Type of solver considered to solve the system of equations (choice of main unknowns and strategy of resolution (coupled/segregated))

◆ srct_h_array

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

◆ srct_w_array

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

◆ 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

◆ 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)

◆ time_hc_pty

cs_property_t* time_hc_pty

Property related to the unsteady term of the hydrogen conservation equation w.r.t. the capillarity pressure

◆ time_hg_pty

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

◆ time_hl_pty

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.

◆ time_wc_pty

cs_property_t* time_wc_pty

Property related to the unsteady term of the water conservation equation w.r.t. the capillarity pressure

◆ upwind_weight

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.

◆ use_coupled_solver

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.

◆ use_diffusion_view_for_darcy

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.

◆ use_incremental_solver

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)

◆ 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.


The documentation for this struct was generated from the following file: