
[Sponsors] 
May 17, 2012, 14:41 
kqRWallFunction

#41 
Member
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 7 
Sponsored Links
I have a quick question. Do you know what kqRWallFunction is doing in OpenFoam?! It seems that this wall function imposes zero gradient boundary condition for the first grid point turbulent kinetic energy but when I am checking my k values for the first and second nodes, they are not equal. Thanks, 

Sponsored Links 
May 21, 2012, 10:53 

#42 
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 9 
Hey Sam,
Normally the wall boundary condition kqRWallFunction should impose a zeroGradient boundary condition for k. This means that the gradient is equal to zero > the value for k at the boundary is equal to the value for k at the first cell. Did you compare the boundary value and the value at the first cell? It should be the same....maybe you compared at the nodes which is different due to interpolation.... Best, Anne 

May 22, 2012, 11:41 

#43 
Member
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 7 
hi Anne,
thanks for your reply. you are correct. But, then for the calculation of nut in nutkwallfunction, i see that we need the value of K at the first grid point. I do not understand what value OpenFoam is using for turbulent kinetic energy at the first grid point. Since we do not solve equations for the first grid point, k value for the first grid point should come from another place. Another thing which is unclear for me is the value of nut at the first grid point. I am expecting this value to come from the log law modification (nut=nu(ky/ln(Ey+)1)), but when I check my data for the first grid point, I see that it is coming from (nut=cmu*k^2/epsilon). So, I think based on my understanding, the boundary is where the log law modification is applied not the first grid point. So, actually, we solve the equations for the first grid point. Am I right?!! thanks, pooyan 

May 22, 2012, 11:45 

#44 
Member
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 7 
Anne,
I have another quick question. How can I get the values at the boundary. when I go to paraview, I can export my data at the cell centers, but that data do not include values at the boundary. they just include values at the first grid point and the second grid point. 

July 11, 2012, 17:11 

#45  
Member
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 7 
Hi Roman
I have a quesion about nutkwallFunction. When I checked a solution using kepsilon wall function and nutkWallfunction, I noticed that the values for nut at the first grid point is actually equal to cmu*k^2/epsilon and the valu at the boundary is coming from log law. So, why do we need a value fo nut at the boundary since we are not solving any equation for nut?! Quote:


July 17, 2012, 11:17 

#46  
Member
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 7 
Hi Anne,
you discussed about the wall shear stress at the wall which contains the modified nut at the wall and that affects the solution for momentum equation. Can you please tell me how I can find the equation for wall shear stress at the boundary?! (i.e. nut*up/yp?!) Quote:


July 17, 2012, 11:36 

#47 
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 9 
Hey Pooyan,
when solving the NavierStokes Equations at the wall, convective terms vanish \int d/dx_j (u_i (P) u_j (P)) = \oint u_i(P) u_j(F) (Gauß) which is zero as u_j(F), the value of u_j at the boundary face is zero. The pressure gradient is also zero, as it has the boundary condtion zeroGradient. The remaining term is the diffusive term \int nut d/dx_j d/dx_j u_i(P) = \oint nut d_x_j u_i (F) \approx nut FaceArea* u(P)/yp This is the wall shear stress at the wall. Sorry for the bad notation, but I would like to point out the basic idea. The wall shear stress is the remaining term when solving the NavierStokesEquations at the boundary. So the modified nut affects the solution. Hope this helps... you won't find it directly in the code, the nut will appear as a matrix coefficient in the equation system. Kind Regards Anne 

July 17, 2012, 12:46 

#48  
Member
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 7 
Thanks a lot for your reply.
that makes sense, but I have a question. Do we solve the N.S equations at the boundary?!! I guess we solve N.S equation for the first grid point and that is where nu_eff is coming into account. right?!! Or the boundary for momentum equation at the wall can be the flux coming from the wall and that is the total shear force which is equal to nu_eff*du/dy?! which of the above statements are true?!! Quote:


July 23, 2012, 10:13 

#49  
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: London, UK
Posts: 368
Rep Power: 14 
Quote:
The reason comes from the way OpenFOAM is programmed. Every boundary condition needs to have a value specified, due to the fact that all boundaries inherit a certain basic functionality from a basic boundary (Inheritance in C++).
__________________
~roman 

March 6, 2013, 06:39 

#50 
New Member
Join Date: Oct 2012
Posts: 8
Rep Power: 6 
Hi Roman,
regarding to standard wall function derivation here http://www.cfdonline.com/Wiki/Two_e...wall_functions based on which assumption can you derive "compact version of log law" (equation 1). I found out that the complet form of this equation is: u_p /u* = (1/kappa) ln(E yplus/1+C_s kplus_s) where kplus_s=u*k_s/nu and k_s is sand grain roughnness. equation 1 can be true only for very smooth wall where C_s kplus_s can be ignored. Is it right? 

