CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

kappatWallFunction

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Anne Lincke

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2010, 19:08
Default kappatWallFunction
  #1
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 15
Hagen is on a distinguished road
Hello,

has anybody experience with the kappatJayatillekeWallFunction? I think the wall function prescribes the Temperature boundary layer with the P-function:

P = 9.24{r3 - r} and
T+ = σT(U+ + P)

I found the relation here:
http://dma.ing.uniroma1.it/Hanjalic/...t-flow-cfd.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
Hagen is offline   Reply With Quote

Old   January 19, 2012, 09:39
Default
  #2
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 15
Anne Lincke is on a distinguished road
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.
Anne Lincke is offline   Reply With Quote

Old   January 19, 2012, 09:41
Default
  #3
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 15
Anne Lincke is on a distinguished road
Quote:
Originally Posted by Hagen View Post
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).
I think you just use it as boundary condition for kappa_t at the wall.
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.
Anne Lincke is offline   Reply With Quote

Old   February 7, 2012, 17:44
Default
  #4
Member
 
Jubayer
Join Date: Oct 2009
Location: The University of Western Ontario, London, Ontario
Posts: 42
Blog Entries: 1
Rep Power: 16
cm_jubayer is on a distinguished road
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/kg-K, 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 low-Re 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.
cm_jubayer is offline   Reply With Quote

Old   February 9, 2012, 08:01
Default
  #5
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 15
Anne Lincke is on a distinguished road
Hey Jubayer,

thank you for the hint with the kappat_t used in OpenFOAM. Now everything makes sense to me.

Quote:
Now I have a question. What happens to this wall function if I want to use low-Re 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.
For thermal simulations you have to compute thermal y+. If thermal y_T+ < y+ then the wall function approach is used.

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;
        }
But I do not yet understand how the thermal y+ is computed. You can find the iteration inside the code


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;
}
Regards
Anne
Anne Lincke is offline   Reply With Quote

Old   May 22, 2012, 04:56
Default
  #6
New Member
 
chkath
Join Date: May 2012
Posts: 2
Rep Power: 0
chkath is on a distinguished road
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!
chkath is offline   Reply With Quote

Old   May 22, 2012, 06:32
Default
  #7
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 15
Anne Lincke is on a distinguished road
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 right-hand 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 Prandtl-number 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
Anne Lincke is offline   Reply With Quote

Old   May 22, 2012, 07:48
Default
  #8
New Member
 
chkath
Join Date: May 2012
Posts: 2
Rep Power: 0
chkath is on a distinguished road
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?
chkath is offline   Reply With Quote

Old   May 24, 2012, 07:22
Default low-Re Buoyant Boussinesq Heat Transfer
  #9
New Member
 
Will Logie
Join Date: Sep 2010
Location: ANU, Canberra, Australia
Posts: 21
Rep Power: 15
will.logie is on a distinguished road
I'd like to join the conversation around about here if I may:

Quote:
Originally Posted by cm_jubayer View Post
Now I have a question. What happens to this wall function if I want to use low-Re 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?
In my experience (very low-Re Boussinesq), the incompressible turbulent thermal diffusivity approaches zero with decreasing y+, thus removing a need for the currently implemented kappatJayatillekeWallFunction. This does not mean however that some thermal law of wall is not necessary, especially for average to high Prandtl numbers (decreasing ratio of yPlusTherm to yPlus). The wallHeatFlux:
Code:
volScalarField kappaEff("kappaEff", RASModel->nu()/Pr + kappat);

surfaceScalarField heatFlux
(
    Cp * rho * fvc::interpolate(kappaEff) * fvc::snGrad(T)
);
may still tend to be underestimated (unless yPlus << 1); leading to higher laminar convective heat transfer coefficients (and Nusselt numbers) than one might expect (e.g. the attachment shows free convection from horizontal cylinders in water where yPlus<<1). Alas, this results in long simulation times...

I don't know how this low-Re 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.
Attached Images
File Type: png ISES2011_NuVSRa.png (55.6 KB, 49 views)
will.logie is offline   Reply With Quote

Old   May 30, 2012, 06:35
Default
  #10
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 15
Anne Lincke is on a distinguished road
Hey chkath,

Quote:
Originally Posted by chkath View Post

Why is T_w = 0 at the wall?
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:
Originally Posted by chkath View Post
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?
You are right, this is a mistake (again, I am sorry for this).
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
lionx likes this.
Anne Lincke is offline   Reply With Quote

Old   September 15, 2019, 18:28
Default kappatJayatillekeWallFunction in OF 2.3
  #11
New Member
 
Riccardo
Join Date: Jan 2016
Posts: 16
Rep Power: 10
RANSES is on a distinguished road
Hello OF users and sorry if I'm reopening and old thread. I have the necessity to use this boundary condition (kappatJayatillekeWallFunction) on a simulation I'm running on the 2.3 version of OF. It looks however that this specific boundary condition was supported until the version 2.2.0. Do you know if there is a similar/analogous BC I can use on later verisons of OF?




Thank you in advance
RANSES is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:44.