My Project
Loading...
Searching...
No Matches
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 > > Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > > Opm::WellInterfaceFluidSystem< FluidSystem > Opm::WellInterfaceGeneric

Public Types

using Base = WellInterface< TypeTag >
 
using StdWellEval = StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
 
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 = BlackoilModelParameters< 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_watVapor, has_brine, has_saltPrecip, has_disgas_in_water, Indices::numPhases >
 
using RateVector = GetPropType< TypeTag, Properties::RateVector >
 
using PressureMatrix = Dune::BCRSMatrix< Opm::MatrixBlock< double, 1, 1 > >
 
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 = 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 Types inherited from Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
using Scalar = typename FluidSystem::Scalar
 
using Eval = DenseAd::Evaluation< Scalar, Indices::numEq >
 
- Public Types inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
using EvalWell = typename PrimaryVariables::EvalWell
 
using Eval = DenseAd::Evaluation< Scalar, Indices::numEq >
 
using BVectorWell = typename StandardWellEquations< Scalar, Indices::numEq >::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, const bool changed_to_open_this_step) override
 
void initPrimaryVariablesEvaluation () override
 
virtual ConvergenceReport getWellConvergence (const SummaryState &summary_state, const WellState &well_state, const std::vector< double > &B_avg, DeferredLogger &deferred_logger, const bool relax_tolerance) 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
 
void recoverWellSolutionAndUpdateWellState (const SummaryState &summary_state, const BVector &x, WellState &well_state, DeferredLogger &deferred_logger) override
 using the solution x to recover the solution xw for wells and applying xw to update Well State
 
virtual void computeWellPotentials (const Simulator &simulator, const WellState &well_state, std::vector< double > &well_potentials, DeferredLogger &deferred_logger) override
 computing the well potentials for group control
 
void updatePrimaryVariables (const SummaryState &summary_state, const WellState &well_state, DeferredLogger &deferred_logger) override
 
virtual void solveEqAndUpdateWellState (const SummaryState &summary_state, WellState &well_state, DeferredLogger &deferred_logger) override
 
virtual void calculateExplicitQuantities (const Simulator &simulator, const WellState &well_state, DeferredLogger &deferred_logger) override
 
virtual void updateProductivityIndex (const Simulator &simulator, const WellProdIndexCalculator &wellPICalc, WellState &well_state, DeferredLogger &deferred_logger) const override
 
virtual double connectionDensity (const int globalConnIdx, const int openConnIdx) const override
 
virtual void addWellContributions (SparseMatrixAdapter &mat) const override
 
virtual void addWellPressureEquations (PressureMatrix &mat, const BVector &x, const int pressureVarIndex, const bool use_well_weights, const WellState &well_state) const override
 
bool iterateWellEqWithControl (const Simulator &simulator, const double dt, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger) override
 
bool iterateWellEqWithSwitching (const Simulator &simulator, const double dt, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger, const bool fixed_control=false, const bool fixed_status=false) override
 
virtual bool jacobianContainsWellContributions () const override
 Wether the Jacobian will also have well contributions in it.
 
double computeWellRatesAndBhpWithThpAlqProd (const Simulator &simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger, std::vector< double > &potentials, double alq) const
 
void computeWellRatesWithThpAlqProd (const Simulator &simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger, std::vector< double > &potentials, double alq) const
 
std::optional< double > computeBhpAtThpLimitProdWithAlq (const Simulator &simulator, const SummaryState &summary_state, const double alq_value, DeferredLogger &deferred_logger) const override
 
void updateIPRImplicit (const Simulator &simulator, WellState &well_state, DeferredLogger &deferred_logger) override
 
virtual void computeWellRatesWithBhp (const Simulator &simulator, const double &bhp, std::vector< double > &well_flux, DeferredLogger &deferred_logger) const override
 
std::vector< double > computeCurrentWellRates (const Simulator &simulator, DeferredLogger &deferred_logger) const override
 Compute well rates based on current reservoir conditions and well variables.
 
std::vector< double > getPrimaryVars () const override
 
int setPrimaryVars (std::vector< double >::const_iterator it) override
 
- 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.
 
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)
 
