Skip to content

Incorrect flux.dt after limiting (Gimzo, moving mesh)

As I already discussed briefly here, there is an issue with the flux.dt of particles that have been limited.

Consider 3 neighbouring particles on timebins corresponding to the following timesteps:

Before limiting orig
I.e. Part 0 and Part 1 have last exchanged fluxes at `ti=16` and Part 0 and 2 have last exchanged fluxes at `ti=0`.

Now suppose that at ti=20 Part 0 is timestep limited to a new timebin corresponding to a timestep of 4:

After limiting limit
Because the `flux.dt` is set during the kick, it will now also correspond to a timestep of 4. This is however only correct for calculating flux exchanges with neighbours which are also on timesteps of 4 or smaller...

For the flux exchange with Part 1, we actually need a flux.dt of 8:

Flux exchange with Part 1 fluxdt1

And for the flux exchange with Part 2 we need a `flux.dt of 24 (which does not even correspond to any timebin):

Flux exchange with Part 2 fluxdt2

The "fix" I implemented for Moving mesh only solves the second case and is probably incorrect for cosmological time integration. This also did not show any noticeably difference in e.g. the Sedov blastwave test, but probably, more extreme examples of this issue can probably be constructed with star particles or sinks instead of hydro only.

To really fix this, I think we need to time integrate the fluxes from the maximal end of the previous timestep of both particles to the minimal end of the current timestep of both particles. and do that in a way that is correct with cosmological time integration.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information