
[Sponsors] 
November 2, 2011, 03:59 
interFoam VOF is loosing fluid

#1 
Member
Soeren Werner
Join Date: Mar 2009
Location: Wädenswil, Switzerland
Posts: 32
Rep Power: 16 
Hello Foamers,
I am running a case with interDyMFoam with OF2.0.x It is simulating a shake flask, which is use in bioscience for cultivation of microorganisms and other cells... so, in simple words, its a conical flask fixed at a rotating table. If you look at the flask form one point, you see always the same point at the flask, a little like the movement of the moon... anyway, I manage to change the tankMixer tutorial so that I get the movement rite... The problem: With every timestep it looses a certain amount of fluid due to "mathematical diffusion" or something... it became obvious after about 5s simulation time, after 1015 s no water is in the flask at all! How can this happen? And can I avoid it? The mesh is quite good, checkMesh shows no problems at all. The residues ar quite low, see below... I attached some of the important configuration files. Hopefully sb has an idea what could happen here, since I am really stuck here at the moment... solver.log, just two time step, it looks all time quite the same, time step size will be bigger later on during the simulation... Code:
Interface Courant Number mean: 0.0066323 max: 0.498321 Courant Number mean: 0.0398762 max: 0.498321 deltaT = 7.7658e07 Time = 0.000208016105042192333 solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.000208016 transformation: ((0.000163375 2.66915e07 0) (0.999999 (0 0 0.00163375))) solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.000208016 transformation: ((0 0 0) (0.999999 (0 0 0.00163375))) solidBodyMotionFunctions::multiMotion::transformation(): Time = 0.000208016 transformation: ((0.000163375 2.66915e07 0) (1 (0 0 0))) Execution time for mesh.update() = 0.26 s time step continuity errors : sum local = 1.96807e13, global = 1.09833e18, cumulative = 2.77411e13 GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 6.41289e07, No Iterations 19 GAMGPCG: Solving for pcorr, Initial residual = 0.0710413, Final residual = 5.60197e07, No Iterations 10 GAMGPCG: Solving for pcorr, Initial residual = 0.00429145, Final residual = 5.82585e07, No Iterations 7 time step continuity errors : sum local = 3.62563e18, global = 1.11019e18, cumulative = 2.77412e13 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844 Min(alpha1) = 2.30226e132 Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844 Min(alpha1) = 3.02039e132 Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844 Min(alpha1) = 3.96591e132 Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844 Min(alpha1) = 5.21193e132 Max(alpha1) = 1 DILUPBiCG: Solving for Ux, Initial residual = 0.00237312, Final residual = 4.19164e09, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 0.00328753, Final residual = 7.49817e09, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 0.0020948, Final residual = 3.63414e09, No Iterations 4 GAMG: Solving for p_rgh, Initial residual = 0.0253511, Final residual = 0.000118152, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 0.00189087, Final residual = 1.84691e05, No Iterations 2 GAMG: Solving for p_rgh, Initial residual = 0.000119528, Final residual = 9.13697e07, No Iterations 6 time step continuity errors : sum local = 2.13139e10, global = 7.34516e19, cumulative = 2.77413e13 GAMG: Solving for p_rgh, Initial residual = 0.00091004, Final residual = 2.82139e06, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 4.74559e05, Final residual = 2.29515e07, No Iterations 3 GAMGPCG: Solving for p_rgh, Initial residual = 3.12808e06, Final residual = 1.99243e09, No Iterations 4 time step continuity errors : sum local = 4.0557e13, global = 7.34599e19, cumulative = 2.77414e13 DILUPBiCG: Solving for omega, Initial residual = 0.00892048, Final residual = 7.19565e09, No Iterations 4 DILUPBiCG: Solving for k, Initial residual = 0.00479677, Final residual = 1.3686e10, No Iterations 5 ExecutionTime = 902.75 s ClockTime = 905 s Interface Courant Number mean: 0.00666334 max: 0.498319 Courant Number mean: 0.0400127 max: 0.498319 deltaT = 7.79193e07 Time = 0.000208795297929659983 solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.000208795 transformation: ((0.000163987 2.68919e07 0) (0.999999 (0 0 0.00163987))) solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.000208795 transformation: ((0 0 0) (0.999999 (0 0 0.00163987))) solidBodyMotionFunctions::multiMotion::transformation(): Time = 0.000208795 transformation: ((0.000163987 2.68919e07 0) (1 (0 0 0))) Execution time for mesh.update() = 0.26 s time step continuity errors : sum local = 4.06964e13, global = 2.12725e18, cumulative = 2.77411e13 GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 8.2677e07, No Iterations 26 GAMGPCG: Solving for pcorr, Initial residual = 0.0782515, Final residual = 7.38951e07, No Iterations 21 GAMGPCG: Solving for pcorr, Initial residual = 0.00468234, Final residual = 3.12732e07, No Iterations 11 time step continuity errors : sum local = 4.6662e18, global = 2.12035e18, cumulative = 2.77409e13 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844 Min(alpha1) = 6.8496e132 Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844 Min(alpha1) = 9.01104e132 Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844 Min(alpha1) = 1.18666e131 Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844 Min(alpha1) = 1.5643e131 Max(alpha1) = 1 DILUPBiCG: Solving for Ux, Initial residual = 0.00237884, Final residual = 3.78435e09, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 0.00328912, Final residual = 7.99669e09, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 0.00209302, Final residual = 3.10299e09, No Iterations 4 GAMG: Solving for p_rgh, Initial residual = 0.0255634, Final residual = 0.000116615, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 0.00189883, Final residual = 1.77012e05, No Iterations 2 GAMG: Solving for p_rgh, Initial residual = 0.000119078, Final residual = 8.93598e07, No Iterations 6 time step continuity errors : sum local = 2.10798e10, global = 2.13129e19, cumulative = 2.77409e13 GAMG: Solving for p_rgh, Initial residual = 0.000931977, Final residual = 2.85761e06, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 4.78142e05, Final residual = 2.35694e07, No Iterations 3 GAMGPCG: Solving for p_rgh, Initial residual = 3.16514e06, Final residual = 1.28317e09, No Iterations 4 time step continuity errors : sum local = 2.60862e13, global = 2.1641e19, cumulative = 2.77409e13 DILUPBiCG: Solving for omega, Initial residual = 0.00886702, Final residual = 5.8744e09, No Iterations 4 DILUPBiCG: Solving for k, Initial residual = 0.00479084, Final residual = 1.15469e10, No Iterations 5 ExecutionTime = 910.15 s ClockTime = 912 s 

