#include <WellInterfaceGeneric.hpp>

Inheritance diagram for Opm::WellInterfaceGeneric:
Inheritance graph

Classes

struct  OperabilityStatus
 

Public Member Functions

 WellInterfaceGeneric (const Well &well, const ParallelWellInfo &parallel_well_info, const int time_step, const int pvtRegionIdx, const int num_components, const int num_phases, const int index_of_well, const std::vector< PerforationData > &perf_data)
 
const std::vector< PerforationData > & perforationData () const
 Get the perforations of the well. More...
 
const std::string & name () const
 Well name. More...
 
bool isInjector () const
 True if the well is an injector. More...
 
bool isProducer () const
 True if the well is a producer. More...
 
const std::vector< int > & cells () const
 Well cells. More...
 
int indexOfWell () const
 Index of well in the wells struct and wellState. More...
 
void adaptRatesForVFP (std::vector< double > &rates) const
 
const Well & wellEcl () const
 
Well & wellEcl ()
 
const PhaseUsagephaseUsage () const
 
bool underPredictionMode () const
 Returns true if the well is currently in prediction mode (i.e. not history mode). More...
 
bool isOperableAndSolvable () const
 
bool useVfpExplicit () const
 
bool thpLimitViolatedButNotSwitched () const
 
void initCompletions ()
 
void closeCompletions (const WellTestState &wellTestState)
 
void setVFPProperties (const VFPProperties *vfp_properties_arg)
 
void setPrevSurfaceRates (WellState< double > &well_state, const WellState< double > &prev_well_state) const
 
void setGuideRate (const GuideRate *guide_rate_arg)
 
void setWellEfficiencyFactor (const double efficiency_factor)
 
void setRepRadiusPerfLength ()
 
void setWsolvent (const double wsolvent)
 
void setDynamicThpLimit (const double thp_limit)
 
std::optional< double > getDynamicThpLimit () const
 
void updatePerforatedCell (std::vector< bool > &is_cell_perforated)
 
bool wellHasTHPConstraints (const SummaryState &summaryState) const
 Returns true if the well has one or more THP limits/constraints. More...
 
void stopWell ()
 
void openWell ()
 
bool wellIsStopped () const
 
int currentStep () const
 
int pvtRegionIdx () const
 
const GuideRate * guideRate () const
 
int numComponents () const
 
int numPhases () const
 
int numPerfs () const
 
double refDepth () const
 
double gravity () const
 
const VFPPropertiesvfpProperties () const
 
const ParallelWellInfoparallelWellInfo () const
 
const std::vector< double > & perfDepth () const
 
std::vector< double > & perfDepth ()
 
const std::vector< double > & wellIndex () const
 
const std::map< int, std::vector< int > > & getCompletions () const
 
double getTHPConstraint (const SummaryState &summaryState) const
 
double getALQ (const WellState< double > &well_state) const
 
double wsolvent () const
 
double rsRvInj () const
 
void initInjMult (const std::vector< double > &max_inj_mult)
 
void updateInjMult (std::vector< double > &inj_multipliers, DeferredLogger &deferred_logger) const
 
double getInjMult (const int perf, const double bhp, const double perf_pres) const
 
bool isVFPActive (DeferredLogger &deferred_logger) const
 
void reportWellSwitching (const SingleWellState< double > &ws, DeferredLogger &deferred_logger) const
 
bool changedToOpenThisStep () const
 
void updateWellTestState (const SingleWellState< double > &ws, const double &simulationTime, const bool &writeMessageToOPMLog, WellTestState &wellTestState, DeferredLogger &deferred_logger) const
 
bool isPressureControlled (const WellState< double > &well_state) const
 
bool stopppedOrZeroRateTarget (const SummaryState &summary_state, const WellState< double > &well_state) const
 
double wellEfficiencyFactor () const
 
void updateFilterCakeMultipliers (const std::vector< double > &inj_fc_multiplier)
 Update filter cake multipliers. More...
 
void resetWellOperability ()
 

Protected Member Functions

bool getAllowCrossFlow () const
 
double wmicrobes_ () const
 
double wfoam_ () const
 
double woxygen_ () const
 
double wpolymer_ () const
 
double wsalt_ () const
 
double wurea_ () const
 
int polymerTable_ () const
 
