My Project
Loading...
Searching...
No Matches
Opm::spu_2p::ModelParameterStorage Class Reference

Internal class to manage the direct and derived quantities needed to formulate the fluid transport system. More...

#include <SinglePointUpwindTwoPhase.hpp>

Public Member Functions

 ModelParameterStorage (int nc, int totconn)
 Constructor.
 
double & drho ()
 Modifiable density difference.
 
double drho () const
 Read-only density difference.
 
double * mob (int c)
 Phase mobility in cell.
 
const double * mob (int c) const
 Phase mobility in cell.
 
double * dmob (int c)
 Diagonal elements of phase mobility derivative (Jacobian).
 
const double * dmob (int c) const
 Diagonal elements of phase mobility derivative (Jacobian).
 
double * porevol ()
 Retrieve pore volumes for all cells.
 
double porevol (int c) const
 Pore volume of single cell.
 
double & dg (int i)
 Static gravity term associated to single half face.
 
double dg (int i) const
 Static gravity term associated to single half face.
 
double & ds (int c)
 Saturation change in particular cell.
 
double ds (int c) const
 Saturation change in particular cell.
 
double & pc (int c)
 Capillary pressure in particular cell.
 
double pc (int c) const
 Capillary pressure in particular cell.
 
double & dpc (int c)
 Derivative of capillary pressure with respect to saturation.
 
double dpc (int c) const
 Derivative of capillary pressure with respect to saturation.
 
double & trans (int f)
 Background (absolute) face transmissibility of particular face.
 
double trans (int f) const
 Background (absolute) face transmissibility of particular face.
 

Detailed Description

Internal class to manage the direct and derived quantities needed to formulate the fluid transport system.

Note: This class elides off-diagonal elements of the phase mobility Jacobian, $(\partial_{s_\beta} \lambda_\alpha)_{\alpha\beta}$. These elements are assumed to be strictly equal to zero. In other words, the relative permeability of phase $\alpha$ is assumed to depend only on the saturation of phase $\alpha$. This convention allows storing only the two diagonals of the mobility Jacobian per grid cell.

The static gravity term is the scalar value

\[
\Delta G_i = \mathsf{T}_f\, \vec{g}\cdot(\Bar{x}_f - \Bar{x}_c)
\]

in which i is the half face index corresponding to the cell-face pair (f,c) and $\mathsf{T}_f$ is the absolute (bacground) two-point transmissibility of face f.

The fluid transport problem is formulated in terms of saturation changes, $\Delta s$, per cell. These changes are the primary degrees of freedom in this model.

Capillary pressures are defined by the fluid model, but usually correspond to $p_w - p_n$ (e.g., $p_\mathit{oil} -
p_\mathit{water}$).

Constructor & Destructor Documentation

◆ ModelParameterStorage()

Opm::spu_2p::ModelParameterStorage::ModelParameterStorage ( int  nc,
int  totconn 
)
inline

Constructor.

Parameters
[in]ncTotal number of grid cells.
[in]totconnTotal number of connections, accumulated per cell (`‘half faces’').

Member Function Documentation

◆ dg() [1/2]

double & Opm::spu_2p::ModelParameterStorage::dg ( int  i)
inline

Static gravity term associated to single half face.

Parameters
[in]iHalf face index corresponding to particular cell-face pair.
Returns
Read-write reference to static gravity term of single half face.

◆ dg() [2/2]

double Opm::spu_2p::ModelParameterStorage::dg ( int  i) const
inline

Static gravity term associated to single half face.

Parameters
[in]iHalf face index corresponding to particular cell-face pair.
Returns
Read-only reference to static gravity term of single half face.

◆ dmob() [1/2]

double * Opm::spu_2p::ModelParameterStorage::dmob ( int  c)
inline

Diagonal elements of phase mobility derivative (Jacobian).

Parameters
[in]cCell.
Returns
Read-write reference to diagonal elements of phase mobility Jacobian in cell c.

◆ dmob() [2/2]

const double * Opm::spu_2p::ModelParameterStorage::dmob ( int  c) const
inline

Diagonal elements of phase mobility derivative (Jacobian).

Parameters
[in]cCell.
Returns
Read-only reference to two consecutive diagonal elements of phase mobility Jacobian in cell c.

◆ dpc() [1/2]

double & Opm::spu_2p::ModelParameterStorage::dpc ( int  c)
inline

Derivative of capillary pressure with respect to saturation.

Parameters
[in]cCell
Returns
Read-write reference to capillary pressure derivative with respect to primary saturation in cell c.

◆ dpc() [2/2]

double Opm::spu_2p::ModelParameterStorage::dpc ( int  c) const
inline

Derivative of capillary pressure with respect to saturation.

Parameters
[in]cCell
Returns
Read-only reference to capillary pressure derivative with respect to primary saturation in cell c.

◆ drho() [1/2]

double & Opm::spu_2p::ModelParameterStorage::drho ( )
inline

Modifiable density difference.

Returns
Reference to modifiable internal representation of fluid phase density difference.

◆ drho() [2/2]

double Opm::spu_2p::ModelParameterStorage::drho ( ) const
inline

Read-only density difference.

Returns
Read-only value of current fluid phase difference value.

◆ ds() [1/2]

double & Opm::spu_2p::ModelParameterStorage::ds ( int  c)
inline

Saturation change in particular cell.

Parameters
[in]c
Returns
Read-write reference to saturation change (scalar) in cell c.

◆ ds() [2/2]

double Opm::spu_2p::ModelParameterStorage::ds ( int  c) const
inline

Saturation change in particular cell.

Parameters
[in]c
Returns
Read-only reference to saturation change (scalar) in cell c.

◆ mob() [1/2]

double * Opm::spu_2p::ModelParameterStorage::mob ( int  c)
inline

Phase mobility in cell.

Parameters
[in]cCell.
Returns
Read-write reference to two consecutive phase mobilities in cell c.

◆ mob() [2/2]

const double * Opm::spu_2p::ModelParameterStorage::mob ( int  c) const
inline

Phase mobility in cell.

Parameters
[in]cCell.
Returns
Read-only reference to two consecutive phase mobilities in cell c.

◆ pc() [1/2]

double & Opm::spu_2p::ModelParameterStorage::pc ( int  c)
inline

Capillary pressure in particular cell.

Parameters
[in]cCell.
Returns
Read-write reference to capillary pressure in cell c.

◆ pc() [2/2]

double Opm::spu_2p::ModelParameterStorage::pc ( int  c) const
inline

Capillary pressure in particular cell.

Parameters
[in]cCell
Returns
Read-only reference to capillary pressure in cell c.

◆ porevol() [1/2]

double * Opm::spu_2p::ModelParameterStorage::porevol ( )
inline

Retrieve pore volumes for all cells.

Returns
Modifiable vector of pore volumes for all cells.

◆ porevol() [2/2]

double Opm::spu_2p::ModelParameterStorage::porevol ( int  c) const
inline

Pore volume of single cell.

Parameters
[in]cCell.
Returns
Pore volume of cell c.

◆ trans() [1/2]

double & Opm::spu_2p::ModelParameterStorage::trans ( int  f)
inline

Background (absolute) face transmissibility of particular face.

Parameters
[in]fFace
Returns
Read-write reference to background face transmissibility of face f.

◆ trans() [2/2]

double Opm::spu_2p::ModelParameterStorage::trans ( int  f) const
inline

Background (absolute) face transmissibility of particular face.

Parameters
[in]fFace
Returns
Read-only reference to bacground face transmissibility of face f.

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