CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Liencubic (

roberthino September 6, 2007 10:57

hi people, well again me. i st
hi people, well again me. i still have the same problem, which is like this. if i do a turbulent channel flow simulation i get good results with k-epsilon and reynolds stress models. if i do the same simulation with any nonlinear model i always get profils which are completely non-axissymmetric. for example all the turbulent kinetic energy is on one side and the velocity profile has its peak more near one side than on the centreline. i am wondering if someone else had a problem like this before and maybe can help me. as inlet and outlet boundary condition i chose the pressureoutlet boundary condition, because the pressure is the only thing i know.

roberthino September 6, 2007 11:39

and something else i forgott.
and something else i forgott. can plz someone tell where i can find the iplementation of y+ in openfoam. i want to change it somehow so that it is easier to get a y+ over 100 for a channel flow.

hjasak September 6, 2007 11:45

Could not resist it - I just l
Could not resist it - I just love this code:

scalar yPlus = Cmu25*turbulenceModel::y_[patchi][facei]*sqrt(k_[faceCelli])/nuw[facei];

Can it be easier?

/home/hjasak/OpenFOAM/OpenFOAM-1.4.2/src/turbulenceModels/incompressible/wallFun ctions/wallFunctionsI.H



roberthino September 6, 2007 11:58

yeah that part i also found...
yeah that part i also found....but how can i change it, so that the values for y+ which are calculated are a lot higher with the same grid? i am not that much into c++, i just tried to multiply the expression by a high constant. it is not really working. after changing or edditing the file do i only have to save it, or do i have to compile it?

msrinath80 September 6, 2007 14:11

i want to change it somehow so
i want to change it somehow so that it is easier to get a y+ over 100 for a channel flow

Forgive me if I'm mistaken, but I always thought that Y+ was a function of the distance of the first grid point from the wall. In other words if you need to maintain a different Y+ range, you can change your mesh accordingly. Why does anyone need to tinker with header files unless they want to modify the way it is calculated?

do i have to compile it?

Almost certainly, if you've edited any source file. You need to either build just the library that the source contributes to (*.so) or if the source is directly linked to your solver you need to rebuild your solver as well.

roberthino September 6, 2007 14:25

well here is the thing...y+ ha
well here is the thing...y+ has to be over 100 for openfoam in combination with wall functions. if you take a channel flow with water (v = e-6, Re = 10000) it is nearly impossible to get such an unfine mesh so that the wallfunctions are valid.for height of 0.2 m even if i take 10 elements it is too fine :-)
so i thought about changing the hole wallfunction-y+ implementation. but i am not sure. i think i get weird values with the nonlinear models because of the bad y+-grid combination i have. the other models seem to be unsensitive against it.

msrinath80 September 6, 2007 14:36

It isn't a good idea to change
It isn't a good idea to change the way Y+ is calculated. If I remember my turbulence modeling correctly, standard wall functions take care of the near-wall region and bridge the gap between k-epsilon solution in the bulk and the wall itself. So the wall functions are essentially based on some assumptions one of which is to ensure that the first resolved grid point away from the wall and should not fall in the laminar sub-layer or the buffer layer. Which means that if you change the way Y+ is calculated, you will no doubt relax some of the assumptions that were used to formulate the wall functions. Logic suggests that you will then also need to change the wall functions itself. Am I making sense here?

roberthino September 6, 2007 14:46

sure that makes sense....but f
sure that makes sense....but for example i found another standard wall function expression......i thought that this other one could work better. also y+ has to be over 40 in that one. but well maybe its also another problem why the nonlinear models are not working :-)

ancsa May 10, 2012 11:09

Hi all!

It's been a while since you wrote here but did someone find out what is wrong with the nonlinear models? Until now I did not check for the wall functions for nonlinear models but with nonlinearKEShih I also have problems. I am also trying to use them, first some tests with a boundary layer flow. The results are different from the analytical solution and I thought maybe because from the original Shih paper mentioned in the code the dirac terms, i.e. the double dot products or the gradU are not implemented. Also in the cubic I find no such terms. I think they are responsible to make the contraction of the resulting Re-stress tensor equal to 2/3 k but I am not exactly sure if it can cause this behaviour mentioned here before.

Did someone have the same feeling when comparing with the paper?


All times are GMT -4. The time now is 08:18.