int polymerInjTable_ () const
 
int polymerWaterTable_ () const
 
bool wellUnderZeroRateTarget (const SummaryState &summary_state, const WellState< double > &well_state) const
 
std::pair< bool, bool > computeWellPotentials (std::vector< double > &well_potentials, const WellState< double > &well_state)
 
void checkNegativeWellPotentials (std::vector< double > &well_potentials, const bool checkOperability, DeferredLogger &deferred_logger)
 
void prepareForPotentialCalculations (const SummaryState &summary_state, WellState< double > &well_state, Well::InjectionControls &inj_controls, Well::ProductionControls &prod_controls) const
 

Protected Attributes

OperabilityStatus operability_status_
 
Well well_ecl_
 
const ParallelWellInfoparallel_well_info_
 
const int current_step_
 
const int pvtRegionIdx_
 
const int num_components_
 
int number_of_phases_
 
int index_of_well_
 
const std::vector< PerforationData > * perf_data_
 
std::vector< double > ipr_a_
 
std::vector< double > ipr_b_
 
std::vector< int > well_cells_
 
std::vector< double > well_index_
 
int number_of_perforations_
 
std::vector< double > perf_depth_
 
std::vector< double > perf_rep_radius_
 
std::vector< double > perf_length_
 
std::vector< double > bore_diameters_
 
std::map< int, std::vector< int > > completions_
 
double ref_depth_
 
std::vector< int > saturation_table_number_
 
Well::Status wellStatus_
 
const PhaseUsagephase_usage_
 
double gravity_
 
double wsolvent_
 
std::optional< double > dynamic_thp_limit_
 
std::vector< double > inj_multiplier_
 
std::vector< double > prev_inj_multiplier_
 
std::vector< double > inj_fc_multiplier_
 
double well_efficiency_factor_
 
const VFPPropertiesvfp_properties_
 
const GuideRate * guide_rate_
 
std::vector< std::string > well_control_log_
 
bool changed_to_open_this_step_ = true
 

Constructor & Destructor Documentation

◆ WellInterfaceGeneric()

Opm::WellInterfaceGeneric::WellInterfaceGeneric ( const Well &  well,
const ParallelWellInfo parallel_well_info,
const int  time_step,
const int  pvtRegionIdx,
const int  num_components,
const int  num_phases,
const int  index_of_well,
const std::vector< PerforationData > &  perf_data 
)

Member Function Documentation

◆ adaptRatesForVFP()

void Opm::WellInterfaceGeneric::adaptRatesForVFP ( std::vector< double > &  rates) const

◆ cells()

const std::vector< int > & Opm::WellInterfaceGeneric::cells ( ) const
inline

Well cells.

References well_cells_.

◆ changedToOpenThisStep()

bool Opm::WellInterfaceGeneric::changedToOpenThisStep ( ) const
inline

◆ checkNegativeWellPotentials()

void Opm::WellInterfaceGeneric::checkNegativeWellPotentials ( std::vector< double > &  well_potentials,
const bool  checkOperability,
DeferredLogger deferred_logger 
)
protected

◆ closeCompletions()

void Opm::WellInterfaceGeneric::closeCompletions ( const WellTestState &  wellTestState)

◆ computeWellPotentials()

std::pair< bool, bool > Opm::WellInterfaceGeneric::computeWellPotentials ( std::vector< double > &  well_potentials,
const WellState< double > &  well_state 
)
protected

◆ currentStep()

int Opm::WellInterfaceGeneric::currentStep ( ) const
inline

References current_step_.

◆ getAllowCrossFlow()

bool Opm::WellInterfaceGeneric::getAllowCrossFlow ( ) const
protected

◆ getALQ()

double Opm::WellInterfaceGeneric::getALQ ( const WellState< double > &  well_state) const

◆ getCompletions()

const std::map< int, std::vector< int > > & Opm::WellInterfaceGeneric::getCompletions ( ) const
inline

References completions_.

◆ getDynamicThpLimit()

std::optional< double > Opm::WellInterfaceGeneric::getDynamicThpLimit ( ) const

◆ getInjMult()

double Opm::WellInterfaceGeneric::getInjMult ( const int  perf,
const double  bhp,
const double  perf_pres 
) const

◆ getTHPConstraint()

