CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Floating point exception (core dumped) (https://www.cfd-online.com/Forums/openfoam-solving/123811-floating-point-exception-core-dumped.html)

marcelorl September 21, 2013 16:12

Floating point exception (core dumped)
 
I am new in OpenFOAM and trying to solve the flow in a labyrinth seal. First I created the mesh in ansys and the mesh looks fine, I don't think that is the problem. anyway, I've got the problem bellow and i am not finding how to solve. Thank you very much in advance for the help.

Starting time loop

Time = 2.4

Courant Number mean: 5.31745e+112 max: 3.29092e+117
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#6
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#7
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#8
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
Floating point exception (core dumped)


Best Regards,

Marcelo Lopes

Lieven September 21, 2013 16:21

Hi Marcelo,


Ok, the reason that you get this error is that your courant number is huge. So first step is to find out why this is. My first guess would be it's either a mesh-problem or an initial condition problem. So could you post the output of checkMesh here?
Could you describe your case a bit (geometry, boundary conditions, ...)

Regards,

L

marcelorl September 21, 2013 16:58

Quote:

Originally Posted by Lieven (Post 452913)
Hi Marcelo,


Ok, the reason that you get this error is that your courant number is huge. So first step is to find out why this is. My first guess would be it's either a mesh-problem or an initial condition problem. So could you post the output of checkMesh here?
Could you describe your case a bit (geometry, boundary conditions, ...)

Regards,

L

As I am just starting the simulation, I am using IcoFoam solver. I am sending you a link with the simulation documents, if you have time to take a look I will be very grateful.

link: https://www.dropbox.com/sh/heth1ej26e7cz2m/ZrmtMgi9hd

Thank you very much

Marcelo

marcelorl September 22, 2013 13:35

HI All,
I still having the problem with courant number, I will put below the checkMesh and my boundaries conditions:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.0-5be49240882f
Exec : checkMesh
Date : Sep 22 2013
Time : 14:23:32
Host : "marcelo-VirtualBox"
PID : 3169
Case : /home/marcelo/Desktop/opt/openfoam220/tutorials/incompressible/icoFoam/2Drefinelwall001
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 167398
internal points: 35544
faces: 1309746
internal faces: 1046042
cells: 588947
faces per cell: 4
boundary patches: 5
point zones: 0
face zones: 1
cell zones: 1

Overall number of cells of each type:
hexahedra: 0
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 588947
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
inlet 126 88 ok (non-closed singly connected)
outlet 126 88 ok (non-closed singly connected)
lowerwall 7488 4996 ok (non-closed singly connected)
upperwall 24048 16036 ok (non-closed singly connected)
frontandback 231916 121258 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.0043412 0 0) (0.00577688 0.00238696 1e-05)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-8.9769e-19 4.84392e-18 1.16378e-18) OK.
Max cell openness = 2.5555e-16 OK.
Max aspect ratio = 8.93804 OK.
Minimum face area = 3.23357e-12. Maximum face area = 3.66475e-10. Face area magnitudes OK.
Min volume = 4.44352e-18. Max volume = 1.10704e-15. Total volume = 1.65589e-10. Cell volumes OK.
Mesh non-orthogonality Max: 72.3617 average: 30.7772
*Number of severely non-orthogonal faces: 8.
Non-orthogonality check OK.
<<Writing 8 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 3.77461 OK.
Coupled point location match (average 0) OK.

Mesh OK.


Boundary Condition:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

upperwall
{
type fixedValue;
value uniform (0 0 0);
}

lowerwall
{
type fixedValue;
value uniform (0 0 0);
}

frontandback
{
type empty;
}

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 100;
}

outlet
{
type fixedValue;
value uniform 50;
}

upperwall
{
type zeroGradient;
}

lowerwall
{
type zeroGradient;
}

frontandback
{
type empty;
}
}

// ************************************************** *********************** //

How big should be the courant number for this case?
Thank you very much
Regards,
Marcelo

Lieven September 22, 2013 13:55

Hi Marcelo,


There is an inconsistency between your mesh and your boundary conditions. According to the checkMesh, you don't have an empty direction
Quote:

Mesh (non-empty) directions (1 1 1)
but you define an empty boundary condition in the U and p files.

Can you post the polyMesh/boundary file too?
Could you post an image of your mesh from a few different angles?

Cheers,

Lieven

