CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   Division by zero in Xoodles (

hannes April 18, 2007 07:16

Description: While starting t
While starting the Xoodles/pitzDaily3D tutorial, Xoodles fails and reports a floating point error.
The reason seems to be in XiFoam/bEqn.H in line 79. There, muu is divided by (rhou*epsilon). It seems, that epsilon may be zero in some cases.
Change the statement to:

volScalarField tauEta = sqrt(thermo->muu()/(
rhou*epsilon + dimensionedScalar("1e-6", rhou.dimensions()*epsilon.dimensions(), 1e-6)

Xoodles, XiFoam, engineFoam

Source file:



1.4 (also 1.3)


henry April 18, 2007 08:13

Thanks for the bug report, the
Thanks for the bug report, the problem is that in the initial k field the internal and wall boundary values are set to zero from which a zero value of epsilon is calculated. The best solution to this problem is to initialise the k field to a small but non-zero value and also select a non-zero value for the walls.


gschaider August 4, 2008 09:34

Hi! It seems that this prob

It seems that this problem is fixed in 1.5 for the Xoodles/pitzDaily (default value set to 1e-8) but NOT in the Xoodles/pitzDaily3D-tutorial-case (values are still 0)


henry August 4, 2008 11:04

Thanks for the report, I will
Thanks for the report, I will fix it in pitzDaily3D also.


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