My Project
Opm::StandardWell< TypeTag > Class Template Reference
Inheritance diagram for Opm::StandardWell< TypeTag >:
Opm::WellInterface< TypeTag > Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > > Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > > Opm::StandardWellGeneric< Scalar > Opm::WellInterfaceFluidSystem< FluidSystem > Opm::WellInterfaceEval< FluidSystem > Opm::WellInterfaceGeneric

Public Types

typedef WellInterface< TypeTag > Base
 
using StdWellEval = StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > >
 
using PolymerModule = BlackOilPolymerModule< TypeTag >
 
using FoamModule = BlackOilFoamModule< TypeTag >
 
using BrineModule = BlackOilBrineModule< TypeTag >
 
using Eval = typename StdWellEval::Eval
 
using EvalWell = typename StdWellEval::EvalWell
 
using BVectorWell = typename StdWellEval::BVectorWell
 
using Simulator = GetPropType< TypeTag, Properties::Simulator >
 
using IntensiveQuantities = GetPropType< TypeTag, Properties::IntensiveQuantities >
 
using FluidSystem = GetPropType< TypeTag, Properties::FluidSystem >
 
using MaterialLaw = GetPropType< TypeTag, Properties::MaterialLaw >
 
using ModelParameters = BlackoilModelParametersEbos< TypeTag >
 
using Indices = GetPropType< TypeTag, Properties::Indices >
 
using RateConverterType = typename WellInterfaceFluidSystem< FluidSystem >::RateConverterType
 
using SparseMatrixAdapter = GetPropType< TypeTag, Properties::SparseMatrixAdapter >
 
using FluidState = BlackOilFluidState< Eval, FluidSystem, has_temperature, has_energy, Indices::compositionSwitchIdx >=0, has_brine, Indices::numPhases >
 
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 BVector = Dune::BlockVector< VectorBlockType >
 
- Public Types inherited from Opm::WellInterface< TypeTag >
enum class  IndividualOrGroup { Individual , Group , Both }
 
using ModelParameters = BlackoilModelParametersEbos< 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 BVector = Dune::BlockVector< VectorBlockType >
 
using Eval = DenseAd::Evaluation< Scalar, Indices::numEq >
 
using RateConverterType = typename WellInterfaceFluidSystem< FluidSystem >::RateConverterType
 
using RatioLimitCheckReport = typename WellInterfaceFluidSystem< FluidSystem >::RatioLimitCheckReport
 
using FluidState = BlackOilFluidState< Eval, FluidSystem, has_temperature, has_energy, Indices::compositionSwitchIdx >=0, has_brine, Indices::numPhases >
 
- Public Types inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > >
using EvalWell = DenseAd::DynamicEvaluation< GetPropType< TypeTag, Properties::Scalar >, numStaticWellEq+Indices::numEq+1 >
 
using Eval = DenseAd::Evaluation< GetPropType< TypeTag, Properties::Scalar >, Indices::numEq >
 
using BVectorWell = typename StandardWellGeneric< GetPropType< TypeTag, Properties::Scalar > >::BVectorWell
 

Public Member Functions

 StandardWell (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)
 
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) override
 
virtual void initPrimaryVariablesEvaluation () const override
 
virtual ConvergenceReport getWellConvergence (const WellState &well_state, const std::vector< double > &B_avg, DeferredLogger &deferred_logger, const bool relax_tolerance=false) const override
 check whether the well equations get converged for this well
 
virtual void apply (const BVector &x, BVector &Ax) const override
 Ax = Ax - C D^-1 B x.
 
virtual void apply (BVector &r) const override
 r = r - C D^-1 Rw
 
virtual void recoverWellSolutionAndUpdateWellState (const BVector &x, WellState &well_state, DeferredLogger &deferred_logger) const override
 using the solution x to recover the solution xw for wells and applying xw to update Well State
 
virtual void computeWellPotentials (const Simulator &ebosSimulator, const WellState &well_state, std::vector< double > &well_potentials, DeferredLogger &deferred_logger) override
 computing the well potentials for group control
 
virtual void updatePrimaryVariables (const WellState &well_state, DeferredLogger &deferred_logger) const override
 
virtual void solveEqAndUpdateWellState (WellState &well_state, DeferredLogger &deferred_logger) override
 
