diff --git a/src/opm/io/eclipse/rst/well.cpp b/src/opm/io/eclipse/rst/well.cpp index 3da024e9f..9ba52e8b6 100644 --- a/src/opm/io/eclipse/rst/well.cpp +++ b/src/opm/io/eclipse/rst/well.cpp @@ -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])), diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Well/Well.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Well/Well.cpp index d9af6af6a..010da3eb3 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Well/Well.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Well/Well.cpp @@ -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); diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp index a19899761..d6fc7dfec 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellProductionProperties.cpp @@ -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() + this->OilRate.get(), this->OilRate.get_dim());