File tree Expand file tree Collapse file tree
opm/input/eclipse/Schedule Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,11 +73,12 @@ struct SimulatorUpdate
7373 std::unordered_set<std::string> welpi_wells{};
7474
7575 // / Wells whose THP limit and/or VFP table has been (re)specified by
76- // / WCONPROD or WCONHIST for the named wells, or by WELTARG with THP or
77- // / VFP control. Unlike affected_wells, this set also includes wells for
78- // / which the entered values are unchanged, since re-specifying either
79- // / input cancels a THP limit imposed dynamically by the simulator (e.g.
80- // / by network balancing). See also the WELL_THP_UPDATE schedule event.
76+ // / WCONPROD or WCONHIST for the named wells, by WELTARG with THP or VFP
77+ // / control, or by WTMULT with THP control. Unlike affected_wells, this
78+ // / set also includes wells for which the entered values are unchanged,
79+ // / since re-specifying either input cancels a THP limit imposed
80+ // / dynamically by the simulator (e.g. by network balancing). See also
81+ // / the WELL_THP_UPDATE schedule event.
8182 std::unordered_set<std::string> thp_respec_wells{};
8283
8384 // / New well connections created as a result of a geomechanical
Original file line number Diff line number Diff line change @@ -115,11 +115,12 @@ namespace Opm
115115 REQUEST_OPEN_COMPLETION = (UINT64_C (1 ) << 24 ),
116116
117117 // / The well THP limit and/or VFP table has been (re)specified
118- // / by WCONPROD or WCONHIST for the named wells, or by WELTARG
119- // / with THP or VFP control. Unlike PRODUCTION_UPDATE, the event
120- // / is also triggered when the entered values are unchanged,
121- // / since re-specifying either input cancels a THP limit imposed
122- // / dynamically by the simulator (e.g. by network balancing).
118+ // / by WCONPROD or WCONHIST for the named wells, by WELTARG with
119+ // / THP or VFP control, or by WTMULT with THP control. Unlike
120+ // / PRODUCTION_UPDATE, the event is also triggered when the
121+ // / entered values are unchanged, since re-specifying either
122+ // / input cancels a THP limit imposed dynamically by the
123+ // / simulator (e.g. by network balancing).
123124 WELL_THP_UPDATE = (UINT64_C (1 ) << 25 ),
124125 };
125126 } // namespace ScheduleEvents
Original file line number Diff line number Diff line change @@ -633,6 +633,18 @@ void handleWTMULT(HandlerContext& handlerContext)
633633 properties->handleWTMULT (cmode, factor.get <double >());
634634
635635 well.updateProduction (properties);
636+
637+ // The THP limit is re-specified (multiplied).
638+ if (cmode == Well::WELTARGCMode::THP ) {
639+ handlerContext.state ().events ()
640+ .addEvent (ScheduleEvents::WELL_THP_UPDATE );
641+
642+ handlerContext.state ().wellgroup_events ()
643+ .addEvent (well_name, ScheduleEvents::WELL_THP_UPDATE );
644+
645+ handlerContext.thp_respec_well (well_name);
646+ }
647+
636648 if (update_well) {
637649 handlerContext.state ().events ()
638650 .addEvent (ScheduleEvents::PRODUCTION_UPDATE );
Original file line number Diff line number Diff line change @@ -7288,6 +7288,14 @@ DATES -- 5
72887288 10 OKT 1998 /
72897289/
72907290
7291+ WTMULT
7292+ 'P1' 'THP' 2.0 /
7293+ /
7294+
7295+ DATES -- 6
7296+ 10 NOV 1998 /
7297+ /
7298+
72917299WCONHIST
72927300 'P1' 'OPEN' 'ORAT' 100 0 0 /
72937301/
@@ -7307,6 +7315,8 @@ WCONHIST
73077315 // WELTARG VFP re-specifies the VFP table, also for an unchanged value
73087316 BOOST_CHECK ( schedule[4 ].wellgroup_events ().hasEvent (" P1" , ScheduleEvents::WELL_THP_UPDATE ));
73097317 BOOST_CHECK (!schedule[4 ].wellgroup_events ().hasEvent (" P1" , ScheduleEvents::PRODUCTION_UPDATE ));
7310- // WCONHIST re-specifies the VFP table
7318+ // WTMULT with THP control re-specifies (multiplies) the THP limit
73117319 BOOST_CHECK ( schedule[5 ].wellgroup_events ().hasEvent (" P1" , ScheduleEvents::WELL_THP_UPDATE ));
7320+ // WCONHIST re-specifies the VFP table
7321+ BOOST_CHECK ( schedule[6 ].wellgroup_events ().hasEvent (" P1" , ScheduleEvents::WELL_THP_UPDATE ));
73127322}
You can’t perform that action at this time.
0 commit comments