double Opm::WellInterfaceGeneric::getTHPConstraint ( const SummaryState &  summaryState) const

◆ gravity()

double Opm::WellInterfaceGeneric::gravity ( ) const
inline

References gravity_.

◆ guideRate()

const GuideRate * Opm::WellInterfaceGeneric::guideRate ( ) const
inline

References guide_rate_.

◆ indexOfWell()

int Opm::WellInterfaceGeneric::indexOfWell ( ) const

Index of well in the wells struct and wellState.

Referenced by Opm::BlackoilWellModel< TypeTag >::calculateProductivityIndexValues().

◆ initCompletions()

void Opm::WellInterfaceGeneric::initCompletions ( )

◆ initInjMult()

void Opm::WellInterfaceGeneric::initInjMult ( const std::vector< double > &  max_inj_mult)

◆ isInjector()

bool Opm::WellInterfaceGeneric::isInjector ( ) const

True if the well is an injector.

◆ isOperableAndSolvable()

bool Opm::WellInterfaceGeneric::isOperableAndSolvable ( ) const

◆ isPressureControlled()

bool Opm::WellInterfaceGeneric::isPressureControlled ( const WellState< double > &  well_state) const

◆ isProducer()

bool Opm::WellInterfaceGeneric::isProducer ( ) const

True if the well is a producer.

◆ isVFPActive()

bool Opm::WellInterfaceGeneric::isVFPActive ( DeferredLogger deferred_logger) const

◆ name()

const std::string & Opm::WellInterfaceGeneric::name ( ) const

◆ numComponents()

int Opm::WellInterfaceGeneric::numComponents ( ) const
inline

References num_components_.

◆ numPerfs()

int Opm::WellInterfaceGeneric::numPerfs ( ) const
inline

◆ numPhases()

int Opm::WellInterfaceGeneric::numPhases ( ) const
inline

References number_of_phases_.

◆ openWell()

void Opm::WellInterfaceGeneric::openWell ( )
inline

References wellStatus_.

◆ parallelWellInfo()

const ParallelWellInfo & Opm::WellInterfaceGeneric::parallelWellInfo ( ) const
inline

References parallel_well_info_.

◆ perfDepth() [1/2]

std::vector< double > & Opm::WellInterfaceGeneric::perfDepth ( )
inline

References perf_depth_.

◆ perfDepth() [2/2]

const std::vector< double > & Opm::WellInterfaceGeneric::perfDepth ( ) const
inline

References perf_depth_.

◆ perforationData()

const std::vector< PerforationData > & Opm::WellInterfaceGeneric::perforationData ( ) const

Get the perforations of the well.

◆ phaseUsage()

const PhaseUsage & Opm::WellInterfaceGeneric::phaseUsage ( ) const

◆ polymerInjTable_()

int Opm::WellInterfaceGeneric::polymerInjTable_ ( ) const
protected

◆ polymerTable_()

int Opm::WellInterfaceGeneric::polymerTable_ ( ) const
protected

◆ polymerWaterTable_()

int Opm::WellInterfaceGeneric::polymerWaterTable_ ( ) const
protected

◆ prepareForPotentialCalculations()

void Opm::WellInterfaceGeneric::prepareForPotentialCalculations ( const SummaryState &  summary_state,
WellState< double > &  well_state,
Well::InjectionControls &  inj_controls,
Well::ProductionControls &  prod_controls 
) const
protected

◆ pvtRegionIdx()

int Opm::WellInterfaceGeneric::pvtRegionIdx ( ) const
inline

References pvtRegionIdx_.

◆ refDepth()

double Opm::WellInterfaceGeneric::refDepth ( ) const
inline

References ref_depth_.

◆ reportWellSwitching()

void Opm::WellInterfaceGeneric::reportWellSwitching ( const SingleWellState< double > &  ws,
DeferredLogger deferred_logger 
) const

◆ resetWellOperability()

void Opm::WellInterfaceGeneric::resetWellOperability ( )

◆ rsRvInj()

double Opm::WellInterfaceGeneric::rsRvInj ( ) const

◆ setDynamicThpLimit()

void Opm::WellInterfaceGeneric::setDynamicThpLimit ( const double  thp_limit)

◆ setGuideRate()

void Opm::WellInterfaceGeneric::setGuideRate ( const GuideRate *  guide_rate_arg)

