
[Sponsors] 
November 25, 2011, 11:35 
pisoFoam : error floating point

#1 
New Member
Join Date: Nov 2011
Posts: 5
Rep Power: 6 
Hello,
I'm trying to use pisoFoam on a test case. This is just a box (1m³) in a flow of 24m/s. I want use a kepsilon model, transient, incompressible, turbulent. But there is an error and pisoFoam stop calculation : Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 Foam::DILUPreconditioner::calcReciprocalD(Foam::Field<double>&, Foam::lduMatrix const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #4 Foam::DILUPreconditioner::DILUPreconditioner(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #5 Foam::lduMatrix::preconditioner::addasymMatrixConstructorToTable<Foam::DILUPreconditioner>::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #6 Foam::lduMatrix::preconditioner::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #7 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #8 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam" #9 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam" #10 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam" #11 __libc_start_main in "/lib/libc.so.6" #12 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam" Exception en point flottant The 0 folder is 0.tar.gz. The system folder is system.tar.gz The properties files are Properties.tar.gz And the boundaries boundary.tar.gz When I execute checkMesh, it's ok. I tried to unset the FOAM_SIGFPE in etc/bashrc but nothing change. I'm not sure of my initial conditions for R, epsilon and k. I don't know which values I need to put, so I let the default values from the tutorial. I don't know if it's can provide from the mesh that I need to refine. I'm waiting your answers. Thanks 

November 26, 2011, 05:22 

