CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

mixerVesselAMI2D's mass is not balancing

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2013, 10:16
Default mixerVesselAMI2D's mass is not balancing
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 844
Rep Power: 18
sharonyue is on a distinguished road
Hi FOAMERS,

I am using foam 2.2.0,recently I am testing a mixer,I have used simpleFoam and interDyMFoam, the velocity and alpha looks fine.but when I checked the mass flux,I found the mass is not balancing in this solvers.I dont know why, So I testify the tutorial located in incompressible/pimpleDyMFoam/mixerVesselAMI2D. and add this code into controlDict.

Code:
functions
{
    faceObj1
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");

        enabled         true;
        outputControl    timeStep;

        // Output to log&file (true) or to file only
        log             true;

        // Output field values as well
        valueOutput     false;

        // Type of source: patch/faceZone/sampledSurface
        source          patch;

        // if patch or faceZone: name of patch or faceZone
        sourceName      AMI1;

        //// if sampledSurface: dictionary with a sampledSurface
        //// Note: will not sample surface fields.
        //sampledSurfaceDict
        //{
        //    // Sampling on triSurface
        //    type        sampledTriSurfaceMesh;
        //    surface     integrationPlane.stl;
        //    source      cells;  // sample cells or boundaryFaces
        //    interpolate true;
        //}

        // Operation: areaAverage/sum/weightedAverage ...
        operation      sum;

        fields
        (
            
            phi         // surface fields not supported for sampledSurface
            
        );
    }

    faceObj2
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled         true;
        outputControl    timeStep;
        log             true;
        valueOutput     false;
        source          patch;
        sourceName      AMI2;
        operation       sum;

        fields
        (
            phi
        );
    }
Then I found the mass is not balancing.

Code:
Create time

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone rotor
Reading field p

Reading field U

Reading/calculating face flux field phi

AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1, 1, 1
AMI: Patch target weights min/max/average = 1, 1, 1
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Reading field rAU if present

Creating finite volume options
Creating fintite volume options from fvOptions

Selecting finite volume options model type MRFSource
    Source: MRF1
    - applying source for all time
    - selecting cells using cellZone rotor
    - selected 1536 cell(s) with volume 0.000100459


PIMPLE: Operating solver in PISO mode


Starting time loop

faceSource faceObj1:
    total faces  = 96
    total area   = 0.00376924


faceSource faceObj2:
    total faces  = 96
    total area   = 0.00376924


