CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   interFoam VOF is loosing fluid (https://www.cfd-online.com/Forums/openfoam-solving/93982-interfoam-vof-loosing-fluid.html)

 wersoe November 2, 2011 04:59

interFoam VOF is loosing fluid

4 Attachment(s)
Hello Foamers,

I am running a case with interDyMFoam with OF-2.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 10-15 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.7658e-07 Time = 0.000208016105042192333 solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.000208016 transformation: ((0.000163375 2.66915e-07 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.66915e-07 0) (1 (0 0 0))) Execution time for mesh.update() = 0.26 s time step continuity errors : sum local = 1.96807e-13, global = -1.09833e-18, cumulative = -2.77411e-13 GAMGPCG:  Solving for pcorr, Initial residual = 1, Final residual = 6.41289e-07, No Iterations 19 GAMGPCG:  Solving for pcorr, Initial residual = 0.0710413, Final residual = 5.60197e-07, No Iterations 10 GAMGPCG:  Solving for pcorr, Initial residual = 0.00429145, Final residual = 5.82585e-07, No Iterations 7 time step continuity errors : sum local = 3.62563e-18, global = -1.11019e-18, cumulative = -2.77412e-13 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844  Min(alpha1) = 2.30226e-132  Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844  Min(alpha1) = 3.02039e-132  Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844  Min(alpha1) = 3.96591e-132  Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844  Min(alpha1) = 5.21193e-132  Max(alpha1) = 1 DILUPBiCG:  Solving for Ux, Initial residual = 0.00237312, Final residual = 4.19164e-09, No Iterations 3 DILUPBiCG:  Solving for Uy, Initial residual = 0.00328753, Final residual = 7.49817e-09, No Iterations 3 DILUPBiCG:  Solving for Uz, Initial residual = 0.0020948, Final residual = 3.63414e-09, 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.84691e-05, No Iterations 2 GAMG:  Solving for p_rgh, Initial residual = 0.000119528, Final residual = 9.13697e-07, No Iterations 6 time step continuity errors : sum local = 2.13139e-10, global = -7.34516e-19, cumulative = -2.77413e-13 GAMG:  Solving for p_rgh, Initial residual = 0.00091004, Final residual = 2.82139e-06, No Iterations 3 GAMG:  Solving for p_rgh, Initial residual = 4.74559e-05, Final residual = 2.29515e-07, No Iterations 3 GAMGPCG:  Solving for p_rgh, Initial residual = 3.12808e-06, Final residual = 1.99243e-09, No Iterations 4 time step continuity errors : sum local = 4.0557e-13, global = -7.34599e-19, cumulative = -2.77414e-13 DILUPBiCG:  Solving for omega, Initial residual = 0.00892048, Final residual = 7.19565e-09, No Iterations 4 DILUPBiCG:  Solving for k, Initial residual = 0.00479677, Final residual = 1.3686e-10, 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.79193e-07 Time = 0.000208795297929659983 solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.000208795 transformation: ((0.000163987 2.68919e-07 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.68919e-07 0) (1 (0 0 0))) Execution time for mesh.update() = 0.26 s time step continuity errors : sum local = 4.06964e-13, global = 2.12725e-18, cumulative = -2.77411e-13 GAMGPCG:  Solving for pcorr, Initial residual = 1, Final residual = 8.2677e-07, No Iterations 26 GAMGPCG:  Solving for pcorr, Initial residual = 0.0782515, Final residual = 7.38951e-07, No Iterations 21 GAMGPCG:  Solving for pcorr, Initial residual = 0.00468234, Final residual = 3.12732e-07, No Iterations 11 time step continuity errors : sum local = 4.6662e-18, global = 2.12035e-18, cumulative = -2.77409e-13 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844  Min(alpha1) = 6.8496e-132  Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844  Min(alpha1) = 9.01104e-132  Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844  Min(alpha1) = 1.18666e-131  Max(alpha1) = 1 MULES: Solving for alpha1 MULES: Solving for alpha1 Liquid phase volume fraction = 0.193844  Min(alpha1) = 1.5643e-131  Max(alpha1) = 1 DILUPBiCG:  Solving for Ux, Initial residual = 0.00237884, Final residual = 3.78435e-09, No Iterations 3 DILUPBiCG:  Solving for Uy, Initial residual = 0.00328912, Final residual = 7.99669e-09, No Iterations 3 DILUPBiCG:  Solving for Uz, Initial residual = 0.00209302, Final residual = 3.10299e-09, 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.77012e-05, No Iterations 2 GAMG:  Solving for p_rgh, Initial residual = 0.000119078, Final residual = 8.93598e-07, No Iterations 6 time step continuity errors : sum local = 2.10798e-10, global = 2.13129e-19, cumulative = -2.77409e-13 GAMG:  Solving for p_rgh, Initial residual = 0.000931977, Final residual = 2.85761e-06, No Iterations 3 GAMG:  Solving for p_rgh, Initial residual = 4.78142e-05, Final residual = 2.35694e-07, No Iterations 3 GAMGPCG:  Solving for p_rgh, Initial residual = 3.16514e-06, Final residual = 1.28317e-09, No Iterations 4 time step continuity errors : sum local = 2.60862e-13, global = 2.1641e-19, cumulative = -2.77409e-13 DILUPBiCG:  Solving for omega, Initial residual = 0.00886702, Final residual = 5.8744e-09, No Iterations 4 DILUPBiCG:  Solving for k, Initial residual = 0.00479084, Final residual = 1.15469e-10, No Iterations 5 ExecutionTime = 910.15 s  ClockTime = 912 s```

 Aurelien Thinat November 2, 2011 06:16

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.

 wersoe November 2, 2011 08:23

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 k-o 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;     } } // ************************************************************************* //```
setFieldsDict:
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?

Best, Sören

 Aurelien Thinat November 2, 2011 09:13

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.

 anmartin November 3, 2011 16:38

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

 wersoe November 4, 2011 05:06

Hello,

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 1e-18, even after many thousands time steps the cumulative error is just about 1e-15.
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

 Ivooo February 27, 2012 08:16

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 large-small cell transitions?

 Aurelien Thinat February 27, 2012 08:22

Ivooo,

By any chance, do you have any symmetryPlane condition in your case ?

 Ivooo February 27, 2012 08:37

3 Attachment(s)
Quote:
 Originally Posted by Aurelien Thinat (Post 346449) Ivooo, By any chance, do you have any symmetryPlane condition in your case ?
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.

 Aurelien Thinat February 27, 2012 08:47

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.

 Ivooo February 28, 2012 11:11

Hi,

Just to follow-up 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.cfd-online.com/Forums/ope...interfoam.html

 roby June 2, 2012 17:06

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

 flexi182 June 26, 2013 08:13

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!

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