CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

twoPhaseEulerFoam - unphysical behaviour

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

Like Tree2Likes
  • 2 Post By alberto

Reply
 
LinkBack Thread Tools Display Modes
Old   May 10, 2012, 06:51
Question twoPhaseEulerFoam - unphysical behaviour
  #1
New Member
 
Lydia Schulze
Join Date: Jan 2012
Location: Karlsruhe, Germany
Posts: 18
Rep Power: 4
Lydia is on a distinguished road
Hello Foamers,

being fairly new to the twoPhaseEulerFoam solver I'm trying to simulate a simple box - closed on all sides and the bottom, open to atmosphere on top.
(Boundary conditions see below).

The box is completely filled with water. There is no inflow, so I would actually expect, that nothing happens.
BUT unfortunately velocities (up to 89 m/s after 4.8s ) and upward flow develops within the box, which gets bigger with time. (See attached pictures.)

Form the pictures of the first written result after 0.1s you can see that the problem seems to evolve from the bottom.

Has anyone an explanation for that?

Looking forward to your answers.
Kind regards,
Lydia

Code:
My boundary conditions:

            walls                                 top    
Theta    zeroGradient;                     inletOutlet; uniform 1.0e-8;
Ua        fixedValue; uniform (0 0 0);   zeroGradient;
Ub        fixedValue; uniform (0 0 0);   zeroGradient;
alpha    zeroGradient;                      inletOutlet; uniform 1.0;
epsilon  zeroGradient;                      inletOutlet; uniform 10.0;
k          zeroGradient;                      inletOutlet; uniform 1.0;
p          buoyant pressure; uniform 0; fixedValue; uniform 0;

As initialization: 

the whole box is filled with alpha=1
via the setFieldsDict:

