|
[Sponsors] |
[swak4Foam] mass conservation of solid phase violated when using groovyBC with twoPhaseEulerFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 2, 2015, 00:24 |
mass conservation of solid phase violated when using groovyBC with twoPhaseEulerFoam
|
#1 |
New Member
Qiu Xiaoping
Join Date: Apr 2013
Location: IPE CAS China
Posts: 14
Rep Power: 14 |
Hi, every one
I am working on OpenFOAM-2.1.1, I need to simulate a gas-solid two phase flow with twoPhaseEulerFoam, the geometry of my simulation is a 2d-rectangular, bottom is inlet, top is outlet, and side patches are walls. gas phase velocity BC is set as follows: "Ub" Code:
boundaryField { walls { type fixedValue; value uniform (0 0 0); } outlet { type zeroGradient; } inlet { type fixedValue; value uniform (0 0.20 0); } frontAndBackPlanes { type empty; } } "Ua" Code:
boundaryField { walls { type fixedValue; value uniform (0 0 0); } outlet { type zeroGradient; //type inletOutlet; //inletValue uniform (0 0 0 ); //value uniform (0 0 0 ); } inlet { //type fixedValue; //value uniform (0 0 0); type groovyBC; valueExpression "-inVel*normal()" value uniform ( 0 0 0 ); variables ( "A=sum(area());" "outFlow{outlet}=sum(Ua&normal()*area()*alpha);" "myFlow=outFlow/alpha;" "inVel=myFlow/A;" ); } frontAndBackPlanes { type empty; } } Boundary condition for alpha are set as: "alpha" Code:
boundaryField { inlet { type fixedValue; value uniform 0.2; } outlet { type zeroGradient; } walls { type zeroGradient; } frontAndBackPlanes { type empty; } The simulation worked fine at the beginning, but as the solid phase approached the top outlet, and started to recirculated back to bottom inlet, things got strange. It seems that the mass conservation of solid phase is violated. Here are some of my logs: At the beginning , total solid phase volume fraction is: Code:
Dispersed phase volume fraction = 0.2925 Min(alpha) = 0 Max(alpha) = 0.6 Code:
Time = 8.65 DILUPBiCG: Solving for alpha, Initial residual = 0.00712221, Final residual = 6.46064e-11, No Iterations 3 Dispersed phase volume fraction = 0.292501 Min(alpha) = 0.0141432 Max(alpha) = 0.565962 from that on, total solid phase volume fraction increased monotonically, and reached 0.293174 at time 20.4s : Code:
Time = 20.4 DILUPBiCG: Solving for alpha, Initial residual = 0.00496807, Final residual = 1.18516e-11, No Iterations 3 Dispersed phase volume fraction = 0.293174 Min(alpha) = 0.0697732 Max(alpha) = 0.513855 I monitored the flux of solid phase at outlet and inlet with "simpleSwakFunctionObjects" , here is the code in the controlDict file: Code:
massConservationTest { type patchExpression; outputControlMode outputTime; patches ( inlet outlet ); verbose true; expression "(Ua & normal())*alpha*area()"; accumulations ( sum ); } And the flux at inlet and outlet are always equal in value and opposite in direction. Code:
Time flux of inlet flux of outlet 8.65 -0.000376597 0.000376597 8.7 -0.000382609 0.000382609 8.75 -0.000377901 0.000377901 8.8 -0.000374998 0.000374998 8.85 -0.000373855 0.000373855 8.9 -0.000377711 0.000377711 8.95 -0.000387632 0.000387632 9 -0.000393048 0.000393048 9.05 -0.00039903 0.00039903 9.1 -0.000403242 0.000403242 9.15 -0.000376861 0.000376861 9.2 -0.000323375 0.000323375 9.25 -0.000147949 0.000147949 9.3 -0.00010581 0.00010581 9.35 -0.000138232 0.000138232 9.4 -0.000138196 0.000138196 9.45 -4.15751e-05 4.15751e-05 9.5 -2.36378e-05 2.36378e-05 9.55 -9.4021e-05 9.4021e-05 9.6 -8.63874e-05 8.63874e-05 9.65 -8.27537e-05 8.27537e-05 9.7 -9.60432e-05 9.60432e-05 9.75 -0.000152863 0.000152863 9.8 -0.000159683 0.000159683 9.85 -0.000191661 0.000191661 9.9 -0.00022118 0.00022118 9.95 -0.000152557 0.000152557 10 -0.000189653 0.000189653 10.05 -0.000233514 0.000233514 10.1 -0.000197505 0.000197505 10.15 -0.000214339 0.000214339 10.2 -0.000235228 0.000235228 10.25 -0.000221006 0.000221006 10.3 -0.000226268 0.000226268 10.35 -0.00025188 0.00025188 10.4 -0.000264869 0.000264869 10.45 -0.000206712 0.000206712 10.5 -0.000236892 0.000236892 10.55 -0.000204415 0.000204415 10.6 -6.89294e-05 6.89294e-05 10.65 -7.52851e-05 7.52851e-05 10.7 -9.99905e-05 9.99905e-05 10.75 -6.23968e-05 6.23968e-05 10.8 8.60961e-05 -8.60961e-05 10.85 -4.74735e-05 4.74735e-05 10.9 -7.44399e-05 7.44399e-05 10.95 -3.77192e-05 3.77192e-05 11 -1.52147e-05 1.52147e-05 It seems that the flux on both inlet and outlet are reasonable, and flux on inlet is exactly conserved with flux on outlet, but why the total volume fraction of solid phase is not conserved ? Thanks a lot for any hints Last edited by xpqiu; June 4, 2015 at 22:15. |
|
June 3, 2015, 04:01 |
|
#2 |
New Member
Join Date: Apr 2015
Posts: 4
Rep Power: 11 |
Dear experts,
I am struggling with the same kind of issue and thus I want to bring out that your help will be appreciated by me, too. Regards, Lassi L. |
|
June 4, 2015, 11:52 |
|
#3 | |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
Quote:
this happens on tons of cases, here are some threads maybe u are interested into it. now its not solved out. Anyway u can force it to be constant. BTW, this is not a serious problem. But yeah, it weird. This happens in 22x,23x,211(by your test). http://www.openfoam.org/mantisbt/view.php?id=1700 http://www.openfoam.org/mantisbt/view.php?id=1237#c3117 http://www.cfd-online.com/Forums/ope...ty-result.html I expect in 23x this should be solved. but its not. even with an conservative equation implemented. Best,
__________________
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 |
||
June 4, 2015, 11:56 |
|
#4 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
Have u ever tried a case without swakFoam? I think this is not related with swak. This dispersed phase volume not constant problem also happens with the tutorial cases.
__________________
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 |
|
June 4, 2015, 22:23 |
|
#5 |
New Member
Qiu Xiaoping
Join Date: Apr 2013
Location: IPE CAS China
Posts: 14
Rep Power: 14 |
Hi Dongyue,
Thanks for the reply,I have tried bubbling fluidized bed without swak4Foam, in that case, Ua set as "uniform (0 0 0)" on both inlet and outlet, and alpha is set as "uniform 0" on both inlet and outlet. In my bubbling fluidized bed case, mass of solid phase is exactly conserved. |
|
June 4, 2015, 22:46 |
|
#6 | |
New Member
Qiu Xiaoping
Join Date: Apr 2013
Location: IPE CAS China
Posts: 14
Rep Power: 14 |
Hi, Dongyue
Quote:
I have tried some bubbling bed cases and circulating fluidized bed(CFB) cases, and violation of mass only happens in my CFB cases. As I know, in OpenFOAM-2.1.1, alphaEqn is solved with iteration method, but since OpenFOAM-2.2.x, alphaEqn is solved with MULES. I didn't try to run my case on OpenFOAM-2.2.x and 2.3.x. I happened to known that MULES is an effective way to limit the maximum value of alpha, to avoid an overpacking of solid phase, so I tried to modify the "twoPhaseEulerFoam" in OpenFOAM-2.1.1, using MULES to solve the alphaEqn. I found that for the same circulating fluidized bed case, violation of mass conversation is more serious in my modified solver, so I don't known if to some extent MULES is responsible for the mass loss(addition). By the way, do you have some reference about MULES? Best Last edited by xpqiu; June 17, 2015 at 02:55. |
||
June 15, 2015, 05:04 |
|
#7 |
New Member
Join Date: Apr 2015
Posts: 4
Rep Power: 11 |
Dear experts,
I have a question related to the code presented in this thread. Ua: Code:
inlet { //type fixedValue; //value uniform (0 0 0); type groovyBC; valueExpression "-inVel*normal()" value uniform ( 0 0 0 ); variables ( "A=sum(area());" "outFlow{outlet}=sum(Ua&normal()*area()*alpha);" "myFlow=outFlow/alpha;" "inVel=myFlow/A;" ); } Code:
"outFlow{outlet}=sum(Ua&normal()*area()*alpha);" Code:
massConservationTest { type patchExpression; outputControlMode outputTime; patches ( inlet outlet ); verbose true; expression "(Ua & normal())*alpha*area()"; accumulations ( sum ); } Thank you. |
|
June 15, 2015, 05:16 |
|
#8 | |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
Quote:
That has been a really long time since I touched the OpenFOAM-2.1.1 last time. From your depiction, If MULES violate the mass conservation, thats interesting. I never tried with solve alphaEqn by conventional method. But maybe solving alphaEqn(without MULES) in OpenFOAM 2.2.x or 2.3.x can provides a mass conservation result? Maybe someday I can make a test, for now I just force it to be mass conservation. Also maybe u can report a bug~ Best,
__________________
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 |
||
June 17, 2015, 03:08 |
|
#9 | ||
New Member
Qiu Xiaoping
Join Date: Apr 2013
Location: IPE CAS China
Posts: 14
Rep Power: 14 |
Dear LassiL,
In the phrase "A=sum(area())" , "area()" means area of current patch. But in Quote:
The trick is that when you use "{patch_name}" after a variable, then all the terms on the right hand side are properties of the specified patch "patch_name". And in the following code, Quote:
|
|||
Tags |
groovybc, twophaseeulerfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
twoPhaseEulerFoam, mass loss and velocity profile problems | mwaqas | OpenFOAM Running, Solving & CFD | 0 | November 14, 2014 18:44 |
Mass conservation | Diego Nogueira | Main CFD Forum | 1 | July 30, 2004 16:50 |
How to calculate density of solid phase | zhou | Main CFD Forum | 0 | December 17, 1999 20:06 |