void assembleWellEq (const Simulator &simulator, const double dt, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
void assembleWellEqWithoutIteration (const Simulator &simulator, const double dt, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
void prepareWellBeforeAssembling (const Simulator &simulator, const double dt, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
virtual void updateWellStateWithTarget (const Simulator &simulator, const GroupState &group_state, WellState &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 &well_state, DeferredLogger &deferred_logger) const
 
bool updateWellControl (const Simulator &simulator, const IndividualOrGroup iog, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
bool updateWellControlAndStatusLocalIteration (const Simulator &simulator, WellState &well_state, const GroupState &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)
 
void addCellRates (RateVector &rates, int cellIdx) const
 
Scalar volumetricSurfaceRateForConnection (int cellIdx, int phaseIdx) 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 &simulator, const WellState &well_state, DeferredLogger &deferred_logger)
 
bool gliftBeginTimeStepWellTestIterateWellEquations (const Simulator &simulator, const double dt, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
void gliftBeginTimeStepWellTestUpdateALQ (const Simulator &simulator, WellState &well_state, DeferredLogger &deferred_logger)
 
void updateWellOperability (const Simulator &simulator, const WellState &well_state, DeferredLogger &deferred_logger)
 
bool updateWellOperabilityFromWellEq (const Simulator &simulator, const WellState &well_state, DeferredLogger &deferred_logger)
 
void updateWellStateRates (const Simulator &simulator, WellState &well_state, DeferredLogger &deferred_logger) const
 Modify the well_state's rates if there is only one nonzero rate.
 
void solveWellEquation (const Simulator &simulator, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
const std::vector< RateVector > & connectionRates () const
 
std::vector< double > wellIndex (const int perf, const IntensiveQuantities &intQuants, const double trans_mult, const SingleWellState &ws) const
 
void updateConnectionDFactor (const Simulator &simulator, SingleWellState &ws) const
 
void updateConnectionTransmissibilityFactor (const Simulator &simulator, SingleWellState &ws) const
 
- Public Member Functions inherited from Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
int flowPhaseToModelCompIdx (const int phaseIdx) const
 
int modelCompIdxToFlowCompIdx (const unsigned compIdx) const
 
double scalingFactor (const int phaseIdx) const
 
Eval restrictEval (const EvalWell &in) const
 
- Public Member Functions inherited from Opm::WellInterfaceFluidSystem< FluidSystem >
int flowPhaseToModelPhaseIdx (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.
 
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).
 
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 &well_state, const WellState &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.
 
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 &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 &ws, DeferredLogger &deferred_logger) const
 
bool changedToOpenThisStep () const
 
void updateWellTestState (const SingleWellState &ws, const double &simulationTime, const bool &writeMessageToOPMLog, WellTestState &wellTestState, DeferredLogger &deferred_logger) const
 
bool isPressureControlled (const WellState &well_state) const
 
bool stopppedOrZeroRateTarget (const SummaryState &summary_state, const WellState &well_state) const
 
double wellEfficiencyFactor () const
 
void updateFilterCakeMultipliers (const std::vector< double > &inj_fc_multiplier)
 Update filter cake multipliers.
 
void resetWellOperability ()
 
- Public Member Functions inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
const StandardWellEquations< Scalar, Indices::numEq > & linSys () const
 Returns a const reference to equation system.
 

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_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 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 Types

using WellConnectionProps = typename StdWellEval::StdWellConnections::Properties
 
- Protected Types inherited from Opm::WellInterfaceFluidSystem< FluidSystem >
using RateConverterType = RateConverter::SurfaceToReservoirVoidage< FluidSystem, std::vector< int > >
 
- Protected Types inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
using Scalar = typename FluidSystem::Scalar
 
using PrimaryVariables = StandardWellPrimaryVariables< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
 
using StdWellConnections = StandardWellConnections< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
 

Protected Member Functions

void updateWellState (const SummaryState &summary_state, const BVectorWell &dwells, WellState &well_state, DeferredLogger &deferred_logger)
 
void computePropertiesForWellConnectionPressures (const Simulator &simulator, const WellState &well_state, WellConnectionProps &props) const
 
void computeWellConnectionDensitesPressures (const Simulator &simulator, const WellState &well_state, const WellConnectionProps &props, DeferredLogger &deferred_logger)
 
void computeWellConnectionPressures (const Simulator &simulator, const WellState &well_state, DeferredLogger &deferred_logger)
 
template<class Value >
void computePerfRate (const IntensiveQuantities &intQuants, const std::vector< Value > &mob, const Value &bhp, const std::vector< Scalar > &Tw, const int perf, const bool allow_cf, std::vector< Value > &cq_s, PerforationRates &perf_rates, 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, const Value &rvw, const Value &rsw, std::vector< Value > &b_perfcells_dense, const std::vector< Scalar > &Tw, const int perf, const bool allow_cf, const Value &skin_pressure, const std::vector< Value > &cmix_s, std::vector< Value > &cq_s, PerforationRates &perf_rates, DeferredLogger &deferred_logger) const
 
void computeWellRatesWithBhpIterations (const Simulator &simulator, const double &bhp, std::vector< double > &well_flux, DeferredLogger &deferred_logger) const override
 
std::vector< double > computeWellPotentialWithTHP (const Simulator &simulator, DeferredLogger &deferred_logger, const WellState &well_state) const
 
bool computeWellPotentialsImplicit (const Simulator &simulator, std::vector< double > &well_potentials, DeferredLogger &deferred_logger) const
 
virtual double getRefDensity () const override
 
template<class Value >
void getMobility (const Simulator &simulator, const int perf, std::vector< Value > &mob, DeferredLogger &deferred_logger) const
 
void updateWaterMobilityWithPolymer (const Simulator &simulator, const int perf, std::vector< EvalWell > &mob_water, DeferredLogger &deferred_logger) const
 
void updatePrimaryVariablesNewton (const BVectorWell &dwells, const bool stop_or_zero_rate_target, DeferredLogger &deferred_logger)
 
void updateWellStateFromPrimaryVariables (const bool stop_or_zero_rate_target, WellState &well_state, const SummaryState &summary_state, DeferredLogger &deferred_logger) const
 
virtual void assembleWellEqWithoutIteration (const Simulator &simulator, 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 &simulator, const double dt, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
void calculateSinglePerf (const Simulator &simulator, 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
 
void checkOperabilityUnderBHPLimit (const WellState &well_state, const Simulator &simulator, DeferredLogger &deferred_logger) override
 
void checkOperabilityUnderTHPLimit (const Simulator &simulator, const WellState &well_state, DeferredLogger &deferred_logger) override
 
void updateIPR (const Simulator &simulator, DeferredLogger &deferred_logger) const override
 
bool allDrawDownWrongDirection (const Simulator &simulator) const
 
bool canProduceInjectWithCurrentBhp (const Simulator &simulator, const WellState &well_state, DeferredLogger &deferred_logger)
 
bool openCrossFlowAvoidSingularity (const Simulator &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 &simulator, const int perf, std::vector< EvalWell > &cq_s) const
 
void handleInjectivityEquations (const Simulator &simulator, 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 &simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger) const
 
std::optional< double > computeBhpAtThpLimitInj (const Simulator &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 &simulator, const WellState &well_state) const
 
virtual void assembleWellEqWithoutIteration (const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)=0
 
virtual bool iterateWellEqWithControl (const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)=0
 
virtual bool iterateWellEqWithSwitching (const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger, const bool fixed_control=false, const bool fixed_status=false)=0
 
bool iterateWellEquations (const Simulator &simulator, const double dt, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
bool solveWellWithTHPConstraint (const Simulator &simulator, const double dt, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, WellState &well_state, const GroupState &group_state, DeferredLogger &deferred_logger)
 
std::optional< double > estimateOperableBhp (const Simulator &simulator, const double dt, WellState &well_state, const SummaryState &summary_state, DeferredLogger &deferred_logger)
 
bool solveWellWithBhp (const Simulator &simulator, const double dt, const double bhp, WellState &well_state, DeferredLogger &deferred_logger)
 
bool solveWellWithZeroRate (const Simulator &simulator, const double dt, WellState &well_state, DeferredLogger &deferred_logger)
 
bool solveWellForTesting (const Simulator &simulator, WellState &well_state, const GroupState &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 &ws) const
 
- Protected Member Functions inherited from Opm::WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
 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, 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 &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
 
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, DeferredLogger &deferred_logger) const
 
- Protected Member Functions inherited from Opm::WellInterfaceGeneric
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 &well_state) const
 
std::pair< bool, bool > computeWellPotentials (std::vector< double > &well_potentials, const WellState &well_state)
 
void checkNegativeWellPotentials (std::vector< double > &well_potentials, const bool checkOperability, DeferredLogger &deferred_logger)
 
void prepareForPotentialCalculations (const SummaryState &summary_state, WellState &well_state, Well::InjectionControls &inj_controls, Well::ProductionControls &prod_controls) const
 
- Protected Member Functions inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
 StandardWellEval (const WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > > &baseif)
 
EvalWell extendEval (const Eval &in) const
 
void computeAccumWell ()
 
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, const bool well_is_stopped, 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 updateWellStateFromPrimaryVariables (const bool stop_or_zero_rate_target, WellState &well_state, const SummaryState &summary_state, DeferredLogger &deferred_logger) const
 

Protected Attributes

bool regularize_
 
- 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
 
bool thp_update_iterations = 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_
 
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
 
- Protected Attributes inherited from Opm::StandardWellEval< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > >
const WellInterfaceIndices< GetPropType< TypeTag, Properties::FluidSystem >, GetPropType< TypeTag, Properties::Indices > > & baseif_
 
PrimaryVariables primary_variables_
 Primary variables for well.
 
std::vector< double > F0_
 
StandardWellEquations< Scalar, Indices::numEq > linSys_
 Linear equation system.
 
StdWellConnections connections_
 Connection level values.
 

Additional Inherited Members

- 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 > >
static constexpr int Bhp
 
static constexpr int WQTotal
 
static constexpr int numWellConservationEq
 
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

◆ addWellContributions()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::addWellContributions ( SparseMatrixAdapter &  mat) const
overridevirtual

◆ addWellPressureEquations()

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

◆ apply() [1/2]

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::apply ( BVector &  r) const
overridevirtual

r = r - C D^-1 Rw

Implements Opm::WellInterface< TypeTag >.

◆ apply() [2/2]

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::apply ( const BVector &  x,
BVector &  Ax 
) const
overridevirtual

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

Implements Opm::WellInterface< TypeTag >.

◆ calculateExplicitQuantities()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::calculateExplicitQuantities ( const Simulator &  simulator,
const WellState well_state,
DeferredLogger deferred_logger 
)
overridevirtual

◆ checkOperabilityUnderBHPLimit()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::checkOperabilityUnderBHPLimit ( const WellState well_state,
const Simulator &  simulator,
DeferredLogger deferred_logger 
)
overrideprotectedvirtual

◆ checkOperabilityUnderTHPLimit()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::checkOperabilityUnderTHPLimit ( const Simulator &  simulator,
const WellState well_state,
DeferredLogger deferred_logger 
)
overrideprotectedvirtual

◆ computeBhpAtThpLimitProdWithAlq()

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

◆ computeCurrentWellRates()

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

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

Used in updateWellStateRates().

Implements Opm::WellInterface< TypeTag >.

◆ computeWellPotentials()

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

computing the well potentials for group control

Implements Opm::WellInterface< TypeTag >.

◆ computeWellRatesWithBhp()

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

◆ connectionDensity()

template<typename TypeTag >
double Opm::StandardWell< TypeTag >::connectionDensity ( const int  globalConnIdx,
const int  openConnIdx 
) const
overridevirtual

◆ getPrimaryVars()

template<typename TypeTag >
std::vector< double > Opm::StandardWell< TypeTag >::getPrimaryVars ( ) const
overridevirtual

Reimplemented from Opm::WellInterface< TypeTag >.

◆ getRefDensity()

template<typename TypeTag >
double Opm::StandardWell< TypeTag >::getRefDensity ( ) const
overrideprotectedvirtual

◆ getWellConvergence()

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

check whether the well equations get converged for this well

Implements Opm::WellInterface< TypeTag >.

◆ initPrimaryVariablesEvaluation()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::initPrimaryVariablesEvaluation ( )
overridevirtual

◆ jacobianContainsWellContributions()

template<typename TypeTag >
virtual bool Opm::StandardWell< TypeTag >::jacobianContainsWellContributions ( ) const
inlineoverridevirtual

Wether the Jacobian will also have well contributions in it.

Reimplemented from Opm::WellInterface< TypeTag >.

◆ recoverWellSolutionAndUpdateWellState()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::recoverWellSolutionAndUpdateWellState ( const SummaryState &  summary_state,
const BVector &  x,
WellState well_state,
DeferredLogger deferred_logger 
)
overridevirtual

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

Implements Opm::WellInterface< TypeTag >.

◆ setPrimaryVars()

template<typename TypeTag >
int Opm::StandardWell< TypeTag >::setPrimaryVars ( std::vector< double >::const_iterator  it)
overridevirtual

Reimplemented from Opm::WellInterface< TypeTag >.

◆ solveEqAndUpdateWellState()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::solveEqAndUpdateWellState ( const SummaryState &  summary_state,
WellState well_state,
DeferredLogger deferred_logger 
)
overridevirtual

◆ updateIPR()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::updateIPR ( const Simulator &  simulator,
DeferredLogger deferred_logger 
) const
overrideprotectedvirtual

◆ updateIPRImplicit()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::updateIPRImplicit ( const Simulator &  simulator,
WellState well_state,
DeferredLogger deferred_logger 
)
overridevirtual

◆ updatePrimaryVariables()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::updatePrimaryVariables ( const SummaryState &  summary_state,
const WellState well_state,
DeferredLogger deferred_logger 
)
overridevirtual

◆ updateProductivityIndex()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::updateProductivityIndex ( const Simulator &  simulator,
const WellProdIndexCalculator wellPICalc,
WellState well_state,
DeferredLogger deferred_logger 
) const
overridevirtual

◆ updateWaterThroughput()

template<typename TypeTag >
void Opm::StandardWell< TypeTag >::updateWaterThroughput ( const double  dt,
WellState well_state 
) const
overrideprotectedvirtual

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