CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

twoPhaseEulerFoam - floating point exception (nutb)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2009, 05:07
Default twoPhaseEulerFoam - floating point exception (nutb)
  #1
New Member
 
Join Date: Mar 2009
Posts: 28
Rep Power: 17
Hectux is on a distinguished road
Hi,

I just started with the twoPhaseEulerFoam Solver.
I got while "calculating nutb" a floating point exception.

I saw that nutb is turbulent kinematic viscosity of phase b. Where could be the problem?


Br
Hectux is offline   Reply With Quote

Old   April 9, 2009, 10:41
Default
  #2
Member
 
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 17
juho is on a distinguished road
Quote:
Originally Posted by Hectux View Post
Hi,

I just started with the twoPhaseEulerFoam Solver.
I got while "calculating nutb" a floating point exception.

I saw that nutb is turbulent kinematic viscosity of phase b. Where could be the problem?


Br
I guess you're using 1.5? If you look at the createFields.H in the solvers's folder and search for the line "Calculating field nutb" you will find:

Info<< "Calculating field nutb\n" << endl;
volScalarField nutb
(
IOobject
(
"nutb",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Cmu*sqr(k)/epsilon
);

Most floating point exceptions are divide-by-zeros. As you can see the square of the turbulent kinetic energy, k, is divided by epsilon. I guess you have a zero in your epsilon field? You can eliminate the floating point exception by using a small value such as 1e-13 instead.

However, in 1.5.x version this problem is eliminated by using:

Cmu*sqr(k)/max(epsilon, dimensionedScalar("smallEps",epsilon.dimensions(), 1e-6))

Where the value of epsilon in the denominator is limited to larger than 1e-6 and thus removing the possibility of a floating point exception caused by a zero in the epsilon field.

So another option is to update to 1.5.x or to modify the line yourself and recompile the solver.
juho is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating point exception? Ricky Wong FLUENT 19 March 28, 2020 15:32
Error : floating point exception; overflow. maryam CFX 3 May 18, 2010 07:44
Floating Point Exception?? Alex FLUENT 2 April 21, 2009 01:29
CFX error, Floating point exception Riyaz Main CFD Forum 0 November 14, 2008 06:30
[Gmsh] Gmsh and samplesurface touf OpenFOAM Meshing & Mesh Conversion 2 December 10, 2007 02:27


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