virtual void calculateExplicitQuantities (const Simulator &ebosSimulator, const WellState &well_state, DeferredLogger &deferred_logger) override
 
virtual void updateProductivityIndex (const Simulator &ebosSimulator, const WellProdIndexCalculator &wellPICalc, WellState &well_state, DeferredLogger &deferred_logger) const override
 
virtual void addWellContributions (SparseMatrixAdapter &mat) const override
 
bool iterateWellEqWithControl (const Simulator &ebosSimulator, const double dt, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger) override
 
virtual bool jacobianContainsWellContributions () const override
 Wether the Jacobian will also have well contributions in it.
 
virtual void gasLiftOptimizationStage1 (WellState &well_state, const GroupState &group_state, const Simulator &ebosSimulator, DeferredLogger &deferred_logger, GLiftProdWells &prod_wells, GLiftOptWells &glift_wells, GLiftWellStateMap &state_map, GasLiftGroupInfo &group_info, GLiftSyncGroups &sync_groups) const override
 
double computeWellRatesAndBhpWithThpAlqProd (const Simulator &ebos_simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger, std::vector< double > &potentials, double alq) const
 
void computeWellRatesWithThpAlqProd (const Simulator &ebos_simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger, std::vector< double > &potentials, double alq) const
 
std::optional< double > computeBhpAtThpLimitProdWithAlq (const Simulator &ebos_simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger, double alq_value) const
 
void computeWellRatesWithBhp (const Simulator &ebosSimulator, const double &bhp, std::vector< double > &well_flux, DeferredLogger &deferred_logger) const
 
virtual std::vector< double > computeCurrentWellRates (const Simulator &ebosSimulator, DeferredLogger &deferred_logger) const override
 Compute well rates based on current reservoir conditions and well variables. More...
 
void computeConnLevelProdInd (const FluidState &fs, const std::function< double(const double)> &connPICalc, const std::vector< EvalWell > &mobility, double *connPI) const
 
void computeConnLevelInjInd (const typename StandardWell< TypeTag >::FluidState &fs, const Phase preferred_phase, const std::function< double(const double)> &connIICalc, const std::vector< EvalWell > &mobility, double *connII, DeferredLogger &deferred_logger) const
 
- Public Member Functions inherited from 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)
 Constructor.
 
virtual ~WellInterface ()=default
 Virtual destructor.
 
