View Issue Details

IDProjectCategoryView StatusLast Update
0001470OpenFOAMBugpublic2015-01-04 14:39
Reportersharonyue Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Summary0001470: different velocity field in openfoam22x and 23x
DescriptionI dont know if its a bug or it is related to numerical algorithm.

I did a comparison of the result of twoPhaseEulerFoam23x and compressibleTwoPhaseEulerFoam23x's tutorials:

mixerVessel2D

u can find it in the tutorials. just run it.

this is the result I got in 4.5s u can see in twoPhaseEulerFoam23x, the velocity near to the wall is almost half of the result I got from compressibleTwoPhaseEulerFoam22x. I believe the latter is normal cuz I have compared it with the paper.

Also it happens to my own case. see it here:
http://www.cfd-online.com/Forums/openfoam-solving/146185-conservative-form-twophaseeulerfoam23x-gives-unsatisfactory-velocity-result.html

also in this thread u can find the dispersed phase volume is not constant when running it in parallel.
TagsNo tags attached.

Activities

sharonyue

2014-12-30 09:04

reporter  

diffU.png (178,230 bytes)   
diffU.png (178,230 bytes)   

sharonyue

2014-12-30 09:06

reporter  

U2.png (72,693 bytes)   
U2.png (72,693 bytes)   

sharonyue

2014-12-30 09:06

reporter  

my3Dcase.jpg (32,286 bytes)   
my3Dcase.jpg (32,286 bytes)   

henry

2015-01-02 23:49

manager   ~0003472

I am running the mixerVessel2D laminar case in OpenFOAM-2.2.x and 2.3.x and find that the behaviour of 2.3.x is more stable than 2.2.x which is rather chaotic and in both cases the results are VERY sensitive to the modelling details, in particular the virtual mass.

You mention that you have compared the results to those in a paper; are these results for this particular case or something similar? Can you provide the paper and the equivalent cases setup for OpenFOAM-2.2.x and OpenFOAM-2.3.x so that I can analyse the difference?

sharonyue

2015-01-03 08:04

reporter   ~0003473

Last edited: 2015-01-03 08:07

Hi henry,
Thanks a lot for your attention. About the virtual mass force, I didnot pay lots of attention to it. cuz usually I set it to be zero. but u give me a hint, I will try adjust the vm force to see the result.

About the paper, these results are particular ones. I compared the epsilon field of my sumilation in 23x with this paper(simulated by 22x):

http://www.degruyter.com/view/j/revce.2014.30.issue-1/revce-2013-0015/revce-2013-0015.xml

form this graph(I upload it), we can see this epsilon is fairly good. I can get this good epsilon field from openfoam22x, but I can not get it from 23x. besides this, from my simulation. we can see the velocity field is not the same. I think this is the reason why epsilon fields are not the same. if we calculate the volume average epsilon field in my stirred tank case. 22x's result(around 0.05) is half of the result ot 23x(around 0.1).

Actually I can use openfoam22x to do simulations. but there is also something weird with the dispersed phase. cuz in my simulation, all the walls are closed, the dispersed phase's volume fraction should be constant.anyway this is another issue.

I will upload a 3d case with a coarse mesh,
thank u very much.

sharonyue

2015-01-03 08:04

reporter  

epsilon.PNG (213,367 bytes)   
epsilon.PNG (213,367 bytes)   

sharonyue

2015-01-03 10:34

reporter   ~0003474

https://www.dropbox.com/s/6llgnxn3588yzwj/Test.tar.gz?dl=0

I upload this case,just run it directly u know...

Also u can check the log file about the alpha field. I run all of them in parallel mode.

besides the U and epsilon, we can see alpha field is not the same. this can be tell from the log:

Min(alpha1) = 0.00156777 Max(alpha1) = 0.00271831

in 23x, some cell's alpha is quite large. But I did not put a lot of time to figure it out. To be notice that: in my case, dispersed phase's density is 1022 which is very close to continual phase(998). I wish it should be very homogeneous, in 22x, its quite homogeneous, the max alpha1 is about 0.00203 or something.

henry

2015-01-03 14:39

manager   ~0003476

Could you provide a simplified 2D setup for this case to study the differences between 2.2.x and 2.3.x?

Note that I have been running laminar to limit the number of differences we are studying simultaneously. The differences in the turbulence modelling between 2.2.x and 2.3.x are very significant with the latter providing a choice of up-to-date two-phase models. The rather over-simplistic modelling in 2.2.x is not provided in 2.3.x as it is not generally applicable or appropriate.

I suggest that in the first instance we concentrate on running laminar and study the effect of the differences in the other models, in particular drag-blending and virtual-mass.

sharonyue

2015-01-03 18:00

reporter  

22xVS23x.tar.gz (1,959,086 bytes)

sharonyue

2015-01-03 18:01

reporter  

u.png (267,019 bytes)

sharonyue

2015-01-03 18:02

reporter  

half.png (137,121 bytes)   
half.png (137,121 bytes)   

sharonyue

2015-01-03 18:08

reporter   ~0003482

I uploaded a laminar case, I think all the configuration is the same.

about the drag force I want to set all of these to be noblended, but 23x blows up. So I set all of them to be blended to make a truly comparison.

Also I found VM force have an effect on the velocity near to the wall. but it has the effect on both 22x and 23x cases.

