CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   How to set initial field in two phase case? (-eulerfoam) (

kjetil July 13, 2009 10:27

How to set initial field in two phase case? (-eulerfoam)
Dear experts,
I am setting up a simple case using a 40m horizontal pipe with a two phase flow - water and air. I have been looking in the tutorial directories of bubbleFoam and twoPhaseEulerFoam, but cannot grasp how to set the initial field.

I am pretty sure it has something to do with the files in the sub directories, but cannot find any info on this forum or in the pdf userguides on how to actually carry this through.

Any directions on what to do?

ngj July 13, 2009 10:50


You need to find information on either setFields or funkySetFields, where the later is useful for more complex initial fields.

Best regards,


kjetil July 14, 2009 04:21

Okay - I found a post from Hectux,, describing a pipe setup with setFields. However, I can't see how this can provide a continuous two phase inlet flow. Does it really?

My intensions for this case is a "horizontal bubble column", except that both phases should have different initial velocities... the alpha fraction is supposed to be 0.5.

This is my first two phase flow case - may I use a single uniform air inlet, say a fraction of the main pipe inlet? Or would it be better - then how - to use a continuous (randomized) "dispersed" air phase at inlet?

ngj July 14, 2009 04:52

Hi Kjetil

Well, setFields cannot give you the boundary conditions, however it can give you the internal initial conditions!
With respect to boundary conditions, I do not know any of the ones you are talking about, however you might find groovyBC useful.

Good luck,


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