CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   multiphase solvers alpha sweep not implemented (http://www.cfd-online.com/Forums/openfoam/74485-multiphase-solvers-alpha-sweep-not-implemented.html)

romant April 1, 2010 08:37

[solved] multiphase solvers alpha sweep not implemented
 
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?

sega April 1, 2010 17:14

In think to remember that in interFoam the boundness was treated inside MULES?
Is that not the case in interPhaseChangeFoam?

piprus April 2, 2010 19:46

Quote:

Originally Posted by sega (Post 252801)
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 (Post 197604)
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


romant April 9, 2010 07:25

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.

musahossein January 4, 2012 17:04

question on transport properties and setfields in sloshingTank2d
 
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.

romant January 5, 2012 03:05

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.

musahossein January 5, 2012 10:06

phas and alpha in sloshingTank2D
 
Quote:

Originally Posted by romant (Post 337934)
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?

romant January 5, 2012 10:56

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 :) )

musahossein January 5, 2012 11:26

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

romant January 5, 2012 11:28

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


All times are GMT -4. The time now is 05:09.