How to ensure sum of alphas are equal to 1 for a four-phase simulation?

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

 July 23, 2021, 08:12 How to ensure sum of alphas are equal to 1 for a four-phase simulation? #1 New Member   Join Date: Oct 2010 Posts: 23 Rep Power: 15 Hello everyone, I am trying to simulate a four-phase case by modifying interPhaseChangeFoam solver. Phase changes (due to cavitation in this case) occur between alpha1(liquid1)<-->alpha2(vapor1) and alpha3(liquid2)<-->alpha4(vapor2), which is modeled with SchneerSauer. In the results, I receive that alpha1 and alpha3 have almost similar value in most of the individual cells, i.e. in the same cell and same timestep both alpha1 and alpha3 are equal to 1. My question is that how we can ensure that sum of all alphas are equal to 1? Regards. Last edited by clarkent; August 6, 2021 at 04:55. Reason: edit

 August 10, 2021, 05:03 #2 Senior Member   Join Date: Dec 2019 Location: Cologne, Germany Posts: 359 Rep Power: 8 you have two options: 1. either calculate the last alpha with alpha = 1 - sum of other alphas 2. or normalize all seperate calculated alphas, i.e. alpha/sum of alphas if everything is correct both ways should lead to nearly the same result, if something is not correct, the deviation will be large.

August 10, 2021, 08:10
#3
New Member

Join Date: Oct 2010
Posts: 23
Rep Power: 15
Quote:
 Originally Posted by geth03 you have two options: 1. either calculate the last alpha with alpha = 1 - sum of other alphas 2. or normalize all seperate calculated alphas, i.e. alpha/sum of alphas if everything is correct both ways should lead to nearly the same result, if something is not correct, the deviation will be large.
Thank you for the answer geth.

Actually I am already following the first approach in your reply, which is inherited from original interPhaseChangeFoam solver.

Code:
`alpha4 = scalar(1) - alpha1 - alpha2 - alpha3;`
In my case I have excluded the MULES solver, do you think that the problem might be connected to this? Do you know how within one transport equation the solver enforce the individual alpha is between 0 and 1?

Transport equation of my case for the first phase can be seen below (it is repeated for the other phases) :

Code:
```fvScalarMatrix alpha1Eqn
(
fvm::ddt(alpha1)
+ fvm::div(phi, alpha1, "div(phi,alpha)")
- fvm::Sp(divU, alpha1)
==
fvm::Sp(vDotvmcAlphal, alpha1)
+ vDotcAlphal
);
alpha1Eqn.solve();```
Use of a phase transport equation without MULES can also be found in this study (section 2.1).

Regards.

 August 11, 2021, 02:39 #4 Senior Member   Join Date: Dec 2019 Location: Cologne, Germany Posts: 359 Rep Power: 8 yeah most likely, the mules algo guarrantees boundedness of mass/volume fractions. how do you want to keep alpha between 0 and 1 if your equation has maybe sources that produce unphysical values? if your values are positive the best way to keep them below 1 is to normalize like i wrote in 2. in my earlier post. i read the publication, looks like they are doing more than just solving for the equation you wrote, they also correct in further steps. maybe that helps to keep alpha between 0 and 1.

August 13, 2021, 07:43
#5
New Member

Join Date: Oct 2010
Posts: 23
Rep Power: 15
Quote:
 Originally Posted by geth03 how do you want to keep alpha between 0 and 1 if your equation has maybe sources that produce unphysical values?
I was using below equation for this purpose:
Code:
`alpha1 = min(max(alpha1, scalar(0)), scalar(1));`
In case above equation is off and normalization is added for each alpha, then the sum is equal to 1. But then individual alphas within the domain can go below 0 or above 1. And non-physical high velocities are produced.

Switching off the source terms in transport equations produce meaningful results, so the problem might be coming from there actually.

 Tags alphaeqn.h, cavitation, interphasechangefoam, mulitphase