Set timesteps after events

The time step after an event can either be set using
timestep_in_days_after_event or using the TUNING keyword in the deck.
This commit is contained in:
Tor Harald Sandve
2017-02-24 13:51:10 +01:00
parent aaa4af6c49
commit 19a16ceeca
6 changed files with 62 additions and 20 deletions

View File

@@ -162,6 +162,7 @@ public:
const auto& schedule = eclState().getSchedule();
// adaptive time stepping
const auto& events = schedule.getEvents();
std::unique_ptr< AdaptiveTimeStepping > adaptiveTimeStepping;
if( param_.getDefault("timestep.adaptive", true ) )
{
@@ -293,7 +294,11 @@ public:
// \Note: The report steps are met in any case
// \Note: The sub stepping will require a copy of the state variables
if( adaptiveTimeStepping ) {
report += adaptiveTimeStepping->step( timer, *solver, state, well_state, output_writer_,
bool event = events.hasEvent(ScheduleEvents::NEW_WELL, timer.currentStepNum()) ||
events.hasEvent(ScheduleEvents::PRODUCTION_UPDATE, timer.currentStepNum()) ||
events.hasEvent(ScheduleEvents::INJECTION_UPDATE, timer.currentStepNum()) ||
events.hasEvent(ScheduleEvents::WELL_STATUS_CHANGE, timer.currentStepNum());
report += adaptiveTimeStepping->step( timer, *solver, state, well_state, event, output_writer_,
output_writer_.requireFIPNUM() ? &fipnum : nullptr );
}
else {