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

InterMixingFoam - Gravity Currents (bug?)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 9, 2010, 01:02
Default InterMixingFoam - Gravity Currents (bug?)
  #1
New Member
 
Martin Sabarots Gerbec
Join Date: Feb 2010
Location: Argentina
Posts: 3
Rep Power: 8
msabger is on a distinguished road
Hi

I've already posted in the "OpenFOAM Running / Solving / CFD" section about this issue, but I'm starting to think that may be there is a bug in the interMixingFoam.

I tried to test the interMixingFoam solver when studing gravity currents. So I took the tutorial example but changing the initial alpha fields. The initial condition is a horizontal free surface, and two separated phases, with different densities (I attach the whole example).

I expected to see the gravity currents due the difference in density, but both liquid phases behave as they have the same properties.

What could it be wrong?

Thanks!

Martin
Attached Files
File Type: zip damBreak_GravityCurrents.zip (81.7 KB, 40 views)
__________________

msabger is offline   Reply With Quote

Old   September 9, 2010, 04:12
Default
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 17
mattijs is on a distinguished road
We've finally got a proper bug reporting system :-)
Please report any OpenFOAM bugs on http://www.openfoam.com/bugs.
mattijs is offline   Reply With Quote

Old   September 28, 2010, 12:02
Default InterMixingFoam - Gravity Currents Bug-fix
  #3
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 10
Rep Power: 9
nbadano is on a distinguished road
Dear Martin,

There's indeed a bug in interMixingFoam. The solvers incorrectly assigns the properties of phase 2 to phase 3, so both are identical, preventing the development of any density current.

I found the bug in threePhaseMixture.C, located under /opt/openfoam171/applications/solvers/multiphase/inaMixingFoam/incompressibleThreePhaseMixture/

In lines 79 to 88 you should replace this piece of the constructor code:

Code:
    nuModel3_
    (
        viscosityModel::New
        (
            "nu3",
            subDict(phase2Name_),
            U,
            phi
        )
    ),
by this:

Code:
    nuModel3_
    (
        viscosityModel::New
        (
            "nu3",
            subDict(phase3Name_),
            U,
            phi
        )
    ),
After that, just recompile the solver with wmake.

I was able to run your test case without any problem after this modification. It works beautyfully. I've uploaded a couple of pics of the resulting alpha3.


Hope this helps.

Best regards!

Nicolas
Attached Images
File Type: jpg DensityCurrents.0000.jpg (23.0 KB, 76 views)
File Type: jpg DensityCurrents.0030.jpg (29.3 KB, 73 views)
File Type: jpg DensityCurrents.0060.jpg (36.0 KB, 66 views)
File Type: jpg DensityCurrents.0090.jpg (39.7 KB, 83 views)
nbadano is offline   Reply With Quote

Old   November 11, 2010, 13:21
Default Bug fixed!
  #4
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 10
Rep Power: 9
nbadano is on a distinguished road
Although we never actually reported the bug officially, it seems to be corrected in the last 1.7.x version of OpenFOAM!

Nicolas
nbadano is offline   Reply With Quote

Old   April 1, 2011, 10:01
Default
  #5
New Member
 
Sarah Köhler
Join Date: Jun 2010
Location: Leoben
Posts: 11
Rep Power: 8
sarahk is on a distinguished road
Hey guys,

i know my probelm doesnt fit that well in this Thread, but as you used interMixingFoam already i thought you might be able to help me

i have a huge vessel with a tap (an electrical arc furnace). So, inside i have steel, slag and air. And i wanna simulate at wich level the slag flows into the tap. and I dont want steel and slag to mix (D=0, am i right??).

my bc´s:
phase 2 and 3 are slag and steel.
the field has a really small velocity in -y
g (0 -9,81 0) at beginning.

what happens is, that Foam stops after the first time step (0,005) and i have a velocity from 600 m/s at the Outlet.

Any Ideas?

Thanks in advance

Sarah
sarahk is offline   Reply With Quote

Old   April 1, 2011, 10:51
Default
  #6
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 10
Rep Power: 9
nbadano is on a distinguished road
Hey Sarah,

I don't really know much about metallurgy but; do slag and steel behave as separate phases (with sharp interface maintained by surface tension)?? If that's the case I think you should use multiphaseInterFoam instead of interMixingFoam. multiphaseInterFoam solves for n inmiscible phases. Maybe D=0 is not very interMixingFoam friendly!

On the other hand, 600 m/s in 0.005 secs sounds like an inconsistency in BCs or a mesh problem (any bad elements according to checkMesh?). Can't really pinpoint anything more concrete without having a look at the actual case directory.

Hope this helps!

Best regards

Nico
nbadano is offline   Reply With Quote

Old   April 4, 2011, 02:59
Default
  #7
New Member
 
Sarah Köhler
Join Date: Jun 2010
Location: Leoben
Posts: 11
Rep Power: 8
sarahk is on a distinguished road
HEy Nico,

thanks i´ll give multiphaseInterFoam a try

the Mesh is ok (i did the calculation in fluent before), but i think it really has a problem with the D=0, and how you use the phases. I changed steel against air (just to try it) and it worked much better (solution was senseless, anyway )

do you if there is still a bug in gravity? When i checked my Solutions i had air blowing through the tap in the steel, without patching any velocity ...

Greetings,

Sarah
sarahk 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
InterMixingFoam - Gravity Currents (not working) msabger OpenFOAM Running, Solving & CFD 1 September 29, 2010 12:05
OpenFoam gravity bug? Whyman OpenFOAM 7 June 21, 2010 04:10
how to consider gravity in CFX shrimp CFX 4 September 8, 2008 20:41
Help: gravity in CFX Dejun Jing CFX 2 July 22, 2002 08:58
On gravity modelling... Drona CFX 7 November 22, 2001 11:28


All times are GMT -4. The time now is 00:51.