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

What solver for two immiscible fluids?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2009, 08:47
Default What solver for two immiscible fluids?
  #1
New Member
 
Join Date: Mar 2009
Posts: 28
Rep Power: 17
Hectux is on a distinguished road
Hi,

I am wondering which solver would be the best to simulate two immiscible fluids e.g. in a pipe.

Any sugestions. I thought about interFoam oder rasInterFoam but I had some problems with defining the two phases.



Best regards
Hectux is offline   Reply With Quote

Old   May 5, 2009, 09:01
Default
  #2
New Member
 
Join Date: Mar 2009
Posts: 28
Rep Power: 17
Hectux is on a distinguished road
I tried a test.
T-Pipe. 2 Inlets, 1 Outlet.

I defined for Inlet 1 Gamma 0 and for Inlet 2 Gamma1.

I thought that I will have 2 Phases (1 Phase at Inlet 1 - Gamma 0 and 1 Phase at Inlet 2 - Gamma 1).

Actually the simmulation was like a simulation with 1 phase. In paraview my Gamma field was always the same at Inlet 2.
Hectux is offline   Reply With Quote

Old   May 5, 2009, 11:33
Default
  #3
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
Have you had a look at the damBreak tutorial? Probably something is wrong with your setup. If you are using interFoam, there is only one gamma field with a value of 0 or 1. One thing to keep in mind is that you need to initialize the correct gamma values on your inlet patches--at least I think this is still true. This can be done using setFields as in the damBreak tutorial to set the initial distribution for gamma.
kwardle is offline   Reply With Quote

Old   May 6, 2009, 03:47
Default
  #4
New Member
 
Join Date: Mar 2009
Posts: 28
Rep Power: 17
Hectux is on a distinguished road
So I have to use the SetFieldsDict initialize the Distribution?
The Gamma 1 Boundary condition at Inlet 1 is not enough?
Hectux is offline   Reply With Quote

Old   May 6, 2009, 06:35
Default
  #5
New Member
 
Join Date: Mar 2009
Posts: 28
Rep Power: 17
Hectux is on a distinguished road
I have checked it several times.

I cannot find the mistake. But the problem is still the same.
My Gamma Field is always the same. The distribution of the fraction is always the same.

I have made an initial distribution of Gamma 1 in the centre of my pipe. Now the fluid flows around that region. Actually I thought that the gamma field will change in the direction of the fluid flow.
Hectux is offline   Reply With Quote

Old   May 6, 2009, 08:53
Default
  #6
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
As to your first question, unless this is not true for current versions, yes, you have to initialize the gamma field on your inlets.

If you are willing to post your case, I could take a quick look at the setup and see if I notice anything.
kwardle is offline   Reply With Quote

Old   May 6, 2009, 09:12
Default
  #7
New Member
 
Join Date: Mar 2009
Posts: 28
Rep Power: 17
Hectux is on a distinguished road
I have packed it.

You can ignore the files for rasInterFoam like k or epilon BCs or RASproperties.
Actually I run this case in interFoam.

I have uploaded it on RapidShare:
http://rapidshare.com/files/22980299...er.tar.gz.html
Hectux is offline   Reply With Quote

Old   May 6, 2009, 12:56
Default a few strange things
  #8
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
OK, I noticed a few things that seemed strange.

1. You scales are screwy. You have the geometric domain on the order of 200 meters but your inlet velocity is 0.1 mm/second. To have a useful physical problem your domain needs to be smaller and your inlet velocities bigger. Try to run ' transformPoints -scale "(0.01 0.01 0.01)" ' to scale to cm and then change your inlet velocities to something like 0.1 m/s. (You will have to change the bounds in your setFieldDict too) The way you had it, of course nothing is moving--your inflow only travels a tenth of a millimeter in the 1 s of simulation time you had set in controlDict.

2. Perhaps this is intentional, but your gamma on both inlets was set to 0, so you have inflow of air only. Also, you had gravity set to zero. Like I said, maybe this was intentional. Based on your initial gamma field, are you trying to simulate the entrained flow of a single droplet?

3. About that, if you do want to simulate a single droplet, your mesh resolution is perhaps a little too coarse. The initial gamma field poorly resolves the curvature of your droplet.

Anyway, give these things a try. Even with the mesh you had, with these settings I was able to see movement of the droplet (not much for 0.1 m/s inflow) but you will have to run for a few seconds of flow time. You may want to increase your maxCo to ~0.2 and your nGammaSubCycles to ~5. You could also try starting with a larger slug instead of your small droplet and see what happens, this is a little more interesting.

Hope this is helpful.
-Kent
kwardle is offline   Reply With Quote

Old   May 7, 2009, 05:24
Default
  #9
New Member
 
Join Date: Mar 2009
Posts: 28
Rep Power: 17
Hectux is on a distinguished road
Real thanks for your help.

I have forgot that I had this time the bigger geometry.
The last days I ran simulations with geometries in mm scale. So I forgot the adjust the BCs. Actually I should have noticed it.

Now it works fine. I nice water slug is moving through the pipe.
Hectux 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
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
sinusoidal interface between two immiscible fluids Stéphane Champmartin FLUENT 1 January 8, 2007 01:09
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32
CFX 5.5 Roued CFX 1 October 2, 2001 16:49


All times are GMT -4. The time now is 19:23.