Merge pull request #2715 from bska/restore-bhp-hist-limit
Set Appropriate Restart BHP Limit for History Wells
This commit is contained in:
commit
3369785c7d
@ -71,7 +71,7 @@ RstWell::RstWell(const ::Opm::UnitSystem& unit_system,
|
||||
completion_ordering( iwel[VI::IWell::CompOrd]),
|
||||
pvt_table( def_pvt_table),
|
||||
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
|
||||
// internalized here.
|
||||
orat_target( swel_value(swel[VI::SWell::OilRateTarget])),
|
||||
|
@ -230,6 +230,11 @@ Well::Well(const RestartIO::RstWell& rst_well,
|
||||
}
|
||||
|
||||
p->addProductionControl(Well::ProducerCMode::BHP);
|
||||
if (! p->predictionMode) {
|
||||
p->BHPTarget.update(0.0);
|
||||
p->setBHPLimit(rst_well.bhp_target_double);
|
||||
}
|
||||
|
||||
if (this->isAvailableForGroupControl())
|
||||
p->addProductionControl(Well::ProducerCMode::GRUP);
|
||||
this->updateProduction(std::move(p));
|
||||
@ -290,6 +295,13 @@ Well::Well(const RestartIO::RstWell& rst_well,
|
||||
|
||||
i->addInjectionControl(Well::InjectorCMode::BHP);
|
||||
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())
|
||||
i->addInjectionControl(Well::InjectorCMode::GRUP);
|
||||
|
||||
|
@ -112,7 +112,7 @@ namespace Opm {
|
||||
void Well::WellProductionProperties::init_history(const DeckRecord& record)
|
||||
{
|
||||
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.
|
||||
this->LiquidRate = UDAValue(this->WaterRate.get<double>() + this->OilRate.get<double>(), this->OilRate.get_dim());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user