◆ setPrevSurfaceRates()

void Opm::WellInterfaceGeneric::setPrevSurfaceRates ( WellState< double > &  well_state,
const WellState< double > &  prev_well_state 
) const

◆ setRepRadiusPerfLength()

void Opm::WellInterfaceGeneric::setRepRadiusPerfLength ( )

◆ setVFPProperties()

void Opm::WellInterfaceGeneric::setVFPProperties ( const VFPProperties vfp_properties_arg)

◆ setWellEfficiencyFactor()

void Opm::WellInterfaceGeneric::setWellEfficiencyFactor ( const double  efficiency_factor)

◆ setWsolvent()

void Opm::WellInterfaceGeneric::setWsolvent ( const double  wsolvent)

◆ stopppedOrZeroRateTarget()

bool Opm::WellInterfaceGeneric::stopppedOrZeroRateTarget ( const SummaryState &  summary_state,
const WellState< double > &  well_state 
) const

◆ stopWell()

void Opm::WellInterfaceGeneric::stopWell ( )
inline

References wellStatus_.

◆ thpLimitViolatedButNotSwitched()

bool Opm::WellInterfaceGeneric::thpLimitViolatedButNotSwitched ( ) const

◆ underPredictionMode()

bool Opm::WellInterfaceGeneric::underPredictionMode ( ) const

Returns true if the well is currently in prediction mode (i.e. not history mode).

◆ updateFilterCakeMultipliers()

void Opm::WellInterfaceGeneric::updateFilterCakeMultipliers ( const std::vector< double > &  inj_fc_multiplier)
inline

Update filter cake multipliers.

References inj_fc_multiplier_.

◆ updateInjMult()

void Opm::WellInterfaceGeneric::updateInjMult ( std::vector< double > &  inj_multipliers,
DeferredLogger deferred_logger 
) const

◆ updatePerforatedCell()

void Opm::WellInterfaceGeneric::updatePerforatedCell ( std::vector< bool > &  is_cell_perforated)

◆ updateWellTestState()

void Opm::WellInterfaceGeneric::updateWellTestState ( const SingleWellState< double > &  ws,
const double &  simulationTime,
const bool &  writeMessageToOPMLog,
WellTestState &  wellTestState,
DeferredLogger deferred_logger 
) const

◆ useVfpExplicit()

bool Opm::WellInterfaceGeneric::useVfpExplicit ( ) const

◆ vfpProperties()

const VFPProperties * Opm::WellInterfaceGeneric::vfpProperties ( ) const
inline

References vfp_properties_.

◆ wellEcl() [1/2]

Well & Opm::WellInterfaceGeneric::wellEcl ( )

◆ wellEcl() [2/2]

const Well & Opm::WellInterfaceGeneric::wellEcl ( ) const

◆ wellEfficiencyFactor()

double Opm::WellInterfaceGeneric::wellEfficiencyFactor ( ) const
inline

◆ wellHasTHPConstraints()

bool Opm::WellInterfaceGeneric::wellHasTHPConstraints ( const SummaryState &  summaryState) const

Returns true if the well has one or more THP limits/constraints.

◆ wellIndex()

const std::vector< double > & Opm::WellInterfaceGeneric::wellIndex ( ) const
inline

References well_index_.

◆ wellIsStopped()

bool Opm::WellInterfaceGeneric::wellIsStopped ( ) const
inline

References wellStatus_.

◆ wellUnderZeroRateTarget()

bool Opm::WellInterfaceGeneric::wellUnderZeroRateTarget ( const SummaryState &  summary_state,
const WellState< double > &  well_state 
) const
protected

◆ wfoam_()

double Opm::WellInterfaceGeneric::wfoam_ ( ) const
protected

◆ wmicrobes_()

double Opm::WellInterfaceGeneric::wmicrobes_ ( ) const
protected

◆ woxygen_()

double Opm::WellInterfaceGeneric::woxygen_ ( ) const
protected

◆ wpolymer_()

double Opm::WellInterfaceGeneric::wpolymer_ ( ) const
protected

◆ wsalt_()

double Opm::WellInterfaceGeneric::wsalt_ ( ) const
protected

◆ wsolvent()

double Opm::WellInterfaceGeneric::wsolvent ( ) const

◆ wurea_()

