
[Sponsors] 
July 15, 2011, 05:57 

#41 
New Member
David R. Fuhrman
Join Date: Jul 2011
Posts: 1
Rep Power: 0 
I also initially experienced the problem that the same solution was returned, regardless of the roughness Ks, when using nutRoughWallFunction (OpenFoam version 1.6ext, and a variant of kOmega for the turbulence model). However, after some inspection, the reason was that my first grid point was too small i.e. not in the log layer, hence the code was essentially treating the wall as smooth, as far as I could tell.
If you check in nutRoughWallFunctionFvPatchScalerField.C, there is an if statement that is only entered if yPlus is greater than yPlusLam, which seems to be taken as 11.5301 (I inserted a temporary Info statement, just to write it to my screen during simulations). Hence, if your first grid point is below this value, then the if statement is not entered, and nutw is not modified. If you want to model roughness properly with these wall functions, as I see it, care must be taken such that the first cell center should be the order of the roughness length Ks. This will ensure that it is sufficiently large to lie in the log layer for a rough wall. Alternatively, this strategy will also (apparently) lead to a wall being treated as smooth, for sufficiently small Ks (and hence grid size). Cheers, David 

July 15, 2011, 11:13 

#42 
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo  Brazil
Posts: 105
Rep Power: 6 
Hi David,
Yes, you are right regarding the Y+ distance when simulating roughness. It does not have physical sense to calculate the turbulent boundary layer profiles where there is a roughness elements. Below the Y+ that corresponds to Ks, the OF considers/assumes a sublayer is that viscous/laminar. Actually the presence of the roughness causes a shift in the U+ profile so increasing the laminar region. However, depending on shape and distribution of the roughness the profile may not follow that of laminar sublayer. The heat transfer is even more complicated because the increasing height of the roughness will degrate the heat flux due to effect of an additional thermal resistance. This is the reason why the direct Pr_t analogy does not work well. This is the assumption made by OpenFoam, however, there is a need to correct the analogy to take into account the effect of roughness sublayer thermal resistance. This fact becomes a real challenge when the roughness equivalent height Ks (or the Reynolds roughness number Re_k=u_tau \cdot Ks / \nu) is high. See references: http://papers.sae.org/2011380023/ Heat Transfer from a Rough Cylinder in Tunnel RE=2.2E5 M=0.07 Regards, Guilherme Last edited by aerothermal; July 15, 2011 at 11:32. Reason: replaced body by elements 

January 5, 2012, 02:04 

#43 
Member
张德胜
Join Date: Oct 2011
Posts: 71
Rep Power: 5 
Hi,friend.I now use simplefoam to calculate windfarm. The ground condition of nut is nutroughwallfunction,but the profile of velocity from inlet to outlet are not fit very well,The max error is about 16%.So i guess it is the problem of Ks and Cs.My z0 is 0.03.Ks=(10/Cs)*z0.Can you give me some advice about my problem.


January 5, 2012, 15:19 

#44 
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo  Brazil
Posts: 105
Rep Power: 6 
Hi hei@ge,
take a look at Tapia thesis...you may find how to make a map of Cs to simulate your terrain. http://hig.divaportal.org/smash/get...936/FULLTEXT01 Regards, Aerothermal 

January 6, 2012, 23:52 

#45 
Member
张德胜
Join Date: Oct 2011
Posts: 71
Rep Power: 5 
Hi,Aerothermal.I think it will be helpful.Now my epsilon's ground condition is epsilonwallfunction,and it works well.Thanks a lot.


January 8, 2012, 09:42 

#46 
Senior Member
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo  Brazil
Posts: 105
Rep Power: 6 
Hi hei@ge
After thinking about the problem, I also suggest to you to implemet your own Cs function inside the wallFunction by modifying the source code itself and making a new model customized for your case. I implemented a new Cs based on Stanford group work (Kays and Crawford book on convective heat transfer) and wall function in the paper: http://www.ats4i.com.br/en/publicati...11380023.pdf Several reasons led me to implement that model but the important point is that sometimes you will need to modify the source code in order to get the the code work for you purposes. Remember that eventually OpenFoam was not implemented to run your specific case. Regards, Aerothermal 

January 18, 2012, 11:45 

#47 
New Member
Tom
Join Date: Nov 2011
Posts: 1
Rep Power: 0 
Hello all,
Would somebody be able to confirm for me from where the equation underlying nutkRoughWallFunction is taken from? Is it the same implementation of rough walls as in Fluent? Or is there another paper/document which describes the derivation of the function used? I'm trying to choose appropriate Ks for my atmospheric roughness length (r0) following Blocken et al. (2007), but without knowing the basic function used I can't be sure of the correct relationship between Ks and r0. My attempts at unravelling the source code haven't been enlightening so far..., but then I'm new to C++... Any help much appreciated! Cheers, Tom 

February 21, 2015, 12:37 
nutkRoughWallFunction

#48  
New Member
Joey
Join Date: Oct 2013
Posts: 4
Rep Power: 3 
Quote:
Do you know how to implement nutkRoughWallFunction in OpenFoam 2.3.0 version? the parameters Ks and Cs are the same, but it is necessary to add a vaule at 0/nut dict. Could you provide an example of the usage of this wall function? Thank you very much. 

Yesterday, 02:47 

#49  
Member
harshawardhank
Join Date: Mar 2014
Posts: 60
Rep Power: 3 
Quote:
I am also stuck at this point. Have you figured out correct syntax to implement nutkRoughWallFunction in OpenFoam 2.3.0? Harsha 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problem with Gmsh  nishant_hull  Open Source Meshers: Gmsh, Netgen, CGNS, ...  19  Yesterday 05:10 
Error : Self intersecting surface mesh, computing intersections & Error : Impossible  velan  Open Source Meshers: Gmsh, Netgen, CGNS, ...  1  July 14, 2015 05:54 
boundaries with gmshToFoam  ouafa  Open Source Meshers: Gmsh, Netgen, CGNS, ...  7  May 21, 2010 12:43 
Surface roughness in Flow3d  Marco  FLOW3D  2  December 23, 2008 22:12 
CFX4.3 build analysis form  Chie Min  CFX  5  July 12, 2001 23:19 