CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Problem with using icoFoam for flow in a straight tube (

edificelp February 10, 2011 07:01

Problem with using icoFoam for flow in a straight tube
1 Attachment(s)

I am trying to use OpenFoam to simulate incompressible, laminar flow of Newtonian fluids in a straight tube. And the 3-d mesh is converted from .msh file of Gmsh. After setting up boundary condition and running the simulation, the courant number mean increases so fast and becomes nearly infinite. Then the simulation stops with the information below:


Courant Number mean: 4.47866e+122 max: 1.17861e+124
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linux64GccDPOpt/"
#1  Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linux64GccDPOpt/"
#2  in "/lib/"
#3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam171/lib/linux64GccDPOpt/"
 in "/opt/openfoam171/applications/bin/linux64GccDPOpt/icoFoam"
 in "/opt/openfoam171/applications/bin/linux64GccDPOpt/icoFoam"
#6  __libc_start_main in "/lib/"
 in "/opt/openfoam171/applications/bin/linux64GccDPOpt/icoFoam"
[1]+  Done                    kate ~/.bashrc
Floating point exception

The file of this simulation has been attached. Could someone help me solve this problem?
Thanks a lot! :)

jhoepken February 10, 2011 10:27

A blind guess: Try to reduce your time step to suffice the CFL condition.

Jean El-Hajal February 10, 2011 15:07


it seems your problem came from the fvSolution and fvSchemes file. Replace them with the original ones from the cavity tutorial.

However the mesh is very bad !



edificelp February 10, 2011 18:23

Thanks a lot! After reading user guide, the incompressible steady state flow just can be simulated by simpleFoam. If icoFoam is used with steadyState, the solution will not converge.

By the way, Jean EI-Hajal, could you tell me how do you determine the mesh is bad or not? This mesh is generated by Gmsh automatically with the characteristic length. I feel headache to check this 3-d mesh.........

jhoepken February 11, 2011 04:27

Run checkMesh and post the output. That tool checks the quality of the mesh and prints some statistics to your console.

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