mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-26 19:36:25 -06:00
Allow for gaslift for wells that violate thp limit but are not allowed to switch
This commit is contained in:
parent
42ef6ed9de
commit
b072cc1d5d
@ -61,6 +61,8 @@ namespace Opm
|
||||
double bhp, bool bhp_is_limited, bool debug_output=true) const override;
|
||||
void setAlqMaxRate_(const GasLiftOpt::Well& well);
|
||||
void setupPhaseVariables_();
|
||||
bool checkThpControl_() const override;
|
||||
|
||||
|
||||
const Simulator &ebos_simulator_;
|
||||
const WellInterface<TypeTag> &well_;
|
||||
|
@ -278,22 +278,6 @@ checkInitialALQmodified_(double alq, double initial_alq) const
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
GasLiftSingleWellGeneric::
|
||||
checkThpControl_() const
|
||||
{
|
||||
const int well_index = this->well_state_.index(this->well_name_).value();
|
||||
const Well::ProducerCMode& control_mode =
|
||||
this->well_state_.well(well_index).production_cmode;
|
||||
bool thp_control = control_mode == Well::ProducerCMode::THP;
|
||||
if (this->debug) {
|
||||
if (!thp_control) {
|
||||
displayDebugMessage_("Well is not under THP control, skipping iteration..");
|
||||
}
|
||||
}
|
||||
return thp_control;
|
||||
}
|
||||
|
||||
std::pair<std::optional<double>,double>
|
||||
GasLiftSingleWellGeneric::
|
||||
computeConvergedBhpAtThpLimitByMaybeIncreasingALQ_() const
|
||||
|
@ -248,7 +248,7 @@ protected:
|
||||
bool checkGroupTargetsViolated(
|
||||
const BasicRates& rates, const BasicRates& new_rates) const;
|
||||
bool checkInitialALQmodified_(double alq, double initial_alq) const;
|
||||
bool checkThpControl_() const;
|
||||
virtual bool checkThpControl_() const = 0;
|
||||
virtual std::optional<double> computeBhpAtThpLimit_(double alq) const = 0;
|
||||
std::pair<std::optional<double>,double> computeConvergedBhpAtThpLimitByMaybeIncreasingALQ_() const;
|
||||
std::pair<std::optional<BasicRates>,double> computeInitialWellRates_() const;
|
||||
|
@ -210,4 +210,23 @@ setAlqMaxRate_(const GasLiftOpt::Well &well)
|
||||
}
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
bool
|
||||
GasLiftSingleWell<TypeTag>::
|
||||
checkThpControl_() const
|
||||
{
|
||||
const int well_index = this->well_state_.index(this->well_name_).value();
|
||||
const Well::ProducerCMode& control_mode =
|
||||
this->well_state_.well(well_index).production_cmode;
|
||||
bool thp_control = control_mode == Well::ProducerCMode::THP;
|
||||
const WellInterfaceGeneric &well = getWell();
|
||||
thp_control = thp_control || well.thpLimitViolatedButNotSwitched();
|
||||
if (this->debug) {
|
||||
if (!thp_control) {
|
||||
displayDebugMessage_("Well is not under THP control, skipping iteration..");
|
||||
}
|
||||
}
|
||||
return thp_control;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -420,6 +420,11 @@ bool WellInterfaceGeneric::useVfpExplicit() const
|
||||
return ((wvfpexp.explicit_lookup() && !changedToOpenThisStep())|| operability_status_.use_vfpexplicit);
|
||||
}
|
||||
|
||||
bool WellInterfaceGeneric::thpLimitViolatedButNotSwitched() const
|
||||
{
|
||||
return operability_status_.thp_limit_violated_but_not_switched;
|
||||
}
|
||||
|
||||
double WellInterfaceGeneric::getALQ(const WellState& well_state) const
|
||||
{
|
||||
return well_state.getALQ(name());
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
// whether the well is operable
|
||||
bool isOperableAndSolvable() const;
|
||||
bool useVfpExplicit () const;
|
||||
bool thpLimitViolatedButNotSwitched() const;
|
||||
|
||||
void initCompletions();
|
||||
void closeCompletions(const WellTestState& wellTestState);
|
||||
|
Loading…
Reference in New Issue
Block a user