CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Closed tank and interFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By nimasam

Reply
 
LinkBack Thread Tools Display Modes
Old   September 17, 2013, 13:13
Default Closed tank and interFoam
  #1
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

just a question to all who are using interFoam.
I made a lot of simulations with that solver but never with a closed tank or something like that.

My idea was to create a tank with p=101300 Pa in it.

I have one inlet and the rest are walls. Now I want that a fluid (water) gets into the tank with 200000 Pa.

Normally the water get in the tank till the compressed air has exact 200000Pa.

The problem I have is to set correct BC for that. Or is it possible to calculate this problem with cfd?

Due to the fact of momentum equation ... mass is going into the system but not out of the system!

Thanks in advance
Tobi
Tobi is offline   Reply With Quote

Old   September 17, 2013, 14:04
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
well, i guess interFoam is not suitable as it consider both phases incompressible, you may want to use compressibleInterFoam
Poltak Stanggang and Tobi like this.
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   September 17, 2013, 14:35
Default
  #3
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by nimasam View Post
well, i guess interFoam is not suitable as it consider both phases incompressible, you may want to use compressibleInterFoam
Oh thanks for that hint
thats sure!



I will test it!
Tobi is offline   Reply With Quote

Old   September 17, 2013, 16:13
Default
  #4
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

okay the solver is running.

But I am not sure how I should set the BC for the inlet?


As I mentioned in the first post, the water should go inside with 2 bar while the air is with 1 bar. After compression of air to 2bar no water is going into the tank.
Tobi is offline   Reply With Quote

Old   September 18, 2013, 00:55
Default
  #5
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
well, i guess i use pressureInletVelocity , then i will fix pressure at inlet
please share the result here
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   September 19, 2013, 07:05
Default
  #6
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

well my first quess was to set U to pressureInletVelocity and p to fixedValue like you mentioned.

But it is not working. The simulations is total unphysical and I got an Floating Point exeption.

First:

p_inlet = 2 bar
P_internalField = 1 bar


Second:

p_inlet = 1.005 bar
p_internalField = 1 bar


(Nothing changed)

hmmm any hints are appreciate
Tobi is offline   Reply With Quote

Old   September 19, 2013, 07:18
Default
  #7
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
at least post the error file , and your setup here
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   September 19, 2013, 08:48
Default
  #8
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I will do it today evening.
Tobi is offline   Reply With Quote

Old   September 19, 2013, 16:47
Default
  #9
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Here the U - file:

Code:
boundaryField
{
    wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    inlet
    {
        type            pressureInletVelocity;
        value           uniform (0 0 0);
    }
}
and the p_rgh file
Code:
boundaryField
{
    wall
    {
        type            fixedFluxPressure;
        value           uniform 1e5;
    }

    inlet
    {
        type            fixedValue;
        value           uniform 1.01e5;
    }
}
Tobi is offline   Reply With Quote

Old   September 20, 2013, 02:40
Default
  #10
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
1- whats your alpha1 file?
2- how is your initial setup?
3-how is your mesh?
4-which version of OF do you use?
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   September 20, 2013, 06:24
Default
  #11
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

initialValues:
Code:
 
p = 1e5 (boundary = calculated)
p_rgh = 1e5
U = (0 0 0)
alphaWater = 0 (boundary = ZeroGradient for the wall and inlet = fixedValue = 1)

T = 300 (boundary = zeroGradient; inlet 300 fixed)
Mesh is a cube 0,5 x 0,5 x 0,5 m with round about 200.000 cells (not many but okay). The inlet is a extra cube with 0,05 x 0,05 x 0,05 m. Mesh made with salome only Hexaeder cells.


I think alphaWater = 1 = phase1 (water) and alphaWater = 0 = phase2 (air)

I use always the latest OpenFOAM Version (2.2.x).
Tobi is offline   Reply With Quote

Old   September 20, 2013, 06:36
Default
  #12
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
what about air and water properties , how did you setup transportproperties?
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   September 20, 2013, 06:45
Default
  #13
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

well I do not have a look at that file since now. I copied the tutorial of the compressibleInterFoam solver. I thought that there is water and air included?

I will have a look at that file today evening.

Question to you - did you ever simulated a closed tank or something like that?
Tobi is offline   Reply With Quote

Old   September 20, 2013, 08:38
Default
  #14
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Quote:
Originally Posted by Tobi View Post
Hi,

well I do not have a look at that file since now. I copied the tutorial of the compressibleInterFoam solver. I thought that there is water and air included?
well, perfect simulation :P

Quote:
Originally Posted by Tobi View Post
I will have a look at that file today evening.

Question to you - did you ever simulated a closed tank or something like that?
nope, i never did, but as it compressible, for me those configuration seems okay
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   September 20, 2013, 13:07
Default
  #15
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

as I thought everything is correct!

phase1 = water; phase2 = air.
Tobi is offline   Reply With Quote

Old   September 22, 2013, 07:45
Default
  #16
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Okay its working now.

But one thing is still strange (attachment)...

Does anyone know why I have so strange gradients in alpha1 ?
Attached Images
File Type: jpg alpha#.jpg (26.7 KB, 21 views)
Tobi is offline   Reply With Quote

Old   September 23, 2013, 02:36
Default
  #17
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
well
1- how did you solve your first problem (float exception?)
2- whats wrong with alpha1 gradient? distribution seems OK with me
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   September 23, 2013, 02:45
Default
  #18
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,100
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I thought that I solved the first problem but with a p_rgh of 2 bar at the inlet its not working anymore.

Hmmm ... I am out of mind and it is so a simple geometry... hmmm

Last edited by Tobi; September 23, 2013 at 06:34.
Tobi is offline   Reply With Quote

Old   September 23, 2013, 10:37
Default
  #19
New Member
 
Join Date: Sep 2012
Posts: 17
Rep Power: 4
cfdan is on a distinguished road
don't mind to hijack this thread, but can anyone assist me here too:

Interfoam - sump pump modelling

my problem seems easier to solve compared to the one here.
cfdan is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Results at Tank Outlet with InterFoam mgdenno OpenFOAM 17 August 18, 2013 21:18
How to set velocity-inlet as a boundary of a tank in interfoam? waynezoon OpenFOAM 3 January 11, 2013 10:30
tank filling (water/air), I think I messed up the BCs simpomann OpenFOAM Running, Solving & CFD 1 September 8, 2012 07:09
Rotating tank problem using interFoam and an axisymmetric model Krishna Sandeep OpenFOAM 0 July 3, 2012 04:10
interFoam / bubbleFoam to simulate an aerated tank Meratb OpenFOAM Running, Solving & CFD 2 June 9, 2011 07:35


All times are GMT -4. The time now is 18:30.