#include <WellInterface.hpp>

Inheritance diagram for Opm::WellInterface< TypeTag >:
Inheritance graph

Public Types

enum class  IndividualOrGroup { Individual , Group , Both }
 
using ModelParameters = BlackoilModelParameters< TypeTag >
 
using Grid = GetPropType< TypeTag, Properties::Grid >
 
using Simulator = GetPropType< TypeTag, Properties::Simulator >
 
using FluidSystem = GetPropType< TypeTag, Properties::FluidSystem >
 
using Indices = GetPropType< TypeTag, Properties::Indices >
 
using IntensiveQuantities = GetPropType< TypeTag, Properties::IntensiveQuantities >
 
using MaterialLaw = GetPropType< TypeTag, Properties::MaterialLaw >
 
using SparseMatrixAdapter = GetPropType< TypeTag, Properties::SparseMatrixAdapter >
 
using RateVector = GetPropType< TypeTag, Properties::RateVector >
 
using GasLiftSingleWell = ::Opm::GasLiftSingleWell< TypeTag >
 
using GLiftOptWells = typename BlackoilWellModel< TypeTag >::GLiftOptWells
 
using GLiftProdWells = typename BlackoilWellModel< TypeTag >::GLiftProdWells
 
using GLiftWellStateMap = typename BlackoilWellModel< TypeTag >::GLiftWellStateMap
 
using GLiftSyncGroups = typename GasLiftSingleWellGeneric::GLiftSyncGroups
 
using Scalar = GetPropType< TypeTag, Properties::Scalar >
 
using VectorBlockType = Dune::FieldVector< Scalar, Indices::numEq >
 
using MatrixBlockType = Dune::FieldMatrix< Scalar, Indices::numEq, Indices::numEq >
 
using Eval = typename Base::Eval
 
using BVector = Dune::BlockVector< VectorBlockType >
 
using PressureMatrix = Dune::BCRSMatrix< Opm::MatrixBlock< double, 1, 1 > >
 
using RateConverterType = typename WellInterfaceFluidSystem< FluidSystem >::RateConverterType
 
using FluidState = BlackOilFluidState< Eval, FluidSystem, has_temperature, has_energy, Indices::compositionSwitchIdx >=0, has_watVapor, has_brine, has_saltPrecip, has_disgas_in_water, Indices::numPhases >
 

Public Member Functions

 WellInterface (const Well &well, const ParallelWellInfo &pw_info, const int time_step, const ModelParameters &param, const RateConverterType &rate_converter, const int pvtRegionIdx, const int num_components, const int num_phases, const int index_of_well, const std::vector< PerforationData > &perf_data)
 Constructor. More...
 
virtual ~WellInterface ()=default
 Virtual destructor. More...
 
virtual void init (const PhaseUsage *phase_usage_arg, const std::vector< double > &depth_arg, const double gravity_arg, const int num_cells, const std::vector< Scalar > &B_avg, const bool changed_to_open_this_step)
 
virtual void initPrimaryVariablesEvaluation ()=0
 
virtual ConvergenceReport getWellConvergence (const SummaryState &summary_state, const WellState< Scalar > &well_state, const std::vector< double > &B_avg, DeferredLogger &deferred_logger, const bool relax_tolerance) const =0
 
virtual void solveEqAndUpdateWellState (const SummaryState &summary_state, WellState< Scalar > &well_state, DeferredLogger &deferred_logger)=0
 
