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

Initial condition in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alberto

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2011, 08:36
Default Initial condition in OpenFoam
  #1
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
Gitesh P is on a distinguished road
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
Gitesh P is offline   Reply With Quote

Old   October 20, 2011, 21:56
Default
  #2
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
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?
mgdenno is offline   Reply With Quote

Old   October 21, 2011, 03:44
Default
  #3
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
Gitesh P is on a distinguished road
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
Attached Images
File Type: jpg pressure profile.JPG (16.1 KB, 127 views)
Gitesh P is offline   Reply With Quote

Old   October 21, 2011, 15:00
Default
  #4
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
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

Last edited by mgdenno; October 21, 2011 at 15:38. Reason: Elaborate
mgdenno is offline   Reply With Quote

Old   October 22, 2011, 02:21
Default
  #5
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
Gitesh P is on a distinguished road
Hello,

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

Gravity is in +ve x direction.

BR,
Gitesh
Gitesh P is offline   Reply With Quote

Old   October 23, 2011, 02:06
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Gitesh P View Post
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,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   October 23, 2011, 02:46
Default
  #7
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
Gitesh P is on a distinguished road
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
Gitesh P is offline   Reply With Quote

Old   October 23, 2011, 02:53
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Gitesh P View Post
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,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   October 24, 2011, 01:08
Default
  #9
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
Gitesh P is on a distinguished road
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
Gitesh P is offline   Reply With Quote

Old   October 24, 2011, 01:11
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Gitesh P View Post
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,
jignesh_thaker2007 likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   May 27, 2013, 09:08
Default
  #11
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by alberto View Post
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 ?
s.m is offline   Reply With Quote

Old   May 27, 2013, 18:08
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 28, 2013, 02:32
Default
  #13
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by immortality View Post
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?
s.m is offline   Reply With Quote

Old   May 28, 2013, 08:15
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
yes,inletOutlet is used in internal flows in common.
I didn't received your case you said that had sent.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 28, 2013, 10:44
Default
  #15
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by immortality View Post
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.
Attached Files
File Type: gz airfoil_snappyHexMesh.tar.gz (38.8 KB, 3 views)
File Type: gz airfoil_simpleFoam.tar.gz (4.0 KB, 3 views)
File Type: txt Allrun.txt (526 Bytes, 2 views)
s.m is offline   Reply With Quote

Old   May 19, 2016, 15:40
Default
  #16
Senior Member
 
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11
sinatahmooresi is on a distinguished road
hi friends! i have the problem of hydrostatic pressure initializing in a tank full of water like Gitesh P!
and what is funkysetField? how can i set hydrostatic pressure condition in my domain ? i shoul say my inlet is not the whole left side of my geometry , it is a little nozzle in there (left side of geometry)
so what can i do?
sinatahmooresi 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
icoLagrangianFoam OF1.6 myNewParticleSolver heavy_user OpenFOAM 23 June 2, 2020 02:18
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 16 March 4, 2017 08:30
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 12:30
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 1 November 25, 2008 20:21


All times are GMT -4. The time now is 02:42.