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

double & | drho ()
| Constructor.
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, . These elements are assumed to be strictly equal to zero. In other words, the relative permeability of phase is assumed to depend only on the saturation of phase . This convention allows storing only the two diagonals of the mobility Jacobian per grid cell.

The static gravity term is the scalar value

in which `i` is the half face index corresponding to the cell-face pair `(f,c)` and is the absolute (bacground) two-point transmissibility of face `f`.

The fluid transport problem is formulated in terms of saturation changes, , 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 (e.g., ).

## 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] | i | Half 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] | i | Half 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] | c | Cell.

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] | c | Cell.

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] | c | Cell

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] | c | Cell

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

Constructor.

Parameters

  [in] | nc | Total number of grid cells.
  [in] | totconn | Total number of connections, accumulated per cell (``half faces''). */ ModelParameterStorage(int nc, int totconn) : drho_(0.0), mob_(0), dmob_(0), porevol_(0), dg_(0), ds_(0), pc_(0), dpc_(0), trans_(0), data_() { std::size_t alloc_sz;

alloc_sz = 2 * nc; // mob_ alloc_sz += 2 * nc; // dmob_ alloc_sz += 1 * nc; // porevol_ alloc_sz += 1 * totconn; // dg_ alloc_sz += 1 * nc; // ds_ alloc_sz += 1 * nc; // pc_ alloc_sz += 1 * nc; // dpc_ alloc_sz += 1 * totconn; // dtrans data_.resize(alloc_sz);

mob_ = &data_[0]; dmob_ = mob_ + (2 * nc ); porevol_ = dmob_ + (2 * nc ); dg_ = porevol_ + (1 * nc ); ds_ = dg_ + (1 * totconn); pc_ = ds_ + (1 * nc ); dpc_ = pc_ + (1 * nc ); trans_ = dpc_ + (1 * nc ); }

/** 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] | c | Cell.

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] | c | Cell.

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] | c | Cell.

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] | c | Cell

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] | c | Cell.

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] | f | Face

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] | f | Face

Returns
  Read-only reference to bacground face transmissibility of face `f`.

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

- opm/core/transport/implicit/SinglePointUpwindTwoPhase.hpp