Template Class wellBase

Inheritance Relationships

Base Type

  • public regIOobject

Derived Type

Class Documentation

template<class KType, int nPhases>
class wellBase : public regIOobject

An abstract class template for well objects.

Subclassed by verticalIsoWell

Public Types

enum operationHandling

Enumeration for handling operation modes.

Values:

PROD

Production well

INJE

Injection well

Public Functions

TypeName("wellBase")
declareRunTimeSelectionTable(autoPtr, wellBase, dictionary, (const word & name , const dictionary &wellDict, const fvMesh &mesh, const wellModelBase < KType, nPhases > &corrector), ( name , wellDict, mesh, corrector))
wellBase(const word &name, const dictionary &wellDict, const fvMesh &mesh, const wellModelBase<KType, nPhases> &corrector)

Construct from components.

virtual ~wellBase()

Destructor.

word operationHandlingToWord(const operationHandling &op) const

Return operationHandling as word.

wellBase<KType, nPhases>::operationHandling wordToOperationHandling(const word &op) const

Return operationHandling as enumeration.

const word &name() const

Handle operation mode from enum, return previous.

for easy operation mode switching operationHandling handleOperationMode(const operationHandling newOp);Return Well name

const dictionary &dict() const

Return model hosting dictionary.

const word &iPhase() const

Return injection phase name.

const operationHandling &operation() const

Return well operation mode as enum.

scalar operationSign() const

Return operation sign to use in source equations.

const scalar &totalVolume() const

Return Well total volume.

cellSet &wellSet()

Return cells set.

const labelList cellIDs() const

Const access to cells IDs.

const dimensionedScalar &targetRate() const

Return target flowRate.

const scalar &skin() const

Return skin value.

scalar radius() const

Return well radius.

void setSource(List<VectorN<scalar, 4>> &src)

Set well source coeffs.

const List<VectorN<scalar, 2 * nPhases>> &source() const

Return Const-Ref to well Source Matrix.

bool isActiveDrive(const word &drive) const

Check if a drive is active.

scalar driveAtTime(const word &activeDrive, scalar index) const

Retrieve imposed drive value from series.

void readPerforations()

Read perforations.

void readImposedDrives()

Read imposed well rate/BHP.

const scalar &nextTimeStep() const

Const access to next timeStep to catch rate changes.

label lowerCell() const

Figure out lower cell index.

label upperCell() const

Figure out upper cell index.

void correct()

Correct well coeffs.

virtual void preCorrect() = 0

Pre-Setup for well correction.

virtual void postCorrect() = 0

Post-Cleanup for well correction.

Public Members

HashTable<int> driveHandling

A Hash table for handling imposed drives.

Currently reservers room to phase rates and BHP Todo: add room for phaseDissolvedInPhaseRatio

Public Static Functions

autoPtr<wellBase<KType, nPhases>> New(const word &name, const dictionary &wellDict, const fvMesh &mesh, const wellModelBase<KType, nPhases> &corrector)

Return a reference to the selected Kr model.

Protected Functions

wellBase(const wellBase&)

Disallow copy construct.

void operator=(const wellBase&)

Disallow default bitwise assignment.

void cellsVolume()

Calculate total cell volume.

Protected Attributes

word name_

Well Name.

dictionary wellDict_

Well configs dict.

const fvMesh &mesh_

Const-ref to mesh.

const wellModelBase<KType, nPhases> &corrector_

Const-ref to the model driving this well.

operationHandling operation_

Well operation mode: injection - production.

word orientation_

Well Orientation.

word iPhase_

Injection phase name.

dimensionedScalar radius_

Well radius.

scalar skin_

Well skin.

PtrList<topoSetSource> perfos_

Well Perforations.

cellSet wellSet_

Well topo set.

wordList phases_

Phase names list.

List<VectorN<scalar, 2 * nPhases>> source_

Well source coeffs as a function of pressure.

(Explicit and implicit parts)

scalar tV_

Well total volume.

dimensionedScalar bhp_

Well BHP.

dimensionedScalar tRate_

Target well rate.

List<interpolationTable<scalar>> driveSeries_

Imposed Drive series.

scalar timeForDt_

TimeStep to catch imposed wellRate/BHP changes.