regions
(boxToCell   {   box (-999 -999 -999) (999 999 999);
 fieldValues (volScalarFieldValue alpha 1);}
Attached Images
File Type: jpg U-0.1s.jpg (25.9 KB, 51 views)
File Type: jpg U-4.8s.jpg (30.8 KB, 47 views)
File Type: jpg p-0.1s.jpg (23.4 KB, 39 views)
File Type: jpg p-4.8s.jpg (23.0 KB, 37 views)
File Type: jpg alpha0.1s-4.8s.jpg (19.1 KB, 33 views)
Lydia is offline   Reply With Quote

Old   May 11, 2012, 03:18
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,890
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Could you attach your case?
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   May 11, 2012, 04:10
Post case-file
  #3
New Member
 
Lydia Schulze
Join Date: Jan 2012
Location: Karlsruhe, Germany
Posts: 18
Rep Power: 4
Lydia is on a distinguished road
For a better understanding , I attached the 0/ system/ and constant/ folder.

Hoping that this gives a better insight into what I did, I'm looking forward to any hint about possible reasons for the aforementioned behavior.

Best regards,

Lydia
Attached Files
File Type: gz 0.tar.gz (1.1 KB, 24 views)
File Type: gz system.tar.gz (2.1 KB, 20 views)
File Type: gz constant.tar.gz (2.1 KB, 17 views)
Lydia is offline   Reply With Quote

Old   May 11, 2012, 06:10
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 146
Rep Power: 13
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Quote:
Originally Posted by Lydia View Post

The box is completely filled with water.

Code:
As initialization: 

the whole box is filled with alpha=1
via the setFieldsDict:
Please correct me if I am wrong, but alpha = 1 means the box is filled with air. Alpha is the volume fraction of the dispersed phase, which is defined if I am not wrong, in the transportProperties with the keyword dragPhase, but I am not 100% sure at this.
GerhardHolzinger is offline   Reply With Quote

Old   May 11, 2012, 06:36
Default correction: there is AIR in the box
  #5
New Member
 
Lydia Schulze
Join Date: Jan 2012
Location: Karlsruhe, Germany
Posts: 18
Rep Power: 4
Lydia is on a distinguished road
Thanks Gerhard. You're correct with this:


Quote:
alpha = 1 means the box is filled with air.
But the results still don't make sense to me...? No matter if it's water or air in the box - I still would expect nothing to happen. Why do i get these high velocities?

I also tried the same with alpha=0. Here the velocities are much smaller.
Does the solver maybe have problems with only air in the domain?
Lydia is offline   Reply With Quote

Old   May 11, 2012, 10:31
Exclamation modified bubble column (twoPhaseEulerFoam) shows similar unphysical behaviour
  #6
New Member
 
Lydia Schulze
Join Date: Jan 2012
Location: Karlsruhe, Germany
Posts: 18
Rep Power: 4
Lydia is on a distinguished road
Hello again,

I just performed a few tests, where I modified the bubble column tutorial and I get similar results to my previous tests.

In the first test I set alpha to 0 in the whole domain.
In the second test alpha was set to 1 in the whole domain.
All other settings were taken over from the tutorial setup.

From the attached pictures it is visible, that velocities evolve although there is no inflow or other sources that could causes flow within the domain. In the second test it even seems that air is flowing in from the bottom. Is there maybe a mistake in my modifications? (I attached the case files to this post).


Or has anyone an explanation for this?

Wishing a you all a nice weekend,

Lydia
Attached Images
File Type: jpg bubbleColumn-tut-alpha0-20s.jpg (43.8 KB, 62 views)
File Type: jpg bubbleColumn_tut-alpha1-20s.jpg (38.4 KB, 50 views)
Attached Files
File Type: gz bubble_tut_alpha0.tar.gz (3.0 KB, 7 views)
File Type: gz bubble_tut_alpha1.tar.gz (3.0 KB, 3 views)
Lydia is offline   Reply With Quote

Old   May 11, 2012, 17:19
Default
  #7
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,890
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Hi Lydia,

I checked your alpha0 case. I have the following comments:
  1. There is a problem in how you define the bottom condition. Since it is a wall, the boundary condition in blockMeshDict should be changed to "wall" instead than of "patch".
  2. The twoPhaseEulerFoam solver uses the "phase-intensive" form of the momentum equation. This form is more robust when the phase fraction approaches zero, however it will return non-zero velocities in such a limit (you can show that for alpha = 0, in absence of acceleration terms, it will return the terminal velocity). This is not a problem being alpha = 0 in those regions, but you need to know this to interpret your results.
I modified the boundary condition as I wrote above, and results look fine (see attachments for pictures and cases). You will see a non-zero velocity for phase a in the cells before the outlet for the reason at point 2. Pictures are taken at t = 20s.
Attached Images
File Type: jpg alpha.jpg (10.8 KB, 71 views)
File Type: jpg p.jpg (13.5 KB, 70 views)
File Type: jpg UaMag.jpg (12.4 KB, 71 views)
File Type: jpg UbMag.jpg (12.2 KB, 66 views)
Attached Files
File Type: gz alpha0Mod.tar.gz (3.0 KB, 54 views)
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.

Last edited by alberto; May 11, 2012 at 17:22. Reason: Added time
alberto is offline   Reply With Quote

Old   May 12, 2012, 06:01
Default
  #8
New Member
 
Lydia Schulze
Join Date: Jan 2012
Location: Karlsruhe, Germany
Posts: 18
Rep Power: 4
Lydia is on a distinguished road
Hello Alberto,

Thank you for your comments and the attached pictures +case!

I didn't know that the definition of the bottom as a 'wall' instead of a 'patch' would make such a difference, since no special wall-functions were set and the velocities were set to 'fixedValue (0 0 0)' at the 'bottom' patch. But from your pictures I really seems to make a difference, so I'll keep that in mind.

Concerning your second comment I don't understand what you mean with the "terminal velocity"? I only started reading through H. Rusche's Thesis and hope to understand more soon.

Best regards,
Lydia
Lydia is offline   Reply With Quote

Old   May 12, 2012, 17:18
Default
  #9
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,890
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Hi Lydia,

I'll try to explain the terminal velocity in simple words with one example. Think to a single particle falling into a fluid. We only consider two forces: drag and external force due to the acceleration (gravity, for example).

If the particle initially has zero velocity, the acceleration will cause an increase in its velocity. However, the drag force exerted by the fluid onto the particle will increase (it depends on the relative velocity), and at some point it will balance the force caused by the acceleration. At that point the velocity of the particle won't change anymore, and such a velocity is the terminal velocity.

Best,
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   May 14, 2012, 08:34
Default cell values vs. cell-to-point values AND unexpected rising water level in closed box
  #10
New Member
 
Lydia Schulze
Join Date: Jan 2012
Location: Karlsruhe, Germany
Posts: 18
Rep Power: 4
Lydia is on a distinguished road
Hello Alberto and all other interested Foamers,

being back at the office today, I just tested your modified case and found out that the modifications actually didn't make the difference.
The difference between your and my results come from a different visualization:
I assume, you visualized the cell-to-point filtered data of Ua and Ub
whereas I visualized the cell data.

The attached pictures show the different visualizations of the same result. I don't understand how Paraview averages these values, since it seems that after the averaging the velocity in the whole box (except at the very top) is 0, whereas without the averaging all values range between 0.3 and 0.31 (according to the 'Data Range' in Paraview). Is there an explanation for that?


Additionally, I tested another case which also produces incomprehensible (for me at least...) results. I took the same box and filled it partially with water (see attached case; filling via setFields). Somehow the water level increases with time although there is no inflow defined. Did I make a mistake in my setup? Or why does the water level rise?

I'm looking forward to your answers.

Best regards,
Lydia
Attached Images
File Type: jpg Ua-cellToPointValues.jpg (14.2 KB, 53 views)
File Type: jpg Ua-cellValues.jpg (29.2 KB, 81 views)
Attached Files
File Type: gz bubbleColumn-water-air.tar.gz (3.5 KB, 11 views)

Last edited by Lydia; May 14, 2012 at 09:32. Reason: Attachment of file
Lydia is offline   Reply With Quote

Old   May 14, 2012, 12:41
Default
  #11
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,890
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Lydia View Post
Hello Alberto and all other interested Foamers,

being back at the office today, I just tested your modified case and found out that the modifications actually didn't make the difference.
The difference between your and my results come from a different visualization:
I assume, you visualized the cell-to-point filtered data of Ua and Ub
whereas I visualized the cell data.

The attached pictures show the different visualizations of the same result. I don't understand how Paraview averages these values, since it seems that after the averaging the velocity in the whole box (except at the very top) is 0, whereas without the averaging all values range between 0.3 and 0.31 (according to the 'Data Range' in Paraview). Is there an explanation for that?
As I said before, you can disregard any non-zero value of the velocity where alpha is zero. This is due to the formulation of the momentum equation, which you can find described in the paper of Oliveira, P.J., Issa, R.I., 2003. Numerical aspects of an algorithm for the Eulerian simulation of two-phase flows. International Journal for Numerical Methods in Fluids 43, 11771198.

You can post-process your ouput data by checking where alpha < alphaSmall (for example 1.0e-6), and set Ua to zero there, if you prefer to have a cleaner view.

Quote:
Additionally, I tested another case which also produces incomprehensible (for me at least...) results. I took the same box and filled it partially with water (see attached case; filling via setFields). Somehow the water level increases with time although there is no inflow defined. Did I make a mistake in my setup? Or why does the water level rise?
Please, try setting dragPhase to a, since the drag phase is air in your problem.

Best,
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   May 16, 2012, 09:18
Default
  #12
New Member
 
Lydia Schulze
Join Date: Jan 2012
Location: Karlsruhe, Germany
Posts: 18
Rep Power: 4
Lydia is on a distinguished road
Hello Alberto,

Thanks for the reference to Oliveira's paper!
Quote:
Originally Posted by alberto View Post
As I said before, you can disregard any non-zero value of the velocity where alpha is zero. This is due to the formulation of the momentum equation, which you can find described in the paper of Oliveira, P.J., Issa, R.I., 2003. Numerical aspects of an algorithm for the Eulerian simulation of two-phase flows. International Journal for Numerical Methods in Fluids 43, 11771198.
It is now understandable for me that the solver has "problems" when alpha approaches 0.

Can I conclude from that, that it is not recommendable to model flows where the phases are completely separated in most regions and only penetrate each other in a small region of the domain?

In specific, I'm thinking of water (free-surface) flowing over an edge, plunging into a pool. The water air mixture (bubble development) in the pool is of special interest.


Best regards,

Lydia

P.S. Setting the drag phase to a in the earlier described case with water and air didn't change the results. The domain is still filling without reason.
Lydia is offline   Reply With Quote

Old   May 16, 2012, 11:03
Default
  #13
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,890
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Lydia View Post
Hello Alberto,

Thanks for the reference to Oliveira's paper!

It is now understandable for me that the solver has "problems" when alpha approaches 0.

Can I conclude from that, that it is not recommendable to model flows where the phases are completely separated in most regions and only penetrate each other in a small region of the domain?
The conclusion is not correct. The implementation of the code is exactly done to address the problem when alpha approaches to zero. The fact you see non-zero velocities where alpha -> 0 does not represent a problem at all, since the momentum is anyways zero there. If you do a literature search, a similar approach is used in many codes (CFDLib, NEPTUNE, ...).

You might want to see http://openfoamwiki.net/index.php/BubbleFoam and notice that the momentum equation is treated similarly to what suggested by Oliveira.

Quote:
In specific, I'm thinking of water (free-surface) flowing over an edge, plunging into a pool. The water air mixture (bubble development) in the pool is of special interest.
That seems to me a different problem, where you might need surface-tracking capabilities,in addition to surface tracking. OpenFOAM has multiphaseEulerFoam to do this.

Quote:
P.S. Setting the drag phase to a in the earlier described case with water and air didn't change the results. The domain is still filling without reason.
I attach a case which does not present this problem. Note that wall conditions for p were changed to zeroGradient. Please, let me know if you have questions.

Best,
Attached Files
File Type: gz bubbleColum-water-air-ap.tar.gz (3.5 KB, 35 views)
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.

Last edited by alberto; May 16, 2012 at 11:15. Reason: Added link to wiki, and added explanation on p
alberto is offline   Reply With Quote

Old   June 13, 2012, 16:36
Default
  #14
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 190
Rep Power: 9
kwardle is on a distinguished road
Lydia,
The momentum equation formulation in multiphaseEulerFoam is a little different from the one in bubbleFoam in terms of phase conservation, so it might behave a little different (hopefully better!) than what you have seen. Indeed if you are interested in a problem with both a free surface and dispersed phases also this might be useful to you. That said, the development of this solver was targeted at a three-phase flow (liquid-liquid-air) in which you have a free-surface for the liquid-air pairs and dispersion for the liquid-liquid part--that is, interface sharpening is either on or off everywhere for a given phase pair. I did tinker with an earlier two-phase version of the same solver in which I implemented 'dynamic' switching of interface sharpening (a la Cerne et al. 2001) which would essentially allow you to capture regions with a sharp interface and regions dispersed for the same phase pair. I may look at adding this into the multiphase version but so far I haven't needed it and have gone on to working on other things.
Hope this is helpful.
-Kent
kwardle is offline   Reply With Quote

Old   June 14, 2012, 04:21
Default
  #15
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,890
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
One note on this, since I receive often emails on the topic

The fact that in twoPhaseEulerFoam the velocity of the dispersed phase (Ua) is not zero when the phase fraction alpha is zero is expected, since it is a property of the phase intensive form of the momentum equation, which is defined when alpha -> 0, and provides a finite non-zero value of Ua in such a case. This also does not represent a problem in general, since the sub-models are typically function of alpha*(1-alpha). (See Oliveira's paper for details).

As Kent said, multiphaseEulerFoam (and compressibleTwoPhaseEulerFoam) uses the conservative form of the momentum equation (and MULES to solve for the phase fractions and ensure they are bounded). To avoid the singularity when the phase fraction is small, the drag term is manipulated so that the values of alpha and beta have a strictly positive inferior bound (not zero). Similarly, the magnitude of the relative velocity is kept strictly positive. This treatment has the important advantage of keeping the conservative form, which is key in certain situations. You will still see however the non-zero velocity for a phase whose phase fraction is zero, and, as before this is fine (remove it in the post-processing).
andrea and pfhan like this.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Reply

Tags
euler-euler, multiphase flow, twophaseeulerfoam

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
twoPhaseEulerFoam - weird behaviour grjmell OpenFOAM Running, Solving & CFD 5 May 22, 2012 05:07
Something wrong in UEqns.H within twoPhaseEulerFoam cheng1988sjtu OpenFOAM 2 June 24, 2011 11:48
twoPhaseEulerFoam freemankofi OpenFOAM 0 May 23, 2011 17:24
Unphysical behaviour in dynamic mesh/vof model xaero FLUENT 0 April 24, 2011 08:50
Unstable behaviour after long period of stablility plunge11 FLUENT 1 April 6, 2011 10:15


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