Merge pull request #2715 from bska/restore-bhp-hist-limit

Set Appropriate Restart BHP Limit for History Wells
This commit is contained in:
Joakim Hove 2021-09-28 21:52:43 +02:00 committed by GitHub
commit 3369785c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View File

@ -71,7 +71,7 @@ RstWell::RstWell(const ::Opm::UnitSystem& unit_system,
completion_ordering( iwel[VI::IWell::CompOrd]), completion_ordering( iwel[VI::IWell::CompOrd]),
pvt_table( def_pvt_table), pvt_table( def_pvt_table),
msw_pressure_drop_model( iwel[VI::IWell::MSW_PlossMod]), msw_pressure_drop_model( iwel[VI::IWell::MSW_PlossMod]),
// The values orat_target -> bhp_target_flow will be used in UDA values. The // The values orat_target -> bhp_target_float will be used in UDA values. The
// UDA values are responsible for unit conversion and raw values are // UDA values are responsible for unit conversion and raw values are
// internalized here. // internalized here.
orat_target( swel_value(swel[VI::SWell::OilRateTarget])), orat_target( swel_value(swel[VI::SWell::OilRateTarget])),

View File

@ -230,6 +230,11 @@ Well::Well(const RestartIO::RstWell& rst_well,
} }
p->addProductionControl(Well::ProducerCMode::BHP); p->addProductionControl(Well::ProducerCMode::BHP);
if (! p->predictionMode) {
p->BHPTarget.update(0.0);
p->setBHPLimit(rst_well.bhp_target_double);
}
if (this->isAvailableForGroupControl()) if (this->isAvailableForGroupControl())
p->addProductionControl(Well::ProducerCMode::GRUP); p->addProductionControl(Well::ProducerCMode::GRUP);
this->updateProduction(std::move(p)); this->updateProduction(std::move(p));
@ -290,6 +295,13 @@ Well::Well(const RestartIO::RstWell& rst_well,
i->addInjectionControl(Well::InjectorCMode::BHP); i->addInjectionControl(Well::InjectorCMode::BHP);
i->BHPTarget.update(rst_well.bhp_target_float); i->BHPTarget.update(rst_well.bhp_target_float);
if (! i->predictionMode) {
if (i->controlMode == Well::InjectorCMode::BHP)
i->bhp_hist_limit = rst_well.hist_bhp_target;
else
i->resetDefaultHistoricalBHPLimit();
}
if (this->isAvailableForGroupControl()) if (this->isAvailableForGroupControl())
i->addInjectionControl(Well::InjectorCMode::GRUP); i->addInjectionControl(Well::InjectorCMode::GRUP);

View File

@ -112,7 +112,7 @@ namespace Opm {
void Well::WellProductionProperties::init_history(const DeckRecord& record) void Well::WellProductionProperties::init_history(const DeckRecord& record)
{ {
this->predictionMode = false; this->predictionMode = false;
// update LiquidRate. The funnny constrction with explicitly making a new // update LiquidRate. The funny construction with explicitly making a new
// UDAValue is to ensure that the UDAValue has the correct dimension. // UDAValue is to ensure that the UDAValue has the correct dimension.
this->LiquidRate = UDAValue(this->WaterRate.get<double>() + this->OilRate.get<double>(), this->OilRate.get_dim()); this->LiquidRate = UDAValue(this->WaterRate.get<double>() + this->OilRate.get<double>(), this->OilRate.get_dim());