Opm::BlackOilDiffusionModule< TypeTag, true > Class Template Reference

Provides the auxiliary methods required for consideration of the diffusion equation. More...

#include <blackoildiffusionmodule.hh>

Public Types

using ExtensiveQuantities = BlackOilDiffusionExtensiveQuantities< TypeTag, true >
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters for the diffusion module. More...
 
template<class Context >
static void addDiffusiveFlux (RateVector &flux, const Context &context, unsigned spaceIdx, unsigned timeIdx)
 Adds the mass flux due to molecular diffusion to the flux vector over the integration point. Following the notation in blackoilmodel.hh, the diffusive flux for component $\kappa$ in phase $\alpha$ is given by: $-\phi b_\alpha S_\alpha D \mathbf{grad}X_\alpha^\kappa$, where $b_\alpha$ is the shrinkage/expansion factor [-], $S_\alpha$ is the saturation [-] D is the diffusion coefficient [L/T^2] and $X_\alpha^\kappa$ the component mass fraction [-] or molar fraction [-],
depending on the input use_mole_fraction_ (default true) Each component mass/molar fraction can be computed using $R_s,\;R_v,\;R_{sw},\;R_{vw}$. For example the mass fraction are given by, $X_w^G=\frac{R_{sw}}{R_{sw}+\rho_w/\rho_g}$, where $\rho_w$ and $\rho_g$ are the reference densities. Considering the water phase and gas component as an example, for cells i and j, the discrete version of the diffusive flux at the face's integration point is given by $-b_{w,ij}S_{w,ij}D_{w,ij}(\frac{1}{R_{sw,ij}+\rho_w/\rho_g})DT_{ij}(R_{sw,i}-R_{sw,j})$ where $b_{w,ij}$, $S_{w,ij}$, $D_{w,ij}$, and $R_{sw,ij}$ are computed using the arithmetic mean, and the ratio $\frac{1}{R_{sw,ij}+\rho_w/\rho_g}$ is denoted as conversion factor. The diffusivity $DT_{ij}$ is computed in ecltransmissibility_impl.hh, using the cells porosity, face area and distance between cell center and the integration point. For mol fraction the convertion factor is given by $\frac{1}{R_{sw,ij}+(Mm_g\rho_w)/(Mm_w\rho_g)}$. More...
 
template<class FluidState , class EvaluationArray >
static void addDiffusiveFlux (RateVector &flux, const FluidState &fluidStateI, const FluidState &fluidStateJ, const Evaluation &diffusivity, const EvaluationArray &effectiveDiffusionCoefficient)
 

Detailed Description

template<class TypeTag>
class Opm::BlackOilDiffusionModule< TypeTag, true >

Provides the auxiliary methods required for consideration of the diffusion equation.

Member Typedef Documentation

◆ ExtensiveQuantities

template<class TypeTag >
using Opm::BlackOilDiffusionModule< TypeTag, true >::ExtensiveQuantities = BlackOilDiffusionExtensiveQuantities<TypeTag,true>

Member Function Documentation

◆ addDiffusiveFlux() [1/2]

template<class TypeTag >
template<class Context >
static void Opm::BlackOilDiffusionModule< TypeTag, true >::addDiffusiveFlux ( RateVector &  flux,
const Context &  context,
unsigned  spaceIdx,
unsigned  timeIdx 
)
inlinestatic

Adds the mass flux due to molecular diffusion to the flux vector over the integration point. Following the notation in blackoilmodel.hh, the diffusive flux for component $\kappa$ in phase $\alpha$ is given by: $-\phi b_\alpha S_\alpha D \mathbf{grad}X_\alpha^\kappa$, where $b_\alpha$ is the shrinkage/expansion factor [-], $S_\alpha$ is the saturation [-] D is the diffusion coefficient [L/T^2] and $X_\alpha^\kappa$ the component mass fraction [-] or molar fraction [-],
depending on the input use_mole_fraction_ (default true) Each component mass/molar fraction can be computed using $R_s,\;R_v,\;R_{sw},\;R_{vw}$. For example the mass fraction are given by, $X_w^G=\frac{R_{sw}}{R_{sw}+\rho_w/\rho_g}$, where $\rho_w$ and $\rho_g$ are the reference densities. Considering the water phase and gas component as an example, for cells i and j, the discrete version of the diffusive flux at the face's integration point is given by $-b_{w,ij}S_{w,ij}D_{w,ij}(\frac{1}{R_{sw,ij}+\rho_w/\rho_g})DT_{ij}(R_{sw,i}-R_{sw,j})$ where $b_{w,ij}$, $S_{w,ij}$, $D_{w,ij}$, and $R_{sw,ij}$ are computed using the arithmetic mean, and the ratio $\frac{1}{R_{sw,ij}+\rho_w/\rho_g}$ is denoted as conversion factor. The diffusivity $DT_{ij}$ is computed in ecltransmissibility_impl.hh, using the cells porosity, face area and distance between cell center and the integration point. For mol fraction the convertion factor is given by $\frac{1}{R_{sw,ij}+(Mm_g\rho_w)/(Mm_w\rho_g)}$.

◆ addDiffusiveFlux() [2/2]

template<class TypeTag >
template<class FluidState , class EvaluationArray >
static void Opm::BlackOilDiffusionModule< TypeTag, true >::addDiffusiveFlux ( RateVector &  flux,
const FluidState &  fluidStateI,
const FluidState &  fluidStateJ,
const Evaluation &  diffusivity,
const EvaluationArray &  effectiveDiffusionCoefficient 
)
inlinestatic

◆ registerParameters()

template<class TypeTag >
static void Opm::BlackOilDiffusionModule< TypeTag, true >::registerParameters ( )
inlinestatic

Register all run-time parameters for the diffusion module.


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