Courant Number mean: 0 max: 0
deltaT = 0.00119048
Time = 0.00119048

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.00119048 transformation: ((0 0 0) (0.999993 (0 0 0.00373998)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00011, 1.00011, 1.00011
AMI: Patch target weights min/max/average = 1.00011, 1.00011, 1.00011
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 2.75637e-08, No Iterations 3
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 2.78334e-08, No Iterations 3
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.00475254, No Iterations 7
time step continuity errors : sum local = 1.06191e-05, global = 1.14192e-14, cumulative = 1.14192e-14
GAMG:  Solving for p, Initial residual = 0.0660116, Final residual = 9.83139e-07, No Iterations 15
time step continuity errors : sum local = 4.63971e-09, global = 1.15555e-15, cumulative = 1.25748e-14
ExecutionTime = 0.11 s  ClockTime = 0 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -1.64542e-10

faceSource faceObj2 output:
    sum(AMI2) for phi = 1.64542e-10

Courant Number mean: 0.0335763 max: 0.344683
deltaT = 0.00135356
Time = 0.00254403

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.00254403 transformation: ((0 0 0) (0.999968 (0 0 0.00799222)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.0002, 1.0002, 1.0002
AMI: Patch target weights min/max/average = 1.0002, 1.0002, 1.0002
smoothSolver:  Solving for Ux, Initial residual = 0.360072, Final residual = 1.13168e-07, No Iterations 5
smoothSolver:  Solving for Uy, Initial residual = 0.360073, Final residual = 1.23184e-07, No Iterations 5
GAMG:  Solving for p, Initial residual = 0.812745, Final residual = 0.00348747, No Iterations 7
time step continuity errors : sum local = 1.34996e-05, global = 6.71617e-09, cumulative = 6.71618e-09
GAMG:  Solving for p, Initial residual = 0.284634, Final residual = 8.34848e-07, No Iterations 18
time step continuity errors : sum local = 6.83155e-09, global = 5.27561e-09, cumulative = 1.19918e-08
ExecutionTime = 0.15 s  ClockTime = 0 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -1.19993e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = 1.18665e-09

Courant Number mean: 0.0380282 max: 0.38775
deltaT = 0.00152275
Time = 0.00406678

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.00406678 transformation: ((0 0 0) (0.999918 (0 0 0.0127758)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00025, 1.00025, 1.00025
AMI: Patch target weights min/max/average = 1.00025, 1.00025, 1.00025
smoothSolver:  Solving for Ux, Initial residual = 0.0323579, Final residual = 2.83588e-07, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.0303661, Final residual = 3.1709e-07, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.22932, Final residual = 0.00131756, No Iterations 4
time step continuity errors : sum local = 2.14473e-06, global = 8.19475e-09, cumulative = 2.01865e-08
GAMG:  Solving for p, Initial residual = 0.0206849, Final residual = 6.7807e-07, No Iterations 16
time step continuity errors : sum local = 7.61434e-09, global = 6.81002e-09, cumulative = 2.69966e-08
ExecutionTime = 0.2 s  ClockTime = 0 s

faceSource faceObj1 output:
    sum(AMI1) for phi = 2.16353e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = 1.32618e-09

Courant Number mean: 0.0425612 max: 0.422903
deltaT = 0.00168304
Time = 0.00574982

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.00574982 transformation: ((0 0 0) (0.999837 (0 0 0.0180626)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00026, 1.00026, 1.00026
AMI: Patch target weights min/max/average = 1.00026, 1.00026, 1.00026
smoothSolver:  Solving for Ux, Initial residual = 0.0234406, Final residual = 1.91973e-07, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.0232963, Final residual = 2.08796e-07, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.141409, Final residual = 0.000590853, No Iterations 4
time step continuity errors : sum local = 8.94274e-07, global = 6.09561e-09, cumulative = 3.30922e-08
GAMG:  Solving for p, Initial residual = 0.00816126, Final residual = 9.76524e-07, No Iterations 10
time step continuity errors : sum local = 6.68059e-09, global = 5.4084e-09, cumulative = 3.85006e-08
ExecutionTime = 0.24 s  ClockTime = 0 s

faceSource faceObj1 output:
    sum(AMI1) for phi = 7.41031e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = 8.94365e-10

Courant Number mean: 0.100468 max: 0.463572
deltaT = 0.0035874
Time = 1.29641

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1.29641 transformation: ((0 0 0) (-0.596865 (0 0 -0.802341)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00027, 1.00027, 1.00027
AMI: Patch target weights min/max/average = 1.00027, 1.00027, 1.00027
smoothSolver:  Solving for Ux, Initial residual = 0.0155061, Final residual = 4.41929e-07, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0155311, Final residual = 4.26798e-07, No Iterations 6
GAMG:  Solving for p, Initial residual = 0.105, Final residual = 0.000795315, No Iterations 3
time step continuity errors : sum local = 1.53077e-06, global = -3.71028e-09, cumulative = 3.74255e-05
GAMG:  Solving for p, Initial residual = 0.00975716, Final residual = 9.42704e-07, No Iterations 10
time step continuity errors : sum local = 6.52561e-09, global = -4.92664e-09, cumulative = 3.74206e-05
ExecutionTime = 21.04 s  ClockTime = 24 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -4.00727e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = -3.73815e-10

Courant Number mean: 0.100392 max: 0.4613
deltaT = 0.0035874
Time = 1.3

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1.3 transformation: ((0 0 0) (-0.587785 (0 0 -0.809017)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00017, 1.00017, 1.00017
AMI: Patch target weights min/max/average = 1.00017, 1.00017, 1.00017
smoothSolver:  Solving for Ux, Initial residual = 0.0153837, Final residual = 4.23871e-07, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0154133, Final residual = 4.05002e-07, No Iterations 6
GAMG:  Solving for p, Initial residual = 0.0871071, Final residual = 0.000835562, No Iterations 3
time step continuity errors : sum local = 1.58389e-06, global = -1.4719e-08, cumulative = 3.74058e-05
GAMG:  Solving for p, Initial residual = 0.00843536, Final residual = 5.56577e-07, No Iterations 10
time step continuity errors : sum local = 1.55645e-08, global = -1.46106e-08, cumulative = 3.73912e-05
ExecutionTime = 21.11 s  ClockTime = 24 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -2.56852e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = -1.20176e-09

Courant Number mean: 0.100289 max: 0.458449
deltaT = 0.00384615
Time = 1.30385

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1.30385 transformation: ((0 0 0) (-0.577967 (0 0 -0.81606)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00015, 1.00015, 1.00015
AMI: Patch target weights min/max/average = 1.00015, 1.00015, 1.00015
smoothSolver:  Solving for Ux, Initial residual = 0.0166437, Final residual = 5.87389e-07, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0167447, Final residual = 5.49334e-07, No Iterations 6
GAMG:  Solving for p, Initial residual = 0.108055, Final residual = 0.000970745, No Iterations 3
time step continuity errors : sum local = 2.0609e-06, global = -1.69306e-08, cumulative = 3.73743e-05
GAMG:  Solving for p, Initial residual = 0.0106522, Final residual = 6.92095e-07, No Iterations 13
time step continuity errors : sum local = 1.85086e-08, global = -1.72556e-08, cumulative = 3.7357e-05
ExecutionTime = 21.2 s  ClockTime = 24 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -2.22339e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = -1.32988e-09

Courant Number mean: 0.10744 max: 0.490639
deltaT = 0.00384615
Time = 1.30769

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1.30769 transformation: ((0 0 0) (-0.568065 (0 0 -0.822984)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00027, 1.00027, 1.00027
AMI: Patch target weights min/max/average = 1.00027, 1.00027, 1.00027
smoothSolver:  Solving for Ux, Initial residual = 0.0164731, Final residual = 5.51256e-07, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0165718, Final residual = 5.13539e-07, No Iterations 6
GAMG:  Solving for p, Initial residual = 0.109053, Final residual = 0.000740803, No Iterations 3
time step continuity errors : sum local = 1.58301e-06, global = -3.43241e-08, cumulative = 3.73227e-05
GAMG:  Solving for p, Initial residual = 0.0103026, Final residual = 7.62202e-07, No Iterations 11
time step continuity errors : sum local = 3.65761e-08, global = -3.5152e-08, cumulative = 3.72876e-05
ExecutionTime = 21.27 s  ClockTime = 24 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -2.93999e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = -2.72504e-09

Courant Number mean: 0.111874 max: 0.48966
deltaT = 0.0040724
Time = 1.34706

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1.34706 transformation: ((0 0 0) (-0.462204 (0 0 -0.886774)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00023, 1.00023, 1.00023
AMI: Patch target weights min/max/average = 1.00023, 1.00023, 1.00023
smoothSolver:  Solving for Ux, Initial residual = 0.0168916, Final residual = 3.04954e-07, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0170456, Final residual = 2.76193e-07, No Iterations 6
GAMG:  Solving for p, Initial residual = 0.125123, Final residual = 0.00105629, No Iterations 3
time step continuity errors : sum local = 2.10342e-06, global = -3.61976e-08, cumulative = 3.66784e-05
GAMG:  Solving for p, Initial residual = 0.012284, Final residual = 7.79036e-07, No Iterations 11
time step continuity errors : sum local = 3.84444e-08, global = -3.70729e-08, cumulative = 3.66413e-05
ExecutionTime = 21.82 s  ClockTime = 24 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -2.74505e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = -2.71613e-09

Courant Number mean: 0.111652 max: 0.48884
deltaT = 0.0040724
Time = 1.35113

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1.35113 transformation: ((0 0 0) (-0.450821 (0 0 -0.892614)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.00022, 1.00022, 1.00022
AMI: Patch target weights min/max/average = 1.00022, 1.00022, 1.00022
smoothSolver:  Solving for Ux, Initial residual = 0.0165065, Final residual = 2.80152e-07, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0166552, Final residual = 2.5669e-07, No Iterations 6
GAMG:  Solving for p, Initial residual = 0.105483, Final residual = 0.0010276, No Iterations 3
time step continuity errors : sum local = 2.01183e-06, global = -3.89227e-08, cumulative = 3.66024e-05
GAMG:  Solving for p, Initial residual = 0.0100286, Final residual = 9.45629e-07, No Iterations 10
time step continuity errors : sum local = 4.02786e-08, global = -3.85933e-08, cumulative = 3.65638e-05
ExecutionTime = 21.91 s  ClockTime = 24 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -4.09814e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = -2.81511e-09

Courant Number mean: 0.111445 max: 0.486969
deltaT = 0.0040724
Time = 1.3552

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1.3552 transformation: ((0 0 0) (-0.439365 (0 0 -0.898309)))
AMI: Creating addressing and weights between 96 source faces and 96 target faces
AMI: Patch source weights min/max/average = 1.0001, 1.0001, 1.0001
AMI: Patch target weights min/max/average = 1.0001, 1.0001, 1.0001
smoothSolver:  Solving for Ux, Initial residual = 0.0165572, Final residual = 2.56067e-07, No Iterations 6
smoothSolver:  Solving for Uy, Initial residual = 0.0167104, Final residual = 2.35877e-07, No Iterations 6
GAMG:  Solving for p, Initial residual = 0.106135, Final residual = 0.000956231, No Iterations 3
time step continuity errors : sum local = 1.82369e-06, global = -1.5371e-08, cumulative = 3.65484e-05
GAMG:  Solving for p, Initial residual = 0.00975367, Final residual = 7.6331e-07, No Iterations 11
time step continuity errors : sum local = 1.67883e-08, global = -1.55053e-08, cumulative = 3.65329e-05
ExecutionTime = 21.98 s  ClockTime = 24 s

faceSource faceObj1 output:
    sum(AMI1) for phi = -3.24097e-11

faceSource faceObj2 output:
    sum(AMI2) for phi = -1.11506e-09

Courant Number mean: 0.111196 max: 0.48682
deltaT = 0.0040724
Time = 1.35928

More details see the attached.

Does anyone know why?Thanks in advance.
Attached Files
File Type: txt faceSourceAMI1.txt (39.1 KB, 23 views)
File Type: txt faceSourceAMI2.txt (39.2 KB, 5 views)
sharonyue is offline   Reply With Quote

Old   March 21, 2013, 20:42
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 844
Rep Power: 18
sharonyue is on a distinguished road
No one has ever faced this problem before?
sharonyue is offline   Reply With Quote

Old   March 22, 2013, 06:09
Default
  #3
Member
 
prasant
Join Date: Jan 2013
Posts: 33
Rep Power: 13
prasant is on a distinguished road
Hello Sharonyue,

I am solving the impeller case with compressible effects. We already discussed regarding this task. I am monitoring mass flow rate at inlet and outlet. For me its balancing, After your suggestion. Coming to tutorial case, It is monitoring at interfaces. That too very negligible value. If you have inlet and outlet patches means, try to monitor mass flux at those locations.

Regards
Prasant.
prasant is offline   Reply With Quote

Old   June 10, 2013, 08:32
Default
  #4
otm
New Member
 
Join Date: Jun 2009
Posts: 22
Rep Power: 17
otm is on a distinguished road
Bump!

I'm seeing this problem too. Anyone found a resolution?

//Olle
otm is offline   Reply With Quote

Old   June 10, 2013, 08:45
Default
  #5
otm
New Member
 
Join Date: Jun 2009
Posts: 22
Rep Power: 17
otm is on a distinguished road
I realized that my problem description above was a bit too brief...

I'm running interDyMFoam on the mixerVesselAMI2D case. But I have changed it so that the outer region (called stator in te tutorial) is rotating at 1 rev/s and the inner region (called rotor) is stationary. Gravity is in negative y-direction and initially alpha1 (the heaver phase) fills the bottom of the geometry up to y=-0.04 m (alpha1 global volume fraction approximately 26%).

Everything runs fine to begin with but after a bit less than 1 second (simulated time) the global volume fraction of alpha1 starts to decrease quite rapidly and after 4 seconds I only have 18% left of my initial alpha1.

Seems to me that the cyclicAMI doesn't conserve mass with the interDyM solver.

In the interDyM tutorial sloshingTank2D conservation of alpha1 is perfect.

Any ideas on how to resolve this are welcome.

BR
//Olle
otm is offline   Reply With Quote

Old   June 10, 2013, 09:01
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Olle: You could have edited your previous post

Right now I don't have time to try the steps you taken. But I do remember a similar problem, where the solution was to use the boundary condition "movingWallVelocity": http://www.openfoam.org/mantisbt/view.php?id=566

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 10, 2013, 09:34
Default
  #7
otm
New Member
 
Join Date: Jun 2009
Posts: 22
Rep Power: 17
otm is on a distinguished road
Hi!

@wyldcat, thanks for the reply! However, I'm already using the movingWallVelocity BC for the velocity. For the pressure I'm using.
type fixedFluxPressure;
phi phiAbs;
value uniform 0;

This setup results in perfect conservation of alpha1 in the sloshingTank tutorial. So I think the problem has something to do with the cyclicAMIs.

BR
//Olle
otm is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
mass fraction of species Lilly FLUENT 5 March 13, 2022 17:52
mass flow inlet and pressure outlet with target mass flow rate Zigainer FLUENT 13 October 26, 2018 05:58
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Problem setting with chtmultiregionFoam Antonin OpenFOAM 10 April 24, 2012 09:50


All times are GMT -4. The time now is 13:24.