5.3. Tracer Particles in DISPATCH — Design Context and Recommendations

5.3.1. 1. Problem Statement

Classical tracer particles advected with cell-centered velocity are biased because they do not represent numerical diffusion in finite-volume schemes.

This leads to:

  • incorrect mixing histories

  • systematic drift relative to fluid mass

  • unreliable “where did this mass come from?” diagnostics

We are evaluating improved methods for tracer transport and ancestry tracking.

5.3.2. 2. Methods Under Consideration

5.3.2.1. 2.1 Classical tracers

  • ODE: dx/dt = u_cell

  • Pros: simple, cheap

  • Cons: ignores numerical diffusion → biased trajectories

5.3.2.2. 2.2 Monte Carlo tracers (AREPO-style)

  • Particles jump between cells with probabilities proportional to mass flux

  • Pros: unbiased transport

  • Cons: discontinuous trajectories, noisy

5.3.2.4. 2.4 Flux-consistent (PIC-style / Esirkepov-like)

Enforces:

particle flux = finite-volume mass flux

Pros:

  • exact conservation

  • deterministic

Cons:

  • complex bookkeeping

  • difficult with AMR + async stepping

  • unnecessary for passive tracers

5.3.3. 3. Key Conclusion on Conservation

Exact particle-level conservation is not required.

Reason:

  • tracers are diagnostic only

  • finite-volume solver already conserves mass

  • resampling (merge/split) breaks exact conservation anyway

What matters is:

E[rho_particles] = rho_grid

i.e. statistical correctness, not exact matching

5.3.4. 4. Core Challenge: Ancestry Tracking

Goal:

“Where did the mass in this cell come from?”

Complication:

  • particles split and merge

  • one particle may represent mass originating from many regions

  • ancestry becomes a many-to-many mapping

5.3.5. 5. Correct Conceptual Model

A tracer particle is:

particle = (position x, weight w, ancestry A)

Where:

  • A is a distribution over origins

5.3.6. 6. Ancestry Handling Under Split/Merge

Split:

parent: (w, A)

child1: (alpha * w, A)
child2: ((1 - alpha) * w, A)

Merge:

w_new = w1 + w2
A_new = (w1 * A1 + w2 * A2) / w_new

This is equivalent to mixing passive scalars.

5.3.7. 7. Practical Representations of Ancestry

5.3.7.1. Option A — Full genealogy (exact, expensive)

Store full directed acyclic graph:

child -> parents + weights

Not scalable.

5.3.7.2. Option B — Sparse origin vectors

Each particle stores:

integer :: origin_id(kmax)
real    :: fraction(kmax)

Merge:

  • weighted union

  • truncate to largest contributors

5.3.9. 9. Backward Query Algorithm

To answer:

“Where did mass in cell C at time T come from?”

Procedure:

  1. collect particles contributing to cell C at time T

  2. read ancestry samples

  3. optionally recurse via event logs to earlier checkpoints

This makes history reconstruction an offline operation.

5.3.11. 11. What NOT to do initially

  • no global residual correction (non-local, expensive)

  • no strict flux-conserving particle transport

  • no full genealogy for all particles

5.3.12. 12. Summary

  • classical tracers are biased

  • Itô tracers correct transport statistically

  • exact conservation is unnecessary

  • ancestry must be treated as a distribution

Best approach:

  • weighted particles

  • stochastic transport

  • sampled ancestry

  • snapshot-based history

5.3.13. 13. Minimal Codex Task Specification

Implement tracer mode ito2 in DISPATCH:

  • compute drift and diffusion from face mass fluxes

  • update particles using Euler–Maruyama

  • store particle weights

  • maintain K ancestry samples per particle

  • implement merge/split via resampling

  • output snapshots including ancestry samples