CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   interFoam Error (http://www.cfd-online.com/Forums/openfoam/76362-interfoam-error.html)

rassilon May 24, 2010 02:52

interFoam Error
 
Hi Foamers,

I am attempting to model a device that I have meshed using snappyHexMesher and run using the interFoam solver, however I get a floating point exception error at the very first iteration.

The error looks like this:

Quote:


#0 Foam::error:: printStack(Foam::Ostream&) in "/usr/OpenFoam/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/usr/OpenFoam/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 void Foam::MULES::limiter<Foam::oneField, Foam::zeroField, Foam::zeroField>(Foam::Field<double>&, Foam::oneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::zeroField const&, Foam::zeroField const&, double, double, int) in "/usr/OpenFoam/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#4 void Foam::MULES::explicitSolve<Foam::oneField, Foam::zeroField, Foam::zeroField>(Foam::oneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::zeroField const&, Foam::zeroField const&, double, double) in "/usr/OpenFoam/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#5 Foam::MULES::explicitSolve(Foam::GeometricField<do uble, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, double, double) in "/usr/OpenFoam/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#6 main in "/usr/OpenFoam/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/interFoam"
#7 __libc_start_main in "/lib/libc.so.6"
#8 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exception

I am not sure if it is because snappy has poorly created my mesh, or if it is for some other reason, like the solver or poor boundary conditions.

The error at #3 looks like it may be some kind of field problem. Could it be that the fields are not initialising correctly using setFields?

If anybody has any ideas, I would love to hear them!


R

kwardle May 24, 2010 10:35

Did you run checkMesh on the generated mesh to make sure nothing crazy is happening with the mesh? I would also indeed first check that you have initialized your alpha1 field correctly--make sure to patch a little into the domain on any inlet boundaries you may have--this helps the solution get started. If you are still having problems, can you post your fvSolution and fvSchemes settings?
Just a couple thoughts that may or may not help...

rassilon May 25, 2010 02:38

Quote:

Originally Posted by kwardle (Post 259986)
Did you run checkMesh on the generated mesh to make sure nothing crazy is happening with the mesh? I would also indeed first check that you have initialized your alpha1 field correctly--make sure to patch a little into the domain on any inlet boundaries you may have--this helps the solution get started. If you are still having problems, can you post your fvSolution and fvSchemes settings?
Just a couple thoughts that may or may not help...


Thanks for replying Kent.

checkMesh does give the all clear, however also identifies quite a few ployhedra. Not sure if this is suitable for use with interFoam.

Quote:


Overall number of cells of each type:
hexahedra: 155577
prisms: 4483
wedges: 0
pyramids: 0
tet wedges: 72
tetrahedra: 0
polyhedra: 24137

My FV Schemes files looks thus:

Quote:


ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(U) Gauss linear;
grad(alpha1) Gauss linear;
}

divSchemes
{
div(rho*phi,U) Gauss linear;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
pcorr;
alpha1;
}

And my FvSolution:

Quote:


solvers
{
pcorr
{
solver PCG;
preconditioner DIC;
tolerance 1e-10;
relTol 0;
}

p
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 0.05;
}

pFinal
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 0;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0;
}
}

PISO
{
momentumPredictor no;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
}

Any thoughts?


R

nimasam May 25, 2010 04:04

if u use groovyBC for boundary condition add following statement in to controlDic;
libs ( "libOpenFOAM.so" "libgroovyBC.so" ) ;

even though check ur boundary condition and initial condition and change them to none Zero value! maybe work

kwardle May 26, 2010 10:07

Polyhedral cells are not a problem--they actually should be more accurate. You haven't said what kind of problem you are trying to solve. A general description would be helpful for a diagnosis. Did you check your initialization for volume fraction and make sure it is doing what you think it is? Since you are getting a floating point error perhaps you are dividing by zero somewhere.

rassilon May 31, 2010 01:48

Quote:

Originally Posted by kwardle (Post 260349)
Polyhedral cells are not a problem--they actually should be more accurate. You haven't said what kind of problem you are trying to solve. A general description would be helpful for a diagnosis. Did you check your initialization for volume fraction and make sure it is doing what you think it is? Since you are getting a floating point error perhaps you are dividing by zero somewhere.


Hi Kent,

Thanks for getting back to me. I seem to have got it working now - It appeared to be some kind of scaling problem when I used the transformPoints utility - I went back to the beginning and started over, and this seems to be the sticking point, but it looks like I have it working now.

Hopefully I won't have any more problems!

Cheers,


R


All times are GMT -4. The time now is 20:33.