File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -388,22 +388,20 @@ init(const std::vector<Scalar>& cellPressures,
388388 }
389389
390390 const auto & prev_well = prevState->well (*old_index);
391-
392- auto & new_well = this ->well (w);
393- new_well.init_timestep (prev_well);
394-
395391 if (prev_well.status == Well::Status::SHUT) {
396392 // Well was shut in previous state, do not use its values.
397393 continue ;
398394 }
399395
400- new_well.status = prev_well.status ;
401-
396+ auto & new_well = this ->well (w);
402397 if (new_well.producer != prev_well.producer ) {
403398 // Well changed to/from injector from/to producer, do not
404399 // use its previous values.
405400 continue ;
406401 }
402+ // Use bhp, thp and temperature from previous values
403+ new_well.init_timestep (prev_well);
404+ new_well.status = prev_well.status ;
407405
408406 // If new target is set using WCONPROD, WCONINJE etc. we use the new control
409407 if (!new_well.events .hasEvent (WellState::event_mask)) {
You can’t perform that action at this time.
0 commit comments