Skip to content

Fix time stepping for FV methods

Florian Atteneder requested to merge fa/rm-dt-from-fv-evolution into main

Previously we computed dt twice per time step:

  1. in evolve.jl where we apply the CFL factor to dt
  2. inside rhs_fn! where we used dt with fv_rhs!

Problem was that they were computed with different methods and also one had the CFL factor already applied.

Turns out that this was the cause for wrong propagation speeds. A nice example is the fv_advection_sine ref test where I found that before the fix the sine wave propagated 2.5 revolutions in the periodic domain, but with the fix it propagates exactly 2.

This also fixes the dependence of the wave speed on the CFL, which I already noticed before. Note that lowering the CFL still causes the amplitude of the wave to shrink, in general, but that is a general dissipative effect of the scheme, I think.

The actual fix for this is hacky: I now forward dt via cache.global_variables. The reason is that I did not want to alter the current rhs! interface, which would have required lots of updates also in DG functions. The DG implementation nicel separates time stepping and flux computation, whereas this is not so clearly cut for the central FV method (because we don't have ghost buffers set up).


This PR also removes the now unused old ERK time steppers and cleans up unit tests.

Merge request reports