Repository navigation
Conversation
Test casesReproducers, configurations, numeric logs and scripts: wall_distance. Develop =
The develop test executes 3 assertions with 1 failure. The new regression adds an independent analytic-distance check. Rotational/helical/dependent-generator support and broader turbulence/FEM/thread/identity validation remain open. Standalone H build succeeds; the analytic-distance testcase passes all 4 assertions in serial and on each of two genuinely partitioned MPI ranks. No full turbulence/FEM/OpenMP pass is claimed. |
|
Is this WIP or ready to be reviewed? |
|
@joshkellyjak Still WIP. The translated-image fix has an analytic serial/MPI check, but broader validation and the remaining periodic cases are unfinished. I'll keep it as a draft until it's ready for review. |
|
@rois1995 please mark WIP in the title and pr:draft as label when it is not ready and you only want to expose your work to the general public. |
|
@bigfooted Yeah, I forgot about this one, thanks! |

Proposed Changes
Periodic boundaries represent a domain that repeats. Near a periodic boundary, the closest wall can belong to the next repeated copy, rather than the copy stored in the mesh. The current wall-distance search can miss that wall and return a distance that is too large.
For example, imagine a channel with a bump on the floor, repeated end to end. A point near the end of one section may be closer to the bump in the next section. This PR includes those translated copies in the nearest-wall search. It also preserves the identity of the wall that was found.
The testcase makes the error visible at two points representing the same periodic location: develop returns
0.5on one face, although the correct distance to the repeated sloping wall is about0.265. With the fix, both faces return0.5/sqrt(1+1.6^2) = 0.26499947. The test also checks the same query shifted into the next repeated section. Turbulence models use wall distance, so this mismatch can affect their predictions; a complete turbulence-flow comparison is still pending.The implementation extends the shared nearest-wall search used by FV and FEM. It does not change the mesh or add physical walls.
Draft: currently covers repetition by translation, with independent repeat directions. Rotating sectors, helical repetition, and redundant repeat directions remain unfinished and retain the existing search behavior. Skew/multiple-generator, FEM/multizone, OpenMP, nearest-wall identity and full turbulence-regression validation remain pending. No claim that all periodic wall-distance cases are fixed.
Standalone H build and analytic-distance testcase pass in serial and partitioned MPI2 (4 assertions/rank); broader checks remain pending.
Related Work
PR Checklist