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

[simpleFoam] Floating point exception

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 1, 2016, 23:53
Question [simpleFoam] Floating point exception
  #1
New Member
 
Siyu Chen
Join Date: Sep 2016
Location: Houghton, USA
Posts: 7
Rep Power: 10
seuchsy is on a distinguished road
Hi, I am Siyu, a beginner.

I want to simulate the flow through aggregates in 2D using simpleFoam solver. The aggregates are scanned from X-ray CT. Then I import just two pictures into 3D Slicer, and export as STL file.

I used blockMesh, snappyHexMesh, and checkMesh.

But when I type "simpleFoam", this error coming out. According to some of the information through Google and on this forum, I thought it may be (1) Boundary condition; (2) Meshing. Actually, I have revised in these two aspects for days. Problem still can NOT be resolved. Please help me think about it. Thanks.

All of the files before meshing are available at (I uploaded on Google Drive):
https://drive.google.com/open?id=0B4...GcwQTdHdmptWk0

Some details as following:

----------------'Geometry'-----------------
Set up face as the inlet, bottom face as the outlet, no value for left and right face, empty for front and back faces.

https://drive.google.com/open?id=0B4...01PRFBRcHlWWmc


----------------boundary condition-----------------
Code:
// p
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    Agg
    {
    	//type			zeroGradient;
        type            fixedValue;
		value			uniform 0;
    }
    inlet
    {
        type			zeroGradient;
        //type            fixedValue;
		//value			uniform 1e-3;
    }

    outlet
    {
        //type			fixedFluxPressure;
        type            fixedValue;
		value			uniform 0;
    }

    left
    {
        type            zeroGradient;
    }
    
    right
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

Code:
// U

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

internalField   uniform (0 0 0);

