conservative form twoPhaseEulerFoam23x gives an unsatisfactory velocity result.

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

December 20, 2014, 09:08
conservative form twoPhaseEulerFoam23x gives an unsatisfactory velocity result.
#1
Senior Member

Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 842
Rep Power: 18
Hi guys,

1.conservative form twoPhaseEulerFoam23x gives an unsatisfactory velocity result.but keep the alpha field conservative.

2.twoPhaseEulerFoam 22x gives very precise velocity and turbulent field. but the alpha field is not very good. I mean, the dispersed phase's volume in twoPhaseEulerFoam 22x is missing. this is the problem.

This is my comparison: my geometry is a simple stirred tank with 4 baffles and 6 rushton impellers, dispersed phase is oil. alpha volume fraction is 0.002. continual phase is water. and I do it with cyclic boundaries.

In twoPhaseEulerFoam 22x. the velocity is like this(which is the same with the singlePhase simulation, cuz the dispersed phase volume is very low, 0.002):

which is the same with single phase simulation:

But in twoPhaseEulerFoam 23x. this is the slice of the velocity, looks like its a little sticky.I have tried with different turbulence model such RAS LES, all dont improve the velocity result.This is the typical velocity field:

Back to the problem of alpha. these two versions of calculated alpha field smoothly, but gives a different distribution(this maybe induced by different velocity field I mentioned above).

In twopahseeulerfoam23x, alpha field is extremely homogeneous. this is what I expected. in 22x, its not homogeneous, but it also make sense.

Apart from this, the really problem is: in 22x, the dispersed phase's volume is missing, in my simulation, the tank is closed. all walls boundaries and cyclic. so any phase can not get out the domain. These is the log of 22x:

Code:
```Courant Number mean: 0.0475877 max: 0.499942
Max Ur Courant Number = 0.0523714
deltaT = 0.000544251
Time = 18.4239

MULES: Solving for alpha1
MULES: Solving for alpha1
Dispersed phase volume fraction = 0.00177668  Min(alpha1) = 2.06395e-06  Max(alpha1) = 0.0284863```
u can see this alpha is missing after a long time simulation. but by 23x, :

Code:
```Courant Number mean: 0.0334339 max: 0.499894
Max Ur Courant Number = 0.0125706
deltaT = 0.000556328
Time = 51.1416

MULES: Solving for alpha.air
MULES: Solving for alpha.air
alpha.air volume fraction = 0.00197767  Min(alpha1) = 5.49808e-05  Max(alpha1) = 0.00311101```
Although its is not 0.002. but this is very acceptable. and pls notice that this is for time 51 sec.

So for now, 22x twophaseeulerfoam gives amazing velocity field. but alpha is missing, 23x twophaseeulerfoam's alpha is stable, but the velocity field is not satisfactory.

I also tried with the different composition of UEqn, PEqn, and AlphaEqn to make a new solver. and I found that, if the velocity is right, alpha is missing...

Attached Images
 twophaseeulerfoam22x.jpg (21.7 KB, 239 views) simpleFoam.jpg (22.7 KB, 238 views) twophaseeulerfoam23x.jpg (23.0 KB, 242 views)

December 20, 2014, 10:31
#2
Senior Member

Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 842
Rep Power: 18
After I post this thread, I think that maybe this maybe caused by the cyclic boundaries? So I tried with the whole geometry , pls see the picture of velocity field:

For now, time 4 sec, 22x behaves perfectly including alpha field, dispersed phase volume is not missing for now. is it caused by the cyclic boundary? I will keep it running and see.

Update: dispersed phase's volume is still missing.....

the initial value of alpha is below 0.002 is because that I plot it from about 7 sec. it does not matter.

Attached Images
 u.jpg (31.5 KB, 237 views) alphaVolume.PNG (15.1 KB, 235 views)

Last edited by sharonyue; December 20, 2014 at 13:14.

 December 21, 2014, 09:44 #3 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Beijing, China Posts: 842 Rep Power: 18 Update: By looking the alpha's plot carefully. we can see its absolutely linear with Time. its going down stably. So I tried with run it with single core. This is solved. alpha is extremely stable to be constant for now. for now I dont have time to figure out why its happening with parallel running. but the velocity field in openfoam 23x has not been solved yet. Also I found that compressible effect is forced to switch on in twoPhaseEulerFoam23x. But I dont expect this compressible effect on my simulation. In conclusion(from my simulation): 1. twophaseeulerfoam 23x's velocity is not satisfactory. this will induce abnormal epsilon field. 2. parallel running can make the dispersed phase volume missing.(not only this, GAMG matrix solver is also not stable in parallel running.) 3. how can I switch off the compressible effect in twoPhaseEulerFoam23x? by the code it looks unlikely. zhangyan likes this.

December 24, 2014, 03:49
#4
Senior Member

Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 842
Rep Power: 18
I plot dispersed phase volume on openfoam 2.3.x.

This is not the same with 22x. Its going down non-linearly. Also should be noticed that in 23x, there is an compressible effect which means rho will change somewhere.

