# Transport equation based wall distance calculation

### Wall-distance variable

Wall distance are required for the implementation of various turbulence models. The approaximate values of wall distance could be obtained by solving a transport equation for a variable called wall-distance variable or $\phi$.
The transport equation for the wall distance variable could be written as: $\int\limits_A {\nabla \phi \bullet d\vec A} = - \int\limits_\Omega {dV}$

with the boundary conditions of Dirichlet at the walls as $\phi = 0$ and Neumann at other boundaries as ${{\partial \phi } \over {\partial n}} = 0$

This transport equation could be solved with any of the approaches similar to that of Poisson's equation.

### Wall distance calculation

Wall distance from the solution of this transport equation could be easily obtained as: $d = \sqrt {\nabla \phi \bullet \nabla \phi + 2\phi } - \left| {\nabla \phi } \right|$

Where as the wall distance vector could be written as: $\vec d = d{{\nabla \phi } \over {\left| {\nabla \phi } \right|}}$

The foregoing method for evaluation of wall distances was proposed by D.B.Spalding , mainly for the purpose of calculating, for arbitrary complex geometries, the wall distances required by various low-Reynolds-number turbulence closure models. Spalding's proposal was mainly intuitive, but the method has been described in a formal mathematical framework by Fares & Schroder (2002).

D.B.Spalding, ‘Calculation of turbulent heat transfer in cluttered spaces’, Proc. 10th Int. Heat Transfer Conference, Brighton, UK, (1994).

E.Fares & W.Schroder, ‘Differential Equation for Approximate Wall Distance' Int.J.Numer.Meth., 39:743-762, (2002).