disable guiderates and set control mode to THP for wells with autochoke
This commit is contained in:
parent
f10399bb77
commit
4a9dbe9c1a
@ -457,6 +457,7 @@ public:
|
|||||||
bool updateGroup(const std::string& group);
|
bool updateGroup(const std::string& group);
|
||||||
bool updateWellGuideRate(bool available, double guide_rate, GuideRateTarget guide_phase, double scale_factor);
|
bool updateWellGuideRate(bool available, double guide_rate, GuideRateTarget guide_phase, double scale_factor);
|
||||||
bool updateWellGuideRate(double guide_rate);
|
bool updateWellGuideRate(double guide_rate);
|
||||||
|
bool updateWellGuideRate(bool available);
|
||||||
bool updateEfficiencyFactor(double efficiency_factor);
|
bool updateEfficiencyFactor(double efficiency_factor);
|
||||||
bool updateSolventFraction(double solvent_fraction);
|
bool updateSolventFraction(double solvent_fraction);
|
||||||
bool updateTracer(std::shared_ptr<WellTracerProperties> tracer_properties);
|
bool updateTracer(std::shared_ptr<WellTracerProperties> tracer_properties);
|
||||||
|
@ -987,6 +987,31 @@ File {} line {}.)", wname, location.keyword, location.filename, location.lineno)
|
|||||||
node.terminal_pressure(pressure_item.getSIDouble(0));
|
node.terminal_pressure(pressure_item.getSIDouble(0));
|
||||||
|
|
||||||
if (as_choke) {
|
if (as_choke) {
|
||||||
|
//Wells belong to a group with autochoke enabled are to be run on a common THP and guide rate should be ignored
|
||||||
|
|
||||||
|
const auto& group = this->getGroup(name, handlerContext.currentStep);
|
||||||
|
for (const std::string& wellName : group.wells()) {
|
||||||
|
auto well = this->snapshots.back().wells.get(wellName);
|
||||||
|
|
||||||
|
//Let the wells be operating on a THP Constraint
|
||||||
|
auto properties = std::make_shared<Well::WellProductionProperties>(well.getProductionProperties());
|
||||||
|
properties->clearControls();
|
||||||
|
properties->addProductionControl(Well::ProducerCMode::THP);
|
||||||
|
properties->controlMode = Well::ProducerCMode::THP;
|
||||||
|
well.updateProduction(properties);
|
||||||
|
// this->snapshots.back().events().addEvent( ScheduleEvents::PRODUCTION_UPDATE );
|
||||||
|
// this->snapshots.back().wellgroup_events().addEvent( well2.name(), ScheduleEvents::PRODUCTION_UPDATE);
|
||||||
|
|
||||||
|
// Guide rate availablity should be set to false
|
||||||
|
const bool availableForGroupControl = false;
|
||||||
|
well.updateWellGuideRate(availableForGroupControl);
|
||||||
|
auto new_config = this->snapshots.back().guide_rate();
|
||||||
|
new_config.update_well(well);
|
||||||
|
this->snapshots.back().guide_rate.update( std::move(new_config) );
|
||||||
|
|
||||||
|
this->snapshots.back().wells.update( std::move(well) );
|
||||||
|
}
|
||||||
|
|
||||||
std::string target_group = name;
|
std::string target_group = name;
|
||||||
const auto& target_item = record.getItem<ParserKeywords::NODEPROP::CHOKE_GROUP>();
|
const auto& target_item = record.getItem<ParserKeywords::NODEPROP::CHOKE_GROUP>();
|
||||||
|
|
||||||
@ -995,7 +1020,6 @@ File {} line {}.)", wname, location.keyword, location.filename, location.lineno)
|
|||||||
|
|
||||||
if (target_group != name) {
|
if (target_group != name) {
|
||||||
if (this->snapshots.back().groups.has(name)) {
|
if (this->snapshots.back().groups.has(name)) {
|
||||||
const auto& group = this->getGroup(name, handlerContext.currentStep);
|
|
||||||
if (group.numWells() > 0)
|
if (group.numWells() > 0)
|
||||||
throw std::invalid_argument("A manifold group must respond to its own target");
|
throw std::invalid_argument("A manifold group must respond to its own target");
|
||||||
}
|
}
|
||||||
|
@ -757,6 +757,16 @@ bool Well::updateWellGuideRate(bool available, double guide_rate_arg, GuideRateT
|
|||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Well::updateWellGuideRate(bool available) {
|
||||||
|
bool update = false;
|
||||||
|
if (this->guide_rate.available != available) {
|
||||||
|
this->guide_rate.available = available;
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return update;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user