November 2, 2011, 05:16 

#2 
Senior Member
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 14 
Hi Wersoe,
You should send your folder 0, or at least the boundary conditions for alpha1 and U. It would be easier to help you. 

November 2, 2011, 07:23 

#3 
Member
Soeren Werner
Join Date: Mar 2009
Location: Wädenswil, Switzerland
Posts: 32
Rep Power: 16 
Hi Aurelien,
thanks for trying to help me... Here are the contents, its quite simple, since it is all around just wall, the same like in the tankMixer tutorial... One more thing: I use the ko SST turbulence model instead of laminar... U: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { Deckel { type movingWallVelocity; value uniform (0 0 0); } Wand { type movingWallVelocity; value uniform (0 0 0); } } // ************************************************************************* // alpha1 before setFields: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { Deckel { type zeroGradient; } Wand { type zeroGradient; } } // ************************************************************************* // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( volScalarFieldValue alpha1 0 ); regions ( boxToCell { box ( 0.1 0.1 0 ) ( 0.1 0.1 0.02725 ); //10mL // box ( 0.1 0.1 0 ) ( 0.1 0.1 0.04525 ); //20mL fieldValues ( volScalarFieldValue alpha1 1 ); } ); // ************************************************************************* // Any idea? Your help is much appreciated... Best, Sören 

November 2, 2011, 08:13 

#4 
Senior Member
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 14 
I don't see any problem in your files.
Did you try to run your case on several meshes with different cell's size ? You can divide by 2 your reference cell size at each step and see if you are stabilizing the volume of fluid . I have run the tutorial and there is the same problem, obviously because of the cell size. 

November 3, 2011, 15:38 

#5 
Member
angel
Join Date: May 2009
Location: Spain
Posts: 46
Rep Power: 16 
Hello,
I have the same ploblem since of1.6 but i do not have any solution. I have tried with different mesh size with same results. Regards 

November 4, 2011, 04:06 

