
[Sponsors] 
October 17, 2011, 07:48 

#21 
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 8 
I get 0 on every wall for fully resolved boundary layers. As reported here: Problems with YPlusRAS and wallShearStress
For wallFunction I get value but I canīt assess them...
__________________
OF  2.0.0 

October 18, 2011, 19:53 
y+ = y*

#22 
New Member
Saxwax
Join Date: Aug 2010
Posts: 17
Rep Power: 6 
Hi Cameosas,
Glad to hear that the file compiled, not sure about the 0 for fully resolved boundary layers. It is possible that I used the old version of Niklas' yPlus utility. Have you checked that? Vaina74, I'm not sure which version of the FLUENT manual you are quoting. In the version that I have (Version 12 April 2009) the section NearWall Treatment for Wall Bounded FLows contains the following quote: "It should be noted that, in ANSYS FLUENT, the lawsofthewall for mean velocity and temperature are based on the wall unit, y*, rather than y+. These quantities are approximately equal in equilibrium turbulent boundary layers." Comparing the equations for y+ and y* we can see that the only difference between the two are the frictionVelocity, Cmu^0.25 and k^0.5 terms. y+ = rho*frictionVelocity*y/mu y* = rho*(Cmu^0.25)*(k^0.5)*y/mu For equilibrium turbulent boundary layers (ETBL) frictionVelocity = (Cmu^0.25)*(k^0.5) (Ferziger), i.e. y+ is equal to y*. If you are using standard wall functions for flows with an ETBL then y*, or yPlusRAS, probably will give you a good enough indication of the appropriateness of your cell size. Not sure if that helps (it definitely wont if I am wrong ). Let me know your thoughts on this one. It would be good to have a better idea on why things are the way they are in OpenFOAM. Regards, D. 

October 20, 2011, 04:09 

#23 
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 8 
HI Saxwax,
I have downloaded both, but I am using the newer version.
__________________
OF  2.0.0 

October 24, 2011, 23:50 
Nut?

#24 
New Member
Saxwax
Join Date: Aug 2010
Posts: 17
Rep Power: 6 
Cameosas,
The way I see it, based on the equation used to calculate the cell y+ value in the yPlus utility there are three possible reasons why a value of exactly zero would be output: 1) y = 0 2) snGrad = 0 3) nut = 0 Two of these are very easy to check, y and nut. The third is also probably quite easy to check (edit yPlus utility to output snGrad instead)  I haven't tried this. My guess would be that nut is the likely culprit. Either a boundary condition at the wall is set to nut = 0, or the wall function being used (i.e. nutkWallFunction) is calculating the nut value at some (or all) points to be zero. I'd either have a look at the nut file or colour the wall patch by nut in Paraview. I have noticed the same zero values being output by yPlus. A quick check showed that the nut field had several cells showing up as zero (nutkWallFunction). I'm not really sure if this is the expected behavior or not. Someone else can probably answer that. Regards, D. Last edited by Saxwax; October 25, 2011 at 01:10. 

October 25, 2011, 10:00 

#25 
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 8 
HI Saxwax,
Thats a really good hint! Thanks! I get zero values for: Code:
yPlus.boundaryField()[patchi] = y[patchi] Code:
yPlus.boundaryField()[patchi] = mut.boundaryField()[patchi] Code:
yPlus.boundaryField()[patchi] = mag(U.boundaryField()[patchi].snGrad()); Code:
yPlus.boundaryField()[patchi] = (RASModel>mu().boundaryField()[patchi]/rho.boundaryField()[patchi]);
__________________
OF  2.0.0 Last edited by camoesas; October 26, 2011 at 01:47. 

October 26, 2011, 03:06 

#26 
Senior Member
Join Date: Mar 2009
Posts: 138
Rep Power: 8 
I have defined the walls for mut like:
Code:
{ type mutkWallFunction; value uniform 0; }
__________________
OF  2.0.0 

November 1, 2011, 20:11 

#27 
New Member
Saxwax
Join Date: Aug 2010
Posts: 17
Rep Power: 6 
Cameosas,
Are the zero values for mut and y in the same cells (or all the cells)? If so I would guess that the mutkWallFunction uses y to calculate the mut value. You could check this by looking at the mutkWallFunction.C source code. This way you would know that the zero values originate from y. If not well then I am not really sure. Again, looking at the source code may help. Regards, D. 

June 10, 2013, 03:56 

#28 
Member
Join Date: Aug 2011
Posts: 74
Rep Power: 5 
Hello,
I just want to check that yPlusRAS is calculating the right thing. So I calculated yPlus with yPlusRAS and by hand with this equation: yPlus= Cmu^(0.25) * y * k^(0.5) / nu with: Cmu =0.09 y = 0.00125 (it is the cell height / 2 because I am looking at the cell directly at the wall) k = 0.19 (from paraview) nu = 1.0e6 So i get: yPlus = 298 yPlusRAS says: yPlus = 6.7 The domain is a rectangular channel, so Iīve got a nice grid. To get the yPlus from yPlusRAS I should use y = 2.8e5 Can somebody help me what is wrong? Thanks a lot 