March 6, 2013, 06:53 

#51 
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: London, UK
Posts: 368
Rep Power: 14 
Hej,
I didn't write the article, but only modified a mistake in the article. However, I think your conclusion is right. Many time, you assume smooth walls in CFD, and this way the grain size (roughness) does not play a role.
__________________
~roman 

March 6, 2013, 07:18 

#52 
New Member
Join Date: Oct 2012
Posts: 8
Rep Power: 6 
Ok.. It seems really dangerous to use the wall functions when u dont know what exactly happens inside them!


March 6, 2013, 07:19 

#53 
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: London, UK
Posts: 368
Rep Power: 14 
There is special wall functions for rough walls, therefore this is not a problem.
__________________
~roman 

March 6, 2013, 08:45 

#54 
New Member
Join Date: Oct 2012
Posts: 8
Rep Power: 6 
Roman,
You are right. For rough wall I can find "nutKAtmRoughWallFunction" where the core equation is: nu_t= nu[(yplus*kappa/ln((y+y_0)/y_0))1] 1)This equation can be true for all walls (smooth as well as rough). but I dont understand why the title of this wall function is "nutKAtmRoughWallFunction" 2) there is an If loop inside the code. before applying the equation above, the code verifies that (y+y_0)/y_0> 10^4. It implies that y must be y>10^4 *y_0 .It does not seem logical to me. Do you have any idea about this condtion? 

March 6, 2013, 08:49 

#55 
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: London, UK
Posts: 368
Rep Power: 14 
Sorry, I don't think I can help you there, I haven't really looked into that wall function. Maybe somebody else knows what to do there.
__________________
~roman 

March 6, 2013, 11:05 

#56 
New Member
Join Date: Oct 2012
Posts: 8
Rep Power: 6 
Just for correction sake, if some body else needs:
I made a mistake in writting. the correct condition is: (y+y_0)/y_0>1+10^4. It implies that y must be y>10^4 *y_0 

August 15, 2013, 05:20 

#57 
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: London, UK
Posts: 368
Rep Power: 14 
I think I made a mistake in the answer of this question, however, I can't change the answer anymore. So I looked into this again. nut is defined on the wall and not in the first grid point, is because the force created from the wall shear stress is a wall force and should enter the equation in that location, the wall (Versteeg, p 277).
__________________
~roman 

November 28, 2014, 10:20 

#58  
New Member
yusik
Join Date: Nov 2014
Posts: 2
Rep Power: 0 
Quote:
I spent some times to come up with the equation, nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus)  1.0); in 'nutUWallFunctionFvPatchScalarField.C' and many of the replies in this forum is not directly related to your question. So I share the reference paper & book I have referred, Eq. 4 in Kalitzin et al. 2005,Nearwall behavior of RANS turbulence models and implications for wall functions (http://www.sciencedirect.com/science...21999104004164) and Eq. 3.21 in VERSTEEG and MALALASEKERA, An introduction to computational fluid dynamics (http://ekaoktariyantonugroho.files.w...sversteeg.pdf). Using these two equations, I could derive the equation in OF. Good luck! 

December 1, 2014, 05:58 

#59 
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 9 
Dear Yusik,
thank you for your answer. Meanwhile, I could derive the equation by myself or rather with the help of the literature that you were also recommending. Helpful is also this link http://www.cfdonline.com/Wiki/Two_e...wall_functions Best Wishes, Anne 

March 12, 2015, 16:40 

#60  
New Member
Join Date: Nov 2014
Posts: 3
Rep Power: 4 
Quote:
Hello romant, I wanted to ask you why the velocity derivative used to compute the wall shear stress is approximated with a linear function, when the velocity distribution is known to be logaritmic. Don't you think that this lowers too much the accuracy of the simulation? Regards, Enrico 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
nutWallFunction vs. nutkWallFunction  romant  OpenFOAM Running, Solving & CFD  4  June 16, 2016 12:43 
second order schemes  marine  OpenFOAM  66  October 26, 2014 12:10 
nutWallFunction questions  madad2005  OpenFOAM  9  October 28, 2011 06:36 
A few questions about Spalart Allmaras model and y  seb62  OpenFOAM Running, Solving & CFD  8  January 15, 2011 14:09 
nutWallFunction boundary condition  AirS  OpenFOAM PreProcessing  6  March 3, 2010 08:31 
Sponsored Links 