henry

2015-01-03 18:20

manager   ~0003483

You MUST blend the interface models for cases with phase-inversion otherwise the system is ill-posed and unphysical. Note that blending in 2.2.x is built-in and linear over the complete range of phase-fraction. You can easily set the blending in 2.3.x to be equivalent.

sharonyue

2015-01-03 21:58

reporter   ~0003486

Last edited: 2015-01-03 22:00

Yes, at first, I want to set it to be non-blended, but this blows up in 23x, so in my uploaded case, all of them are blended.

except the governing momentum equation is conservative, I found this code in 23x:

phase1.turbulence().divDevRhoReff(U1)

does not include this term:

(((2.0/3.0)*I)*nuEff1)*tr(gradU1T)

even this term should be zero in convergence, but in openfoam22x it was included, in openfoam 23x, it is not included. So is this related to the problem? or there is some tricky way to handle this term in 23x?

BTW, I tried to add this term into 23x, looks like it does not improve the result.

Thanks very much!

henry

2015-01-03 22:03

manager   ~0003487

For single-phase flow this term is usually handled as part of the pressure but in two-phase flow with a single pressure it cannot be handled as part of the pressure. However, unless the flow is high-speed compressible this term is small and can generally be neglected. For these mixer cases it will be VERY small.

sharonyue

2015-01-03 22:32

reporter   ~0003490

oh, very quick response.lol,thanks a lot!

Um. so far, for this "small velocity in the stationary zones" problem...Im have tried to figure it out for about ten days. I tried to compared with the codes. also I found

dgdt in the alphaEqn is not the same in 23x and 22x:

23x:
 Sp[celli] -= dgdt_[celli]/max(1.0 - alpha1[celli], 1e-4);
 Su[celli] += dgdt_[celli]/max(1.0 - alpha1[celli], 1e-4);

22x:

Sp[celli] -= dgdt[celli]*alpha1[celli];
Su[celli] += dgdt[celli]*alpha1[celli];

I can understand the code of 22x, cuz the whole equations are the same with your paper long time ago. but 23x this is a little tricky.

I transported the whole compressibleTwoPhaseEulerFoam22x codes into openfoam23x. I can get the good result. Good means velocity in the stationary zones is larger.

for now, from the laminar case, maybe this problem is caused by the whole algorithm of 23x? I dont have much CFD experience anyway. So I wish U guys can help me out. lol.

Actually I can use 22x to run, but I just only run it with single core.. it way too slow..

henry

2015-01-03 22:39

manager   ~0003491

dgdt is defined differently between 2.2.x and 2.3.x explaining the difference in the Su and Sp terms. Look at the way dgdt is updated in pEqn in the two codes.

My understanding of the difference is that it is likely to be due to differences in the modelling and blending between the two codes. Also the fact that 2.3.x is conservative and 2.2.x isn't will affect the results.

sharonyue

2015-01-03 22:47

reporter   ~0003492

okay, looks like its very complicated to handle this problem. And if u guys have a solution pls make this update. for now I think I will use 22x to simulate.

Thanks very much for your time to discuss this with me. I really appreciate it.!

henry

2015-01-04 14:39

manager   ~0003500

I traced the difference in behavior between OpenFOAM-2.2.x and 2.3.x to the drag-blending as expected but the error is on OpenFOAM-2.2.x not 2.3.x. I have pushed the correction to OpenFOAM-2.2.x:

commit 1f35a0ff2a58105bbfce2259a74df47334a0fa53

Now if you choose linear blending in OpenFOAM-2.3.x over the phase-fraction range 0-1 and equivalent models the results between 2.2.x and 2.3.x are the same within reason.

Issue History

Date Modified Username Field Change
2014-12-30 09:04 sharonyue New Issue
2014-12-30 09:04 sharonyue File Added: diffU.png
2014-12-30 09:06 sharonyue File Added: U2.png
2014-12-30 09:06 sharonyue File Added: my3Dcase.jpg
2015-01-02 23:49 henry Note Added: 0003472
2015-01-03 08:04 sharonyue Note Added: 0003473
2015-01-03 08:04 sharonyue File Added: epsilon.PNG
2015-01-03 08:07 sharonyue Note Edited: 0003473
2015-01-03 10:34 sharonyue Note Added: 0003474
2015-01-03 14:39 henry Note Added: 0003476
2015-01-03 18:00 sharonyue File Added: 22xVS23x.tar.gz
2015-01-03 18:01 sharonyue File Added: u.png
2015-01-03 18:02 sharonyue File Added: half.png
2015-01-03 18:08 sharonyue Note Added: 0003482
2015-01-03 18:20 henry Note Added: 0003483
2015-01-03 21:58 sharonyue Note Added: 0003486
2015-01-03 22:00 sharonyue Note Edited: 0003486
2015-01-03 22:03 henry Note Added: 0003487
2015-01-03 22:32 sharonyue Note Added: 0003490
2015-01-03 22:39 henry Note Added: 0003491
2015-01-03 22:47 sharonyue Note Added: 0003492
2015-01-04 14:39 henry Note Added: 0003500
2015-01-04 14:39 henry Status new => resolved
2015-01-04 14:39 henry Resolution open => fixed
2015-01-04 14:39 henry Assigned To => henry