Skip to content

Particle to field projection

lmoresi edited this page Oct 5, 2026 · 1 revision

Particle-to-field projection

How scattered values (forward-launched arrivals, swarm particles) are read back onto a continuous field, and what goes wrong. Code: utilities/particle_projection.py (ParticleL2Projector).

What we do now

A weighted least-squares L2 projection of the arrivals onto a continuous P1 or P2 field, with the arrivals as the quadrature, assembled consistently across partition seams. It replaces the per-cell fit for the forward histories (reconstruction="global"): stable at the cylinder's rear stagnation point with no smoothing and no limiter, excursions of 2 to 5%, serial equal to parallel to 1e-6. Two regularisations ride on it, each a named term with one parameter: a deficit fill (where a cell's arrivals cover less than half its measure, the previous field supplies the uncovered share as finite-element mass) and, for P2, a bubble penalty (a hierarchical prior pulling each edge dof toward the mean of its vertices, in units of the bubble mass: β 0.01 removes about 20% of a resolved quadratic, 0.1 about 75%). Louis: P2 almost always needs some regularisation; we have the right number of points at launch and then scramble them.

What did not work, and why

  • The per-cell fit is unstable where a vertex lies outside its own cell's arrivals, which at the rear stagnation point of a cylinder is 43% of cells: the overshoot grew 0.89, 1.29, 3.05 over three steps and the run blew up (#811).
  • A Barth–Jespersen limiter on the cell fit cured that but clipped true gradients (drag 7 to 15% low), because the cell's own arrivals are the wrong bound; the neighbour range, exchanged across seams, would be the right one. It stays in the code, off. Louis: "I don't much like these limiters."
  • The first deficit fill was a diffusion. Filling any shortfall pulled about half the cells toward the un-advected field every step; a rotating Gaussian lost 18% of its peak with the forward-nodes history and 6% with forward-IP. Every cylinder run looked stable throughout. Lesson: a regularisation that "only acts on empty cells" has to be checked on a moving smooth field against the unregularised baseline, not on a stable run. The fill now acts below 50% coverage; the runs that carried the bias are listed in the roadmap.
  • Seam weights summed over local cells only half-weighted the nodes on partition seams, so three ranks differed from serial. They are summed across seams now.

Open

The same operator as a swarm proxy option (proxy_sampling="project") where the RBF proxy feeds a residual. The neighbour-range limiter, if a bound is ever wanted again.

History

  • 2026-10-05 — created.

Clone this wiki locally