
[Sponsors] 
March 19, 2013, 11:16 
mixerVesselAMI2D's mass is not balancing

#1 
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 750
Rep Power: 9 
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 ); } Code:
Create time Create mesh for time = 0 Selecting dynamicFvMesh solidBodyMotionFvMesh Selecting solidbody 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.75637e08, No Iterations 3 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 2.78334e08, No Iterations 3 GAMG: Solving for p, Initial residual = 1, Final residual = 0.00475254, No Iterations 7 time step continuity errors : sum local = 1.06191e05, global = 1.14192e14, cumulative = 1.14192e14 GAMG: Solving for p, Initial residual = 0.0660116, Final residual = 9.83139e07, No Iterations 15 time step continuity errors : sum local = 4.63971e09, global = 1.15555e15, cumulative = 1.25748e14 ExecutionTime = 0.11 s ClockTime = 0 s faceSource faceObj1 output: sum(AMI1) for phi = 1.64542e10 faceSource faceObj2 output: sum(AMI2) for phi = 1.64542e10 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.13168e07, No Iterations 5 smoothSolver: Solving for Uy, Initial residual = 0.360073, Final residual = 1.23184e07, 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.34996e05, global = 6.71617e09, cumulative = 6.71618e09 GAMG: Solving for p, Initial residual = 0.284634, Final residual = 8.34848e07, No Iterations 18 time step continuity errors : sum local = 6.83155e09, global = 5.27561e09, cumulative = 1.19918e08 ExecutionTime = 0.15 s ClockTime = 0 s faceSource faceObj1 output: sum(AMI1) for phi = 1.19993e11 faceSource faceObj2 output: sum(AMI2) for phi = 1.18665e09 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.83588e07, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.0303661, Final residual = 3.1709e07, 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.14473e06, global = 8.19475e09, cumulative = 2.01865e08 GAMG: Solving for p, Initial residual = 0.0206849, Final residual = 6.7807e07, No Iterations 16 time step continuity errors : sum local = 7.61434e09, global = 6.81002e09, cumulative = 2.69966e08 ExecutionTime = 0.2 s ClockTime = 0 s faceSource faceObj1 output: sum(AMI1) for phi = 2.16353e11 faceSource faceObj2 output: sum(AMI2) for phi = 1.32618e09 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.91973e07, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.0232963, Final residual = 2.08796e07, 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.94274e07, global = 6.09561e09, cumulative = 3.30922e08 GAMG: Solving for p, Initial residual = 0.00816126, Final residual = 9.76524e07, No Iterations 10 time step continuity errors : sum local = 6.68059e09, global = 5.4084e09, cumulative = 3.85006e08 ExecutionTime = 0.24 s ClockTime = 0 s faceSource faceObj1 output: sum(AMI1) for phi = 7.41031e11 faceSource faceObj2 output: sum(AMI2) for phi = 8.94365e10 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.41929e07, No Iterations 6 smoothSolver: Solving for Uy, Initial residual = 0.0155311, Final residual = 4.26798e07, 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.53077e06, global = 3.71028e09, cumulative = 3.74255e05 GAMG: Solving for p, Initial residual = 0.00975716, Final residual = 9.42704e07, No Iterations 10 time step continuity errors : sum local = 6.52561e09, global = 4.92664e09, cumulative = 3.74206e05 ExecutionTime = 21.04 s ClockTime = 24 s faceSource faceObj1 output: sum(AMI1) for phi = 4.00727e11 faceSource faceObj2 output: sum(AMI2) for phi = 3.73815e10 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.23871e07, No Iterations 6 smoothSolver: Solving for Uy, Initial residual = 0.0154133, Final residual = 4.05002e07, 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.58389e06, global = 1.4719e08, cumulative = 3.74058e05 GAMG: Solving for p, Initial residual = 0.00843536, Final residual = 5.56577e07, No Iterations 10 time step continuity errors : sum local = 1.55645e08, global = 1.46106e08, cumulative = 3.73912e05 ExecutionTime = 21.11 s ClockTime = 24 s faceSource faceObj1 output: sum(AMI1) for phi = 2.56852e11 faceSource faceObj2 output: sum(AMI2) for phi = 1.20176e09 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.87389e07, No Iterations 6 smoothSolver: Solving for Uy, Initial residual = 0.0167447, Final residual = 5.49334e07, 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.0609e06, global = 1.69306e08, cumulative = 3.73743e05 GAMG: Solving for p, Initial residual = 0.0106522, Final residual = 6.92095e07, No Iterations 13 time step continuity errors : sum local = 1.85086e08, global = 1.72556e08, cumulative = 3.7357e05 ExecutionTime = 21.2 s ClockTime = 24 s faceSource faceObj1 output: sum(AMI1) for phi = 2.22339e11 faceSource faceObj2 output: sum(AMI2) for phi = 1.32988e09 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.51256e07, No Iterations 6 smoothSolver: Solving for Uy, Initial residual = 0.0165718, Final residual = 5.13539e07, 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.58301e06, global = 3.43241e08, cumulative = 3.73227e05 GAMG: Solving for p, Initial residual = 0.0103026, Final residual = 7.62202e07, No Iterations 11 time step continuity errors : sum local = 3.65761e08, global = 3.5152e08, cumulative = 3.72876e05 ExecutionTime = 21.27 s ClockTime = 24 s faceSource faceObj1 output: sum(AMI1) for phi = 2.93999e11 faceSource faceObj2 output: sum(AMI2) for phi = 2.72504e09 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.04954e07, No Iterations 6 smoothSolver: Solving for Uy, Initial residual = 0.0170456, Final residual = 2.76193e07, 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.10342e06, global = 3.61976e08, cumulative = 3.66784e05 GAMG: Solving for p, Initial residual = 0.012284, Final residual = 7.79036e07, No Iterations 11 time step continuity errors : sum local = 3.84444e08, global = 3.70729e08, cumulative = 3.66413e05 ExecutionTime = 21.82 s ClockTime = 24 s faceSource faceObj1 output: sum(AMI1) for phi = 2.74505e11 faceSource faceObj2 output: sum(AMI2) for phi = 2.71613e09 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.80152e07, No Iterations 6 smoothSolver: Solving for Uy, Initial residual = 0.0166552, Final residual = 2.5669e07, 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.01183e06, global = 3.89227e08, cumulative = 3.66024e05 GAMG: Solving for p, Initial residual = 0.0100286, Final residual = 9.45629e07, No Iterations 10 time step continuity errors : sum local = 4.02786e08, global = 3.85933e08, cumulative = 3.65638e05 ExecutionTime = 21.91 s ClockTime = 24 s faceSource faceObj1 output: sum(AMI1) for phi = 4.09814e11 faceSource faceObj2 output: sum(AMI2) for phi = 2.81511e09 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.56067e07, No Iterations 6 smoothSolver: Solving for Uy, Initial residual = 0.0167104, Final residual = 2.35877e07, 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.82369e06, global = 1.5371e08, cumulative = 3.65484e05 GAMG: Solving for p, Initial residual = 0.00975367, Final residual = 7.6331e07, No Iterations 11 time step continuity errors : sum local = 1.67883e08, global = 1.55053e08, cumulative = 3.65329e05 ExecutionTime = 21.98 s ClockTime = 24 s faceSource faceObj1 output: sum(AMI1) for phi = 3.24097e11 faceSource faceObj2 output: sum(AMI2) for phi = 1.11506e09 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. 

