Loading...
Searching...
No Matches
Opm::PAvgCalculator< Scalar > Class Template Reference

Facility for deriving well-level pressure values from selected block-averaging procedures. More...

`#include <PAvgCalculator.hpp>`

## Classes

class | Accumulator
| Accumulate weighted running averages of cell contributions to WBP. More...
class | Result
| Result of block-averaging well pressure procedure. More...
class | Sources
| References to source contributions owned by other party. More...

## Public Member Functions

| PAvgCalculator (const GridDims &cellIndexMap, const WellConnections &connections)
| Constructor.
virtual | ~PAvgCalculator ()
| Destructor.
void | pruneInactiveWBPCells (const std::vector< bool > &isActive)
| Finish construction by pruning inactive cells.
void | inferBlockAveragePressures (const Sources &sources, const PAvg &controls, const Scalar gravity, const Scalar refDepth)
| Compute block-average well-level pressure values from collection of source contributions and user-defined averaging procedure controls.
const std::vector< std::size_t > & | allWBPCells () const
| List of all cells, global indices in natural ordering, that contribute to the block-average pressures in this well.
std::vector< std::size_t > | allWellConnections () const
| List all reservoir connections that potentially contribute to this block-averaging pressure calculation.
const Result & | averagePressures () const
| Block-average pressure derived from selection of source cells.

## Protected Attributes

Accumulator | accumCTF_ {}
| Average pressures weighted by connection transmissibility factor.
Accumulator | accumPV_ {}
| Average pressures weighted by pore-volume.

## Detailed Description

template<class Scalar>
class Opm::PAvgCalculator< Scalar >

Facility for deriving well-level pressure values from selected block-averaging procedures.

Applicable to stopped wells which don't have a flowing bottom-hole pressure. Mainly useful for reporting.

## Constructor & Destructor Documentation

## PAvgCalculator()

template<class Scalar >

Opm::PAvgCalculator< Scalar >::PAvgCalculator | ( | const GridDims & | cellIndexMap,
|  | const WellConnections & | connections
| ) |  |

Constructor.

Parameters

  [in] | cellIndexMap | Cell index triple map ((I,J,K) <-> global).
  [in] | connections | List of reservoir connections for single well.

## Member Function Documentation

## allWellConnections()

template<class Scalar >

std::vector< std::size_t > Opm::PAvgCalculator< Scalar >::allWellConnections | ( |  | ) | const

List all reservoir connections that potentially contribute to this block-averaging pressure calculation.

Convenience method only. Mainly intended to aid in constructing PAvgDynamicSourceData objects for the current well's reservoir connections.

Returns
  Vector of the numbers 0 .. n-1 in increasing order with n being the number of connections in the input set provided to the object constructor.

## averagePressures()

template<class Scalar >

const Result & Opm::PAvgCalculator< Scalar >::averagePressures | ( |  | ) | const

inline

Block-average pressure derived from selection of source cells.

Parameters

  [in] | mode | Source cell selection.

Returns
  Block-average pressure

## inferBlockAveragePressures()

template<class Scalar >

void Opm::PAvgCalculator< Scalar >::inferBlockAveragePressures | ( | const Sources & | sources,
|  | const PAvg & | controls,
|  | const Scalar | gravity,
|  | const Scalar | refDepth
| ) |  |

Compute block-average well-level pressure values from collection of source contributions and user-defined averaging procedure controls.

Parameters

  [in] | sources | Connection and cell-level raw data.
  [in] | controls | Averaging procedure controls.
  [in] | gravity | Strength of gravity in SI units [m/s^2].
  [in] | refDepth | Well's reference depth for block-average pressure calculation. Often, but not always, equal to the well's bottom-hole pressure reference depth.

## pruneInactiveWBPCells()

template<class Scalar >

void Opm::PAvgCalculator< Scalar >::pruneInactiveWBPCells | ( | const std::vector< bool > & | isActive | ) |

Finish construction by pruning inactive cells.

Parameters

  [in] | isActive | Linearised predicate for whether or not given cell amongst allWBPCells() Opm::PAvgCalculator::allWBPCells const std::vector< std::size_t > & allWBPCells() const List of all cells, global indices in natural ordering, that contribute to the block-average pressures... Definition PAvgCalculator.hpp:233 is actually active in the model.

Assumed to have the same size–number of elements–as the return value from member function

allWBPCells()

, and organise its elements such that

isActive[i]

holds the active status of

allWBPCells()[i]

.

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

- opm/input/eclipse/Schedule/Well/PAvgCalculator.hpp
- opm/input/eclipse/Schedule/Well/PAvgCalculator.cpp