mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-16 00:01:57 -06:00
ebos: allow initial time step sizes shorter than the initial episode size
This commit is contained in:
parent
53b48b2838
commit
d82f5be347
@ -344,9 +344,17 @@ public:
|
||||
++ nextEpisodeIdx;
|
||||
}
|
||||
|
||||
Scalar episodeLength = timeMap->getTimeStepLength(nextEpisodeIdx);
|
||||
Scalar dt = episodeLength;
|
||||
if (nextEpisodeIdx == 0) {
|
||||
// allow the size of the initial time step to be set via an external parameter
|
||||
Scalar initialDt = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize);
|
||||
dt = std::min(dt, initialDt);
|
||||
}
|
||||
|
||||
if (nextEpisodeIdx < numReportSteps) {
|
||||
simulator.startNextEpisode(timeMap->getTimeStepLength(nextEpisodeIdx));
|
||||
simulator.setTimeStepSize(timeMap->getTimeStepLength(nextEpisodeIdx));
|
||||
simulator.startNextEpisode(episodeLength);
|
||||
simulator.setTimeStepSize(dt);
|
||||
}
|
||||
|
||||
// set up the wells
|
||||
|
Loading…
Reference in New Issue
Block a user