void assembleWellEq (const Simulator &ebosSimulator, const double dt, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
virtual void updateWellStateWithTarget (const Simulator &ebos_simulator, const GroupState &group_state, WellState &well_state, DeferredLogger &deferred_logger) const
 
bool updateWellControl (const Simulator &ebos_simulator, const IndividualOrGroup iog, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
void addCellRates (RateVector &rates, int cellIdx) const
 
Scalar volumetricSurfaceRateForConnection (int cellIdx, int phaseIdx) const
 
template<class EvalWell >
Eval restrictEval (const EvalWell &in) const
 
void wellTesting (const Simulator &simulator, const double simulation_time, WellState &well_state, const GroupState &group_state, WellTestState &welltest_state, DeferredLogger &deferred_logger)
 
void checkWellOperability (const Simulator &ebos_simulator, const WellState &well_state, DeferredLogger &deferred_logger)
 
void updateWellOperability (const Simulator &ebos_simulator, const WellState &well_state, DeferredLogger &deferred_logger)
 
void updateWellStateRates (const Simulator &ebosSimulator, WellState &well_state, DeferredLogger &deferred_logger) const
 Modify the well_state's rates if there is only one nonzero rate. More...
 
void solveWellEquation (const Simulator &ebosSimulator, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
- Public Member Functions inherited from Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > >
int flowPhaseToEbosCompIdx (const int phaseIdx) const
 
int ebosCompIdxToFlowCompIdx (const unsigned compIdx) const
 
double scalingFactor (const int phaseIdx) const
 
- Public Member Functions inherited from Opm::WellInterfaceFluidSystem< FluidSystem >
void updateWellTestState (const SingleWellState &ws, const double &simulationTime, const bool &writeMessageToOPMLog, WellTestState &wellTestState, DeferredLogger &deferred_logger) const
 
int flowPhaseToEbosPhaseIdx (const int phaseIdx) const
 
const RateConverterTyperateConverter () const
 
- Public Member Functions inherited from 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)
 
const std::vector< PerforationData > & perforationData () const
 Get the perforations of the well.
 
const std::string & name () const
 Well name.
 
bool isInjector () const
 True if the well is an injector.
 
bool isProducer () const
 True if the well is a producer.
 
const std::vector< int > & cells () const
 Well cells.
 
int indexOfWell () const
 Index of well in the wells struct and wellState.
 
const Well & wellEcl () const
 
const PhaseUsagephaseUsage () const
 
bool underPredictionMode () const
 Returns true if the well is currently in prediction mode (i.e. not history mode).
 
bool isOperableAndSolvable () const
 
void initCompletions ()
 
void closeCompletions (const WellTestState &wellTestState)
 
void setVFPProperties (const VFPProperties *vfp_properties_arg)
 
void setGuideRate (const GuideRate *guide_rate_arg)
 
void setWellEfficiencyFactor (const double efficiency_factor)
 
void setRepRadiusPerfLength (const std::vector< int > &cartesian_to_compressed)
 
void setWsolvent (const double wsolvent)
 
void setDynamicThpLimit (const double thp_limit)
 
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.
 
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
 
double getTHPConstraint (const SummaryState &summaryState) const
 
double getALQ (const WellState &well_state) const
 
double wsolvent () const
 
bool isVFPActive (DeferredLogger &deferred_logger) const
 
void reportWellSwitching (const SingleWellState &ws, DeferredLogger &deferred_logger) const
 
- Public Member Functions inherited from Opm::WellInterfaceEval< FluidSystem >
template<class EvalWell >
EvalWell calculateBhpFromThp (const WellState &well_state, const std::vector< EvalWell > &rates, const Well &well, const SummaryState &summaryState, const double rho, DeferredLogger &deferred_logger) const
 
template<class EvalWell >
void getGroupInjectionControl (const Group &group, const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, const InjectorType &injectorType, const EvalWell &bhp, const EvalWell &injection_rate, EvalWell &control_eq, double efficiencyFactor, DeferredLogger &deferred_logger) const
 
template<class EvalWell >
void getGroupProductionControl (const Group &group, const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, const EvalWell &bhp, const std::vector< EvalWell > &rates, EvalWell &control_eq, double efficiencyFactor) const
 
template<class EvalWell , class BhpFromThpFunc >
void assembleControlEqProd (const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, const Well::ProductionControls &controls, const EvalWell &bhp, const std::vector< EvalWell > &rates, BhpFromThpFunc bhp_from_thp, EvalWell &control_eq, DeferredLogger &deferred_logger) const
 
template<class EvalWell >
void assembleControlEqProd_ (const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, const Well::ProductionControls &controls, const EvalWell &bhp, const std::vector< EvalWell > &rates, const std::function< EvalWell()> &bhp_from_thp, EvalWell &control_eq, DeferredLogger &deferred_logger) const
 
template<class EvalWell , class BhpFromThpFunc >
void assembleControlEqInj (const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, const Well::InjectionControls &controls, const EvalWell &bhp, const EvalWell &injection_rate, BhpFromThpFunc bhp_from_thp, EvalWell &control_eq, DeferredLogger &deferred_logger) const
 
template<class EvalWell >
void assembleControlEqInj_ (const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, const Well::InjectionControls &controls, const EvalWell &bhp, const EvalWell &injection_rate, const std::function< EvalWell()> &bhp_from_thp, EvalWell &control_eq, DeferredLogger &deferred_logger) const
 

Static Public Attributes

static constexpr int numWellConservationEq = Indices::numPhases + Indices::numSolvents
 
static constexpr int numWellControlEq = 1
 
static constexpr int numStaticWellEq = numWellConservationEq + numWellControlEq
 
static constexpr int Bhp = numStaticWellEq - numWellControlEq
 
static constexpr bool has_solvent
 
static constexpr bool has_zFraction
 
static constexpr bool has_polymer
 
static constexpr bool has_polymermw
 
static constexpr bool has_foam
 
static constexpr bool has_brine
 
static constexpr bool has_energy
 
static constexpr bool has_micp
 
- Static Public Attributes inherited from Opm::WellInterface< TypeTag >
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_micp = getPropValue<TypeTag, Properties::EnableMICP>()
 
- Static Public Attributes inherited from Opm::WellInterfaceFluidSystem< FluidSystem >
static constexpr int Water = BlackoilPhases::Aqua
 
static constexpr int Oil = BlackoilPhases::Liquid
 
static constexpr int Gas = BlackoilPhases::Vapour
 

Protected Member Functions

Eval getPerfCellPressure (const FluidState &fs) const
 
void recoverSolutionWell (const BVector &x, BVectorWell &xw) const
 
void updateWellState (const BVectorWell &dwells, WellState &well_state, DeferredLogger &deferred_logger) const
 
void computePropertiesForWellConnectionPressures (const Simulator &ebosSimulator, const WellState &well_state, std::vector< double > &b_perf, std::vector< double > &rsmax_perf, std::vector< double > &rvmax_perf, std::vector< double > &surf_dens_perf) const
 
void computeWellConnectionDensitesPressures (const Simulator &ebosSimulator, const WellState &well_state, const std::vector< double > &b_perf, const std::vector< double > &rsmax_perf, const std::vector< double > &rvmax_perf, const std::vector< double > &surf_dens_perf)
 
void computeWellConnectionPressures (const Simulator &ebosSimulator, const WellState &well_state)
 
void computePerfRateEval (const IntensiveQuantities &intQuants, const std::vector< EvalWell > &mob, const EvalWell &bhp, const double Tw, const int perf, const bool allow_cf, std::vector< EvalWell > &cq_s, double &perf_dis_gas_rate, double &perf_vap_oil_rate, DeferredLogger &deferred_logger) const
 
void computePerfRateScalar (const IntensiveQuantities &intQuants, const std::vector< Scalar > &mob, const Scalar &bhp, const double Tw, const int perf, const bool allow_cf, std::vector< Scalar > &cq_s, DeferredLogger &deferred_logger) const
 
template<class Value >
void computePerfRate (const std::vector< Value > &mob, const Value &pressure, const Value &bhp, const Value &rs, const Value &rv, std::vector< Value > &b_perfcells_dense, const double Tw, const int perf, const bool allow_cf, const Value &skin_pressure, const std::vector< Value > &cmix_s, std::vector< Value > &cq_s, double &perf_dis_gas_rate, double &perf_vap_oil_rate, DeferredLogger &deferred_logger) const
 
void computeWellRatesWithBhpIterations (const Simulator &ebosSimulator, const double &bhp, std::vector< double > &well_flux, DeferredLogger &deferred_logger) const
 
std::vector< double > computeWellPotentialWithTHP (const Simulator &ebosSimulator, DeferredLogger &deferred_logger, const WellState &well_state) const
 
virtual double getRefDensity () const override
 
void getMobilityEval (const Simulator &ebosSimulator, const int perf, std::vector< EvalWell > &mob, DeferredLogger &deferred_logger) const
 
void getMobilityScalar (const Simulator &ebosSimulator, const int perf, std::vector< Scalar > &mob, DeferredLogger &deferred_logger) const
 
void updateWaterMobilityWithPolymer (const Simulator &ebos_simulator, const int perf, std::vector< EvalWell > &mob_water, DeferredLogger &deferred_logger) const
 
void updatePrimaryVariablesNewton (const BVectorWell &dwells, const WellState &well_state, DeferredLogger &deferred_logger) const
 
void updateExtraPrimaryVariables (const BVectorWell &dwells) const
 
void updateWellStateFromPrimaryVariables (WellState &well_state, DeferredLogger &deferred_logger) const
 
virtual void assembleWellEqWithoutIteration (const Simulator &ebosSimulator, const double dt, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger) override
 
void assembleWellEqWithoutIterationImpl (const Simulator &ebosSimulator, const double dt, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
void calculateSinglePerf (const Simulator &ebosSimulator, const int perf, WellState &well_state, std::vector< RateVector > &connectionRates, std::vector< EvalWell > &cq_s, EvalWell &water_flux_s, EvalWell &cq_s_zfrac_effective, DeferredLogger &deferred_logger) const
 
virtual void checkOperabilityUnderBHPLimitProducer (const WellState &well_state, const Simulator &ebos_simulator, DeferredLogger &deferred_logger) override
 
virtual void checkOperabilityUnderTHPLimitProducer (const Simulator &ebos_simulator, const WellState &well_state, DeferredLogger &deferred_logger) override
 
virtual void updateIPR (const Simulator &ebos_simulator, DeferredLogger &deferred_logger) const override
 
bool allDrawDownWrongDirection (const Simulator &ebos_simulator) const
 
bool canProduceInjectWithCurrentBhp (const Simulator &ebos_simulator, const WellState &well_state, DeferredLogger &deferred_logger)
 
bool openCrossFlowAvoidSingularity (const Simulator &ebos_simulator) const
 
EvalWell pskin (const double throuhgput, const EvalWell &water_velocity, const EvalWell &poly_inj_conc, DeferredLogger &deferred_logger) const
 
EvalWell pskinwater (const double throughput, const EvalWell &water_velocity, DeferredLogger &deferred_logger) const
 
EvalWell wpolymermw (const double throughput, const EvalWell &water_velocity, DeferredLogger &deferred_logger) const
 
void handleInjectivityRate (const Simulator &ebosSimulator, const int perf, std::vector< EvalWell > &cq_s) const
 
void handleInjectivityEquations (const Simulator &ebosSimulator, const WellState &well_state, const int perf, const EvalWell &water_flux_s, DeferredLogger &deferred_logger)
 
virtual void updateWaterThroughput (const double dt, WellState &well_state) const override
 
void checkConvergenceExtraEqs (const std::vector< double > &res, ConvergenceReport &report) const
 
void updateConnectionRatePolyMW (const EvalWell &cq_s_poly, const IntensiveQuantities &int_quants, const WellState &well_state, const int perf, std::vector< RateVector > &connectionRates, DeferredLogger &deferred_logger) const
 
std::optional< double > computeBhpAtThpLimitProd (const WellState &well_state, const Simulator &ebos_simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger) const
 
std::optional< double > computeBhpAtThpLimitInj (const Simulator &ebos_simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger) const
 
- Protected Member Functions inherited from Opm::WellInterface< TypeTag >
double wpolymer () const
 
double wfoam () const
 
double wsalt () const
 
double wmicrobes () const
 
double woxygen () const
 
double wurea () const
 
const std::vector< double > & compFrac () const
 
std::vector< double > initialWellRateFractions (const Simulator &ebosSimulator, const WellState &well_state) const
 
bool iterateWellEquations (const Simulator &ebosSimulator, const double dt, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
bool solveWellForTesting (const Simulator &ebosSimulator, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
bool shutUnsolvableWells () const
 
- Protected Member Functions inherited from Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > >
 WellInterfaceIndices (const Well &well, const ParallelWellInfo &parallel_well_info, const int time_step, const typename WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::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)
 
- Protected Member Functions inherited from Opm::WellInterfaceFluidSystem< FluidSystem >
 WellInterfaceFluidSystem (const Well &well, const ParallelWellInfo &parallel_well_info, const int time_step, 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)
 
void calculateReservoirRates (SingleWellState &ws) const
 
bool checkIndividualConstraints (SingleWellState &ws, const SummaryState &summaryState) const
 
Well::InjectorCMode activeInjectionConstraint (const SingleWellState &ws, const SummaryState &summaryState) const
 
Well::ProducerCMode activeProductionConstraint (const SingleWellState &ws, const SummaryState &summaryState) const
 
std::pair< bool, double > checkGroupConstraintsInj (const Group &group, const WellState &well_state, const GroupState &group_state, const double efficiencyFactor, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger) const
 
std::pair< bool, double > checkGroupConstraintsProd (const Group &group, const WellState &well_state, const GroupState &group_state, const double efficiencyFactor, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger) const
 
bool checkGroupConstraints (WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger) const
 
bool checkConstraints (WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger) const
 
bool checkRateEconLimits (const WellEconProductionLimits &econ_production_limits, const double *rates_or_potentials, Opm::DeferredLogger &deferred_logger) const
 
void checkMaxWaterCutLimit (const WellEconProductionLimits &econ_production_limits, const SingleWellState &ws, RatioLimitCheckReport &report) const
 
void checkMaxGORLimit (const WellEconProductionLimits &econ_production_limits, const SingleWellState &ws, RatioLimitCheckReport &report) const
 
void checkMaxWGRLimit (const WellEconProductionLimits &econ_production_limits, const SingleWellState &ws, RatioLimitCheckReport &report) const
 
void checkRatioEconLimits (const WellEconProductionLimits &econ_production_limits, const SingleWellState &ws, RatioLimitCheckReport &report, DeferredLogger &deferred_logger) const
 
void updateWellTestStateEconomic (const SingleWellState &ws, const double simulation_time, const bool write_message_to_opmlog, WellTestState &well_test_state, DeferredLogger &deferred_logger) const
 
std::optional< double > getGroupInjectionTargetRate (const Group &group, const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, const InjectorType &injectorType, double efficiencyFactor, DeferredLogger &deferred_logger) const
 
double getGroupProductionTargetRate (const Group &group, const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, double efficiencyFactor) const
 
- Protected Member Functions inherited from Opm::WellInterfaceGeneric
bool getAllowCrossFlow () const
 
double mostStrictBhpFromBhpLimits (const SummaryState &summaryState) const
 
void updateWellTestStatePhysical (const double simulation_time, const bool write_message_to_opmlog, WellTestState &well_test_state, DeferredLogger &deferred_logger) const
 
- Protected Member Functions inherited from Opm::WellInterfaceEval< FluidSystem >
 WellInterfaceEval (const WellInterfaceFluidSystem< FluidSystem > &baseif)
 
- Protected Member Functions inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > >
 StandardWellEval (const WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > > &baseif)
 
void initPrimaryVariablesEvaluation () const
 
const EvalWell & getBhp () const
 
const EvalWell & getWQTotal () const
 
EvalWell extendEval (const Eval &in) const
 
EvalWell getQs (const int compIdx) const
 
EvalWell wellSurfaceVolumeFraction (const int compIdx) const
 
EvalWell wellVolumeFraction (const unsigned compIdx) const
 
EvalWell wellVolumeFractionScaled (const int phase) const
 
void assembleControlEq (const WellState &well_state, const GroupState &group_state, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger)
 
void computeAccumWell ()
 
void computeConnectionDensities (const std::vector< double > &perfComponentRates, const std::vector< double > &b_perf, const std::vector< double > &rsmax_perf, const std::vector< double > &rvmax_perf, const std::vector< double > &surf_dens_perf)
 
ConvergenceReport getWellConvergence (const WellState &well_state, const std::vector< double > &B_avg, const double maxResidualAllowed, const double tol_wells, const double relaxed_tolerance_flow, const bool relax_tolerance, std::vector< double > &res, DeferredLogger &deferred_logger) const
 
void init (std::vector< double > &perf_depth, const std::vector< double > &depth_arg, const int num_cells, const bool has_polymermw)
 
void processFractions () const
 
void updatePrimaryVariables (const WellState &well_state, DeferredLogger &deferred_logger) const
 
void updatePrimaryVariablesPolyMW (const BVectorWell &dwells) const
 
void updateWellStateFromPrimaryVariables (WellState &well_state, DeferredLogger &deferred_logger) const
 
void updatePrimaryVariablesNewton (const BVectorWell &dwells, const double dFLimit, const double dBHPLimit) const
 
void updateWellStateFromPrimaryVariablesPolyMW (WellState &well_state) const
 
void updateThp (WellState &well_state, DeferredLogger &deferred_logger) const
 
- Protected Member Functions inherited from Opm::StandardWellGeneric< Scalar >
 StandardWellGeneric (int Bhp, const WellInterfaceGeneric &baseif)
 
double calculateThpFromBhp (const WellState &well_state, const std::vector< double > &rates, const double bhp, DeferredLogger &deferred_logger) const
 
void checkConvergenceControlEq (const WellState &well_state, ConvergenceReport &report, DeferredLogger &deferred_logger, const double max_residual_allowed) const
 
void checkConvergencePolyMW (const std::vector< double > &res, ConvergenceReport &report, const double maxResidualAllowed) const
 
void computeConnectionPressureDelta ()
 
std::optional< double > computeBhpAtThpLimitInj (const std::function< std::vector< double >(const double)> &frates, const SummaryState &summary_state, DeferredLogger &deferred_logger) const
 
std::optional< double > computeBhpAtThpLimitProdWithAlq (const std::function< std::vector< double >(const double)> &frates, const SummaryState &summary_state, DeferredLogger &deferred_logger, double alq_value) const
 
void gliftDebug (const std::string &msg, DeferredLogger &deferred_logger) const
 
bool checkGliftNewtonIterationIdxOk (const int report_step_idx, const int iteration_idx, const Schedule &schedule, DeferredLogger &deferred_logger) const
 
bool doGasLiftOptimize (const WellState &well_state, const int report_step_idx, const int iteration_idx, const Schedule &schedule, DeferredLogger &deferred_logger) const
 
double getRho () const
 

Additional Inherited Members

- Protected Types inherited from Opm::WellInterfaceFluidSystem< FluidSystem >
using RateConverterType = RateConverter::SurfaceToReservoirVoidage< FluidSystem, std::vector< int > >
 
- Protected Types inherited from Opm::StandardWellGeneric< Scalar >
using VectorBlockWellType = Dune::DynamicVector< Scalar >
 
using BVectorWell = Dune::BlockVector< VectorBlockWellType >
 
using DiagMatrixBlockWellType = Dune::DynamicMatrix< Scalar >
 
using DiagMatWell = Dune::BCRSMatrix< DiagMatrixBlockWellType >
 
using OffDiagMatrixBlockWellType = Dune::DynamicMatrix< Scalar >
 
using OffDiagMatWell = Dune::BCRSMatrix< OffDiagMatrixBlockWellType >
 
- Static Protected Member Functions inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > >
static double relaxationFactorFractionsProducer (const std::vector< double > &primary_variables, const BVectorWell &dwells)
 
- Static Protected Member Functions inherited from Opm::StandardWellGeneric< Scalar >
static double relaxationFactorRate (const std::vector< double > &primary_variables, const BVectorWell &dwells)
 
static double relaxationFactorFraction (const double old_value, const double dx)
 
- Protected Attributes inherited from Opm::WellInterface< TypeTag >
const ModelParametersparam_
 
std::vector< RateVector > connectionRates_
 
std::vector< Scalar > B_avg_
 
bool changed_to_stopped_this_step_ = false
 
- Protected Attributes inherited from Opm::WellInterfaceFluidSystem< FluidSystem >
const RateConverterTyperateConverter_
 
- Protected Attributes inherited from Opm::WellInterfaceGeneric
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_
 
double well_efficiency_factor_
 
const VFPPropertiesvfp_properties_
 
const GuideRate * guide_rate_
 
std::vector< std::string > well_control_log_
 
- Protected Attributes inherited from Opm::WellInterfaceEval< FluidSystem >
const WellInterfaceFluidSystem< FluidSystem > & baseif_
 
- Protected Attributes inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > >
const WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > > & baseif_
 
int numWellEq_
 
std::vector< double > primary_variables_
 
std::vector< EvalWell > primary_variables_evaluation_
 
std::vector< double > F0_
 
- Protected Attributes inherited from Opm::StandardWellGeneric< Scalar >
const WellInterfaceGenericbaseif_
 
BVectorWell resWell_
 
std::vector< double > perf_densities_
 
std::vector< double > perf_pressure_diffs_
 
bool glift_debug = false
 
bool glift_optimize_only_thp_wells = true
 
OffDiagMatWell duneB_
 
OffDiagMatWell duneC_
 
DiagMatWell invDuneD_
 
wellhelpers::ParallelStandardWellB< Scalar > parallelB_
 
BVectorWell Bx_
 
BVectorWell invDrw_
 
- Static Protected Attributes inherited from Opm::WellInterfaceFluidSystem< FluidSystem >
static constexpr int INVALIDCOMPLETION = std::numeric_limits<int>::max()
 
- Static Protected Attributes inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices >, GetPropType< TypeTag, Properties::Scalar > >
static constexpr int numWellConservationEq
 
static constexpr int numWellControlEq
 
static constexpr int numStaticWellEq
 
static constexpr int Bhp
 
static const int WQTotal
 
static const bool waterEnabled
 
static const bool gasEnabled
 
static const bool oilEnabled
 
static constexpr bool has_wfrac_variable
 
static constexpr bool has_gfrac_variable
 
static constexpr int WFrac
 
static constexpr int GFrac
 
static constexpr int SFrac
 

Member Function Documentation

◆ computeCurrentWellRates()

template<typename TypeTag >
std::vector< double > Opm::StandardWell< TypeTag >::computeCurrentWellRates ( const Simulator &  ebosSimulator,
DeferredLogger deferred_logger 
) const
overridevirtual

Compute well rates based on current reservoir conditions and well variables.

Used in updateWellStateRates().

Implements Opm::WellInterface< TypeTag >.


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