BTW, 23x is going down slowly. u can compare with this plot and the previous plot. This is why I can accept 23x. But 23x's velocity is not good. So here is my solution:

1. serial running on openfoam22x, this may take a long long time.
2. parallel running on 23x, alpha will be constant but the velocity..
3. parallel running on 22x, velocity is extremely the same with the published paper. but alpha is not constant....
Attached Images
 23x.PNG (18.0 KB, 228 views)

 December 24, 2014, 15:13 #5 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Beijing, China Posts: 842 Rep Power: 18 Update: Anyone who is interesed into this thing can download the case from here. http://www.openfoam.org/mantisbt/view.php?id=1466 The dispersed phase volume missing is not the problem of the equations. because: in openfoam 22x, serial running is good and the data is almost the same with single phase simulation(This is the reason why Im using 22x not 23x). But parallel running the dispersed phase volume is missing! I tried with many method, modifying the mesh, do not use cyclic boundary condition, copy the physical properties form the tutorial, change the boundary condition, change fvShemes, change fvSolutions, change timePrecision and writePrecision(this maybe a clue) change the initial internal field of alpha. All does not work. But I found an interesting thing that: this value tends to change after the fourth significant figure. for example: 1. if the initial value of alpha is 0.002. from the log file we can see that it will change like this: 0.00199998,0.00199985,0.00199965,0.00199955. 2. if the initial value of alpha is 1e-09, it will be: 9.999708543e-10, 9.999532875e-10, 9.999330141e-10 So this maybe related with significant figure in C++? Last edited by sharonyue; December 30, 2014 at 04:11.

 December 26, 2014, 04:42 #6 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Beijing, China Posts: 842 Rep Power: 18 for now, im running with one core... mesh cells : 58000. taking 3500s, I got 0.5s result. deltaT = 0.0005 Looks like I can should take a vacation to America!!

 January 12, 2015, 02:44 #7 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Beijing, China Posts: 842 Rep Power: 18 Update: Looks like this dispersed phase volume problem can not be handled in openfoam 22x. I guess I have simulated at least 50 different cases. So I decide to forget it to move along. Also, I found this velocity field simulated by openfoam 23x can not be cured. Even after this bug report, http://www.openfoam.org/mantisbt/view.php?id=1470 openfoam twoPhaseEulerFoam 23x still can not predict velocity precisely in stirred tanks. So I post another thread to figure out the difference between this two models: http://www.cfd-online.com/Forums/ope...ifference.html ...no one is using twoPhaseEulerFoam23x here? looks they are not interested into this problem.. best,

 May 25, 2015, 05:14 #8 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Beijing, China Posts: 842 Rep Power: 18 Similar bug reports here: http://www.openfoam.org/mantisbt/view.php?id=1685 http://www.openfoam.org/mantisbt/view.php?id=1700 Still not fixed, for now if I want my dispersed phase to be constant. I have to force it to be in the code.

 February 10, 2016, 10:31 #9 Member   Sami Join Date: Nov 2012 Location: Cap Town, South Africa Posts: 87 Rep Power: 13 Hi Sharonyue, Thank you for the great work you did. I'm using multiphaseEulerFoam (OpenFoam 2.3.0) to simulate a two phase flow (air and water for eg.). My problem is that the solver become unstable (Co number explodes) when I tun in parallel. Do you have an idea about the origin of the problem ? Thank you

 February 10, 2016, 10:37 #10 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Beijing, China Posts: 842 Rep Power: 18 Hi Mehrez, Maybe you can check your mesh's quality? Is it total hex? or with tet? __________________ My OpenFOAM algorithm website: http://dyfluid.com By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html

February 10, 2016, 13:23
#11
Member

Sami
Join Date: Nov 2012
Location: Cap Town, South Africa
Posts: 87
Rep Power: 13
Thank you for the quick answer.
The mesh is with tetrahedral elements.
Do you think that using hexahedral elements is better ?
Thank you.

Mehrez

Quote:
 Originally Posted by sharonyue Hi Mehrez, Maybe you can check your mesh's quality? Is it total hex? or with tet?

 February 12, 2016, 15:42 #12 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Beijing, China Posts: 842 Rep Power: 18 Yes Im sure it will be better! Especially for this solver. Enjoy. kwardle likes this. __________________ My OpenFOAM algorithm website: http://dyfluid.com By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html

April 9, 2016, 23:30
#13
Member

Sami
Join Date: Nov 2012
Location: Cap Town, South Africa
Posts: 87
Rep Power: 13
Thank you for this important remark. In fact, I noticed that using Hex meshes improve the stability of the solver compared to tetrahedral ones.

But the issue is that the generation of Hex meshes is not easy when dealing with complex geometries...
I'm trying to find the best fvSchemes to use with the multiphaseEulerFoam solver to ensure the stability of the simulation using tetrahedral mesh. I posted here:
http://www.cfd-online.com/Forums/ope...tml#post594250

Mhrz

Quote:
 Originally Posted by sharonyue Yes Im sure it will be better! Especially for this solver. Enjoy.

Last edited by wyldckat; April 10, 2016 at 16:19. Reason: removed dead link