marcelorl September 22, 2013 14:25

2 Attachment(s)
Quote:

Originally Posted by Lieven (Post 452998)
Hi Marcelo,


There is an inconsistency between your mesh and your boundary conditions. According to the checkMesh, you don't have an empty direction

but you define an empty boundary condition in the U and p files.

Can you post the polyMesh/boundary file too?
Could you post an image of your mesh from a few different angles?

Cheers,

Lieven

Hi Lieven,
Thank you very much for you help and sorry to be beginner and without any openfoam skills. This mesh was done in ansys and exported to openfoam. As openfoam only recognize 3d mesh, I generate the mesh with the 3rd direction very thin and called the front and back wall as "empty". FInd below the boundary file, and as I told, it was generated in ansys and I don’t have a polymesh file, but big files in the polymesh directory.

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

5
(
inlet
{
type patch;
nFaces 126;
startFace 1046042;
}
outlet
{
type patch;
nFaces 126;
startFace 1046168;
}
lowerwall
{
type wall;
nFaces 7488;
startFace 1046294;
}
upperwall
{
type wall;
nFaces 24048;
startFace 1053782;
}
frontandback
{
type empty;
nFaces 231916;
startFace 1077830;
}
)

// ************************************************** *********************** //

Lieven September 22, 2013 14:53

Hi Marcelo,

Is the mesh effectively 1 cell deep in the 3th dimension? It's not possible to see this based on the pictures you provided. I have the feeling it is not, since the checkMesh doesn't recognize it as such.

Just as an experiment, could you change the 'empty' to 'patch' in the polyMesh/boundary file, the 'empty' to 'slip' in the U and p file and run the case again (as a 3D case)?

Cheers,

L

marcelorl September 22, 2013 15:31

Quote:

Originally Posted by Lieven (Post 453003)
Hi Marcelo,

Is the mesh effectively 1 cell deep in the 3th dimension? It's not possible to see this based on the pictures you provided. I have the feeling it is not, since the checkMesh doesn't recognize it as such.

Just as an experiment, could you change the 'empty' to 'patch' in the polyMesh/boundary file, the 'empty' to 'slip' in the U and p file and run the case again (as a 3D case)?

Cheers,

L

You are right about the cell deep, it had more than 1. but I tried to change the boundary to slip and the empty to patch, and run as a 3D case, but still not working. I will paste here the courant number and the error again:

Time = 0.7

Courant Number mean: 4.30227e+39 max: 7.87172e+45
DILUPBiCG: Solving for Ux, Initial residual = 0.831977, Final residual = 78717.3, No Iterations 1001
DILUPBiCG: Solving for Uy, Initial residual = 0.917538, Final residual = 782.374, No Iterations 1001
DILUPBiCG: Solving for Uz, Initial residual = 0.95876, Final residual = 243.126, No Iterations 1001
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::DICPreconditioner::calcReciprocalD(Foam::Fie ld<double>&, Foam::lduMatrix const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::DICPreconditioner::DICPreconditioner(Foam::l duMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::lduMatrix::preconditioner::addsymMatrixConst ructorToTable<Foam::DICPreconditioner>::New(Foam:: lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6 Foam::lduMatrix::preconditioner::New(Foam::lduMatr ix::solver const&, Foam::dictionary const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#7 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#8 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#9 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#10
at icoFoam.C:0
#11
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
#12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#13
in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/icoFoam"
Floating point exception (core dumped)
marcelo@marcelo-VirtualBox:~/Desktop/opt/openfoam220/tutorials/incompressible/icoFoam/2Drefinelwall001$

Thank you again for the help.

Regards,

Marcelo

Lieven September 22, 2013 15:39

Ok, but at least it is running and we identified the problem i.e. the mesh.
The reason it fails after solving for Uz is that the pressure matrix will be horribly conditioned because of the huge Co and the 1001 iterations (simply Nmax) it needs for solving the velocity vector.

So first things first:
* remake your mesh and import it properly so that it really is a 2D mesh. I suggest to search this forum if you need help on this. I don't expect you to be the first one to have this problem.
* Consider using hex cells instead of tets. From what I can see, the geometry is rather simple and this will improve both convergence and accuracy
* checkMesh should show a line like
Quote:

Mesh (non-empty) directions (1 1 0)
or (1 0 1) or (0 1 1). Not (1 1 1)


Good luck!

L


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