# Wrong wall distance calculation for ACMI cases

### Summary

When running cases with ACMI patches, the wall distance field is not correctly calculated by the methods `meshWave`

and `exactDistance`

, where the ACMI patch is interpreted as a solid wall and the wall distance is set accordingly (i.e. close to zero). In contrast, the wall distance method `Poisson`

seems to work correctly for such cases. This can become a problem for routines which require the wall distance field, e.g. certain turbulence models such as `kOmegaSST`

or `SpalartAllmaras`

. An artificial damping of the turbulent eddy viscosity field `nut`

can then be seen near the ACMI patch as a consequence (strength of damping is somewhat case-dependent).

### Steps to reproduce

Take the standard OpenFOAM tutorial `oscillatingInletACMI2D`

, switch to the `kOmegaSST`

model and write out the wall distance field for selected time steps.

### Example case

I prepared a modified version of the standard OpenFOAM tutorial `oscillatingInletACMI2D`

to reproduce the problem: oscillatingInletACMI2D_SST_wallDist_OF-v2312.tar.gz

The setup is for OpenFOAM-v2312, but we have observed this behaviour also in OpenFOAM-v2212. The method to calculate the wall distance is selected in `system/fvSchemes`

. A coded function object declared in `system/controlDict`

is used to write out the wall distance field for each write time.

###
*bug* behaviour?

What is the current The wall distance field is incorrectly calculated for the method `meshWave`

:

The wall distance field is incorrectly calculated for the method `exactDistance`

:

The method `Poisson`

produces an accurate wall distance field (dependent on how well the Laplacian equation converges):

I have not tested the `advectionDiffusion`

method yet, but I would assume that it works as well.

###
*correct* behavior?

What is the expected The wall distance field should be calculated correctly for all wall distance methods.

### Relevant logs and/or images

See section **What is the current bug behaviour?**

### Environment information

- OpenFOAM version : v2312
- Operating system : openSUSE
- Hardware info : not relevant
- Compiler : gcc 7 & 11

### Possible fixes

Unfortunately, I haven't had the time yet to dig deeper into the code to come up with a proposal for a fix.