mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user