
[Sponsors] 
December 9, 2010, 20:08 
kappatWallFunction

#1 
Member
Hagen Müller
Join Date: Nov 2010
Posts: 33
Rep Power: 8 
Hello,
has anybody experience with the kappatJayatillekeWallFunction? I think the wall function prescribes the Temperature boundary layer with the Pfunction: P = 9.24{r3  r} and T+ = σT(U+ + P) I found the relation here: http://dma.ing.uniroma1.it/Hanjalic/...tflowcfd.pdf But it is still not clear how OpenFOAM exactly predicts the Temperature value at the wall adjacent cell. In my opinion further quantities like the temperature gradient or the wall heat flux are needed. Furthermore, I don't know how to set up a case with this wall Function. It does not work like for example nutWallFunction is used (boundary patch type). Thank you for your help 

January 19, 2012, 10:39 

#2 
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 8 
Hey,
in my opinion the boundary condition for kappa_t models the effect of the thermal law of the wall, using the linear difference quotient for the approximation of the heat flux at the wall, that means: q = kappa_t (dT/dx) \approx \kappa_t T_p / y_p From the definition of T+ T+ = [(T_w T_p) rho c_p u_tau]/ q we obtain an equation for heat flux q which depends on T+: q=[(T_w T_p) rho c_p u_tau] /T+ The thermal law of the wall T+ = Pr_t ( 1/kappa ln(Ey+) + P) gives an equation for T+ which can be inserted into the equation for the flux. With the definition of the flux and the approximation we obtain q = kappa_t T_p / y_p = [(T_w T_p) rho c_p u_tau] /T+ and by inserting the logarithmic law of the wall for T+ we obtain an equation for kappa_t which models the effect of the logarithmic law of the wall. In OpenFOAM the implementation in kappatJayatillekeWallFunction is kappa_t = nu * (y+ / (Pr_t * (log(Ey+)/kappa + P)  1/Pr) When I derive this boundary condition from the equations which I mentioned before I obtain kappa_t = mu *cp (y+ / (Pr_t * (log(Ey+)/kappa + P)  1/Pr) Has anyone made similar experiences? If you are interested I could also post a more detailed deduction of the boundary condition in order to see where might be the error. 

January 19, 2012, 10:41 

#3  
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 8 
Quote:
The wall function for kappa_t is analogous to the wall function for nu_t. In my opinion it should be possible to use both, nutWallFunction for nut at the wall and JayatillekeWallFunction for kappa_t at the wall. 

February 7, 2012, 18:44 

#4 
Member
Jubayer
Join Date: Oct 2009
Location: The University of Western Ontario, London, Ontario
Posts: 42
Blog Entries: 1
Rep Power: 9 
Hi Anne,
As you said, "In OpenFOAM the implementation in kappatJayatillekeWallFunction is kappa_t = nu * (y+ / (Pr_t * (log(Ey+)/kappa + P)  1/Pr) When I derive this boundary condition from the equations which I mentioned before I obtain kappa_t = mu *cp (y+ / (Pr_t * (log(Ey+)/kappa + P)  1/Pr) Has anyone made similar experiences? If you are interested I could also post a more detailed deduction of the boundary condition in order to see where might be the error."" Actually there is nothing wrong between the above two equations. In everywhere kappat is actually turbulent thermal conductivity with unit J/kgK, but in openFoam kappat is something with unit m^2/s (you can look into hot room tutorial to see the unit of kappat). So the real_kaapat = openFoam_kappat*Cp*rho. So if you divide your real_kappat equation (2nd one) with Cp and rho you will get openFoam_kappat equation (1st one) Now I have a question. What happens to this wall function if I want to use lowRe modelling for heat transfer (y+<1). Law of the wall says, T+ = y+ for y+<11. What happens to this JayatillekeWallFunction for y+<11? Do I have to modify the wall function? Thanks. 

February 9, 2012, 09:01 

#5  
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 8 
Hey Jubayer,
thank you for the hint with the kappat_t used in OpenFOAM. Now everything makes sense to me. Quote:
When yT+>y+ in OpenFOAM/JayatillekeWallFunction kappa_t is set to zero Code:
if (yPlus > yPlusTherm) { scalar nu = nuw[faceI]; scalar kt = nu*(yPlus/(Prt_*(log(E_*yPlus)/kappa_ + P))  1/Pr); kappatw[faceI] = max(0.0, kt); } else { kappatw[faceI] = 0.0; } HTML Code:
scalar kappatJayatillekeWallFunctionFvPatchScalarField::yPlusTherm ( const scalar P, const scalar Prat ) const { scalar ypt = 11.0; for (int i=0; i<maxIters_; i++) { scalar f = ypt  (log(E_*ypt)/kappa_ + P)/Prat; scalar df = 1.0  1.0/(ypt*kappa_*Prat); scalar yptNew = ypt  f/df; if (yptNew < VSMALL) { return 0; } else if (mag(yptNew  ypt) < tolerance_) { return yptNew; } else { ypt = yptNew; } } return ypt; } Anne 

May 22, 2012, 04:56 

#6 
New Member
chkath
Join Date: May 2012
Posts: 2
Rep Power: 0 
Hi,
can anybody tell me how Anne derived the boundary condition: kappa_t = mu *cp (y+ / (Pr_t * (log(Ey+)/kappa + P)  1/Pr) from the equation: q = kappa_t T_p / y_p = [(T_w T_p) rho c_p u_tau] /T+ Thank you for your reply! 

May 22, 2012, 06:32 

#7 
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 8 
Hey,
actually there was a little mistake, i.e. I derived the equation from q = kappa_eff T_p / y_p = [(T_w T_p) rho c_p u_tau] /T+ which is equal to q= (kappa + kappa_t) T_p / y_p = [(T_w T_p) rho c_p u_tau] /T+ (I will correct this in my preceding post) Starting with (kappa + kappa_t) T_p / y_p = [(T_w T_p) rho c_p u_tau] /T+ you shift the term kappa T_p/y_p to the righthand side. Then you obtain kappa_t T_p / y_p = [(T_w T_p) rho c_p u_tau] /(T+)  kappa*T_p/y_p For u_tau you use the equation u_tau = (y+/y_p) *nu kappa_t T_p / y_p = [(T_w T_p) rho c_p y+*nu] /(T+ y_p)  kappa*T_p/y_p T_w=0 at the wall, setting mu= rho*nu and multiplying with y_p/T_p leads to kappa_t = (mu c_p y+) /(T+)  kappa For the Prandtlnumber holds Pr= mu*cp/kappa > kappa= (mu*cp)/Pr kappa_t = (mu c_p y+) /(T+)  (mu*cp)/Pr So kappa_t= mu*cp (y+/T+ 1/Pr) Finally inserting T+ according to the thermal law of the wall T+= Pr_t * (log(Ey+) /kappa + P) leads to the final equation for kappa_t kappa_t= mu *cp (y+ / (Pr_t * (log(Ey+)/kappa + P)  1/Pr) If you note more mistakes do not hesitate to inform me 

May 22, 2012, 07:48 

#8 
New Member
chkath
Join Date: May 2012
Posts: 2
Rep Power: 0 
Thank you for your reply!
It looks much more clear for me, but I still have questions: Why is T_w = 0 at the wall? And you wrote: "multiplying with y_p/T_p leads to: kappa_t = (mu c_p y+) /(T+)  kappa" In the equation before you have a minus in front of T_p. Why does this minus vanishes? 

May 24, 2012, 07:22 
lowRe Buoyant Boussinesq Heat Transfer

#9  
New Member
Will Logie
Join Date: Sep 2010
Location: ANU, Canberra, Australia
Posts: 21
Rep Power: 8 
I'd like to join the conversation around about here if I may:
Quote:
Code:
volScalarField kappaEff("kappaEff", RASModel>nu()/Pr + kappat); surfaceScalarField heatFlux ( Cp * rho * fvc::interpolate(kappaEff) * fvc::snGrad(T) ); I don't know how this lowRe thermal wall function might look (i.e. which modifications one could make to JayatillekeWallFunction) nor if there are other workarounds (e.g. NuFOAM). Any thoughts on the matter? Regards, Will. 

May 30, 2012, 06:35 

#10  
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 8 
Hey chkath,
This condition is valid when using a homogeneous Dirichlet boundary condition for the temperature at the wall, i.e. the temperature is set to zero, so Tw=0 Quote:
The heat flux is defined, according to Fourier's law as q= kappa_eff T_p / y_p Setting this equal to the highRe equation leads to  kappa_eff T_p / y_p = [(T_w T_p) rho c_p u_tau] /T+ and this is equal to kappa_eff T_p / y_p = [(T_p  T_w) rho c_p u_tau] /T+ So the final result remains the same. Kind Regards Anne 

Thread Tools  
Display Modes  

