underworld3 icon indicating copy to clipboard operation
underworld3 copied to clipboard

[BUG] - Eulerian Material Derivative Routine Puzzler

Open lmoresi opened this issue 5 months ago • 4 comments

The ddt.py routines are Material Derivative classes.

There are three of them which are designed to handle the various end member cases:

  1. Lagrangian: the classic swarm-based history manager in which we just supply history terms and update the value of the variable as it is carried by the flow. This is best suited to strong advection (weak diffusion) and works best in the no-diffusion limit.
  2. Semi-Lagrangian: computes values along the recent trajectory of the fluid at a nodal point. Works well for balanced advection / diffusion but will not work very well if the fluid is very slowly moving compared to the diffusion timescale (it becomes overly diffusive due to interpolation steps).
  3. Eulerian: classical mesh-based advection diffusion which works well for weak advection and has all the usual Courant stability problems. It should work well in the pure diffusion limit.

We should be able to switch between these (plugin replacements for each other) but the current implementation of the Eulerian ddt class has no advection terms at all. It also has a different calling pattern to the other classes.

lmoresi avatar Jul 28 '25 09:07 lmoresi

Not sure whose code this was to begin with - @bknight1 is it you ?

Anyway, we also need to verify if all of these really can just switch in and out for the relevant solvers.

lmoresi avatar Jul 28 '25 09:07 lmoresi

Yep @lmoresi the Eulerian one is my code.

I can look at updating it to be consistent with the others.

bknight1 avatar Jul 29 '25 06:07 bknight1

OK - no problem.

The idea is that all of these are $D/Dt$ time managers. We should include the $v\cdot\nabla$ terms in the Eulerian formulation. Question is, can we just implement something naive, or do we need a genuine, card-carrying advection scheme.

lmoresi avatar Jul 29 '25 07:07 lmoresi

Let's discuss Friday at the dev meeting

bknight1 avatar Jul 30 '25 02:07 bknight1