boundaryField
{
    Agg
    {
    	type			noSlip;
    	//type			fixedValue;
    	//value			uniform (0 0 0);
    }
    
    inlet
    {
        //type            zeroGradient;
        type			fixedValue;
    	value			uniform (0 -0.001 0);
    }

    outlet
    {
        type            inletOutlet;
        //value			uniform 0;
        inletValue		uniform (0 0 0);
    }

    left
    {
    	type			noSlip;
    	//type			fixedValue;
    	//value			uniform (0 0 0);
    }
    
    right
    {
    	type			noSlip;
    	//type			fixedValue;
    	//value			uniform (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }

}
-----------------------checkMesh-----------------------
Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           1825571
    faces:            3949696
    internal faces:   3216923
    cells:            1085217
    faces per cell:   6.60386
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     728927
    prisms:        58108
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     298182
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            5   42486
            6   90848
            7   714
            8   2476
            9   90836
           10   1421
           11   1044
           12   49539
           13   100
           14   394
           15   18045
           16   2
           17   5
           18   271
           21   1

Checking topology...
    Boundary definition OK.
 ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
    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      100      202  ok (non-closed singly connected)
                  outlet      100      202  ok (non-closed singly connected)
                    left      100      202  ok (non-closed singly connected)
                   right      100      202  ok (non-closed singly connected)
            frontAndBack   116838   141393  ok (non-closed singly connected)
                     Agg   615535   661836  multiply connected (shared edge)
  <<Writing 153 conflicting points to set nonManifoldPoints

Checking geometry...
    Overall domain bounding box (-100 -100 0) (0 0 1)
    Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
    Mesh has 2 solution (non-empty) directions (1 1 0)
 ***Number of edges not aligned with or perpendicular to non-empty directions: 1054845
  <<Writing 1500798 points on non-aligned edges to set nonAlignedEdges
    Boundary openness (7.90745e-18 -1.62165e-17 4.64804e-15) OK.
    Max cell openness = 1.34114e-15 OK.
    Max aspect ratio = 25.2667 OK.
    Minimum face area = 1.05879e-22. Maximum face area = 1.00726.  Face area magnitudes OK.
 ***Zero or negative cell volume detected.  Minimum negative volume: -2.52891e-07, Number of negative volume cells: 31
  <<Writing 31 zero volume cells to set zeroVolumeCells
    Mesh non-orthogonality Max: 179.57 average: 19.4536
   *Number of severely non-orthogonal (> 70 degrees) faces: 604.
 ***Number of non-orthogonality errors: 20.
  <<Writing 624 non-orthogonal faces to set nonOrthoFaces
 ***Error in face pyramids: 1184 faces are incorrectly oriented.
  <<Writing 1171 faces with incorrect orientation to set wrongOrientedFaces
 ***Max skewness = 167.391, 144 highly skew faces detected which may impair the quality of the results
  <<Writing 144 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 5 mesh checks.

End
-----------------------fvSolution and fvSchemes-----------------------
fvSolution
Code:
solvers 
{

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

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

}
SIMPLE
{
    nNonOrthogonalCorrectors 0;

    residualControl
    {
        p               1e-5;
        U               1e-5;
    }

	pRefCell 0;
	pRefValue 0;
}

relaxationFactors
{
    p               0.15;
    U               0.94;
}

fvSchemes
Code:
ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss limitedLinearV 1;
	div((nuEff*dev2(T(grad(U))))) Gauss linear;
//    div(phid,p)     Gauss limitedLinear 1;
//    div(phiU,p)     Gauss linear;
//    div(U)          Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}
-----------------------Error info-----------------------
Code:
...
Time = 28

DILUPBiCG:  Solving for Ux, Initial residual = 0.576676, Final residual = 9.89667e-08, No Iterations 11
DILUPBiCG:  Solving for Uy, Initial residual = 0.589817, Final residual = 2.19584e-08, No Iterations 12
DICPCG:  Solving for p, Initial residual = 0.909012, Final residual = 258.481, No Iterations 1001
time step continuity errors : sum local = 3.31355e+20, global = 4.27055e+16, cumulative = 4.27046e+16
ExecutionTime = 300.04 s  ClockTime = 306 s

Time = 29

DILUPBiCG:  Solving for Ux, Initial residual = 0.930444, Final residual = 3.52896e-08, No Iterations 15
DILUPBiCG:  Solving for Uy, Initial residual = 0.940062, Final residual = 1.46116e-08, No Iterations 13
DICPCG:  Solving for p, Initial residual = 0.987867, Final residual = 7531.96, No Iterations 1001
time step continuity errors : sum local = 4.12972e+30, global = 3.83275e+27, cumulative = 3.83275e+27
ExecutionTime = 363.53 s  ClockTime = 370 s

Time = 30

DILUPBiCG:  Solving for Ux, Initial residual = 0.938886, Final residual = 6.16514e-08, No Iterations 32
DILUPBiCG:  Solving for Uy, Initial residual = 0.905041, Final residual = 4.36084e-08, No Iterations 28
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#2  ? in "/lib64/libc.so.6"
#3  Foam::DICPreconditioner::calcReciprocalD(Foam::Field<double>&, Foam::lduMatrix const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#4  Foam::DICPreconditioner::DICPreconditioner(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#5  Foam::lduMatrix::preconditioner::addsymMatrixConstructorToTable<Foam::DICPreconditioner>::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#6  Foam::lduMatrix::preconditioner::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#7  Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#8  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so"
#9  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
#10  Foam::fvMatrix<double>::solve() in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
#11  ? in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
#12  __libc_start_main in "/lib64/libc.so.6"
#13  ? in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
Floating point exception
---------------------------------------------
Thanks for your help!
seuchsy is offline   Reply With Quote

Old   November 2, 2016, 01:12
Default
  #2
Member
 
Arsalan
Join Date: Jul 2014
Posts: 74
Rep Power: 12
arsalan.dryi is on a distinguished road
Hi Siyu,
It's quite obvious from checkMesh report that your mesh quality is so terrible, negative minimum volume, high non-orthogonality, incorrect orientation, high max skewness and all the bad.Try to work out the mesh and resolve any problems you're facing.

Regards,
Arsalan.
arsalan.dryi is offline   Reply With Quote

Old   November 2, 2016, 07:24
Default
  #3
New Member
 
Siyu Chen
Join Date: Sep 2016
Location: Houghton, USA
Posts: 7
Rep Power: 10
seuchsy is on a distinguished road
Thanks for your reply. I will check with it.

Quote:
Originally Posted by arsalan.dryi View Post
Hi Siyu,
It's quite obvious from checkMesh report that your mesh quality is so terrible, negative minimum volume, high non-orthogonality, incorrect orientation, high max skewness and all the bad.Try to work out the mesh and resolve any problems you're facing.

Regards,
Arsalan.
seuchsy is offline   Reply With Quote

Old   November 3, 2016, 09:29
Default checkMesh
  #4
New Member
 
Siyu Chen
Join Date: Sep 2016
Location: Houghton, USA
Posts: 7
Rep Power: 10
seuchsy is on a distinguished road
Hi Arsalan,

I found that if I do NOT have the "refinementSurfaces", the checkMesh will be ok.
In snappyHexMeshDict,
I change "level (5 6)" to "level (0 0)".
Code:
    refinementSurfaces
    {
        Agg
        {
            // Surface-wise min and max refinement level
            level (0 0);
        }
checkMesh result as following:

Code:
Build  : v1606+
Exec   : checkMesh
Date   : Nov 03 2016
Time   : 14:07:21
Host   : "4576fc08b5fb"
PID    : 490
Case   : /Users/siyu/OpenFOAM/docker-v1606+/run/agg_2d
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           20402
    internal points:  0
    faces:            40200
    internal faces:   19800
    cells:            10000
    faces per cell:   6
    boundary patches: 5
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     10000
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    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               100      202      ok (non-closed singly connected)  
    outlet              100      202      ok (non-closed singly connected)  
    left                100      202      ok (non-closed singly connected)  
    right               100      202      ok (non-closed singly connected)  
    frontAndBack        20000    20402    ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-100 -100 0) (0 0 1)
    Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
    Mesh has 2 solution (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (0 0 0) OK.
    Max cell openness = 0 OK.
    Max aspect ratio = 1 OK.
    Minimum face area = 1. Maximum face area = 1.  Face area magnitudes OK.
    Min volume = 1. Max volume = 1.  Total volume = 10000.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

--> FOAM Warning : 
    From function virtual Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
    in file meshes/polyMesh/polyMeshIO.C at line 203
    unexpected consequences.  Proceed with care.
Time = 1

Mesh stats
    points:           16786
    internal points:  0
    faces:            32404
    internal faces:   15614
    cells:            8003
    faces per cell:   6
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

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

Checking topology...
    Boundary definition OK.
 ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
    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               100      202      ok (non-closed singly connected)  
    outlet              100      202      ok (non-closed singly connected)  
    left                100      202      ok (non-closed singly connected)  
    right               100      202      ok (non-closed singly connected)  
    frontAndBack        15992    16774    ok (non-closed singly connected)  
    Agg                 398      784      ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-100 -100 0) (0 0 1)
    Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
    Mesh has 2 solution (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (0 0 0) OK.
    Max cell openness = 0 OK.
    Max aspect ratio = 1 OK.
    Minimum face area = 1. Maximum face area = 1.  Face area magnitudes OK.
    Min volume = 1. Max volume = 1.  Total volume = 8003.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

Time = 2

Mesh stats
    points:           16562
    internal points:  0
    faces:            32292
    internal faces:   15614
    cells:            8003
    faces per cell:   5.98601
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

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

Checking topology...
    Boundary definition OK.
 ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
    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               100      202      ok (non-closed singly connected)  
    outlet              100      202      ok (non-closed singly connected)  
    left                100      202      ok (non-closed singly connected)  
    right               100      202      ok (non-closed singly connected)  
    frontAndBack        15992    16561    ok (non-closed singly connected)  
    Agg                 286      560      ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-100 -100 0) (0 0 1)
    Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
    Mesh has 2 solution (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (0 3.39742e-18 1.78846e-15) OK.
    Max cell openness = 2.22205e-16 OK.
    Max aspect ratio = 8.88166 OK.
    Minimum face area = 0.0201718. Maximum face area = 2.01033.  Face area magnitudes OK.
    Min volume = 0.0304974. Max volume = 2.01033.  Total volume = 8015.75.  Cell volumes OK.
    Mesh non-orthogonality Max: 64.7428 average: 2.67785
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.00593 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
But the simplefoam is still facing the problem "floating point exception" at 816 s.

Code:
Time = 815

DILUPBiCG:  Solving for Ux, Initial residual = 0.334857, Final residual = 2.99063e-08, No Iterations 7
DILUPBiCG:  Solving for Uy, Initial residual = 0.324766, Final residual = 8.88104e-08, No Iterations 7
DICPCG:  Solving for p, Initial residual = 2.41506e-05, Final residual = 2.29941e-06, No Iterations 17
time step continuity errors : sum local = 1.95843e+78, global = 4.69163e+77, cumulative = 7.87177e+77
ExecutionTime = 13.72 s  ClockTime = 19 s

Time = 816

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#2  ? in "/lib64/libc.so.6"
#3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#4  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so"
#5  ? in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
#6  ? in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
#7  ? in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
#8  __libc_start_main in "/lib64/libc.so.6"
#9  ? in "/opt/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
Floating point exception
My question is, could you give me some suggestion on using snappyHexMesh or another software? I think my mesh still have some problems. But I can NOT figure out how to solve.

Thanks!

Quote:
Originally Posted by arsalan.dryi View Post
Hi Siyu,
It's quite obvious from checkMesh report that your mesh quality is so terrible, negative minimum volume, high non-orthogonality, incorrect orientation, high max skewness and all the bad.Try to work out the mesh and resolve any problems you're facing.

Regards,
Arsalan.
seuchsy is offline   Reply With Quote

Reply

Tags
simplefoam; mesh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
icoFoam floating point exception (8) leizhao512 OpenFOAM Running, Solving & CFD 7 November 1, 2018 11:43
Floating point exception error after icoFoam Deepacfd OpenFOAM Bugs 1 February 10, 2017 05:35
A floating point exception has occurred: floating point exception [Overflow]. starlight STAR-CCM+ 4 May 4, 2016 09:08
A floating point exception - SEM Model yansheng STAR-CCM+ 1 April 4, 2016 04:57
Floating point exception from twoPhaseEulerFoam openfoammaofnepo OpenFOAM Running, Solving & CFD 1 March 19, 2016 13:56


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