CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   InterFoam negative alpha (http://www.cfd-online.com/Forums/openfoam/101956-interfoam-negative-alpha.html)

karasa03 May 18, 2012 01:49

InterFoam negative alpha
 
Hello everyone I am new to OpenFOAM and hopefully i can explain my problem and have it fixed quickly.

I am using interFOAM to simulate blood flow and saline interaction. I have a catheter in a blood vessel and saline solution is injected into inlet of the catheter and comes out at the tip. I am modeling the blood as a Newtonian fluid and everything is laminar at this point.


When I run the simulation, I get negative min(alpha1) numbers and my Liquid phase volume fraction number is supper small. And when I look at it using paraview, it show the saline alpha turn into blood alpha. The velocity and pressure look right so I do not know why my alpha is not being calculated correctly.


HTML Code:

file:///home/kiwi/Dropbox/Photos/blood_saline_alpha1.png



[IMG]file:///home/kiwi/Dropbox/Photos/blood_saline_alpha1.png[/IMG]





Starting time loop

Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 1.2e-09
Time = 1.2e-09

MULES: Solving for alpha1
Liquid phase volume fraction = 0 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0 Min(alpha1) = 0 Max(alpha1) = 1
PIMPLE: iteration 1
GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 0.00733461, No Iterations 11
time step continuity errors : sum local = 7.11934e-12, global = -1.62818e-13, cumulative = -1.62818e-13
GAMG: Solving for p_rgh, Initial residual = 0.0789804, Final residual = 0.000539265, No Iterations 2
time step continuity errors : sum local = 8.32344e-10, global = 7.85013e-12, cumulative = 7.68731e-12
GAMG: Solving for p_rgh, Initial residual = 0.00796039, Final residual = 7.21831e-05, No Iterations 3
time step continuity errors : sum local = 1.20275e-10, global = -1.6724e-12, cumulative = 6.01491e-12
PIMPLE: iteration 2
GAMG: Solving for p_rgh, Initial residual = 0.00233487, Final residual = 1.24411e-05, No Iterations 3
time step continuity errors : sum local = 2.10593e-11, global = -4.16641e-13, cumulative = 5.59827e-12
GAMG: Solving for p_rgh, Initial residual = 0.000394277, Final residual = 3.01518e-06, No Iterations 3
time step continuity errors : sum local = 5.12505e-12, global = -7.12971e-14, cumulative = 5.52697e-12
GAMG: Solving for p_rgh, Initial residual = 9.51221e-05, Final residual = 5.60966e-07, No Iterations 3
time step continuity errors : sum local = 9.54372e-13, global = -1.71028e-14, cumulative = 5.50987e-12
PIMPLE: iteration 3
GAMG: Solving for p_rgh, Initial residual = 2.02063e-05, Final residual = 1.54376e-07, No Iterations 3
time step continuity errors : sum local = 2.62689e-13, global = -3.58164e-15, cumulative = 5.50628e-12
GAMG: Solving for p_rgh, Initial residual = 5.171e-06, Final residual = 7.63952e-08, No Iterations 2
time step continuity errors : sum local = 1.30001e-13, global = -2.05852e-15, cumulative = 5.50423e-12
GAMG: Solving for p_rgh, Initial residual = 1.22273e-06, Final residual = 8.68386e-08, No Iterations 1
time step continuity errors : sum local = 1.47774e-13, global = -2.38579e-15, cumulative = 5.50184e-12
ExecutionTime = 16.13 s ClockTime = 17 s

Courant Number mean: 4.08779e-07 max: 0.000289305
Interface Courant Number mean: 0 max: 0
deltaT = 1.44e-09
Time = 2.64e-09

MULES: Solving for alpha1
Liquid phase volume fraction = 1.7146e-11 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 3.4292e-11 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 5.1438e-11 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 6.85839e-11 Min(alpha1) = 0 Max(alpha1) = 1
PIMPLE: iteration 1
GAMG: Solving for p_rgh, Initial residual = 0.000570361, Final residual = 4.18279e-06, No Iterations 11
time step continuity errors : sum local = 1.02444e-11, global = 2.32694e-13, cumulative = 5.73453e-12
GAMG: Solving for p_rgh, Initial residual = 0.72832, Final residual = 0.00497247, No Iterations 2
time step continuity errors : sum local = 1.19882e-09, global = -1.12942e-11, cumulative = -5.55967e-12
GAMG: Solving for p_rgh, Initial residual = 0.294599, Final residual = 0.00267426, No Iterations 3
time step continuity errors : sum local = 1.73428e-10, global = 2.39662e-12, cumulative = -3.16304e-12
PIMPLE: iteration 2
GAMG: Solving for p_rgh, Initial residual = 0.437679, Final residual = 0.00233468, No Iterations 3
time step continuity errors : sum local = 3.03803e-11, global = 5.9927e-13, cumulative = -2.56377e-12
GAMG: Solving for p_rgh, Initial residual = 0.412863, Final residual = 0.00316053, No Iterations 3
time step continuity errors : sum local = 7.39308e-12, global = 1.02173e-13, cumulative = -2.4616e-12
GAMG: Solving for p_rgh, Initial residual = 0.164912, Final residual = 0.000973731, No Iterations 3
time step continuity errors : sum local = 1.37731e-12, global = 2.4518e-14, cumulative = -2.43708e-12
PIMPLE: iteration 3
GAMG: Solving for p_rgh, Initial residual = 0.0328144, Final residual = 0.000250931, No Iterations 3
time step continuity errors : sum local = 3.78993e-13, global = 5.10882e-15, cumulative = -2.43197e-12
GAMG: Solving for p_rgh, Initial residual = 0.00806736, Final residual = 5.27134e-05, No Iterations 3
time step continuity errors : sum local = 8.28767e-14, global = 1.08536e-15, cumulative = -2.43089e-12
GAMG: Solving for p_rgh, Initial residual = 0.00199432, Final residual = 6.46556e-08, No Iterations 11
time step continuity errors : sum local = 1.0254e-16, global = -4.80509e-19, cumulative = -2.43089e-12
ExecutionTime = 27.71 s ClockTime = 29 s

Courant Number mean: 4.90274e-07 max: 0.0003464
Interface Courant Number mean: 0 max: 0
deltaT = 1.728e-09
Time = 4.368e-09

MULES: Solving for alpha1
Liquid phase volume fraction = 8.91177e-11 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 1.09651e-10 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 1.30185e-10 Min(alpha1) = -1.24534e-51 Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 1.50719e-10 Min(alpha1) = -6.11486e-57 Max(alpha1) = 1
PIMPLE: iteration 1
GAMG: Solving for p_rgh, Initial residual = 0.0533576, Final residual = 0.000324406, No Iterations 4
time step continuity errors : sum local = 7.26737e-13, global = 2.18295e-13, cumulative = -2.21259e-12
GAMG: Solving for p_rgh, Initial residual = 0.0135501, Final residual = 0.000108332, No Iterations 4
time step continuity errors : sum local = 2.39232e-13, global = 1.49219e-14, cumulative = -2.19767e-12
GAMG: Solving for p_rgh, Initial residual = 0.00333453, Final residual = 1.67357e-05, No Iterations 4
time step continuity errors : sum local = 3.66317e-14, global = 1.43155e-15, cumulative = -2.19624e-12
PIMPLE: iteration 2
GAMG: Solving for p_rgh, Initial residual = 0.000663491, Final residual = 3.34355e-06, No Iterations 4
time step continuity errors : sum local = 7.30476e-15, global = 2.96115e-16, cumulative = -2.19594e-12
GAMG: Solving for p_rgh, Initial residual = 0.000135325, Final residual = 6.83283e-07, No Iterations 4
time step continuity errors : sum local = 1.49233e-15, global = 4.4585e-17, cumulative = -2.1959e-12
GAMG: Solving for p_rgh, Initial residual = 3.02876e-05, Final residual = 2.95952e-07, No Iterations 3
time step continuity errors : sum local = 6.46326e-16, global = 2.59109e-17, cumulative = -2.19587e-12
PIMPLE: iteration 3
GAMG: Solving for p_rgh, Initial residual = 6.59564e-06, Final residual = 6.65695e-08, No Iterations 4
time step continuity errors : sum local = 1.45379e-16, global = 2.34212e-18, cumulative = -2.19587e-12
GAMG: Solving for p_rgh, Initial residual = 2.63412e-06, Final residual = 4.01697e-08, No Iterations 2
time step continuity errors : sum local = 8.77245e-17, global = 2.86944e-18, cumulative = -2.19587e-12
GAMG: Solving for p_rgh, Initial residual = 5.98916e-07, Final residual = 4.62872e-08, No Iterations 1
time step continuity errors : sum local = 1.01084e-16, global = 5.20981e-18, cumulative = -2.19586e-12
ExecutionTime = 37.33 s ClockTime = 39 s

karasa03 May 18, 2012 01:54

I do not know if the link works, i am new to dropbox also, here is another link to the paraview image of the alpha 1 and velocity

http://dl.dropbox.com/u/72086722/blo...ine_alpha1.png

http://dl.dropbox.com/u/72086722/blo...20velocity.png

olivierG May 18, 2012 03:12

hello,

You get negative alpha, but it's -6e-57 and i don't think your tolerance error is that small !

Anyway, you have a liquid phase fraction of 1e-10, which is pretty small. Have you run setFields in order to inititialyze ? or run for a longer time ...

regards,
olivier

akidess May 19, 2012 05:04

Also, doesn't the saline eventually mix with the blood? Because if it's not immiscible, interFoam is not the right solver to start with.

karasa03 May 19, 2012 21:48

Thanks guys, I have run setFeilds to initialize the saline, but it still does not work. I have a feeling that this has to do with my mesh, because i ran the same setup on the pitzDaily by modifying the mesh and adding a second inlet.

And i also interFOAM with the same fluid property (water) and it gives me the same error. I am using interFOAM because although blood and saline are not immiscible fluids, i do not want them to mix. I want more of a flushing of the blood near the walls and i think interFOAM is the right one. However i will try to use TwoLiquidMixingFoam if there is a tutorial for that.

karasa03 May 22, 2012 14:51

Thank you Anton and Oliver, TwoLiquidMixingFoam was the correct solver to use, I still get very low liquid phase fraction ( order of 0.002) but after running it for long time i get mixing and it finally comes out of the tip.

However i have a few question, If Dab diffusivity what is alphatab and where do i find these two values for blood and saline. Thank you

akidess May 23, 2012 03:00

See posts #33 and #34.

Filankes December 12, 2013 04:41

I had the same problem, solved it by setting alpha = 0.5 to the all field.


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