CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] mass conservation of solid phase violated when using groovyBC with twoPhaseEulerFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By xpqiu

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 1, 2015, 23:24
Default 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
xpqiu is on a distinguished road
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;
    }
}
For solid phase, I need the solid exitting the top outlet recirculate back to the bottom inlet, so I used groovyBC for inlet of solid phase velocity, as follows:

"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;
    }
}
where "alpha" is the volume fraction of solid phase.

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;
    }
Note that I used a fixed inlet solid phase volume fraction.


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
But at Time = 8.65s, solid phase approached at the top outlet, and total solid phase volume fraction started to increase:

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 21:15.
xpqiu is offline   Reply With Quote

 

Tags
groovybc, twophaseeulerfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 01:27
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
twoPhaseEulerFoam, mass loss and velocity profile problems mwaqas OpenFOAM Running, Solving & CFD 0 November 14, 2014 17:44
Mass conservation Diego Nogueira Main CFD Forum 1 July 30, 2004 15:50
How to calculate density of solid phase zhou Main CFD Forum 0 December 17, 1999 19:06


All times are GMT -4. The time now is 23:37.