If a certain output time (specified in the file) is not matched by the simulation times, simstrat currently adjusts the timestep in the following way:
Starting from some some output time (or from the start), it checks how many default timesteps are needed to match the next output time. This number is a float, for example 29.7.
If the number is not an integer, it is rounded to the next integer below (29 in the example) and the timestep between the two output times is adjusted so that in 29 steps the next output time is reached
This can increase the specified timestep by up to a few percent.
This is not really a neat solution for two reasons:
The used timestep deviates from the one specified, and its not lower but larger which could potentially cause stability issues.
The result of the code depends (very slightly) on the output times chosen by the user
We should implement a timestep adjustment which does not/minimally interfere with the simulation timestep. I see 2 possibilities:
The model state at a certain output time is interpolated using the state just before and after
The model uses the specified timestep until it cannot do a full timestep without crossing an output time. At this point, the model does a smaller timestep to reach the output time and goes on with the usual timestep.
If a certain output time (specified in the file) is not matched by the simulation times, simstrat currently adjusts the timestep in the following way:
This is not really a neat solution for two reasons:
We should implement a timestep adjustment which does not/minimally interfere with the simulation timestep. I see 2 possibilities: