libCEED icon indicating copy to clipboard operation
libCEED copied to clipboard

examples/fluids: unstructured distance function

Open jedbrown opened this issue 2 years ago • 0 comments

Computing distance from walls is necessary for some turbulence models and to create initial conditions for which the initial transient is not too extreme. The Eikonal equation offers a proper way to solve this equation, but it's difficult to solve scalably using variational methods. This paper compares several strategies and suggests a simple method:

  1. Solve $-\nabla^2 \phi = 1$ with boundary condition $\phi=0$ on no-slip walls.
  2. Compute distance as $d = \sqrt{\lVert \nabla \phi \rVert^2 + 2\phi} - \lVert \nabla \phi \rVert$.

This is accurate near walls, but not in the far field (where accurate distance isn't physically important). This requires solving one Poisson system and then evaluating the solution at quadrature points, which is where distance is needed in a turbulence model. If "nodal" distance is required, it can be projected into a nodal space using a (lumped) $L^2$ projection.

jedbrown avatar Oct 28 '22 20:10 jedbrown