June 11, 2013, 03:00 

#29 
Member
Join Date: Aug 2011
Posts: 74
Rep Power: 5 
I found my mistake
the yPlus = 6.7 was shown in paraview. If I look at the output in the shell after I tipped yPlusRAS I see complete different values in comparison to the values in paraview. But the values in the output are the values I calculated by hand. So the interpolation in paraview was the problem. But still one simple question is left: I have a rectangular channel and I decided to use wall functions for k, epsilon and nut. Am I right that the distance from the wall to the cell centre of the first cell at the wall has to be smaller than yPlus = 11? If itīs not, do I get a wrong result? I am also not sure what k I should use for calculating yPlus. At the beginning I only have the k which I enter in the kfile. But at the end of my simulation the k at the wall has changed. So yPlus has changed too. So maybe after the run I know that my grid should be smaller. How can I solve this problem? thanks a lot for your help 

August 6, 2014, 13:18 

#30 
New Member
Marvin
Join Date: Jan 2014
Posts: 11
Rep Power: 3 
Sorry for bumping that old thread.
Has anyone a compiling version of the right "yPlus" for OF 2.3. Or can anyone tell me what I have to change in the original yPlusRAS.H to calculate the right yPlus. I'm quite new to openFOAM so I'm greatful for any hint that teaches me how to write my own sourcecode. Actually I'm just grepping through source code on and on with little progress. Unlike OF 1.7, in OF 2.3 I can't find yPlus.H there is only yPlusRAS.H which somehow calculates yPlus using the nutWallFunctionFvPatchScalarField. 

September 9, 2014, 13:01 

#31  
New Member
Chrissy Stanford
Join Date: Oct 2013
Location: South Africa
Posts: 11
Rep Power: 3 
Quote:
I am struggling with the same problem. Have you found a way of calculating y+ yet? I have found other yPlus utilities in similar threads (See link below) and tried to apply them to my model, but since I'm working with a high Re turbulence model (and the code is written for low Re models) I get y+ values of zero. This is not necessarily the problem, though. I might just be implementing it completely incorrectly. Here is the link to the other posts on this topic that I read: y+ and u+ values with lowRe RANS turbulence models: utility + testcase. Post #93 is where I found the utility I mentioned. I have also wondered how openFoam v. 2.3.x calculates y* and whether it is possible to find a relation between y* and y+ and modify the values that are generated by yPlusRAS? I have scoured through the nutWallFunctionFvPatchScalarField, but since my programming is rusty I can't figure out how y* is calculated. Any help would be greatly appreciated. Thanks, Chrissy 

September 15, 2014, 04:14 

#32 
New Member
Marvin
Join Date: Jan 2014
Posts: 11
Rep Power: 3 
Hey Chrissy,
I am sorry but my final approach was now to use CFX to compute yPlus values instead. I haven't found a relation between y* and y+. What I have noticed is that the yStar values from CFX are more than ten times higher if the prisms are very thin (12 prism layers and more, enough to resolve the boundary layer). For meshes with 3 prism layers, yStar and yPlus were only slightly different (both average and min max). What I need to add is that OF is directly computing on teds and CFX is using the nodes to create a polyeder mesh around them. Therefore the elements slighly differ. You are right with the nutFunction. They are essential for yPlus computation. For example if you resolve the BL (set nut = computed) you can't compute yPlus any more. I found nutkWallfunction: const scalar Cmu25 = pow025(Cmu_); tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw(); forAll(nutw, faceI) { label faceCellI = patch().faceCells()[faceI]; scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI]; if (yPlus > yPlusLam_) { nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus)  1.0); } } return tnutw; } maybe it is the definition you are looking for. I hope I could help you little. But now I have to return writing my thesis Greets Marvin 

July 7, 2015, 08:53 

#33 
New Member
Luka Denies
Join Date: Oct 2014
Posts: 10
Rep Power: 2 
I've changed the file previously uploaded here. This file works for OF 2.3.1 and calculates y+ instead of y*.


Tags 
komegasst, openfoam 1.7.1, simplefoam, yplusras 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
OpenFOAM static build on Cray XT5  asaijo  OpenFOAM Installation  9  April 6, 2011 12:21 
Working directory via command line  Luiz  CFX  4  March 6, 2011 21:02 
OpenCFD release OpenFOAMŪ version 1.7.1  opencfd  OpenFOAM Announcements from ESIOpenCFD  0  August 26, 2010 11:40 
yPlusRAS in OF 1.6.x  Low Re Models  ivan_cozza  OpenFOAM Running, Solving & CFD  0  September 23, 2009 05:27 
OpenFOAM14 for Mac OSX Darwin 104  gschaider  OpenFOAM Installation  118  July 20, 2008 05:19 