CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   Bug in wall function (

rolando June 6, 2007 11:10

There is a minor bug in the im
There is a minor bug in the implementation of the wall function.
The production term is calculated as:
G = nu_t * dUdY * Cmu25 * sqrt(k) / (kappa * y)
As the production is defined as:
G = tau_wall * dUdY * (Cmu25 * sqrt(k) / (kappa * y)
tau_wall = (nu + nu_t) * dUdY

nu_t should be replaced by (nu + nu_t)

In a wide range of the application of the wall function this doesnīt matter as nu << nu_t.
But in the lower wall function range nu_t ~ nu and it can have an influence.


henry June 6, 2007 12:38

We have been investigating thi
We have been investigating this recently. The current implementation using nu_t is consistent with the production term in the k-epsilon model which also uses nu_t rather than nu_eff. We understand that most people use nu_eff in the production term in the wall-functions and we will change OpenFOAM to conform. We also understand that in the latest version of Fluent nu_eff rather than nu_t is now used in the production term in the k-epsilon and other two-equation models although no justification is given for this. Do you have any thoughts on this matter?


rolando June 6, 2007 15:55

In the inner flow field of a f
In the inner flow field of a fully turbulent flow there should be no difference between nut and nuEff, as nut >> nu.
At the wall the idea of a flow with no curvature, respectively constant shear stress between the wall point and the first field point is used. This is a Couette flow. For this flow the production of turbulent kinetik energy is:
P = -<u_t*u_n> * dU_t/dn
The reynolds stress is equivalent the wall shear stress (constant shear stress):
-<u_t*u_n> = tau_w / rho
The derivative at the first field point is built from the logarithmic velocity profile:
dU_t/dn = u_tau / (kappa * n) = pow(Cmu, 0.25) * sqrt(k) / (kappa * n)
=> P = tau_w / rho * pow(Cmu, 0.25) * sqrt(k) / (kappa * n)
tau_w = nuEff * dU_t/dn
So by the idea of using the couette flow, the usage nuEff rather than nut in the wall neat domain is justifiable.


henry June 7, 2007 05:35

Do you think the production te
Do you think the production term in the two-equation models should be made consistent, i.e. use nuEff rather than nut? If so what is the justification and why is it rarely done that way (apart from the latest Fluent that is)?


rolando June 7, 2007 09:07

In the literature the wall pro
In the literature the wall production of k is mostly:
P_w = tau_wall * (dU/dy)

tau_wall is a function of nu_eff rather than nu_t.
This is also done in OpenFOAM at one place. There the wall function calculates the turbulent wall viscosity as:
nu_t_wall = tau_wall / (dU / dy) - nu_wall

For the calculation of P_w, tau_wall should be reconstructed in this same way, for consistency reasons. This means, that (nu_t_wall + nu_wall), rather than nu_t_wall should be used for the calculation of the wall production of k.

Below there is a plot of the ratio of the wall productions calculated by nu_eff and nu_t.
The abscissa shows the wall distance in the dimensionless formulation of y+. It is plotted from 30 (the lower end of the logarithmic region) to 1000.
The ordinate shows the ratio of the two formulations.
You can see, that at the lower end of the scope (y+ ~ 30) , there is a large difference of nearly 100%. At the other end the difference is of about 2%, which might be negligible, as the "error" by not simulating the wall near domain might be larger.


henry June 7, 2007 09:16

I understand the arguments abo
I understand the arguments about the wall production, my question relates to the production term in the two-equations models independent of the wall treatment, i.e. in the bulk flow.


rolando June 7, 2007 09:30

Independent of the wall treatm
Independent of the wall treatment, Iīm familiar with the formulation P = nu_t * S^2 as it is implemented in OpenFOAM.

The latest fluent manual I own, is the fluent 6.2 (which one is the latest one?).
There it is still done in this way. If in a newer release it is done in an other way, I donīt know why.


michele June 8, 2007 04:51

Just a comment about the turbu
Just a comment about the turbulence production in the k equation.
The turbulent production represents the rate at which kinetic energy is transferred from the mean flow to the turbulence, and is defined as
Pk=tau_ij S_ij,
where tau_ij represents the Reynolds stress tensor and S_ij the mean strain-rate tensor.
The Reynolds stress tensor, under the Boussinesq constitutive model (for incompressible flows), is
tau_ij=2 nu_t S_ij - 2/3 k delta_ij
(delta_ij is the Kronecker diagonal tensor).
Substituting and taking into account for the incompressibility (delta_ij S_ij=0), the production term is then
Pk=nu_t S^2,
as correctly defined in OpenFOAM.


All times are GMT -4. The time now is 15:49.