March 21, 2013, 21:42 

#2 
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 750
Rep Power: 9 
No one has ever faced this problem before?


March 22, 2013, 07:09 

#3 
Member
prasant
Join Date: Jan 2013
Posts: 33
Rep Power: 6 
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. 

June 10, 2013, 08:32 

#4 
New Member
Join Date: Jun 2009
Posts: 21
Rep Power: 9 
Bump!
I'm seeing this problem too. Anyone found a resolution? //Olle 

June 10, 2013, 08:45 

#5 
New Member
Join Date: Jun 2009
Posts: 21
Rep Power: 9 
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 ydirection 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 

June 10, 2013, 09:01 

#6 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,800
Blog Entries: 39
Rep Power: 106 
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
__________________


June 10, 2013, 09:34 

#7 
New Member
Join Date: Jun 2009
Posts: 21
Rep Power: 9 
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 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
mass flow inlet and pressure outlet with target mass flow rate  Zigainer  FLUENT  10  January 5, 2013 22:51 
Water subcooled boiling  Attesz  CFX  7  January 5, 2013 04:32 
Problem setting with chtmultiregionFoam  Antonin  OpenFOAM  10  April 24, 2012 09:50 
mass fraction of species  Lilly  FLUENT  3  July 25, 2011 05:00 
mass flow in is not equal to mass flow out  saii  CFX  2  September 18, 2009 08:07 