CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Initial condition in OpenFoam (http://www.cfd-online.com/Forums/openfoam-solving/93612-initial-condition-openfoam.html)

Gitesh P October 20, 2011 08:36

Initial condition in OpenFoam
 
Hello,

I want to initialize hydrostatic pressure in my simulation. I have tried it to do it by 'funkySetFields -time 0'. It works for zero time but at first iteration it suddenly changes.

I have pressure inlet and pressure outlet as a BC's. In 0/p I have given fixed values for pressure uniform 101320(for outlet) and uniform 118600 (for inlet).

Can anyone help me in this problem ?

Best regards,
Gitesh

mgdenno October 20, 2011 21:56

What solver are you using?

Can you provide a little more information about what you have tried? Step by step?

Did you use setFields to initialize water surface?

Gitesh P October 21, 2011 03:44

1 Attachment(s)
Hello mgdenno,

OK. So my system is air is feeding by pipe into water tank. I am using twoPhaseEulerFoam solver.

I am using 'funkySetFields' for case initialization. It works ok. But at after first iteration it calculate different things. You can see in pictures (pressure) in attached file.

Best regards,
Gitesh

mgdenno October 21, 2011 15:00

Hi Gitesh,

I am not at all familiar with twoPhaseEulerFoam, but which variables did you initialize? pressure? phase?

Looks like maybe you only initialized the pressure but not the phase?

Also which way is gravity acting?

MD

Gitesh P October 22, 2011 02:21

Hello,

I also initialized phase. It works ok but the problem in pressure.

Gravity is in +ve x direction.

BR,
Gitesh

alberto October 23, 2011 02:06

Quote:

Originally Posted by Gitesh P (Post 328723)
I have pressure inlet and pressure outlet as a BC's. In 0/p I have given fixed values for pressure uniform 101320(for outlet) and uniform 118600 (for inlet).

This is not a correct setup for an incompressible code. You should specify a velocity at the inlet. If you do that, you also do not need to initialize the pressure gradient.

Best,

Gitesh P October 23, 2011 02:46

Hello alberto,

I want to initialize hydrostatic pressure for water. Also I have to give pressure inlet value because air is coming from there. Moreover I have pressure outlet there from where air will be out.

So, I have used funkySetFields for hydrostatic pressure initialization. So, is there any other bc from where we can directly calculate pressure gradient with out initialization ?

Thank you !!

BR,
Gitesh

alberto October 23, 2011 02:53

Quote:

Originally Posted by Gitesh P (Post 329053)
Hello alberto,

I want to initialize hydrostatic pressure for water. Also I have to give pressure inlet value because air is coming from there. Moreover I have pressure outlet there from where air will be out.

Setting the pressure at the outlet is fine. Setting it also at the inlet is going to give you troubles. You should specify the velocity of air. If you do this, initializing the hydrostatic pressure becomes irrelevant, since at the first iteration the code will find the appropriate pressure field.

Best,

Gitesh P October 24, 2011 01:08

Hello Albarto,

Thank you !!

So, you mean I have to give velocity of air at inlet and to initialize pressure gradient by funkySetFields ?

BR,
Gitesh

alberto October 24, 2011 01:11

Quote:

Originally Posted by Gitesh P (Post 329122)
Hello Albarto,

Thank you !!

So, you mean I have to give velocity of air at inlet and to initialize pressure gradient by funkySetFields ?

BR,
Gitesh

My suggestion is to:

1) Specify velocity at the inlet, and set the condition on the pressure to zeroGradient there.

2) Fix the value of the pressure at the outlet, and set the velocity to zeroGradient or inletOutlet, depending on your case.

3) You can use a uniform initialization for the pressure in this case, since it does not really matter. The solver will find the correct pressure filed at the first time step.

Best,

s.m May 27, 2013 09:08

Quote:

Originally Posted by alberto (Post 329123)
My suggestion is to:

1) Specify velocity at the inlet, and set the condition on the pressure to zeroGradient there.

2) Fix the value of the pressure at the outlet, and set the velocity to zeroGradient or inletOutlet, depending on your case.

3) You can use a uniform initialization for the pressure in this case, since it does not really matter. The solver will find the correct pressure filed at the first time step.

Best,

hi alberto,
i am working on 2D multi element airfoils, i have a Question about 2th suggestion.
"Fix the value of the pressure at the outlet, and set the velocity to zeroGradient or inletOutlet, depending on your case."
what do you mean with depending on your case,in my case which one is better? inletOutlet or fixedValue ?

immortality May 27, 2013 18:08

hi
inletOutlet is an "outlet" BC not inlet.this is the same zeroGradient only with a difference.
When there is a backflow in outlet,inletOutlet BC sets a value on the cells that have backflow by the value we have specified.
So if you think may you have backflow use inletOulet otherwise zeroGradient suffices.
Hope it helps.

s.m May 28, 2013 02:32

Quote:

Originally Posted by immortality (Post 430368)
hi
inletOutlet is an "outlet" BC not inlet.this is the same zeroGradient only with a difference.
When there is a backflow in outlet,inletOutlet BC sets a value on the cells that have backflow by the value we have specified.
So if you think may you have backflow use inletOulet otherwise zeroGradient suffices.
Hope it helps.

hi ehsan,
i understand what you said, thank you very much.
if my domain is large enough around my airfoil, it doesn’t need to use the inletOutlet boundary condition, is it right?

immortality May 28, 2013 08:15

yes,inletOutlet is used in internal flows in common.
I didn't received your case you said that had sent.

s.m May 28, 2013 10:44

3 Attachment(s)
Quote:

Originally Posted by immortality (Post 430493)
yes,inletOutlet is used in internal flows in common.
I didn't received your case you said that had sent.

hi Dear ehsan,
i put my multi element airfoil,
thank you very much for your help.


All times are GMT -4. The time now is 09:59.