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

Rising Bubble Test Case Using interFoam: Unrealistic Results?!

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2014, 19:22
Default Rising Bubble Test Case Using interFoam: Unrealistic Results?!
  #1
New Member
 
Faraz
Join Date: Apr 2014
Location: Toronto, Canada
Posts: 16
Rep Power: 12
farazarbabi is on a distinguished road
Hi guys,

I am trying to follow the following paper and model a simple single bubble rising in a tank filled with water:

Hysing et al., "Quantitative benchmark computations of two-dimensional bubble dynamics", International Journal for Numerical Methods in Fluids, 2009.

The problem is that, I am not getting the same results as reported in this paper (I have modeled other test cases in other papers, but got the same problem). I attached my results for test case 2, and considered the parameters shown in the table below (nu for water and air were set to 0.01 and 0.1, respectively), but my bubble looks to move through a more viscous medium!
Does anybody have any idea where I might have made a mistake? I checked everything, and everything looks to be correct. Has anybody faced the same problem?

Thank you.
Attached Images
File Type: jpg Compare.jpg (71.8 KB, 525 views)
File Type: jpg table.jpg (29.3 KB, 185 views)
AnkitV and B_R_Khan like this.
farazarbabi is offline   Reply With Quote

Old   September 13, 2014, 16:50
Default
  #2
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Dear Faraz,

I have validated these results before,
You have got to be more specific about your setup to be able to know where the problem is.
farazarbabi likes this.
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   September 15, 2014, 13:05
Default
  #3
New Member
 
Faraz
Join Date: Apr 2014
Location: Toronto, Canada
Posts: 16
Rep Power: 12
farazarbabi is on a distinguished road
Hi Mojtaba and thank you for your response,

These are the parameters that I used:

zeroGradient pressure B.C. for for the walls. slip B.C. for the left and right walls, no-slip for the lower and upper walls.
g= -9.8, nu (water)= 0.01, nu (air)= 0.1, rho (w) = 1000, rho (air)= 1.0, and sigma= 1.96,.
Meshing= 160X320. No conversion of the units.

vertices
(
(0 0 0)
(1 0 0)
(1 2 0)
(0 2 0)
(0 0 0.01)
(1 0 0.01)
(1 2 0.01)
(0 2 0.01)
);
===============
I.C.: cylinderToCell

p1 (0.5 0.5 0);
p2 (0.5 0.5 0.01);
radius 0.25;

================

I also added pRefCell and pRefValue= 0 to fvSolutions.

Please let me know if you need any more details,
Thank you for your help,
Faraz
farazarbabi is offline   Reply With Quote

Old   September 15, 2014, 13:37
Default
  #4
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
How you set your initial condition for alpha?
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   September 15, 2014, 14:07
Default
  #5
New Member
 
Faraz
Join Date: Apr 2014
Location: Toronto, Canada
Posts: 16
Rep Power: 12
farazarbabi is on a distinguished road
In setFields:

defaultFieldValues
(
volScalarFieldValue alpha.water 1
);

