Skip to content

wallDist is called every iteration when using vanDriest delta function in turbulenceProperties

Summary

The function wallDist is called every iteration when using vanDriest delta function in turbulenceProperties, even if explicitly setting the parameters in fvSchemes, e.g.

    wallDist
    {
        method meshWave;

        // Optional entry enabling the calculation
        // of the normal-to-wall field
        nRequired true;

        // Optional entry delaying wall distance update to every n steps
        // Default is 1 (update every step)
        updateInterval 100000;
    }

This behavior hurts the performance especially in large-scale simulations, using a large number of cores. In some tests we have conducted, almost 50% of the computing time is spent in the meshWave function when using more than 1500 cores.

Steps to reproduce

It happens when vanDriest is selected as delta function in turbulenceProperties.

Example case

Tutorial case: tutorials/incompressible/pimpleFoam/LES/vortexShed

The calculation of wallDist in every time step can be visualized using the corresponding debug switch in controlDict

DebugSwitches
{
    FaceCellWave        1;
}

What is the current bug behaviour?

The wallDist is called every time step, regardless of the parameters set in the fvSchemes, e.g.

wallDist
{
        method meshWave;
        nRequired true;
        updateInterval 1000000;
}

The behavior does not change if setting nRequired to true or false, or changing the updateInterval to 0, 5 or 1000000

What is the expected correct behavior?

I would expect that when setting updateInterval to a value greater than 1, that the wallDist calculation would be performed only in this interval.

Relevant logs and/or images

Environment information

  • OpenFOAM version : v2206
  • Operating system : CentOS/Rocky 8
  • Hardware info : AMD EPYC
  • Compiler : GCC 10.2

Possible fixes