double Opm::WellInterfaceGeneric::wurea_ ( ) const
protected

Member Data Documentation

◆ bore_diameters_

std::vector<double> Opm::WellInterfaceGeneric::bore_diameters_
protected

◆ changed_to_open_this_step_

bool Opm::WellInterfaceGeneric::changed_to_open_this_step_ = true
protected

Referenced by changedToOpenThisStep().

◆ completions_

std::map<int, std::vector<int> > Opm::WellInterfaceGeneric::completions_
protected

Referenced by getCompletions().

◆ current_step_

const int Opm::WellInterfaceGeneric::current_step_
protected

Referenced by currentStep().

◆ dynamic_thp_limit_

std::optional<double> Opm::WellInterfaceGeneric::dynamic_thp_limit_
protected

◆ gravity_

double Opm::WellInterfaceGeneric::gravity_
protected

Referenced by gravity().

◆ guide_rate_

const GuideRate* Opm::WellInterfaceGeneric::guide_rate_
protected

Referenced by guideRate().

◆ index_of_well_

int Opm::WellInterfaceGeneric::index_of_well_
protected

◆ inj_fc_multiplier_

std::vector<double> Opm::WellInterfaceGeneric::inj_fc_multiplier_
protected

◆ inj_multiplier_

std::vector<double> Opm::WellInterfaceGeneric::inj_multiplier_
mutableprotected

◆ ipr_a_

std::vector<double> Opm::WellInterfaceGeneric::ipr_a_
mutableprotected

◆ ipr_b_

std::vector<double> Opm::WellInterfaceGeneric::ipr_b_
mutableprotected

◆ num_components_

const int Opm::WellInterfaceGeneric::num_components_
protected

◆ number_of_perforations_

int Opm::WellInterfaceGeneric::number_of_perforations_
protected

◆ number_of_phases_

int Opm::WellInterfaceGeneric::number_of_phases_
protected

Referenced by numPhases().

◆ operability_status_

OperabilityStatus Opm::WellInterfaceGeneric::operability_status_
protected

◆ parallel_well_info_

const ParallelWellInfo& Opm::WellInterfaceGeneric::parallel_well_info_
protected

Referenced by parallelWellInfo().

◆ perf_data_

const std::vector<PerforationData>* Opm::WellInterfaceGeneric::perf_data_
protected

◆ perf_depth_

std::vector<double> Opm::WellInterfaceGeneric::perf_depth_
protected

Referenced by perfDepth().

◆ perf_length_

std::vector<double> Opm::WellInterfaceGeneric::perf_length_
protected

◆ perf_rep_radius_

std::vector<double> Opm::WellInterfaceGeneric::perf_rep_radius_
protected

◆ phase_usage_

const PhaseUsage* Opm::WellInterfaceGeneric::phase_usage_
protected

◆ prev_inj_multiplier_

std::vector<double> Opm::WellInterfaceGeneric::prev_inj_multiplier_
protected

◆ pvtRegionIdx_

const int Opm::WellInterfaceGeneric::pvtRegionIdx_
protected

Referenced by pvtRegionIdx().

◆ ref_depth_

double Opm::WellInterfaceGeneric::ref_depth_
protected

Referenced by refDepth().

◆ saturation_table_number_

std::vector<int> Opm::WellInterfaceGeneric::saturation_table_number_
protected

◆ vfp_properties_

const VFPProperties* Opm::WellInterfaceGeneric::vfp_properties_
protected

Referenced by vfpProperties().

◆ well_cells_

std::vector<int> Opm::WellInterfaceGeneric::well_cells_
protected

Referenced by cells().

◆ well_control_log_

std::vector< std::string> Opm::WellInterfaceGeneric::well_control_log_
protected

◆ well_ecl_

◆ well_efficiency_factor_

double Opm::WellInterfaceGeneric::well_efficiency_factor_
protected

Referenced by wellEfficiencyFactor().

◆ well_index_

std::vector<double> Opm::WellInterfaceGeneric::well_index_
protected

Referenced by wellIndex().

◆ wellStatus_

Well::Status Opm::WellInterfaceGeneric::wellStatus_
protected

Referenced by openWell(), stopWell(), and wellIsStopped().

◆ wsolvent_

double Opm::WellInterfaceGeneric::wsolvent_
protected

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