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

multiphase solvers alpha sweep not implemented

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 1, 2010, 09:37
Question [solved] multiphase solvers alpha sweep not implemented
  #1
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21
romant is on a distinguished road
Hej,

I have noticed that in the alphaEqn.H of the multiphase solvers with volume of fluid method (VOF), a correctional sweep is not implemented. The sweep is to make sure that alpha can never be larger than one or smaller than 0, because the method might introduce those small errors. The sweep is proposed in the original paper by Hirt and Nichols (1981).

It becomes apparent that when running a solver (interPhaseChangeFoam), sometimes the alpha value becomes larger than one or smaller than zero.

Does anybody know why this sweep is not implemented? Is there a specific reason?
__________________
~roman

Last edited by romant; April 9, 2010 at 08:27. Reason: discussion became irrelevant
romant is offline   Reply With Quote

Old   April 1, 2010, 18:14
Default
  #2
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
In think to remember that in interFoam the boundness was treated inside MULES?
Is that not the case in interPhaseChangeFoam?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   April 2, 2010, 20:46
Default
  #3
Member
 
Piotr Prusinski
Join Date: Oct 2009
Location: Warsaw, Poland
Posts: 67
Rep Power: 17
piprus is on a distinguished road
Quote:
Originally Posted by sega View Post
In think to remember that in interFoam the boundness was treated inside MULES?
Is that not the case in interPhaseChangeFoam?
Sebastian is right. MULES limits alpha/psi/gamma (depends on definition) thanks to psiMin and psiMax parameters, which are normally equal to 0 and 1 respectively.

The only one difference I see between interFoam (or compressibleInterFoam) and interPhaseChangeFoam is that the last one is using implicit instead of explicit method. Maybe that causes the trouble?!

-----
I was digging for something else, but I found something that might be interesting:
Quote:
Originally Posted by jaswi View Post
Hi Saha

if one carefully takes a look at the min and max values for gamma then one can conclude that
Min(gamma) = -7.81823e-47 implies gamma approximately equals 0 and regarding the Max(gamma) = 1.0004, as far as my understanding goes it can be because of several reasons:

1) set higher value for write precision in the controlDict to reduce rounding off error.

2)you are usng multigird for the pressure equation

3)this might be an intermediate iteration and when you let the solution converge you will get gamma=1.0

hope that helps and settle the doubt a bit :-)

With Best Regards
Jaswi

Last edited by piprus; April 3, 2010 at 12:49.
piprus is offline   Reply With Quote

Old   April 9, 2010, 08:25
Default
  #4
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21
romant is on a distinguished road
yeah, I was able to check it again with the MULES solver and it seems to do the sweep, but never output the cumulative error that forms due to this.

anyway, the third reason cannot hold, because the statistics on alpha1 are only written to log, after all the intermediate results are run. therefore, it does not converge to 1 or 0, which can also clearly be seen when inspecting the results in post-processing.

the reason, that the explicit solver is responsible for this is a valid one. i will have to try and see what else i can do about it.
__________________
~roman
romant is offline   Reply With Quote

Old   January 4, 2012, 17:04
Default question on transport properties and setfields in sloshingTank2d
  #5
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Dear all:
In transport properties, dynamic viscosities and densities are defined for phase1 and phase 2. In setFieldsDict, volScalarFieldValue alpha1 for fluid is set to 1 and volScalarFieldValue alpha1 for gas is set to 0. My question is

1. In setFieldsDict, phase for fluid and gas are both called alpha1 (though assigned different values). Is this correct and,
2. How does OpenFOAM know to which part of the model phase1 properties are to be applied and to which part phase 2 properties are to be applied? In other words, where and how does OpenFOAM make a connection between the phase1 and phase2, and alpha1=1 and alpha1=0?

Sorry if this is a dumb question to all the CFD wiz'es out there, but I could not find a relationship between the alpha1's and the phase1 and 2

Thanks to anyone who responds.
musahossein is offline   Reply With Quote

Old   January 5, 2012, 03:05
Default
  #6
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21
romant is on a distinguished road
hej,

the setFields will only assign 1 and 0, but will not assign something inbetween, even though that would be possible. just think of alpha1 as the first phase, therefore phase1, when a cell contains only phase 1, alpha1=1. if a cell contains only phase2, alpha1=0. Everything in between is a mix of both phases. Meaning that the properties are calculated based on

Code:
a_mix = alpha1*a_1 + (1-alpha1)*a_2
the connection is made by using alpha1 corresponding to phase1. for two phases there does not need to be a alpha2 because it can easily be calculated from 1-alpha1=alpha2. this saves memory and computation time.
__________________
~roman
romant is offline   Reply With Quote

Old   January 5, 2012, 10:06
Default phas and alpha in sloshingTank2D
  #7
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by romant View Post
hej,

the setFields will only assign 1 and 0, but will not assign something inbetween, even though that would be possible. just think of alpha1 as the first phase, therefore phase1, when a cell contains only phase 1, alpha1=1. if a cell contains only phase2, alpha1=0. Everything in between is a mix of both phases. Meaning that the properties are calculated based on

Code:
a_mix = alpha1*a_1 + (1-alpha1)*a_2
the connection is made by using alpha1 corresponding to phase1. for two phases there does not need to be a alpha2 because it can easily be calculated from 1-alpha1=alpha2. this saves memory and computation time.
Thank for your response. After reading your response I think I understand what you mean, but still I have the following question:

Say for example, I have a rectangular tank. Two thirds of the tank is water and the remaining one-third is open to the atmosphere. I know when I assign the lower 2/3 of the tank as fluid (alpha1=1), OpenFOAM will know to set the phase of those cells to 1. But how does it know that alpha1=1 means water?In the transportproperties file, I have set phase1 as water and phase2 as air. So how does openFoam know that the property of alpha1=1 should be the property of water, ie, property of alpha1 in the controlDict = property of phase1 in transportProperties?
musahossein is offline   Reply With Quote

Old   January 5, 2012, 10:56
Default
  #8
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21
romant is on a distinguished road
yes,

the "1" behind the word creates so-to-say the connection. let say you would state that phase1 in the transport properties is set to gas then alpha1=1 would be gas and you all the sudden would set the lower half to gas and the upper part to water, (which by the way can give you a great animation of falling water and some sloshing )
__________________
~roman
romant is offline   Reply With Quote

Old   January 5, 2012, 11:26
Default
  #9
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
understood. Many thanks. Also do you know which segment of the OpenFOAM code processes the alpha and the phase? I tried to find the class that processes trasportproperties and the setFieldsDict, but cant seem to find it. Thanks
musahossein is offline   Reply With Quote

Old   January 5, 2012, 11:28
Default
  #10
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 21
romant is on a distinguished road
setFieldsDict is read and processed by the tool setField, you can find how it does many of those things in the source code

alpha and the phase are processed by the different solvers which deal with mixed phases, and of course with MULES which calculated the transport of alpha
__________________
~roman
romant is offline   Reply With Quote

Reply

Tags
bug, multiphase, solver


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
interFoam (and other multiphase solvers): What is solved? mconroy OpenFOAM Running, Solving & CFD 3 February 23, 2010 17:07
Multiphase solvers Theory titio OpenFOAM Running, Solving & CFD 1 November 20, 2009 18:23
Alpha to be phased out Heiko Gerhauser Main CFD Forum 17 July 25, 2001 15:40
Determining alpha and beta for porous baffle Liaqat Khan Siemens 1 October 27, 2000 05:44


All times are GMT -4. The time now is 14:16.