void assembleWellEq (const Simulator &simulator, const double dt, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
void assembleWellEqWithoutIteration (const Simulator &simulator, const double dt, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
void prepareWellBeforeAssembling (const Simulator &simulator, const double dt, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
virtual void computeWellRatesWithBhp (const Simulator &simulator, const double &bhp, std::vector< double > &well_flux, DeferredLogger &deferred_logger) const =0
 
virtual std::optional< double > computeBhpAtThpLimitProdWithAlq (const Simulator &simulator, const SummaryState &summary_state, const double alq_value, DeferredLogger &deferred_logger) const =0
 
virtual void recoverWellSolutionAndUpdateWellState (const SummaryState &summary_state, const BVector &x, WellState< Scalar > &well_state, DeferredLogger &deferred_logger)=0
 
virtual void apply (const BVector &x, BVector &Ax) const =0
 Ax = Ax - C D^-1 B x. More...
 
virtual void apply (BVector &r) const =0
 r = r - C D^-1 Rw More...
 
virtual void computeWellPotentials (const Simulator &simulator, const WellState< Scalar > &well_state, std::vector< double > &well_potentials, DeferredLogger &deferred_logger)=0
 
virtual void updateWellStateWithTarget (const Simulator &simulator, const GroupState< Scalar > &group_state, WellState< Scalar > &well_state, DeferredLogger &deferred_logger) const
 
virtual void computeWellRatesWithBhpIterations (const Simulator &simulator, const Scalar &bhp, std::vector< double > &well_flux, DeferredLogger &deferred_logger) const =0
 
bool updateWellStateWithTHPTargetProd (const Simulator &simulator, WellState< Scalar > &well_state, DeferredLogger &deferred_logger) const
 
bool updateWellControl (const Simulator &simulator, const IndividualOrGroup iog, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
bool updateWellControlAndStatusLocalIteration (const Simulator &simulator, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, const double WQTotal, DeferredLogger &deferred_logger, const bool fixed_control=false, const bool fixed_status=false)
 
virtual void updatePrimaryVariables (const SummaryState &summary_state, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger)=0
 
virtual void calculateExplicitQuantities (const Simulator &simulator, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger)=0
 
virtual void updateProductivityIndex (const Simulator &simulator, const WellProdIndexCalculator &wellPICalc, WellState< Scalar > &well_state, DeferredLogger &deferred_logger) const =0
 
virtual double connectionDensity (const int globalConnIdx, const int openConnIdx) const =0
 
virtual bool jacobianContainsWellContributions () const
 Wether the Jacobian will also have well contributions in it. More...
 
virtual void addWellContributions (SparseMatrixAdapter &) const =0
 
virtual void addWellPressureEquations (PressureMatrix &mat, const BVector &x, const int pressureVarIndex, const bool use_well_weights, const WellState< Scalar > &well_state) const =0
 
void addCellRates (RateVector &rates, int cellIdx) const
 
Scalar volumetricSurfaceRateForConnection (int cellIdx, int phaseIdx) const
 
void wellTesting (const Simulator &simulator, const double simulation_time, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, WellTestState &welltest_state, DeferredLogger &deferred_logger)
 
void checkWellOperability (const Simulator &simulator, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger)
 
bool gliftBeginTimeStepWellTestIterateWellEquations (const Simulator &simulator, const double dt, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
void gliftBeginTimeStepWellTestUpdateALQ (const Simulator &simulator, WellState< Scalar > &well_state, DeferredLogger &deferred_logger)
 
void updateWellOperability (const Simulator &simulator, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger)
 
bool updateWellOperabilityFromWellEq (const Simulator &simulator, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger)
 
virtual void updateWaterThroughput (const double dt, WellState< Scalar > &well_state) const =0
 
virtual std::vector< double > computeCurrentWellRates (const Simulator &simulator, DeferredLogger &deferred_logger) const =0
 
void updateWellStateRates (const Simulator &simulator, WellState< Scalar > &well_state, DeferredLogger &deferred_logger) const
 
void solveWellEquation (const Simulator &simulator, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
const std::vector< RateVector > & connectionRates () const
 
virtual std::vector< double > getPrimaryVars () const
 
virtual int setPrimaryVars (std::vector< double >::const_iterator)
 
std::vector< double > wellIndex (const int perf, const IntensiveQuantities &intQuants, const double trans_mult, const SingleWellState< double > &ws) const
 
void updateConnectionDFactor (const Simulator &simulator, SingleWellState< double > &ws) const
 
void updateConnectionTransmissibilityFactor (const Simulator &simulator, SingleWellState< double > &ws) const
 
int flowPhaseToModelCompIdx (const int phaseIdx) const
 
int modelCompIdxToFlowCompIdx (const unsigned compIdx) const
 
double scalingFactor (const int phaseIdx) const
 
Eval restrictEval (const EvalWell &in) const
 
int flowPhaseToModelPhaseIdx (const int phaseIdx) const
 
const RateConverterTyperateConverter () const
 
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 ()
 

Static Public Attributes

static constexpr bool has_solvent = getPropValue<TypeTag, Properties::EnableSolvent>()
 
static constexpr bool has_zFraction = getPropValue<TypeTag, Properties::EnableExtbo>()
 
static constexpr bool has_polymer = getPropValue<TypeTag, Properties::EnablePolymer>()
 
static constexpr bool has_energy = getPropValue<TypeTag, Properties::EnableEnergy>()
 
static const bool has_temperature = getPropValue<TypeTag, Properties::EnableTemperature>()
 
static constexpr bool has_polymermw = getPropValue<TypeTag, Properties::EnablePolymerMW>()
 
static constexpr bool has_foam = getPropValue<TypeTag, Properties::EnableFoam>()
 
static constexpr bool has_brine = getPropValue<TypeTag, Properties::EnableBrine>()
 
static constexpr bool has_watVapor = getPropValue<TypeTag, Properties::EnableVapwat>()
 
static constexpr bool has_disgas_in_water = getPropValue<TypeTag, Properties::EnableDisgasInWater>()
 
static constexpr bool has_saltPrecip = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>()
 
static constexpr bool has_micp = getPropValue<TypeTag, Properties::EnableMICP>()
 
static constexpr int Water
 
static constexpr int Oil
 
static constexpr int Gas
 

Protected Member Functions

double wpolymer () const
 
double wfoam () const
 
double wsalt () const
 
double wmicrobes () const
 
double woxygen () const
 
double wurea () const
 
virtual double getRefDensity () const =0
 
const std::vector< double > & compFrac () const
 
std::vector< double > initialWellRateFractions (const Simulator &simulator, const WellState< Scalar > &well_state) const
 
virtual void checkOperabilityUnderBHPLimit (const WellState< Scalar > &well_state, const Simulator &simulator, DeferredLogger &deferred_logger)=0
 
virtual void checkOperabilityUnderTHPLimit (const Simulator &simulator, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger)=0
 
virtual void updateIPR (const Simulator &simulator, DeferredLogger &deferred_logger) const =0
 
virtual void assembleWellEqWithoutIteration (const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)=0
 
virtual bool iterateWellEqWithControl (const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)=0
 
virtual bool iterateWellEqWithSwitching (const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger, const bool fixed_control=false, const bool fixed_status=false)=0
 
virtual void updateIPRImplicit (const Simulator &simulator, WellState< Scalar > &well_state, DeferredLogger &deferred_logger)=0
 
bool iterateWellEquations (const Simulator &simulator, const double dt, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
bool solveWellWithTHPConstraint (const Simulator &simulator, const double dt, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
std::optional< double > estimateOperableBhp (const Simulator &simulator, const double dt, WellState< Scalar > &well_state, const SummaryState &summary_state, DeferredLogger &deferred_logger)
 
bool solveWellWithBhp (const Simulator &simulator, const double dt, const double bhp, WellState< Scalar > &well_state, DeferredLogger &deferred_logger)
 
bool solveWellWithZeroRate (const Simulator &simulator, const double dt, WellState< Scalar > &well_state, DeferredLogger &deferred_logger)
 
bool solveWellForTesting (const Simulator &simulator, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)
 
Eval getPerfCellPressure (const FluidState &fs) const
 
template<class Value , class Callback >
void getMobility (const Simulator &simulator, const int perf, std::vector< Value > &mob, Callback &extendEval, DeferredLogger &deferred_logger) const
 
void computeConnLevelProdInd (const FluidState &fs, const std::function< double(const double)> &connPICalc, const std::vector< Scalar > &mobility, double *connPI) const
 
void computeConnLevelInjInd (const FluidState &fs, const Phase preferred_phase, const std::function< double(const double)> &connIICalc, const std::vector< Scalar > &mobility, double *connII, DeferredLogger &deferred_logger) const
 
double computeConnectionDFactor (const int perf, const IntensiveQuantities &intQuants, const SingleWellState< double > &ws) const
 
void calculateReservoirRates (SingleWellState< double > &ws) const
 
bool checkIndividualConstraints (SingleWellState< double > &ws, const SummaryState &summaryState, DeferredLogger &deferred_logger, const std::optional< Well::InjectionControls > &inj_controls=std::nullopt, const std::optional< Well::ProductionControls > &prod_controls=std::nullopt) const
 
bool checkGroupConstraints (WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger) const
 
bool checkConstraints (WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger) const
 
std::optional< double > getGroupInjectionTargetRate (const Group &group, const WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, const InjectorType &injectorType, double efficiencyFactor, DeferredLogger &deferred_logger) const
 
double getGroupProductionTargetRate (const Group &group, const WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, double efficiencyFactor, DeferredLogger &deferred_logger) const
 
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

const ModelParametersparam_
 
std::vector< RateVectorconnectionRates_
 
std::vector< ScalarB_avg_
 
bool changed_to_stopped_this_step_ = false
 
bool thp_update_iterations = false
 
const RateConverterTyperateConverter_
 
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
 

Static Protected Attributes

static constexpr int INVALIDCOMPLETION
 

Member Typedef Documentation

◆ BVector

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::BVector = Dune::BlockVector<VectorBlockType>

◆ Eval

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::Eval = typename Base::Eval

◆ FluidState

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::FluidState = BlackOilFluidState<Eval, FluidSystem, has_temperature, has_energy, Indices::compositionSwitchIdx >= 0, has_watVapor, has_brine, has_saltPrecip, has_disgas_in_water, Indices::numPhases >

◆ FluidSystem

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>

◆ GasLiftSingleWell

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::GasLiftSingleWell = ::Opm::GasLiftSingleWell<TypeTag>

◆ GLiftOptWells

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::GLiftOptWells = typename BlackoilWellModel<TypeTag>::GLiftOptWells

◆ GLiftProdWells

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::GLiftProdWells = typename BlackoilWellModel<TypeTag>::GLiftProdWells

◆ GLiftSyncGroups

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::GLiftSyncGroups = typename GasLiftSingleWellGeneric::GLiftSyncGroups

◆ GLiftWellStateMap

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::GLiftWellStateMap = typename BlackoilWellModel<TypeTag>::GLiftWellStateMap

◆ Grid

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::Grid = GetPropType<TypeTag, Properties::Grid>

◆ Indices

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::Indices = GetPropType<TypeTag, Properties::Indices>

◆ IntensiveQuantities

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>

◆ MaterialLaw

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>

◆ MatrixBlockType

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::MatrixBlockType = Dune::FieldMatrix<Scalar, Indices::numEq, Indices::numEq>

◆ ModelParameters

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::ModelParameters = BlackoilModelParameters<TypeTag>

◆ PressureMatrix

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::PressureMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1> >

◆ RateConverterType

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::RateConverterType = typename WellInterfaceFluidSystem<FluidSystem>::RateConverterType

◆ RateVector

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::RateVector = GetPropType<TypeTag, Properties::RateVector>

◆ Scalar

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::Scalar = GetPropType<TypeTag, Properties::Scalar>

◆ Simulator

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::Simulator = GetPropType<TypeTag, Properties::Simulator>

◆ SparseMatrixAdapter

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::SparseMatrixAdapter = GetPropType<TypeTag, Properties::SparseMatrixAdapter>

◆ VectorBlockType

template<typename TypeTag >
using Opm::WellInterface< TypeTag >::VectorBlockType = Dune::FieldVector<Scalar, Indices::numEq>

Member Enumeration Documentation

◆ IndividualOrGroup

template<typename TypeTag >
enum class Opm::WellInterface::IndividualOrGroup
strong
Enumerator
Individual 
Group 
Both 

Constructor & Destructor Documentation

◆ WellInterface()

template<typename TypeTag >
Opm::WellInterface< TypeTag >::WellInterface ( const Well &  well,
const ParallelWellInfo pw_info,
const int  time_step,
const ModelParameters param,
const RateConverterType rate_converter,
const int  pvtRegionIdx,
const int  num_components,
const int  num_phases,
const int  index_of_well,
const std::vector< PerforationData > &  perf_data 
)

◆ ~WellInterface()

template<typename TypeTag >
virtual Opm::WellInterface< TypeTag >::~WellInterface ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ adaptRatesForVFP()

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

◆ addCellRates()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::addCellRates ( RateVector rates,
int  cellIdx 
) const

◆ addWellContributions()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::addWellContributions ( SparseMatrixAdapter ) const
pure virtual

◆ addWellPressureEquations()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::addWellPressureEquations ( PressureMatrix mat,
const BVector x,
const int  pressureVarIndex,
const bool  use_well_weights,
const WellState< Scalar > &  well_state 
) const
pure virtual

◆ apply() [1/2]

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::apply ( BVector r) const
pure virtual

r = r - C D^-1 Rw

Implemented in Opm::MultisegmentWell< TypeTag >, and Opm::StandardWell< TypeTag >.

◆ apply() [2/2]

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::apply ( const BVector x,
BVector Ax 
) const
pure virtual

Ax = Ax - C D^-1 B x.

Implemented in Opm::MultisegmentWell< TypeTag >, and Opm::StandardWell< TypeTag >.

◆ assembleWellEq()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::assembleWellEq ( const Simulator simulator,
const double  dt,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)

◆ assembleWellEqWithoutIteration() [1/2]

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::assembleWellEqWithoutIteration ( const Simulator simulator,
const double  dt,
const WellInjectionControls &  inj_controls,
const WellProductionControls &  prod_controls,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)
protectedpure virtual

◆ assembleWellEqWithoutIteration() [2/2]

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::assembleWellEqWithoutIteration ( const Simulator simulator,
const double  dt,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)

◆ calculateExplicitQuantities()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::calculateExplicitQuantities ( const Simulator simulator,
const WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)
pure virtual

◆ calculateReservoirRates()

void Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::calculateReservoirRates ( SingleWellState< double > &  ws) const
protectedinherited

◆ cells()

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

Well cells.

References Opm::WellInterfaceGeneric::well_cells_.

◆ changedToOpenThisStep()

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

◆ checkConstraints()

bool Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::checkConstraints ( WellState< double > &  well_state,
const GroupState< double > &  group_state,
const Schedule &  schedule,
const SummaryState &  summaryState,
DeferredLogger deferred_logger 
) const
protectedinherited

◆ checkGroupConstraints()

bool Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::checkGroupConstraints ( WellState< double > &  well_state,
const GroupState< double > &  group_state,
const Schedule &  schedule,
const SummaryState &  summaryState,
DeferredLogger deferred_logger 
) const
protectedinherited

◆ checkIndividualConstraints()

bool Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::checkIndividualConstraints ( SingleWellState< double > &  ws,
const SummaryState &  summaryState,
DeferredLogger deferred_logger,
const std::optional< Well::InjectionControls > &  inj_controls = std::nullopt,
const std::optional< Well::ProductionControls > &  prod_controls = std::nullopt 
) const
protectedinherited

◆ checkNegativeWellPotentials()

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

◆ checkOperabilityUnderBHPLimit()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::checkOperabilityUnderBHPLimit ( const WellState< Scalar > &  well_state,
const Simulator simulator,
DeferredLogger deferred_logger 
)
protectedpure virtual

◆ checkOperabilityUnderTHPLimit()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::checkOperabilityUnderTHPLimit ( const Simulator simulator,
const WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)
protectedpure virtual

◆ checkWellOperability()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::checkWellOperability ( const Simulator simulator,
const WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)

◆ closeCompletions()

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

◆ compFrac()

template<typename TypeTag >
const std::vector< double > & Opm::WellInterface< TypeTag >::compFrac ( ) const
protected

◆ computeBhpAtThpLimitProdWithAlq()

template<typename TypeTag >
virtual std::optional< double > Opm::WellInterface< TypeTag >::computeBhpAtThpLimitProdWithAlq ( const Simulator simulator,
const SummaryState &  summary_state,
const double  alq_value,
DeferredLogger deferred_logger 
) const
pure virtual

◆ computeConnectionDFactor()

template<typename TypeTag >
double Opm::WellInterface< TypeTag >::computeConnectionDFactor ( const int  perf,
const IntensiveQuantities intQuants,
const SingleWellState< double > &  ws 
) const
protected

◆ computeConnLevelInjInd()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::computeConnLevelInjInd ( const FluidState fs,
const Phase  preferred_phase,
const std::function< double(const double)> &  connIICalc,
const std::vector< Scalar > &  mobility,
double *  connII,
DeferredLogger deferred_logger 
) const
protected

◆ computeConnLevelProdInd()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::computeConnLevelProdInd ( const FluidState fs,
const std::function< double(const double)> &  connPICalc,
const std::vector< Scalar > &  mobility,
double *  connPI 
) const
protected

References Opm::phaseUsage().

◆ computeCurrentWellRates()

template<typename TypeTag >
virtual std::vector< double > Opm::WellInterface< TypeTag >::computeCurrentWellRates ( const Simulator simulator,
DeferredLogger deferred_logger 
) const
pure virtual

Compute well rates based on current reservoir conditions and well variables. Used in updateWellStateRates().

Implemented in Opm::MultisegmentWell< TypeTag >, and Opm::StandardWell< TypeTag >.

◆ computeWellPotentials() [1/2]

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::computeWellPotentials ( const Simulator simulator,
const WellState< Scalar > &  well_state,
std::vector< double > &  well_potentials,
DeferredLogger deferred_logger 
)
pure virtual

◆ computeWellPotentials() [2/2]

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

◆ computeWellRatesWithBhp()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::computeWellRatesWithBhp ( const Simulator simulator,
const double &  bhp,
std::vector< double > &  well_flux,
DeferredLogger deferred_logger 
) const
pure virtual

◆ computeWellRatesWithBhpIterations()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::computeWellRatesWithBhpIterations ( const Simulator simulator,
const Scalar bhp,
std::vector< double > &  well_flux,
DeferredLogger deferred_logger 
) const
pure virtual

◆ connectionDensity()

template<typename TypeTag >
virtual double Opm::WellInterface< TypeTag >::connectionDensity ( const int  globalConnIdx,
const int  openConnIdx 
) const
pure virtual

◆ connectionRates()

template<typename TypeTag >
const std::vector< RateVector > & Opm::WellInterface< TypeTag >::connectionRates ( ) const
inline

◆ currentStep()

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

◆ estimateOperableBhp()

template<typename TypeTag >
std::optional< double > Opm::WellInterface< TypeTag >::estimateOperableBhp ( const Simulator simulator,
const double  dt,
WellState< Scalar > &  well_state,
const SummaryState &  summary_state,
DeferredLogger deferred_logger 
)
protected

◆ flowPhaseToModelCompIdx()

int Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Indices > >::flowPhaseToModelCompIdx ( const int  phaseIdx) const
inherited

◆ flowPhaseToModelPhaseIdx()

int Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::flowPhaseToModelPhaseIdx ( const int  phaseIdx) const
inherited

◆ getAllowCrossFlow()

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

◆ getALQ()

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

◆ getCompletions()

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

◆ getDynamicThpLimit()

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

◆ getGroupInjectionTargetRate()

std::optional< double > Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::getGroupInjectionTargetRate ( const Group &  group,
const WellState< double > &  well_state,
const GroupState< double > &  group_state,
const Schedule &  schedule,
const SummaryState &  summaryState,
const InjectorType &  injectorType,
double  efficiencyFactor,
DeferredLogger deferred_logger 
) const
protectedinherited

◆ getGroupProductionTargetRate()

double Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::getGroupProductionTargetRate ( const Group &  group,
const WellState< double > &  well_state,
const GroupState< double > &  group_state,
const Schedule &  schedule,
const SummaryState &  summaryState,
double  efficiencyFactor,
DeferredLogger deferred_logger 
) const
protectedinherited

◆ getInjMult()

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

◆ getMobility()

template<typename TypeTag >
template<class Value , class Callback >
void Opm::WellInterface< TypeTag >::getMobility ( const Simulator simulator,
const int  perf,
std::vector< Value > &  mob,
Callback &  extendEval,
DeferredLogger deferred_logger 
) const
protected

◆ getPerfCellPressure()

template<typename TypeTag >
WellInterface< TypeTag >::Eval Opm::WellInterface< TypeTag >::getPerfCellPressure ( const FluidState fs) const
protected

◆ getPrimaryVars()

template<typename TypeTag >
virtual std::vector< double > Opm::WellInterface< TypeTag >::getPrimaryVars ( ) const
inlinevirtual

◆ getRefDensity()

template<typename TypeTag >
virtual double Opm::WellInterface< TypeTag >::getRefDensity ( ) const
protectedpure virtual

◆ getTHPConstraint()

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

◆ getWellConvergence()

template<typename TypeTag >
virtual ConvergenceReport Opm::WellInterface< TypeTag >::getWellConvergence ( const SummaryState &  summary_state,
const WellState< Scalar > &  well_state,
const std::vector< double > &  B_avg,
DeferredLogger deferred_logger,
const bool  relax_tolerance 
) const
pure virtual

◆ gliftBeginTimeStepWellTestIterateWellEquations()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::gliftBeginTimeStepWellTestIterateWellEquations ( const Simulator simulator,
const double  dt,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)

◆ gliftBeginTimeStepWellTestUpdateALQ()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::gliftBeginTimeStepWellTestUpdateALQ ( const Simulator simulator,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)

◆ gravity()

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

◆ guideRate()

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

◆ indexOfWell()

int Opm::WellInterfaceGeneric::indexOfWell ( ) const
inherited

Index of well in the wells struct and wellState.

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

◆ init()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::init ( const PhaseUsage phase_usage_arg,
const std::vector< double > &  depth_arg,
const double  gravity_arg,
const int  num_cells,
const std::vector< Scalar > &  B_avg,
const bool  changed_to_open_this_step 
)
virtual

◆ initCompletions()

void Opm::WellInterfaceGeneric::initCompletions ( )
inherited

◆ initialWellRateFractions()

template<typename TypeTag >
std::vector< double > Opm::WellInterface< TypeTag >::initialWellRateFractions ( const Simulator simulator,
const WellState< Scalar > &  well_state 
) const
protected

◆ initInjMult()

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

◆ initPrimaryVariablesEvaluation()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::initPrimaryVariablesEvaluation ( )
pure virtual

◆ isInjector()

bool Opm::WellInterfaceGeneric::isInjector ( ) const
inherited

True if the well is an injector.

◆ isOperableAndSolvable()

bool Opm::WellInterfaceGeneric::isOperableAndSolvable ( ) const
inherited

◆ isPressureControlled()

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

◆ isProducer()

bool Opm::WellInterfaceGeneric::isProducer ( ) const
inherited

True if the well is a producer.

◆ isVFPActive()

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

◆ iterateWellEquations()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::iterateWellEquations ( const Simulator simulator,
const double  dt,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)
protected

◆ iterateWellEqWithControl()

template<typename TypeTag >
virtual bool Opm::WellInterface< TypeTag >::iterateWellEqWithControl ( const Simulator simulator,
const double  dt,
const WellInjectionControls &  inj_controls,
const WellProductionControls &  prod_controls,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)
protectedpure virtual

◆ iterateWellEqWithSwitching()

template<typename TypeTag >
virtual bool Opm::WellInterface< TypeTag >::iterateWellEqWithSwitching ( const Simulator simulator,
const double  dt,
const WellInjectionControls &  inj_controls,
const WellProductionControls &  prod_controls,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger,
const bool  fixed_control = false,
const bool  fixed_status = false 
)
protectedpure virtual

◆ jacobianContainsWellContributions()

template<typename TypeTag >
virtual bool Opm::WellInterface< TypeTag >::jacobianContainsWellContributions ( ) const
inlinevirtual

Wether the Jacobian will also have well contributions in it.

Reimplemented in Opm::StandardWell< TypeTag >.

◆ modelCompIdxToFlowCompIdx()

int Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Indices > >::modelCompIdxToFlowCompIdx ( const unsigned  compIdx) const
inherited

◆ name()

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

◆ numComponents()

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

◆ numPerfs()

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

◆ numPhases()

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

◆ openWell()

void Opm::WellInterfaceGeneric::openWell ( )
inlineinherited

◆ parallelWellInfo()

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

◆ perfDepth() [1/2]

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

◆ perfDepth() [2/2]

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

◆ perforationData()

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

Get the perforations of the well.

◆ phaseUsage()

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

◆ polymerInjTable_()

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

◆ polymerTable_()

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

◆ polymerWaterTable_()

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

◆ prepareForPotentialCalculations()

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

◆ prepareWellBeforeAssembling()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::prepareWellBeforeAssembling ( const Simulator simulator,
const double  dt,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)

◆ pvtRegionIdx()

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

◆ rateConverter()

const RateConverterType & Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::rateConverter ( ) const
inlineinherited

◆ recoverWellSolutionAndUpdateWellState()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::recoverWellSolutionAndUpdateWellState ( const SummaryState &  summary_state,
const BVector x,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)
pure virtual

using the solution x to recover the solution xw for wells and applying xw to update Well State

◆ refDepth()

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

◆ reportWellSwitching()

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

◆ resetWellOperability()

void Opm::WellInterfaceGeneric::resetWellOperability ( )
inherited

◆ restrictEval()

Eval Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Indices > >::restrictEval ( const EvalWell &  in) const
inlineinherited

◆ rsRvInj()

double Opm::WellInterfaceGeneric::rsRvInj ( ) const
inherited

◆ scalingFactor()

double Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem > , GetPropType< TypeTag, Properties::Indices > >::scalingFactor ( const int  phaseIdx) const
inherited

◆ setDynamicThpLimit()

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

◆ setGuideRate()

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

◆ setPrevSurfaceRates()

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

◆ setPrimaryVars()

template<typename TypeTag >
virtual int Opm::WellInterface< TypeTag >::setPrimaryVars ( std::vector< double >::const_iterator  )
inlinevirtual

◆ setRepRadiusPerfLength()

void Opm::WellInterfaceGeneric::setRepRadiusPerfLength ( )
inherited

◆ setVFPProperties()

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

◆ setWellEfficiencyFactor()

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

◆ setWsolvent()

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

◆ solveEqAndUpdateWellState()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::solveEqAndUpdateWellState ( const SummaryState &  summary_state,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)
pure virtual

◆ solveWellEquation()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::solveWellEquation ( const Simulator simulator,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)

◆ solveWellForTesting()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::solveWellForTesting ( const Simulator simulator,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)
protected

◆ solveWellWithBhp()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::solveWellWithBhp ( const Simulator simulator,
const double  dt,
const double  bhp,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)
protected

◆ solveWellWithTHPConstraint()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::solveWellWithTHPConstraint ( const Simulator simulator,
const double  dt,
const Well::InjectionControls &  inj_controls,
const Well::ProductionControls &  prod_controls,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)
protected

◆ solveWellWithZeroRate()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::solveWellWithZeroRate ( const Simulator simulator,
const double  dt,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)
protected

◆ stopppedOrZeroRateTarget()

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

◆ stopWell()

void Opm::WellInterfaceGeneric::stopWell ( )
inlineinherited

◆ thpLimitViolatedButNotSwitched()

bool Opm::WellInterfaceGeneric::thpLimitViolatedButNotSwitched ( ) const
inherited

◆ underPredictionMode()

bool Opm::WellInterfaceGeneric::underPredictionMode ( ) const
inherited

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

◆ updateConnectionDFactor()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::updateConnectionDFactor ( const Simulator simulator,
SingleWellState< double > &  ws 
) const

◆ updateConnectionTransmissibilityFactor()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::updateConnectionTransmissibilityFactor ( const Simulator simulator,
SingleWellState< double > &  ws 
) const

◆ updateFilterCakeMultipliers()

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

Update filter cake multipliers.

References Opm::WellInterfaceGeneric::inj_fc_multiplier_.

◆ updateInjMult()

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

◆ updateIPR()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::updateIPR ( const Simulator simulator,
DeferredLogger deferred_logger 
) const
protectedpure virtual

◆ updateIPRImplicit()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::updateIPRImplicit ( const Simulator simulator,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)
protectedpure virtual

◆ updatePerforatedCell()

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

◆ updatePrimaryVariables()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::updatePrimaryVariables ( const SummaryState &  summary_state,
const WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)
pure virtual

◆ updateProductivityIndex()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::updateProductivityIndex ( const Simulator simulator,
const WellProdIndexCalculator wellPICalc,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
) const
pure virtual

◆ updateWaterThroughput()

template<typename TypeTag >
virtual void Opm::WellInterface< TypeTag >::updateWaterThroughput ( const double  dt,
WellState< Scalar > &  well_state 
) const
pure virtual

◆ updateWellControl()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::updateWellControl ( const Simulator simulator,
const IndividualOrGroup  iog,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
DeferredLogger deferred_logger 
)

◆ updateWellControlAndStatusLocalIteration()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::updateWellControlAndStatusLocalIteration ( const Simulator simulator,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
const Well::InjectionControls &  inj_controls,
const Well::ProductionControls &  prod_controls,
const double  WQTotal,
DeferredLogger deferred_logger,
const bool  fixed_control = false,
const bool  fixed_status = false 
)

◆ updateWellOperability()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::updateWellOperability ( const Simulator simulator,
const WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)

◆ updateWellOperabilityFromWellEq()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::updateWellOperabilityFromWellEq ( const Simulator simulator,
const WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
)

◆ updateWellStateRates()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::updateWellStateRates ( const Simulator simulator,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
) const

Modify the well_state's rates if there is only one nonzero rate. If so, that rate is kept as is, but the others are set proportionally to the rates returned by computeCurrentWellRates().

References Opm::WellState< Scalar >::well().

◆ updateWellStateWithTarget()

◆ updateWellStateWithTHPTargetProd()

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::updateWellStateWithTHPTargetProd ( const Simulator simulator,
WellState< Scalar > &  well_state,
DeferredLogger deferred_logger 
) const

◆ updateWellTestState()

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

◆ useVfpExplicit()

bool Opm::WellInterfaceGeneric::useVfpExplicit ( ) const
inherited

◆ vfpProperties()

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

◆ volumetricSurfaceRateForConnection()

template<typename TypeTag >
WellInterface< TypeTag >::Scalar Opm::WellInterface< TypeTag >::volumetricSurfaceRateForConnection ( int  cellIdx,
int  phaseIdx 
) const

References Opm::to_string().

◆ wellEcl() [1/2]

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

◆ wellEcl() [2/2]

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

◆ wellEfficiencyFactor()

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

◆ wellHasTHPConstraints()

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

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

◆ wellIndex() [1/2]

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

◆ wellIndex() [2/2]

template<typename TypeTag >
std::vector< double > Opm::WellInterface< TypeTag >::wellIndex ( const int  perf,
const IntensiveQuantities intQuants,
const double  trans_mult,
const SingleWellState< double > &  ws 
) const

◆ wellIsStopped()

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

◆ wellTesting()

template<typename TypeTag >
void Opm::WellInterface< TypeTag >::wellTesting ( const Simulator simulator,
const double  simulation_time,
WellState< Scalar > &  well_state,
const GroupState< Scalar > &  group_state,
WellTestState &  welltest_state,
DeferredLogger deferred_logger 
)

◆ wellUnderZeroRateTarget()

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

◆ wfoam()

template<typename TypeTag >
double Opm::WellInterface< TypeTag >::wfoam
protected

◆ wfoam_()

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

◆ wmicrobes()

template<typename TypeTag >
double Opm::WellInterface< TypeTag >::wmicrobes
protected

◆ wmicrobes_()

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

◆ woxygen()

template<typename TypeTag >
double Opm::WellInterface< TypeTag >::woxygen
protected

◆ woxygen_()

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

◆ wpolymer()

template<typename TypeTag >
double Opm::WellInterface< TypeTag >::wpolymer
protected

◆ wpolymer_()

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

◆ wsalt()

template<typename TypeTag >
double Opm::WellInterface< TypeTag >::wsalt
protected

◆ wsalt_()

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

◆ wsolvent()

double Opm::WellInterfaceGeneric::wsolvent ( ) const
inherited

◆ wurea()

template<typename TypeTag >
double Opm::WellInterface< TypeTag >::wurea
protected

◆ wurea_()

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

Member Data Documentation

◆ B_avg_

template<typename TypeTag >
std::vector< Scalar > Opm::WellInterface< TypeTag >::B_avg_
protected

◆ bore_diameters_

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

◆ changed_to_open_this_step_

bool Opm::WellInterfaceGeneric::changed_to_open_this_step_ = true
protectedinherited

◆ changed_to_stopped_this_step_

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::changed_to_stopped_this_step_ = false
protected

◆ completions_

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

◆ connectionRates_

template<typename TypeTag >
std::vector<RateVector> Opm::WellInterface< TypeTag >::connectionRates_
protected

◆ current_step_

const int Opm::WellInterfaceGeneric::current_step_
protectedinherited

◆ dynamic_thp_limit_

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

◆ Gas

constexpr int Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::Gas
staticconstexprinherited

◆ gravity_

double Opm::WellInterfaceGeneric::gravity_
protectedinherited

◆ guide_rate_

const GuideRate* Opm::WellInterfaceGeneric::guide_rate_
protectedinherited

◆ has_brine

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_brine = getPropValue<TypeTag, Properties::EnableBrine>()
staticconstexpr

◆ has_disgas_in_water

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_disgas_in_water = getPropValue<TypeTag, Properties::EnableDisgasInWater>()
staticconstexpr

◆ has_energy

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_energy = getPropValue<TypeTag, Properties::EnableEnergy>()
staticconstexpr

◆ has_foam

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_foam = getPropValue<TypeTag, Properties::EnableFoam>()
staticconstexpr

◆ has_micp

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_micp = getPropValue<TypeTag, Properties::EnableMICP>()
staticconstexpr

◆ has_polymer

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_polymer = getPropValue<TypeTag, Properties::EnablePolymer>()
staticconstexpr

◆ has_polymermw

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_polymermw = getPropValue<TypeTag, Properties::EnablePolymerMW>()
staticconstexpr

◆ has_saltPrecip

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_saltPrecip = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>()
staticconstexpr

◆ has_solvent

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_solvent = getPropValue<TypeTag, Properties::EnableSolvent>()
staticconstexpr

◆ has_temperature

template<typename TypeTag >
const bool Opm::WellInterface< TypeTag >::has_temperature = getPropValue<TypeTag, Properties::EnableTemperature>()
static

◆ has_watVapor

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_watVapor = getPropValue<TypeTag, Properties::EnableVapwat>()
staticconstexpr

◆ has_zFraction

template<typename TypeTag >
constexpr bool Opm::WellInterface< TypeTag >::has_zFraction = getPropValue<TypeTag, Properties::EnableExtbo>()
staticconstexpr

◆ index_of_well_

int Opm::WellInterfaceGeneric::index_of_well_
protectedinherited

◆ inj_fc_multiplier_

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

◆ inj_multiplier_

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

◆ INVALIDCOMPLETION

constexpr int Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::INVALIDCOMPLETION
staticconstexprprotectedinherited

◆ ipr_a_

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

◆ ipr_b_

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

◆ num_components_

const int Opm::WellInterfaceGeneric::num_components_
protectedinherited

◆ number_of_perforations_

int Opm::WellInterfaceGeneric::number_of_perforations_
protectedinherited

◆ number_of_phases_

int Opm::WellInterfaceGeneric::number_of_phases_
protectedinherited

◆ Oil

constexpr int Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::Oil
staticconstexprinherited

◆ operability_status_

OperabilityStatus Opm::WellInterfaceGeneric::operability_status_
protectedinherited

◆ parallel_well_info_

const ParallelWellInfo& Opm::WellInterfaceGeneric::parallel_well_info_
protectedinherited

◆ param_

template<typename TypeTag >
const ModelParameters& Opm::WellInterface< TypeTag >::param_
protected

◆ perf_data_

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

◆ perf_depth_

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

◆ perf_length_

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

◆ perf_rep_radius_

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

◆ phase_usage_

const PhaseUsage* Opm::WellInterfaceGeneric::phase_usage_
protectedinherited

◆ prev_inj_multiplier_

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

◆ pvtRegionIdx_

const int Opm::WellInterfaceGeneric::pvtRegionIdx_
protectedinherited

◆ rateConverter_

const RateConverterType& Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::rateConverter_
protectedinherited

◆ ref_depth_

double Opm::WellInterfaceGeneric::ref_depth_
protectedinherited

◆ saturation_table_number_

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

◆ thp_update_iterations

template<typename TypeTag >
bool Opm::WellInterface< TypeTag >::thp_update_iterations = false
protected

◆ vfp_properties_

const VFPProperties* Opm::WellInterfaceGeneric::vfp_properties_
protectedinherited

◆ Water

constexpr int Opm::WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::Water
staticconstexprinherited

◆ well_cells_

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

◆ well_control_log_

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

◆ well_ecl_

◆ well_efficiency_factor_

double Opm::WellInterfaceGeneric::well_efficiency_factor_
protectedinherited

◆ well_index_

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

◆ wellStatus_

Well::Status Opm::WellInterfaceGeneric::wellStatus_
protectedinherited

◆ wsolvent_

double Opm::WellInterfaceGeneric::wsolvent_
protectedinherited

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