CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   in k-epsilon wall function approach high Re turbulence models: question of velocity (

romant June 27, 2013 04:04

in k-epsilon wall function approach high Re turbulence models: question of velocity

I looked through the different wall function for k-epsilon turbulence models, however I feel I am missing something. In Wilcox (Turbulence modeling for CFD 2006) as well as many other publications, in wall functions the velocity seems to be set in the first grid point. In OpenFOAM, the following properties are changed with wall functions in the example of the k-epsilon turbulence model,

  1. epsilon: based on the logarithmic law of the wall, epsilon is set in the first cell node (epsilonWallFunction)
  2. G: the turbulence production term is determined from the law of the wall and also set in the first node from the wall (epsilonWallFunction)
  3. k: is only set to zeroGradient (kqRWallFunction)
  4. velocity is not touched in any of these functions?
  5. the turbulent viscosity (nut, mut) are set based on the law of the wall (mutUWallFunction)
The question is, why?

romant July 2, 2013 05:18

took a while but here is a solution to the problem

I think I found the solution to this. I found it in Pope, Turbulent Flow, 2000 under the way that wall functions are created. The original question was why the velocity is not set by any of the wall function. The answer is, that wall functions are apparently more robust by setting the shear stress and not the velocity, which makes sense when looking at separation points and other nasty flow phenomena, in which the velocity can become essentially 0. The way this is for the k-epsilon model done is

  1. determine the nominal value for the shear velocity, u_shear
  2. find y+ using the shear velocity
  3. find the nominal values for the velocity in the first grid point (based on the log law in this case), U_p,nominal
  4. set the shear stresses -<u_i u_j> (not the normal stresses in the Reynolds stresses) to u_shear * U_p,real / U_p,nominal , In OF this happens through the turbulent viscosity (nu_t)

cfdonline2mohsen July 2, 2013 13:22

Thanks roman
it was very helpful.

immortality July 2, 2013 19:02

Whould you explain more and Why stage 4 is done?

romant July 3, 2013 04:26


Originally Posted by immortality (Post 437418)
Whould you explain more and Why stage 4 is done?

Step 4 is introduced in order to have a more stable solver. Instead of setting the velocity in the first point away from the wall, a force (the wall shear force) is introduced in the equation. This way, the solver won't have any 0 velocities introduced by accident (think of stagnation points), this could destabilize the solver as you would be introducing 0's into the matrix.

The easiest way to introduce this source term into the equation is by modifying the turbulent viscosity, see Pope, Turbulent Flows, 2000, pp 442-443 and Versteeg and Malalasekera, An introduction to computational fluid dynamics: The finite volume method, pp. 276-277

All times are GMT -4. The time now is 20:45.