CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   How to set up BCs for k epsilon model (https://www.cfd-online.com/Forums/openfoam-pre-processing/64634-how-set-up-bcs-k-epsilon-model.html)

maysmech May 30, 2011 14:32

Hi Juan, I didn't face your problem before.
Hi Eren, I have doubt about using free stream for both U and P. I haven't used this boundary too.
Try using fixed value for U and zeroGradient for P and nut if possible in your case. i suggest to use settings same as tutorial settings.

Any other suggestions for these two problems will be appreciated.

maysmech May 30, 2011 14:35

Other possible for convergence problem of simpleFoam is running an unsteady case with this steady solver.

i had this experience. Switching to pisoFoam solved my problem.

Eren10 June 22, 2011 08:27

How important is the initial values for k and epsilon. I know that it doesn't require exact values but what is maximum variation ? Or is it enough if it converges well with the right yPlus values.

maysmech June 22, 2011 09:05

Initial values are not important and your solution is independent on them but, you should set them exactly in boundaries.

Eren10 June 22, 2011 09:21

Quote:

Originally Posted by maysmech (Post 313074)
Initial values are not important and your solution is independent on them but, you should set them exactly in boundaries.

This sounds as a contradiction !

maysmech June 22, 2011 09:48

I don't see any contradiction. what is set in 0 folder is not initial condition only. you should set also boundary condition in this folder. if you see e.g case/0/U what is written after "Internal field" is initial value and after "Boundary field" is boundary condition. boundary condition effects solution in next iterations but initial value doesn't.

Eren10 June 22, 2011 11:33

Quote:

Originally Posted by maysmech (Post 313084)
I don't see any contradiction. what is set in 0 folder is not initial condition only. you should set also boundary condition in this folder. if you see e.g case/0/U what is written after "Internal field" is initial value and after "Boundary field" is boundary condition. boundary condition effects solution in next iterations but initial value doesn't.


Thank you ! I overlooked that. I have set that correct and now I have almost the same Cl. Only Cd is almost 2 times higher , y+ lies between 14-40 , average 29.5 . This is also not too bad.

Do you know what the cause of much higher Cd is ?

mihaipruna June 21, 2012 20:41

This seems to have worked for me. Internal flow,compressible:

SDuctOutlet
{

type inletOutlet;
inletValue uniform 200;
value uniform 200;
}
SDuctInlet
{
type compressible::turbulentMixingLengthDissipationRate Inlet;
mixingLength 0.005;
value uniform 200;
}
vol1face4
{
type compressible::epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}


however...what should I do for freestream conditions parallel to the flow?
I have thins and I'm sure it's wrong

rightZmax
{type compressible::turbulentMixingLengthDissipationRate Inlet;
mixingLength 0.005;
value uniform 200;
}

malaboss January 15, 2013 10:08

1 Attachment(s)
Quote:

Originally Posted by wolle1982 (Post 216508)
inlet:
U: fixed value
p: zero gradient
k/eps/omega: value

outlet:
U: zero ngradient
p: fixed value (0)
k/eps/omega: zero gradient

walls:
U: fixed value
p: zero gradient
k/eps/omega: zero gradient

Hi,
I tried to use those boundary conditions for my model.
I use a k epsilon turbulence model, and the simpleFoam (steady) solver.
At the inlet I fixed the value 1.5 for k since my flow's velocity is 10m/s et my turbulent intensity is 10%.

When I look at the k field and the epsilon field, they seem to be far from true as you can see in the picture I enclosed.

I think that this problem is related to the boundary condition at the outlet.
Do you have an idea about what could be the problem ?

Thx for all !

sdharmar January 31, 2013 12:05

Similar Problem
 
1 Attachment(s)
I have a similar type of problem too. Why can not we set k=0 at wall boundaries. According to theory all the velocity fluctuations are zero at the wall boundaries hence k should be 0.

I gave this BC in one of my simulations and couldn't see k=0 at the wall in post processed results. Have attached the figure.

Please help me to figure this out.

malaboss February 1, 2013 02:58

I just forgot to tell that I found what was my problem : I has inverted my inlet boundary conditions with my outlet boundary conditions.
However, for your case, it seems like you have fixed a k value at the inlet and put zero gradient at the outlet.
Maybe you should try to see if your velocity boundary conditions are OK.

For your second question : there is no reason why k would be zero at the wall because the boundary condition is zeroGradient.
You use this boundary condition when you work with a wall function (see simpleFoam/pitzDaily tutorial for example). And when you don't use wall function, you can put a value near 0 on the wall. For example you can see the lowRekEpsilon model LaunderSharma tutorials.

It does not answer your question but it shows that these boundary conditions are classical.
The reason why we use zero gradient when we have a wall function was explained in another thread here : what i understood was that on the first cell the wall function creates a profile of k, espilon, U ... You do not see that because on your simulation there is only one value in one cell. But you should not actually worry about it.
This is all I know on the subject and there must be a lot of things I do not understand, so be careful with what i said !

sdharmar February 1, 2013 12:38

BC for k
 
Thanks for your reply.

It seems that I have not expressed my question clearly in the previous post. I am very sorry about that.

The boundary conditions are exactly same for U and p as in your post on Jan 15 2013.

For k and epsilon I put
fixedValue condition at the inlet
zeroGradient condition at the outlet

And at the walls

for k , type fixedValue;
value uniform 0;

and for epsilon,
type zeroGradient;

for these conditions I got above diagram for k. You can see that I have explicitly set k=0 at the wall.

That is the problem I have. Why doesn't the diagram show k=0. Is it a wrong BC for the k-epsilon model.

Please give me a clue. Once again thank you in advance.

malaboss February 3, 2013 08:35

Hi,
Could you tell me if you use wall function ?
Maybe you should try to avoid using wall function for your case as you want to fix a value for k (which means not setting the BC nutWallFunction for nut).
Tell me if it helped.

inf.vish August 19, 2013 04:48

Hi Julian,
Can you please share your files for the elbow tutorial if you still have them?
I am also trying to simulate the elbow tutorial with turbulence but not able to get turbulence and everything just looks laminar.

yash.aesi August 20, 2013 13:42

setting of omega BC"s
 
helo
I am trying to set up a case using rhopimplefoam solver and the kOmegaSST turbulance model model but I have difficulties defining the boundary conditions for omega.

in my case i have inlet , axis , upperwall, outlet so hw to define BC's for that ?

immortality August 21, 2013 06:03

what Eren?you have set both p and U in inlet by values and both zeroGradient in outlet?
that's wrong obviously.
you should set p be value in outlet and whether p or U be value in inlet and the other be zeroGradient in inlet. k and epsilon seems be correct.

Dadou February 5, 2014 07:55

Boundary Conditions
 
Hello Everyone,

I see that you are quit familiar with all the BCs settings.

I have a question for you all about the settings of U,P,k,epsilon and nut. I am trying to model a 3D free surface flow (flow goes in [inlet] and the same flow goes out [outlet]) and I'm having a hard time setting boundary conditions for allthe U,P... .

I tried to follow some instructions suggested in this threads but I didn't really find what I need. So (as you can see in the pictures attached) I need to have in the Inlet a flow condition and outlet flow condition too. For the walls (k, Epsilon and nut) I used respectively :

- kqRWallFunction uniforme 1;
- epsilonWallFunction uniform 200;
- nutkWallFunction uniform 0;
(I copied the values from a tutorial)

I am using a simpleFoam solver with RASModel ---> kEpsilon

Can someone help me with th BCs it's the first time that I have to do the settings so I'm a little bit lost :confused:

Thank you

Dadou

mihaipruna February 5, 2014 08:10

Dadou: I can't see the attachments.

Dadou February 5, 2014 08:16

2 Attachment(s)
Quote:

Originally Posted by mihaipruna (Post 473544)
Dadou: I can't see the attachments.


I Apparently it didn't work.

And Now ?

mihaipruna February 5, 2014 08:23

three things:

did you actually type "uniforme" in the input file?

try to set your free surface like freestream in the motorbike tutorial.

if no typos in the file, I would suggest a K-omega model, look into the forums for definitions and initial conditions settings.


All times are GMT -4. The time now is 10:38.