regions
(
cylinderToCell
{

p1 (0.5 0.5 0);
p2 (0.5 0.5 0.01);
radius 0.25;

fieldValues
(
volScalarFieldValue alpha.water 0
);

}

and in alpha.water.org zeroGradient is set for all boundaries.
farazarbabi is offline   Reply With Quote

Old   September 15, 2014, 14:24
Default
  #6
New Member
 
Faraz
Join Date: Apr 2014
Location: Toronto, Canada
Posts: 16
Rep Power: 12
farazarbabi is on a distinguished road
Correction:
g=-0.98, as stated in the mentioned paper.


Quote:
Originally Posted by farazarbabi View Post
Hi Mojtaba and thank you for your response,

These are the parameters that I used:

zeroGradient pressure B.C. for for the walls. slip B.C. for the left and right walls, no-slip for the lower and upper walls.
g= -9.8, nu (water)= 0.01, nu (air)= 0.1, rho (w) = 1000, rho (air)= 1.0, and sigma= 1.96,.
Meshing= 160X320. No conversion of the units.

vertices
(
(0 0 0)
(1 0 0)
(1 2 0)
(0 2 0)
(0 0 0.01)
(1 0 0.01)
(1 2 0.01)
(0 2 0.01)
);
===============
I.C.: cylinderToCell

p1 (0.5 0.5 0);
p2 (0.5 0.5 0.01);
radius 0.25;

================

I also added pRefCell and pRefValue= 0 to fvSolutions.

Please let me know if you need any more details,
Thank you for your help,
Faraz
farazarbabi is offline   Reply With Quote

Old   September 15, 2014, 15:16
Default
  #7
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
OK,

I have attached the case I had used for validation. Just run Allrun script and you will be fine.

It works on OF 2.3.

Hope it helps,
Good luck.
Attached Files
File Type: gz bubbleValid2.tar.gz (2.7 KB, 432 views)
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   September 19, 2014, 19:12
Default
  #8
New Member
 
Faraz
Join Date: Apr 2014
Location: Toronto, Canada
Posts: 16
Rep Power: 12
farazarbabi is on a distinguished road
Thank you so much Mojtaba, it helped so much.
I realized that I had set the top-wall pressure B.C. to zeroGradient, which should be fixedValue.
Can you please explain why we must use fixedValue instead of zeroGradient? I thought the appropriate B.C. for walls is zeroGradient, and we have a wall at top, don't we?

Thank you again!
farazarbabi is offline   Reply With Quote

Old   September 19, 2014, 19:51
Default
  #9
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by farazarbabi View Post
Thank you so much Mojtaba, it helped so much.
I realized that I had set the top-wall pressure B.C. to zeroGradient, which should be fixedValue.
Can you please explain why we must use fixedValue instead of zeroGradient? I thought the appropriate B.C. for walls is zeroGradient, and we have a wall at top, don't we?

Thank you again!
Well I have set outlet boundary as patch since it is not a wall. Check boundary file.
As I far as I remember that wasn't set to wall in the paper.

Best.
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   September 20, 2014, 15:27
Default
  #10
New Member
 
Faraz
Join Date: Apr 2014
Location: Toronto, Canada
Posts: 16
Rep Power: 12
farazarbabi is on a distinguished road
I just noticed that writeInterval is a main reason for contradiction between our results. Its value has a huge effect on the solution. using deltaT=1e-04, and writeInterval=0.1 gives me wrong results, while writeInterval=0.01 gives me (more) correct results!
I used to think the writeInterval sets the steps that we want our results to be recorded, and thus it does not have any effect on the solution, can you please correct me?
Here are my results at t=2.2 sec, for writeIntervals equal to 0.1 and 0.01 in comparison with the reported result by Hysing et al.
Attached Images
File Type: jpg 2.2-0.1.jpg (7.3 KB, 99 views)
File Type: jpg 2.2-0.01.jpg (11.3 KB, 122 views)
File Type: jpg t=2.2.jpg (19.2 KB, 101 views)
farazarbabi is offline   Reply With Quote

Old   September 20, 2014, 17:22
Default
  #11
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by farazarbabi View Post
I just noticed that writeInterval is a main reason for contradiction between our results. Its value has a huge effect on the solution. using deltaT=1e-04, and writeInterval=0.1 gives me wrong results, while writeInterval=0.01 gives me (more) correct results!
I used to think the writeInterval sets the steps that we want our results to be recorded, and thus it does not have any effect on the solution, can you please correct me?
Here are my results at t=2.2 sec, for writeIntervals equal to 0.1 and 0.01 in comparison with the reported result by Hysing et al.
Well actually your sentence regarding "writeInterval sets the steps that we want our results to be recorded" is absolutely true. But there is one misunderstanding though.
I just checked OpenFOAM Time and data input/output control and got this:

- adjustableRunTime
Writes data every writeInterval seconds of simulated time, adjusting the time steps to coincide with the writeInterval if necessary — used in cases with automatic time step adjustment

It says that it changes timeStep to coincide with the writeInterval. Here choosing adjustableRunTime has forced the solver to change deltaT. Therefore in fact, it is deltaT which has effects on the solution.
minh khang likes this.
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   September 20, 2014, 17:46
Default
  #12
New Member
 
Faraz
Join Date: Apr 2014
Location: Toronto, Canada
Posts: 16
Rep Power: 12
farazarbabi is on a distinguished road
I see your point, but I think (according to OpenFOAM) as long as the Courant number is below 1, the solution should be correct. Neither writeInterval equal to 0.1 nor 0.01 causes the Courant number reach even close to 1.
This is important for me since I want to run more complex simulations, so I must use adjustableRunTime, and if Co < 1 constraint does not work properly, I need to set the maximum Co to a more reliable number.
farazarbabi is offline   Reply With Quote

Old   September 20, 2014, 18:33
Default
  #13
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by farazarbabi View Post
I see your point, but I think (according to OpenFOAM) as long as the Courant number is below 1, the solution should be correct. Neither writeInterval equal to 0.1 nor 0.01 causes the Courant number reach even close to 1.
This is important for me since I want to run more complex simulations, so I must use adjustableRunTime, and if Co < 1 constraint does not work properly, I need to set the maximum Co to a more reliable number.
I see, well how about checking to see what are the differences between timeSteps in the two simulations?

However I just found a link which I think is helpful:

http://www.idurun.com/?p=371

Another thing, maybe you can solve the problem by setting a lower value for maxDeltaT ?!
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   September 22, 2014, 14:27
Default
  #14
New Member
 
Faraz
Join Date: Apr 2014
Location: Toronto, Canada
Posts: 16
Rep Power: 12
farazarbabi is on a distinguished road
Hi Mojtaba,

I reran the case for different maxCo (and maxalphaCo) numbers, for writeIntervals equal to 0.1:

Co= 0.5; Execution Time= 106 s
Co= 0.3; Execution Time= 190 s
Co= 0.1; Execution Time= 758 s
Co= 0.05 Execution Time= 1484 s

It is clear from the results that despite what OpenFOAM manual suggests, at least in multiphase modeling, we will not obtain realistic results by using Courant numbers higher than 0.1. Even limiting Courant number to below 0.05, still there is a minor discrepancy between our result and what reported in the literature.
The execution time is too high, but can be moderated by running in parallel.
Attached Images
File Type: jpg 2.2-0.1-Co0.1.jpg (23.3 KB, 156 views)
File Type: jpg 2.2-0.1-Co0.3.jpg (22.3 KB, 152 views)
File Type: jpg 2.2-0.1-Co0.5.jpg (21.9 KB, 156 views)
File Type: jpg 2.2-0.1-Co0.05.jpg (24.2 KB, 187 views)
File Type: jpg t=2.2.jpg (19.2 KB, 129 views)
farazarbabi is offline   Reply With Quote

Old   July 16, 2015, 09:34
Default bubble rising grid study problem!
  #15
New Member
 
Mohammad reza
Join Date: Jul 2015
Posts: 7
Rep Power: 11
mreza_cfd is on a distinguished road
Hello!


I did a simple run: 2d bubble rising with solver interFoam.
The problem is that when I run on a finer mesh, the results have more error with comparison to Hysing et al.*

Do you know why?!


You can see the code and results in attachment.


Thanks a lot in advance!


Attached Images
File Type: png bubble rising.PNG (24.7 KB, 152 views)
File Type: png Position of bubble.PNG (21.4 KB, 166 views)
File Type: png rise velosity grid 300-600.PNG (14.0 KB, 142 views)
Attached Files
File Type: zip bubble rising.zip (9.4 KB, 111 views)
arsalan.dryi likes this.
mreza_cfd is offline   Reply With Quote

Old   January 11, 2017, 16:45
Default
  #16
New Member
 
seyed zeynab hoseini larimi
Join Date: Jan 2017
Location: Mazandaran - Iran
Posts: 1
Rep Power: 0
zeynab hoseini is on a distinguished road
Quote:
Originally Posted by Mojtaba.a View Post
OK,

I have attached the case I had used for validation. Just run Allrun script and you will be fine.

It works on OF 2.3.

Hope it helps,
Good luck.
Hello Mojtaba
I have validated above paper and now I have some question:
1- In this paper , units have not been mentioned so it means i can choose cm unit ? If i can , which parameter must be changed ? Changing units in blockMesh and setFields are enough or other parameters must be changed according to dimensionless numbers? How can I change them ?
2 – the bubble behavior in both case should be similar or not ? ( it is reasonable that in cm case runtime increases because bouancy force reduces while surface tention and gravity force are constant ).
If It's Possible Please Guide Me .
With Best Regards
zeynab hoseini is offline   Reply With Quote

Old   May 23, 2017, 06:04
Default
  #17
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi guys,

we will keep the thread in the validation sub-forum because there are some nice results. However, in general the thread is more about solving the problem rather than showing a validation which has good comparison.

Some hints to your cases:

If you lower the Courant number, you will lower the time step and therefore you get more accurate results based on the fact that you are using a 1st order time discretization. Personally I would say, that here you have the problem rather than that it is a problem of FOAM. It's more the numerical aspects which has to be considered. Another example is the laplacian discretization. I think you have a orthogonal case, so you should set also appropriate discretization for that term and not a corrected one

I know that this thread is a bit old but maybe someone will re-check it with more accurate numerical schemes.

Good luck.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 1, 2017, 14:37
Default
  #18
New Member
 
David Smith
Join Date: Jul 2013
Posts: 9
Rep Power: 13
minh khang is on a distinguished road
"Another example is the laplacian discretization. I think you have a orthogonal case, so you should set also appropriate discretization for that term and not a corrected one"

I don't understand this.
minh khang is offline   Reply With Quote

Old   January 2, 2018, 17:42
Default
  #19
Member
 
Lilian Chabannes
Join Date: Apr 2017
Posts: 58
Rep Power: 9
Lookid is on a distinguished road
Quote:
Originally Posted by minh khang View Post
"Another example is the laplacian discretization. I think you have a orthogonal case, so you should set also appropriate discretization for that term and not a corrected one"

I don't understand this.
Your input on fvSchemes should depend a lot on your mesh quality. Basically, if you have a perfect mesh, you put very accurate schemes, if you have a bad mesh, you put robust scheme, but less accurate. It's always a compromise between accuracy and stability. To know more about this, please read this : http://www.wolfdynamics.com/wiki/fvm_crash_intro.pdf
It's full of great information, you won't lose your time

For example, for laplacian terms, you'll put orthogonal if you have a high quality hexa-mesh, and as the quality of your mesh goes down, you'll use corrected, limited and finally uncorrected. So try to put "Gauss linear orthogonal;" and see if it helps you
minh khang and warnerchang like this.
Lookid is offline   Reply With Quote

Old   January 3, 2018, 01:55
Default
  #20
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
I calculated this example too. It is a good exercise to set all the parameters appropriate to the problem. I used accurate schemes for discretisation. The most important parameter was the maxCo, which influenced the accuracy most. I ended with as low as 0.01, 0.003 was only very slightly better. I measured this against the center of mass y_c after 3 seconds.
minh khang likes this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Reply

Tags
interfoam, rising bubble, unrealistic


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
bubble rising problem swamysrikanth ANSYS Meshing & Geometry 3 May 31, 2016 12:09
bubbleFoam - Simple case, Large bubble, closed domain darai OpenFOAM Running, Solving & CFD 9 October 12, 2015 06:40
3D rising bubble view in paraFoam post-processing tayo OpenFOAM Post-Processing 1 September 27, 2012 08:03
bubble rising in a column swamysrikanth Main CFD Forum 2 September 27, 2010 09:59
Interfoam Droplet under shear test case adona058 OpenFOAM Running, Solving & CFD 3 May 3, 2010 19:46


All times are GMT -4. The time now is 06:46.