#6 
Member
Soeren Werner
Join Date: Mar 2009
Location: Wädenswil, Switzerland
Posts: 32
Rep Power: 16 
Hello,
thanks for your replies... I use a polyeder mesh create with following steps: 1: Salome for geometry and surface mesh 2: enGrid for boundary layer and volume mesh with tetraeder 3: polyDualMesh for conversion to polymesh The size of the domain is about 500mL. The mesh is about 2mm in edge lenght, which gives about 800 k cells with tetra and about 200k with poly... I run the case with single processor, and with 4 and 8 processors... The main thing I dont understand is that the time step continuity error is very small, about 1e18, even after many thousands time steps the cumulative error is just about 1e15. So what happens here? @Aurelien: Could you give me a hint how you reduce the mesh size by 2? Which tool do you use for it? @anmartin: Thanks for the hint, anyway, I cant use it. For the motion I use the multiMotion class, which was introduced in OF 2.0. Any help would be much appreciated. Best, Sören 

February 27, 2012, 07:16 

#7 
New Member
Ivo
Join Date: Feb 2012
Posts: 26
Rep Power: 13 
Hi Wersoe,
For what it's worth, after 3 months; refining the mesh can be done using the 'refineMesh' tool. But of course you can also change the blockMeshDict to change the cell size. I am too seeing this problem, also with interDyMFoam... The alpha1 fraction in the domain should not change if there's no inflow or outflow, but it does. As far as I know, the VoF scheme should be fully conservative, no matter what the cell size is. I just cannot really pinpoint the problem, in some simulations I can see it happening immediately, in other simulations it doesn't happen or only after a long time. Could it have something to do with largesmall cell transitions? 

February 27, 2012, 07:22 

#8 
Senior Member
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 14 
Ivooo,
By any chance, do you have any symmetryPlane condition in your case ? 

February 27, 2012, 07:37 

#9 
New Member
Ivo
Join Date: Feb 2012
Posts: 26
Rep Power: 13 
No, but I do use the constantAlphaContactAngle BC condition. I simulate a droplet around a fibre, and I set the contact angle of the fibre to some high value so that the liquid moves to find its lowest energy state. While it looks ok, I can check the volume fraction of alpha1 in the domain, and it decreases. Some snapshots and volume vs time evolution are given in the Figures attached.


February 27, 2012, 07:47 

#10 
Senior Member
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 14 
Well, for what it's worth :
I had some issues with the conservation of the fluid volume fraction in my simulations. It was linked to the pressure condition over a symmetryPlane. The gradient was not defined correctly. I switched for a slip wall with buoyant Presssure condition to fix it. 

February 28, 2012, 10:11 
Check your BCs!

#11 
New Member
Ivo
Join Date: Feb 2012
Posts: 26
Rep Power: 13 
Hi,
Just to followup the volume loss problems using constantAlphaContactAngle; be sure to set the 'limit' parameter to 'zeroGradient', otherwise a flux through the interface will emerge. Another option is to change the pressure boundary conditions, as outlined in the post of phsieh2005 in [1]. [1] http://www.cfdonline.com/Forums/ope...interfoam.html 

June 2, 2012, 17:06 

#12 
New Member
roberto putzu
Join Date: Mar 2012
Posts: 9
Rep Power: 13 
Hello,
This is maybe just a silly idea coming to my mind: What if you reduce the tolerances in the fvSolution? (i particular for U) If you have a continuity problem, maybe it's because the equation is not sufficiently well approximated. Roby 

June 26, 2013, 08:13 

#13 
New Member
Felix
Join Date: Aug 2012
Posts: 7
Rep Power: 12 
For constantAlphaContactAngle
you must use fixedFluxPressure > Calculates the pressure gradient in that way that the velocity bc is fullfilled Velocity*Area is Flux! and the flux is at the wall then zero! 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Fluent VOF Volume of Fluid Realistic Solution Problem  wormik  FLUENT  3  June 21, 2009 07:04 
Questions of fluid pairs  fjalil  CFX  1  June 10, 2009 17:36 
Fluid pairs  fjalil  Main CFD Forum  0  June 10, 2009 13:47 
VOF  fluid property problem  weechristo  FLUENT  1  April 11, 2009 15:08 
How to apply negtive pressure to outlet  bioman66  CFX  5  June 3, 2006 01:40 