My Project
Loading...
Searching...
No Matches
Opm::PAvgCalculator Class 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 double gravity, const double 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 ResultaveragePressures () 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

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()

Opm::PAvgCalculator::PAvgCalculator ( const GridDims cellIndexMap,
const WellConnections connections 
)

Constructor.

Parameters
[in]cellIndexMapCell index triple map ((I,J,K) <-> global).
[in]connectionsList of reservoir connections for single well.

Member Function Documentation

◆ allWellConnections()

std::vector< std::size_t > Opm::PAvgCalculator::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()

const Result & Opm::PAvgCalculator::averagePressures ( ) const
inline

Block-average pressure derived from selection of source cells.

Parameters
[in]modeSource cell selection.
Returns
Block-average pressure

◆ inferBlockAveragePressures()

void Opm::PAvgCalculator::inferBlockAveragePressures ( const Sources sources,
const PAvg controls,
const double  gravity,
const double  refDepth 
)

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

Parameters
[in]sourcesConnection and cell-level raw data.
[in]controlsAveraging procedure controls.
[in]gravityStrength of gravity in SI units [m/s^2].
[in]refDepthWell's reference depth for block-average pressure calculation. Often, but not always, equal to the well's bottom-hole pressure reference depth.

◆ pruneInactiveWBPCells()

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

Finish construction by pruning inactive cells.

Parameters
[in]isActiveLinearised predicate for whether or not given cell amongst
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:208
is actually active in the model.

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

, and organise its elements such that

isActive[i]

holds the active status of

.


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