version 3.9-dev
porousmediumflow/2pnc/model.hh File Reference

Adaption of the fully implicit scheme to the two-phase n-component fully implicit model. More...

Go to the source code of this file.

Description

This model implements two-phase n-component flow of two compressible and partially miscible fluids \(\alpha \in \{ w, n \}\) composed of the n components \(\kappa \in \{ w, n,\cdots \}\) in combination with mineral precipitation and dissolution. The solid phases. The standard multiphase Darcy approach is used as the equation for the conservation of momentum. For details on Darcy's law see dumux/flux/darcyslaw.hh.

By inserting Darcy's law into the equations for the conservation of the components, one gets one transport equation for each component,

\begin{eqnarray*} && \frac{\partial (\sum_\alpha \phi \varrho_\alpha X_\alpha^\kappa S_\alpha )} {\partial t} - \sum_\alpha \nabla \cdot \left\{ \varrho_\alpha X_\alpha^\kappa \frac{k_{r\alpha}}{\mu_\alpha} \mathbf{K} (\nabla p_\alpha - \varrho_{\alpha} \mathbf{g}) \right\} \nonumber \\ \nonumber \\ &-& \sum_\alpha \nabla \cdot \left\{{\bf D_{\alpha, pm}^\kappa} \varrho_{\alpha} \nabla X^\kappa_{\alpha} \right\} - \sum_\alpha q_\alpha^\kappa = 0 \qquad \kappa \in \{w, a,\cdots \} \, , \alpha \in \{w, g\}, \end{eqnarray*}

where:

  • \( \phi \) is the porosity of the porous medium,
  • \( S_\alpha \) represents the saturation of phase \( \alpha \),
  • \( \rho_\alpha \) is the mass density of phase \( \alpha \),
  • \( X_\alpha^\kappa \) is the mass fraction of component \( \kappa \) in phase \( \alpha \),
  • \( x_\alpha^\kappa \) is the mole fraction of component \( \kappa \) in phase \( \alpha \),
  • \( v_\alpha \) is the velocity of phase \( \alpha \),
  • \( {\bf D_{\alpha, pm}^\kappa} \) is the effective diffusivity of component \( \kappa \) in phase \( \alpha \),
  • \( q_\alpha^\kappa \) is a source or sink term.

The solid or mineral phases are assumed to consist of a single component. Their mass balance consists of only a storage and a source term, \(\frac{\partial \varrho_\lambda \phi_\lambda )} {\partial t} = q_\lambda,\)

where:

  • \( \varrho_\lambda \) is the mass density of the solid phase \( \lambda \),
  • \( \phi_\lambda \) is the porosity of the solid,
  • \( q_\lambda \) is a source or sink term.

By using constitutive relations for the capillary pressure \(p_c = p_n - p_w\) and relative permeability \(k_{r\alpha}\) and taking advantage of the fact that \(S_w + S_n = 1\) and \(X^\kappa_w + X^\kappa_n = 1\), the number of unknowns can be reduced to number of components.

The used primary variables are, like in the two-phase model, either \(p_w\) and \(S_n\) or \(p_n\) and \(S_w\). The formulation which ought to be used can be specified by setting the Formulation property to either TwoPTwoCIndices::pwsn or TwoPTwoCIndices::pnsw. By default, the model uses \(p_w\) and \(S_n\).

Moreover, the second primary variable depends on the phase state, since a primary variable switch is included. The phase state is stored for all nodes of the system. The model is uses mole fractions. Following cases can be distinguished:

  • Both phases are present: The saturation is used (either \(S_n\) or \(S_w\), dependent on the chosen Formulation), as long as \( 0 < S_\alpha < 1\).
  • Only wetting phase is present: The mole fraction of, e.g., air in the wetting phase \(x^a_w\) is used, as long as the maximum mole fraction is not exceeded ( \(x^a_w<x^a_{w,max}\))
  • Only nonwetting phase is present: The mole fraction of, e.g., water in the nonwetting phase, \(x^w_n\), is used, as long as the maximum mole fraction is not exceeded ( \(x^w_n<x^w_{n,max}\))

For the other components, the mole fraction \(x^\kappa_w\) is the primary variable.

Classes

struct  Dumux::TwoPNCModelTraits< nComp, useMol, setMoleFractionForFP, formulation, repCompEqIdx >
 Specifies a number properties of two-phase n-component models. More...
 
struct  Dumux::Properties::TTag::TwoPNC
 
struct  Dumux::Properties::TTag::TwoPNCNI
 
struct  Dumux::Properties::PrimaryVariables< TypeTag, TTag::TwoPNC >
 The primary variables vector for the 2pnc model. More...
 
struct  Dumux::Properties::VolumeVariables< TypeTag, TTag::TwoPNC >
 Set the volume variables property. More...
 
struct  Dumux::Properties::BaseModelTraits< TypeTag, TTag::TwoPNC >
 Set the base model traits. More...
 
struct  Dumux::Properties::ModelTraits< TypeTag, TTag::TwoPNC >
 default the actually used traits to the base traits More...
 
struct  Dumux::Properties::IOFields< TypeTag, TTag::TwoPNC >
 Set the vtk output fields specific to this model. More...
 
struct  Dumux::Properties::LocalResidual< TypeTag, TTag::TwoPNC >
 Use the compositional local residual. More...
 
struct  Dumux::Properties::ReplaceCompEqIdx< TypeTag, TTag::TwoPNC >
 Per default, no component mass balance is replaced. More...
 
struct  Dumux::Properties::Formulation< TypeTag, TTag::TwoPNC >
 Default formulation is pw-Sn, overwrite if necessary. More...
 
struct  Dumux::Properties::SetMoleFractionsForFirstPhase< TypeTag, TTag::TwoPNC >
 Set the primary variables mole fractions for the wetting or nonwetting phase. More...
 
struct  Dumux::Properties::UseMoles< TypeTag, TTag::TwoPNC >
 Use mole fractions in the balance equations by default. More...
 
struct  Dumux::Properties::EffectiveDiffusivityModel< TypeTag, TTag::TwoPNC >
 Use the model after Millington (1961) for the effective diffusivity. More...
 
struct  Dumux::Properties::FluidState< TypeTag, TTag::TwoPNC >
 This model uses the compositional fluid state. More...
 
struct  Dumux::Properties::ModelTraits< TypeTag, TTag::TwoPNCNI >
 Set the non-isothermal model traits. More...
 
struct  Dumux::Properties::VolumeVariables< TypeTag, TTag::TwoPNCNI >
 Set the volume variables property. More...
 
struct  Dumux::Properties::IOFields< TypeTag, TTag::TwoPNCNI >
 Set non-isothermal output fields. More...
 
struct  Dumux::Properties::ThermalConductivityModel< TypeTag, TTag::TwoPNCNI >
 Somerton is used as default model to compute the effective thermal heat conductivity. More...
 

Namespaces

namespace  Dumux
 
namespace  Dumux::Properties
 The energy balance equation for a porous solid.
 
namespace  Dumux::Properties::TTag
 Type tag for numeric models.
 
Include dependency graph for porousmediumflow/2pnc/model.hh: