|
enum class | IndividualOrGroup { Individual
, Group
, Both
} |
|
using | Grid = GetPropType< TypeTag, Properties::Grid > |
|
using | Simulator = GetPropType< TypeTag, Properties::Simulator > |
|
using | Scalar = GetPropType< TypeTag, Properties::Scalar > |
|
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< Scalar >::GLiftSyncGroups |
|
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< Scalar, 1, 1 > > |
|
using | RateConverterType = typename WellInterfaceFluidSystem< FluidSystem >::RateConverterType |
|
using | ModelParameters = typename Base::ModelParameters |
|
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 | Scalar = typename FluidSystem::Scalar |
|
using | Eval = DenseAd::Evaluation< Scalar, Indices::numEq > |
|
using | ModelParameters = typename WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::ModelParameters |
|
using | Scalar = typename FluidSystem::Scalar |
|
using | ModelParameters = typename WellInterfaceGeneric< Scalar >::ModelParameters |
|
using | ModelParameters = BlackoilModelParameters< FluidSystem::Scalar > |
|
|
| WellInterface (const Well &well, const ParallelWellInfo< Scalar > &pw_info, const int time_step, const ModelParameters ¶m, const RateConverterType &rate_converter, const int pvtRegionIdx, const int num_components, const int num_phases, const int index_of_well, const std::vector< PerforationData< Scalar > > &perf_data) |
| Constructor.
|
|
virtual | ~WellInterface ()=default |
| Virtual destructor.
|
|
virtual void | init (const PhaseUsage *phase_usage_arg, const std::vector< Scalar > &depth_arg, const Scalar gravity_arg, const std::vector< Scalar > &B_avg, const bool changed_to_open_this_step) |
|
virtual void | initPrimaryVariablesEvaluation ()=0 |
|
virtual ConvergenceReport | getWellConvergence (const Simulator &simulator, const WellState< Scalar > &well_state, const std::vector< Scalar > &B_avg, DeferredLogger &deferred_logger, const bool relax_tolerance) const =0 |
|
virtual void | solveEqAndUpdateWellState (const Simulator &simulator, 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 &ebosSimulator, const Scalar &bhp, std::vector< Scalar > &well_flux, DeferredLogger &deferred_logger) const =0 |
|
virtual std::optional< Scalar > | computeBhpAtThpLimitProdWithAlq (const Simulator &ebos_simulator, const SummaryState &summary_state, const Scalar alq_value, DeferredLogger &deferred_logger) const =0 |
|
virtual void | recoverWellSolutionAndUpdateWellState (const Simulator &simulator, const BVector &x, WellState< Scalar > &well_state, DeferredLogger &deferred_logger)=0 |
| using the solution x to recover the solution xw for wells and applying xw to update Well State
|
|
virtual void | apply (const BVector &x, BVector &Ax) const =0 |
| Ax = Ax - C D^-1 B x.
|
|
virtual void | apply (BVector &r) const =0 |
| r = r - C D^-1 Rw
|
|
virtual void | computeWellPotentials (const Simulator &simulator, const WellState< Scalar > &well_state, std::vector< Scalar > &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< Scalar > &well_flux, DeferredLogger &deferred_logger) const =0 |
|
bool | wellUnderZeroRateTarget (const Simulator &simulator, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger) const |
|
bool | wellUnderZeroGroupRateTarget (const Simulator &simulator, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger, std::optional< bool > group_control=std::nullopt) const |
|
bool | stoppedOrZeroRateTarget (const Simulator &simulator, const WellState< Scalar > &well_state, DeferredLogger &deferred_logger) const |
|
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 Scalar WQTotal, DeferredLogger &deferred_logger, const bool fixed_control=false, const bool fixed_status=false) |
|
virtual void | updatePrimaryVariables (const Simulator &simulator, 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< Scalar > &wellPICalc, WellState< Scalar > &well_state, DeferredLogger &deferred_logger) const =0 |
|
virtual Scalar | connectionDensity (const int globalConnIdx, const int openConnIdx) const =0 |
|
virtual bool | jacobianContainsWellContributions () const |
| Wether the Jacobian will also have well contributions in it.
|
|
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 &ebos_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< Scalar > | computeCurrentWellRates (const Simulator &simulator, DeferredLogger &deferred_logger) const =0 |
| Compute well rates based on current reservoir conditions and well variables.
|
|
void | 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.
|
|
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< Scalar > | getPrimaryVars () const |
|
virtual int | setPrimaryVars (typename std::vector< Scalar >::const_iterator) |
|
std::vector< Scalar > | wellIndex (const int perf, const IntensiveQuantities &intQuants, const Scalar trans_mult, const SingleWellState< Scalar > &ws) const |
|
void | updateConnectionDFactor (const Simulator &simulator, SingleWellState< Scalar > &ws) const |
|
void | updateConnectionTransmissibilityFactor (const Simulator &simulator, SingleWellState< Scalar > &ws) const |
|
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 |
|
int | flowPhaseToModelCompIdx (const int phaseIdx) const |
|
int | modelCompIdxToFlowCompIdx (const unsigned compIdx) const |
|
Scalar | scalingFactor (const int phaseIdx) const |
|
Eval | restrictEval (const EvalWell &in) const |
|
int | flowPhaseToModelPhaseIdx (const int phaseIdx) const |
|
const RateConverterType & | rateConverter () const |
|
| WellInterfaceGeneric (const Well &well, const ParallelWellInfo< FluidSystem::Scalar > ¶llel_well_info, const int time_step, const ModelParameters ¶m, const int pvtRegionIdx, const int num_components, const int num_phases, const int index_of_well, const std::vector< PerforationData< FluidSystem::Scalar > > &perf_data) |
|
const std::vector< PerforationData< FluidSystem::Scalar > > & | 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< FluidSystem::Scalar > &rates) const |
|
const Well & | wellEcl () const |
|
Well & | wellEcl () |
|
const PhaseUsage & | phaseUsage () 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< FluidSystem::Scalar > *vfp_properties_arg) |
|
void | setPrevSurfaceRates (WellState< FluidSystem::Scalar > &well_state, const WellState< FluidSystem::Scalar > &prev_well_state) const |
|
void | setGuideRate (const GuideRate *guide_rate_arg) |
|
void | setWellEfficiencyFactor (const FluidSystem::Scalar efficiency_factor) |
|
void | setRepRadiusPerfLength () |
|
void | setWsolvent (const FluidSystem::Scalar wsolvent) |
|
void | setDynamicThpLimit (const FluidSystem::Scalar thp_limit) |
|
void | setDynamicThpLimit (const std::optional< FluidSystem::Scalar > thp_limit) |
|
std::optional< FluidSystem::Scalar > | 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 |
|
FluidSystem::Scalar | refDepth () const |
|
FluidSystem::Scalar | gravity () const |
|
const VFPProperties< FluidSystem::Scalar > * | vfpProperties () const |
|
const ParallelWellInfo< FluidSystem::Scalar > & | parallelWellInfo () const |
|
const std::vector< FluidSystem::Scalar > & | perfDepth () const |
|
std::vector< FluidSystem::Scalar > & | perfDepth () |
|
const std::vector< FluidSystem::Scalar > & | wellIndex () const |
|
const std::map< int, std::vector< int > > & | getCompletions () const |
|
FluidSystem::Scalar | getTHPConstraint (const SummaryState &summaryState) const |
|
FluidSystem::Scalar | getALQ (const WellState< FluidSystem::Scalar > &well_state) const |
|
FluidSystem::Scalar | wsolvent () const |
|
FluidSystem::Scalar | rsRvInj () const |
|
void | initInjMult (const std::vector< FluidSystem::Scalar > &max_inj_mult) |
|
void | updateInjMult (std::vector< FluidSystem::Scalar > &inj_multipliers, DeferredLogger &deferred_logger) const |
|
FluidSystem::Scalar | getInjMult (const int perf, const FluidSystem::Scalar bhp, const FluidSystem::Scalar perf_pres, DeferredLogger &dlogger) const |
|
bool | isVFPActive (DeferredLogger &deferred_logger) const |
|
void | reportWellSwitching (const SingleWellState< FluidSystem::Scalar > &ws, DeferredLogger &deferred_logger) const |
|
bool | changedToOpenThisStep () const |
|
void | updateWellTestState (const SingleWellState< FluidSystem::Scalar > &ws, const double &simulationTime, const bool &writeMessageToOPMLog, const bool zero_group_target, WellTestState &wellTestState, DeferredLogger &deferred_logger) const |
|
bool | isPressureControlled (const WellState< FluidSystem::Scalar > &well_state) const |
|
FluidSystem::Scalar | wellEfficiencyFactor () const |
|
void | updateFilterCakeMultipliers (const std::vector< FluidSystem::Scalar > &inj_fc_multiplier) |
| Update filter cake multipliers.
|
|
void | resetWellOperability () |
|
|
Scalar | wpolymer () const |
|
Scalar | wfoam () const |
|
Scalar | wsalt () const |
|
Scalar | wmicrobes () const |
|
Scalar | woxygen () const |
|
Scalar | wurea () const |
|
virtual Scalar | getRefDensity () const =0 |
|
const std::vector< Scalar > & | compFrac () const |
|
std::vector< Scalar > | initialWellRateFractions (const Simulator &ebosSimulator, 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 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< Scalar > | estimateOperableBhp (const Simulator &ebos_simulator, const double dt, WellState< Scalar > &well_state, const SummaryState &summary_state, DeferredLogger &deferred_logger) |
|
bool | solveWellWithBhp (const Simulator &simulator, const double dt, const Scalar 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< Scalar(const Scalar)> &connPICalc, const std::vector< Scalar > &mobility, Scalar *connPI) const |
|
void | computeConnLevelInjInd (const FluidState &fs, const Phase preferred_phase, const std::function< Scalar(const Scalar)> &connIICalc, const std::vector< Scalar > &mobility, Scalar *connII, DeferredLogger &deferred_logger) const |
|
Scalar | computeConnectionDFactor (const int perf, const IntensiveQuantities &intQuants, const SingleWellState< Scalar > &ws) const |
|
| WellInterfaceIndices (const Well &well, const ParallelWellInfo< Scalar > ¶llel_well_info, const int time_step, const ModelParameters ¶m, 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< Scalar > > &perf_data) |
|
| WellInterfaceFluidSystem (const Well &well, const ParallelWellInfo< Scalar > ¶llel_well_info, const int time_step, const ModelParameters ¶m, const RateConverterType &rate_converter, const int pvtRegionIdx, const int num_components, const int num_phases, const int index_of_well, const std::vector< PerforationData< Scalar > > &perf_data) |
|
void | calculateReservoirRates (const bool co2store, SingleWellState< Scalar > &ws) const |
|
bool | checkIndividualConstraints (SingleWellState< Scalar > &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< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger) const |
|
bool | checkConstraints (WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, DeferredLogger &deferred_logger) const |
|
std::optional< Scalar > | getGroupInjectionTargetRate (const Group &group, const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const InjectorType &injectorType, Scalar efficiencyFactor, DeferredLogger &deferred_logger) const |
|
Scalar | getGroupProductionTargetRate (const Group &group, const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, Scalar efficiencyFactor, DeferredLogger &deferred_logger) const |
|
bool | zeroGroupRateTarget (const SummaryState &summary_state, const Schedule &schedule, const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferredLogger) const |
|
bool | getAllowCrossFlow () const |
|
FluidSystem::Scalar | wmicrobes_ () const |
|
FluidSystem::Scalar | wfoam_ () const |
|
FluidSystem::Scalar | woxygen_ () const |
|
FluidSystem::Scalar | wpolymer_ () const |
|
FluidSystem::Scalar | wsalt_ () const |
|
FluidSystem::Scalar | wurea_ () const |
|
int | polymerTable_ () const |
|
int | polymerInjTable_ () const |
|
int | polymerWaterTable_ () const |
|
bool | wellUnderZeroRateTargetIndividual (const SummaryState &summary_state, const WellState< FluidSystem::Scalar > &well_state) const |
|
bool | wellUnderGroupControl (const SingleWellState< FluidSystem::Scalar > &ws) const |
|
std::pair< bool, bool > | computeWellPotentials (std::vector< FluidSystem::Scalar > &well_potentials, const WellState< FluidSystem::Scalar > &well_state) |
|
void | checkNegativeWellPotentials (std::vector< FluidSystem::Scalar > &well_potentials, const bool checkOperability, DeferredLogger &deferred_logger) |
|
void | prepareForPotentialCalculations (const SummaryState &summary_state, WellState< FluidSystem::Scalar > &well_state, Well::InjectionControls &inj_controls, Well::ProductionControls &prod_controls) const |
|
void | resetDampening () |
|