CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Turbulence models and wall boundary conditions (https://www.cfd-online.com/Forums/openfoam-solving/58676-turbulence-models-wall-boundary-conditions.html)

Daniele Panara (Panara) February 14, 2005 04:49

Dear all, Which kind of bo
 
Dear all,

Which kind of boundary conditions should I apply for k and epsilon at the wall when I am using a low Re k-epsilon model?

The same as the high renolds number model?
zerogradient?

Henry Weller (Henry) February 14, 2005 04:51

fixedValue of 0 for k and zer
 
fixedValue of 0 for k and zeroGradient for epsilon although with most low Re models it will work perfectly well with zeroGradient on k.

Kaushik Balakrishnan (Balakrishnan) February 15, 2005 08:56

How can we change the value o
 
How can we change the value of k at inlet to zero gradient? I choose inlet and k is automatically made fixed value.

Henry Weller (Henry) February 15, 2005 09:00

A zeroGradient inlet conditio
 
A zeroGradient inlet condition is effectively an upstream extrapolation from inside the domain and is therfore unstable for a convection-dominated property.

Fabian Peng Kärrholm (Kärrholm) February 16, 2005 02:55

From my experience (although
 
From my experience (although short) from spray calculations in Foam using the Launder Sharma k-epsilon model, choosing k to have a zero gradient on walls, can cause the timestep to become very small (of the order of nanoseconds). If k is set to zero, this behaviour seems to go away.

Hrvoje Jasak (Hjasak) February 16, 2005 08:26

Surely, the original paper wi
 
Surely, the original paper will tell you what boundary conditions you should use.

lucchini June 20, 2005 09:47

Hi all! I have a question a
 
Hi all!

I have a question about turbulence models and mesh motion.

Usually the function turbulence->correct() is calculated after the PISO loop.
In the case of a moving mesh, the flux phi is calculated according to:

phi = fvc::interpolate(rho)
*((fvc::interpolate(U) & mesh.Sf()) - mesh.phi());

In the correct() function of the turbulenceModel divU is corrected by:

if (mesh_.moving())
{
divU += fvc::div(mesh_.phi());
}

why? Shouldn't be divU -= fvc::div(mesh_.phi());

Could someone explain this?
thanks a lot
Regards
Tommaso

henry June 20, 2005 10:12

in phi = fvc::interpolate(r
 
in

phi = fvc::interpolate(rho)
*((fvc::interpolate(U) & mesh.Sf()) - mesh.phi());

the - mesh.phi() converts the absolute fluxes obtained from the absolute U into relative fluxes.

if (mesh_.moving())
{
divU += fvc::div(mesh_.phi());
}

adds the contribution from the mesh motion to the divergence calculated from the relative fluxes.

ralph January 24, 2006 07:12

Hi FOAMers, I´ve just looked
 
Hi FOAMers,
I´ve just looked at the implementation of some of the turbulence models for incompressible flows in Open FOAM and there I is one thing I did´t get so far. Maybe someone can help me out.
For the calculation of the Reynoldstensor there´s obviously used the Boussinesq-Approximation, where k is used to avoid a traceless stress tensor: n<sub>t</sub>(u<sub>i</sub>/x<sub>j</sub>+u<sub>j</sub>/x<sub>i</sub>)-2/3kd<sub>ij</sub>.
This is done in the method: turbulenceModel::R().
In the method turbulenceModel::divR(), which calculates the divergence of this part in combination with the laminar part, the correction by 2/3kd<sub>ij</sub> is omitted, which should actually be of the form: -2/3*grad(k).
Is this regular or do I omit a part of the normal stresses (which is added to the pressure-gradient term and falsify the static pressure)?

Thanks in advance,

Ralph

hjasak January 24, 2006 08:27

Yes, or "well, yes". All you
 
Yes, or "well, yes". All you need to do is subtrack k from the pressure field and you'll get the static pressure.

Hrv

ralph January 24, 2006 09:04

Thanks Hrvoje for your quick
 
Thanks Hrvoje
for your quick reply.
By the way: In turbulenceModel::divR() for incompressible cases, the deviatoric part of grad(U).T() is used (in an explicit manner). Is this done for stabilisation reasons, as the trace of the tensor should be zero anyway (incompressible)?

Ralph

david_h January 24, 2006 10:40

Ralph, dev(grad(U).T()) is
 
Ralph,

dev(grad(U).T()) is the second term and the missing divergence term in the Boussinesq approximation as written above. I beleive the reason this is treated explitly is that the term is a cross-coupling term between the different components of the velocity vector. Treating this term implicitly is not possible with a segregated solver.

Dave

hjasak January 24, 2006 10:43

The term says div(mu (grad
 
The term says

div(mu (grad U)^T)

and this can be rewritten as

mu grad (div(U)) + grad mu . grad U

The first one drops off because of the incompressibility constraint but the second one remains. However, after a lot of messing about it turns out that having the original form behaves better than grad mu . grad U and this is why it remains.

Hope this is clear,

Hrv

ralph January 24, 2006 11:11

Thanks for your answers, I th
 
Thanks for your answers,
I think that´s clear.
Maybe I expressed myself somewhat imprecise.
My question was about the deviatoric part of (grad U)^T. Why is the the deviatoric part of the tensor and not the "whole" tensor used in the second term of "divR()"?

Ralph

diego_n July 17, 2006 14:11

First of all I have to say tha
 
First of all I have to say that being an undergraduated student I am very new with both Foam and CFD.
From literature I found that Launder Sharma model requires a zero value for epsilon at wall.
But trying this boundary Foam produce a singularity error, as expected looking at model.
Is Foam Launder-Sharma model a particular one requiring zerogradient?

chris1980 July 18, 2006 00:34

I assume you want to use a hig
 
I assume you want to use a high-Re turbulence model which uses wall-functions. Therefore it is necessary to choose appropriate boundary conditions (i.e. zeroGradient for k and epsilon). Please note that wall functions are only valid if the y+ of your boundary cells is in the log-law region!

In the case of low-Re models with special near-wall modelling you have to come up with highly resolved mesh near-wall region.

diego_n July 18, 2006 05:46

I am using Launder-Sharma comp
 
I am using Launder-Sharma compressible lo-Re model and I have made an highly resolved mesh near wall to obtain an y+ value minor than 1.

christian May 15, 2007 03:53

When I'm using a low-Re model
 
When I'm using a low-Re model (e.g. LaunderSharma) my case crashes. I can attach the error message if someone is interested. When I instead change the k value of the walls from 0 to 1e-20 it runs fine. Why is this?

Secondly, in FoamX, when setting a wall to "wall" or "wallFunctions" I can see that the k condition changes (fixedValue or zeroGradient). To what file is my choice to run with or without wall function written? I.e. how is the solver being aware of my wall function choice so that it computes the velocity at the first cell according to the wall function or not?

Best regards,
Christian Svensson

dmoroian May 15, 2007 04:33

It is just an intuitive guess:
 
It is just an intuitive guess:
in the file /constant/turbulenceProperties set:
turbulenceModel laminar;
turbulence on;

So if I am wrong, please correct me!

Dragos

sradl August 1, 2008 06:01

Hi Foamers, I have a questi
 
Hi Foamers,

I have a question regarding kEpsilon turbulence model and what it does near walls (the standard wall functions are implemented). Specifically, I'm interested in the production term "G" of k at the wall. In the file wallFunctionsI.H I found (OF-1.5):

G[faceCelli] +=
(nutw[facei] + nuw[facei])
*magFaceGradU[facei]
*Cmu25*sqrt(k_[faceCelli])
/(kappa_.value()*RASModel::y_[patchi][facei]);

which is a little confusing, as it should be:

G=tau_wall*UP/yP

(UP and yP is the velocity and the wall-normal distance to the first cell respectively and tau_wall is the wall shear stress)

Has anybody an explanation where the term:

Cmu25*sqrt(k_[faceCelli])
/(kappa_.value()*RASModel::y_[patchi][facei])

comes from?

eugene August 1, 2008 07:15

G ~= tauw*(dU/dy)p, G != tauw*
 
G ~= tauw*(dU/dy)p, G != tauw*Up/yp, i.e. (dU/dy)p != Up/yp

Log-law
U = utau/kappa*ln(y*utau/nu * E);

or

dU/dy = utau /(kappa*y);

utau = Cmu25*sqrt(k);

Clear?

sradl August 2, 2008 02:50

Thanks Eugene, this is clear t
 
Thanks Eugene, this is clear to me.

BUT: My literature (lecture notes from a AVL guy) tells me G=tau_wall*UP/yP. Furthermore, something like

G=tauw*UP/yP-rho*Cmu75*kP^1.5*u^+/yP

can be found in Versteeg and Malalasekera (Computational Fluid Dynamics, 1995), which was a little confusing to me.

However, OF'S approach sounds more physical.

By the way: can you recommend some recent literature for this kind of aspects (except your PhD thesis)?

cheers
Stefan

eugene August 4, 2008 06:45

This one: G=tauw*UP/yP-rho*
 
This one:

G=tauw*UP/yP-rho*Cmu75*kP^1.5*u^+/yP

:
utau^3 = Cmu75*kP^1.5
utau^2 = tauw/rho
and
u+ = UP/utau

thus

G=tauw*UP/yp - tauw*UP/yP

Doesn't sound very correct to me unless some of my assumptions were wrong.

But don't take my word for it, you can work it out yourself. The definition of G is:

G = 1/yN * int(tau_turb * dU/dy.dy)[0-yN]

Normally people make various assumptions to simplify things, like the laminar region is negligible, tau_turb is constant and equal to tauw , etc.

For recent literature, do a google on "UMIST wall functions".


All times are GMT -4. The time now is 22:36.