#2 
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9 
Hi there,
What are you trying to set up? Your BCs seem a bit strange. If you would like to have a flow inlet on the left and outflow on the right, you probably want to specify U at the inlet, have inletOutlet for U at the outlet, have p zeroGradient at the inlet, and fix p at, say, 0 at the outlet. have a look at $FOAM_TUTORIALS/incompressible/pisoFoam/les/pitzDaily for some inspiration. and can be modelled as (have a look at the User Guide): , where is turbulent intensity (guestimate can be e.g. 0.02 or 0.05), and , where and is a characteristic length scale (e.g. 20% of channel inlet diameter). From $FOAM_TUTORIALS/incompressible/pisoFoam/les/pitzDaily you can see that e.g. 0/U has the following for the inlet: Code:
inlet { type turbulentInlet; referenceField uniform (10 0 0); // main flow U fluctuationScale (0.02 0.01 0.01); // I in x, y, and z direction value uniform (10 0 0); }
__________________
Regards, Gijs 

November 28, 2011, 10:19 

#3 
New Member
Join Date: Nov 2011
Posts: 5
Rep Power: 6 
Thank you for your answer, I have changed my BC but it doesn't work, could you say me if everything is ok.
0/epsilon : Code:
dimensions [0 2 3 0 0 0 0]; internalField uniform 0.04571; boundaryField { AvtArr { type empty; } HautBas { type fixedValue; value uniform 0.04571; } Sortie { type fixedValue; value uniform 0.04571; } Entree { type fixedValue; value uniform 0.04571; } Objet { type epsilonWallFunction; value uniform 0.04571; } } Code:
internalField uniform 0.0864; boundaryField { AvtArr { type empty; } HautBas { type fixedValue; value uniform 0.0864; } Sortie { type fixedValue; value uniform 0.0864; } Entree { type fixedValue; value uniform 0.0864; } Objet { type kqRWallFunction; value uniform 0.0864; } } Code:
internalField uniform 0; boundaryField { Entree { type zeroGradient; } Sortie { type fixedValue; value uniform 0; } Objet { type zeroGradient; } HautBas { type zeroGradient; } AvtArr { type empty; } } Code:
internalField uniform (0 0 0); boundaryField { Entree { type turbulentInlet; referenceField uniform (24 0 0); // main flow U fluctuationScale (0.01 0.01 0.01); // I in x, y, and z direction value uniform (24 0 0); } Sortie { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } Objet { type fixedValue; value uniform (0 0 0); } HautBas { type freestream; freestreamValue uniform (0 0 0); } AvtArr { type empty; } } 

November 28, 2011, 17:02 

#4 
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9 
Ok, what is the error you get?
I noticed that your mesh is 3D. Do you want your domain to be a thin 3D slice, or do you want 2D? In OpenFOAM the 2D mesh will be one cell thick, looking like 3D, but I don't think you need to do that in your meshing tool. The mesh converter will take care of that. Another thing is what you want to do. What kind of simulation are you interested in? What are the boundaries? For example, if HautBas are your lower and upper walls, you probably want to set something like fixedValue (0 0 0) there for velocity ...
__________________
Regards, Gijs 

November 29, 2011, 06:14 

#5 
New Member
Join Date: Nov 2011
Posts: 5
Rep Power: 6 
The error that I get is :
Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 Foam::LimitedScheme<double, Foam::limitedLinearLimiter<Foam::NVDTVD>, Foam::limitFuncs::magSqr>::limiter(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #4 Foam::limitedSurfaceInterpolationScheme<double>::weights(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #5 Foam::fv::gaussConvectionScheme<double>::fvmDiv(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #6 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::div<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so" #7 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::div<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so" #8 Foam::incompressible::RASModels::kEpsilon::correct() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so" #9 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam" #10 __libc_start_main in "/lib/libc.so.6" #11 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam" Exception en point flottant mesh.jpg The HautBas is not wall. I tried with this 0/U : Code:
internalField uniform (24 0 0); boundaryField { Entree { type turbulentInlet; referenceField uniform (24 0 0); // main flow U fluctuationScale (0.01 0.01 0.01); // I in x, y, and z direction value uniform (24 0 0); } Sortie { type zeroGradient; } Objet { type fixedValue; value uniform (0 0 0); } HautBas { type zeroGradient; } AvtArr { type empty; } } Code:
internalField uniform (24 0 0); boundaryField { Entree { type turbulentInlet; referenceField uniform (24 0 0); // main flow U fluctuationScale (0.01 0.01 0.01); // I in x, y, and z direction value uniform (24 0 0); } Sortie { type fixedValue; value uniform (24 0 0); } Objet { type fixedValue; value uniform (0 0 0); } HautBas { type fixedValue; value uniform (24 0 0); } AvtArr { type empty; } } I have reduced my deltaT in controlDict to 0.00001, my smallest deltaX is 0.005. So my Courant number is 0.048<1. But when I see the last iteration, the log write a max Courant number of 97 : Code:
Time = 5e05 Courant Number mean: 0.00490689 max: 0.796989 DILUPBiCG: Solving for Ux, Initial residual = 0.825801, Final residual = 3.40013e06, No Iterations 11 DILUPBiCG: Solving for Uy, Initial residual = 0.93573, Final residual = 4.85214e06, No Iterations 11 DICPCG: Solving for p, Initial residual = 0.787761, Final residual = 0.0756733, No Iterations 9 time step continuity errors : sum local = 9.71158e06, global = 2.36612e09, cumulative = 1.1106e07 DICPCG: Solving for p, Initial residual = 0.364313, Final residual = 9.27039e07, No Iterations 336 time step continuity errors : sum local = 1.96103e09, global = 1.34322e11, cumulative = 1.11073e07 DILUPBiCG: Solving for epsilon, Initial residual = 0.123204, Final residual = 7.07044e06, No Iterations 7 bounding epsilon, min: 2.42782e+10 max: 2.51261e+11 average: 3.90569e+07 DILUPBiCG: Solving for k, Initial residual = 0.986799, Final residual = 6.01388e06, No Iterations 11 bounding k, min: 5539.94 max: 8.89783e+06 average: 10386.5 ExecutionTime = 2.34 s ClockTime = 2 s Time = 6e05 Courant Number mean: 0.00545273 max: 97.8431 DILUPBiCG: Solving for Ux, Initial residual = 0.681026, Final residual = 8.30994e06, No Iterations 4 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 9.54478e09, No Iterations 5 DICPCG: Solving for p, Initial residual = 0.448027, Final residual = 0.0447951, No Iterations 72 time step continuity errors : sum local = 9.72168e05, global = 1.50061e08, cumulative = 9.60673e08 DICPCG: Solving for p, Initial residual = 0.0616509, Final residual = 9.43425e07, No Iterations 334 time step continuity errors : sum local = 6.20469e+10, global = 6.24885e+08, cumulative = 6.24885e+08 Last edited by Dbutant; November 29, 2011 at 06:55. 

November 30, 2011, 06:01 

#6 
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9 
You are using pisoFoam, so that means you want to do LES? What turbulence model are you using? I see that k and epsilon go unbounded. Is that you subgrid model, or are you using RAS properties with and LES solver? Also, I see that you fix k everywhere, which is neither physical, nor stable. Can you perhaps upload the case, so I can have a look?
__________________
Regards, Gijs 

November 30, 2011, 11:30 

#8 
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 9 
Perhaps it is worth checking out $FOAM_TUTORIALS//incompressible/pimpleFoam/TJunction. It is a RAS kEpsilon case with inlet and outlets, using pimpleFoam. Can you use your mesh with that case (with the correct boundary names etc)?
__________________
Regards, Gijs 

December 8, 2011, 07:01 

#9 
New Member
Join Date: Nov 2011
Posts: 5
Rep Power: 6 
Thank you.
I have resolved my problem see this pisoFoam floating point error  GAMG I put in fvSolution : nCorrectors to 3 and relTol to 0 for p. 

February 8, 2012, 02:16 
Floating error

#10 
Member
Join Date: Jan 2012
Posts: 58
Rep Power: 5 
Hello.
I am getting floating error:invalid number. I am working on train moving in tunnel. Can any body help me. My email is sheikhnasir39@gmail.com thanks 

October 9, 2012, 09:45 

#11 
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 7 
Hi all
I had a same problem (Floating point exception) when running pisoFoam for a RAS simulation Floating point exception means that you have division by zero somewhere in your solution especially for k or e (see the ke equations, they appear in the denominator somewhere! ). check your 0 folder and instead of giving zero for the initial values of k or e, give a very small number (e.g.1e20) It worked for me! If it didn't work, as already Dbutant mentioned above, follow the instructions in the following post pisoFoam floating point error  GAMG for changing your system folder parameters. Best Wishes 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
blockstructured mesh for tjunction  Robert@cfd  ANSYS Meshing & Geometry  20  November 11, 2011 05:59 
Problem with UDF compiling for kTkLW model  Wantami  FLUENT  0  July 18, 2011 05:11 
pisoFoam floating point error  GAMG  sErik  OpenFOAM Running, Solving & CFD  8  January 14, 2010 11:43 
Gmsh and samplesurface  touf  Open Source Meshers: Gmsh, Netgen, CGNS, ...  2  December 10, 2007 03:27 
CFX4.3 build analysis form  Chie Min  CFX  5  July 12, 2001 23:19 