- **OpenFOAM Bugs**
(*https://www.cfd-online.com/Forums/openfoam-bugs/*)

- - **Bug in wall function**
(*https://www.cfd-online.com/Forums/openfoam-bugs/62578-bug-wall-function.html*)

There is a minor bug in the imThere 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) and: 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. Rolando |

We have been investigating thiWe 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?
Henry |

In the inner flow field of a fIn 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. Rolando |

Do you think the production teDo 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)?
Henry |

In the literature the wall proIn 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. http://www.cfd-online.com/OpenFOAM_D...s/126/4641.png Rolando |

I understand the arguments aboI 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.
Henry |

Independent of the wall treatmIndependent 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. Rolando |

Just a comment about the turbuJust 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. Michele |

All times are GMT -4. The time now is 10:28. |