CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Other] Floating point exception with changed distance scale

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2018, 21:54
Question Floating point exception with changed distance scale
  #1
New Member
 
Muriel
Join Date: Nov 2018
Posts: 1
Rep Power: 0
muriell96 is on a distinguished road
Hello!

I am creating a simulation of 2 rotating cylinders in a 2D rectangular tank.
Everything successfully compiles when my blockMeshDict is on a meter scale. However, when I changed everything to the centimeter scale, which more accurately represents the real tank I am trying to simulate, I get a floating point exception error when I run pimpleFoam (blockMesh itself runs successfully).

I’ve tried to figure out this out on my own for several days but I’m stumped. Any help would be greatly appreciated.

My blockMesh code:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.01;

vertices #codeStream
{
    codeInclude
    #{
        #include "pointField.H"
    #};

    code
    #{
        pointField points(38);
        points[0]  = point(0.5, 0, -0.5);
        points[1]  = point(1, 0, -0.5);
        points[2]  = point(2, 0, -0.5);
        points[3]  = point(2, 0.707107, -0.5);
        points[4]  = point(0.707107, 0.707107, -0.5);
        points[5]  = point(0.353553, 0.353553, -0.5);
        points[6]  = point(2, 2, -0.5);
        points[7]  = point(0.707107, 2, -0.5);
        points[8]  = point(0, 2, -0.5);
        points[9]  = point(0, 1, -0.5);
        points[10] = point(0, 0.5, -0.5);
        points[11] = point(-0.5, 0, -0.5);
        points[12] = point(-1, 0, -0.5);
        points[13] = point(-2, 0, -0.5);
        points[14] = point(-2, 0.707107, -0.5);
        points[15] = point(-0.707107, 0.707107, -0.5);
        points[16] = point(-0.353553, 0.353553, -0.5);
        points[17] = point(-2, 2, -0.5);
        points[18] = point(-0.707107, 2, -0.5);

	//cyl 2: add 4 to every x coordinate

	//bc of overlap, use 6, 3, and 2 where 17, 14 and 13 were used for cyl 1
	points[19]  = point(4.5, 0, -0.5);
        points[20]  = point(5, 0, -0.5);
        points[21]  = point(6, 0, -0.5);
        points[22]  = point(6, 0.707107, -0.5);
        points[23]  = point(4.707107, 0.707107, -0.5);
        points[24]  = point(4.353553, 0.353553, -0.5);
        points[25]  = point(6, 2, -0.5);
        points[26]  = point(4.707107, 2, -0.5);
        points[27]  = point(4, 2, -0.5); 
        points[28]  = point(4, 1, -0.5); 
        points[29] = point(4, 0.5, -0.5);
        points[30] = point(3.5, 0, -0.5);
        points[31] = point(3, 0, -0.5);
       // points[32] = point(3, 0, -0.5); 
       //points[33] = point(2, 0.707107, -0.5); 
        points[34] = point(3.292829, 0.707107, -0.5); 
        points[35] = point(3.646447, 0.353553, -0.5);
        points[36] = point(2, 2, -0.5); 
        points[37] = point(3.292829, 2, -0.5);


        // Duplicate z points
        label sz = points.size();
        points.setSize(2*sz);
        for (label i = 0; i < sz; i++)
        {
            const point& pt = points[i];
            points[i+sz] = point(pt.x(), pt.y(), -pt.z());
        }

        os  << points;
    #};
};


blocks
(
    //cyl 1
    hex (5 4 9 10 43 42 47 48) (10 10 1) simpleGrading (1 1 1)
    hex (0 1 4 5 38 39 42 43) (10 10 1) simpleGrading (1 1 1)
    hex (1 2 3 4 39 40 41 42) (20 10 1) simpleGrading (1 1 1)
    hex (4 3 6 7 42 41 44 45) (20 20 1) simpleGrading (1 1 1)
    hex (9 4 7 8 47 42 45 46) (10 20 1) simpleGrading (1 1 1)
    hex (15 16 10 9 53 54 48 47) (10 10 1) simpleGrading (1 1 1)
    hex (12 11 16 15 50 49 54 53) (10 10 1) simpleGrading (1 1 1)
    hex (13 12 15 14 51 50 53 52) (20 10 1) simpleGrading (1 1 1)
    hex (14 15 18 17 52 53 56 55) (20 20 1) simpleGrading (1 1 1)
    hex (15 9 8 18 53 47 46 56) (10 20 1) simpleGrading (1 1 1)

    //cyl 2
    hex (24 23 28 29 62 61 66 67) (10 10 1) simpleGrading (1 1 1)
    hex (19 20 23 24 57 58 61 62) (10 10 1) simpleGrading (1 1 1)
    hex (20 21 22 23 58 59 60 61) (20 10 1) simpleGrading (1 1 1)
    hex (23 22 25 26 61 60 63 64) (20 20 1) simpleGrading (1 1 1) 
    hex (28 23 26 27 66 61 64 65) (10 20 1) simpleGrading (1 1 1)
    hex (34 35 29 28 72 73 67 66) (10 10 1) simpleGrading (1 1 1)
    hex (31 30 35 34 69 68 73 72) (10 10 1) simpleGrading (1 1 1)
    hex (2 31 34 3 40 69 72 41) (20 10 1) simpleGrading (1 1 1)
    hex (3 34 37 6 41 72 75 44) (20 20 1) simpleGrading (1 1 1)
    hex (34 28 27 37 72 66 65 75) (10 20 1) simpleGrading (1 1 1)

);

edges
(
    arc 0 5 (0.469846 0.17101 -0.5)
    arc 5 10 (0.17101 0.469846 -0.5)
    arc 1 4 (0.939693 0.34202 -0.5)
    arc 4 9 (0.34202 0.939693 -0.5)
    arc 38 43 (0.469846 0.17101 0.5)
    arc 43 48 (0.17101 0.469846 0.5)
    arc 39 42 (0.939693 0.34202 0.5)
    arc 42 47 (0.34202 0.939693 0.5)
    arc 11 16 (-0.469846 0.17101 -0.5)
    arc 16 10 (-0.17101 0.469846 -0.5)
    arc 12 15 (-0.939693 0.34202 -0.5)
    arc 15 9 (-0.34202 0.939693 -0.5)
    arc 49 54 (-0.469846 0.17101 0.5)
    arc 54 48 (-0.17101 0.469846 0.5)
    arc 50 53 (-0.939693 0.34202 0.5)
    arc 53 47 (-0.34202 0.939693 0.5)

    //cyl 2: add 4 to all x-coordinates
    arc 19 24 (4.469846 0.17101 -0.5)
    arc 24 29 (4.17101 0.469846 -0.5)
    arc 20 23 (4.939693 0.34202 -0.5)
    arc 23 28 (4.34202 0.939693 -0.5)
    arc 57 62 (4.469846 0.17101 0.5)
    arc 62 67 (4.17101 0.469846 0.5)
    arc 58 61 (4.939693 0.34202 0.5)
    arc 61 66 (4.34202 0.939693 0.5)
    arc 30 35 (3.530154 0.17101 -0.5)
    arc 35 29 (3.82899 0.469846 -0.5)
    arc 31 34 (3.060307 0.34202 -0.5)
    arc 34 28 (3.65798 0.939693 -0.5)
    arc 68 73 (3.530154 0.17101 0.5)
    arc 73 67 (3.82899 0.469846 0.5)
    arc 69 72 (3.060307 0.34202 0.5)
    arc 72 66 (3.65798 0.939693 0.5)
);

boundary
(
    down
    {
        type symmetry;
        faces
        (
            (0 1 39 38)
            (1 2 40 39)
            (12 11 49 50)
            (13 12 50 51)

	    //cyl 2
            (19 20 58 57)
            (20 21 59 58)
            (31 30 68 69)
            (2 31 69 40)
        );
    }
    right
    {
        type wall;
	//replace with right cylinder
        faces
        (
           (21 22 60 59)
           (22 25 63 60)
        );
    }
    up
    {
        type wall;
        faces
        (
            (7 8 46 45)
            (6 7 45 44)
            (8 18 56 46)
            (18 17 55 56)

	    //cyl 2
            (26 27 65 64)
            (25 26 64 63)
            (27 37 75 65)
            (37 6 44 75)
        );
    }
    left
    {
        type wall;
        faces
        (
            (14 13 51 52)
            (17 14 52 55)
        );
    }
    cyl-1
    {
        type wall;
        faces
        (
            (10 5 43 48)
            (5 0 38 43)
            (16 10 48 54)
            (11 16 54 49)
        );
    }

    cyl-2
    {
        type wall;
        faces
        (
            (29 24 62 67)
            (24 19 57 62)
            (35 29 67 73)
            (30 35 73 68)
        );  
    } 
);

mergePatchPairs
(
);
The error message I get when running pimpleFoam


Code:
PIMPLE: iteration 1
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib64/libc.so.6"
#3  Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const at ??:?
#4  Foam::surfaceInterpolation::nonOrthDeltaCoeffs() const at ??:?
#5  Foam::fv::correctedSnGrad<Foam::Vector<double> >::deltaCoeffs(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#6  Foam::fv::gaussLaplacianScheme<Foam::Vector<double>, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#7  Foam::fv::laplacianScheme<Foam::Vector<double>, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#8  Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::fvm::laplacian<Foam::Vector<double>, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#9  Foam::linearViscousStress<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::divDevRhoReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const at ??:?
#10  Foam::IncompressibleTurbulenceModel<Foam::transportModel>::divDevReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const at ??:?
#11  ? at ??:?
#12  __libc_start_main in "/lib64/libc.so.6"
#13  ? at ??:?
[hawk-int:32378:0] Caught signal 8 (Floating point exception)
==== backtrace ====
 2 0x00000000000686ec mxm_handle_error()  /var/tmp/OFED_topdir/BUILD/mxm-3.5.3093/src/mxm/util/debug/debug.c:641
 3 0x0000000000068c3c mxm_error_signal_handler()  /var/tmp/OFED_topdir/BUILD/mxm-3.5.3093/src/mxm/util/debug/debug.c:616
 4 0x0000000000035250 killpg()  ??:0
 5 0x00000000000351d7 __GI_raise()  :0
 6 0x0000000000035250 killpg()  ??:0
 7 0x0000000000d05c6b _ZNK4Foam20surfaceInterpolation22makeNonOrthDeltaCoeffsEv()  ??:0
 8 0x0000000000d063c5 _ZNK4Foam20surfaceInterpolation18nonOrthDeltaCoeffsEv()  ??:0
 9 0x0000000001256f34 _ZNK4Foam2fv15correctedSnGradINS_6VectorIdEEE11deltaCoeffsERKNS_14GeometricFieldIS3_NS_12fvPatchFieldENS_7volMeshEEE()  ??:0
10 0x00000000012f5baf _ZN4Foam2fv20gaussLaplacianSchemeINS_6VectorIdEEdE12fvmLaplacianERKNS_14GeometricFieldIdNS_13fvsPatchFieldENS_11surfaceMeshEEERKNS5_IS3_NS_12fvPatchFieldENS_7volMeshEEE()  ??:0
11 0x0000000001300449 _ZN4Foam2fv15laplacianSchemeINS_6VectorIdEEdE12fvmLaplacianERKNS_14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEERKNS5_IS3_S6_S7_EE()  ??:0
12 0x00000000000e363e _ZN4Foam3fvm9laplacianINS_6VectorIdEEdEENS_3tmpINS_8fvMatrixIT_EEEERKNS_14GeometricFieldIT0_NS_12fvPatchFieldENS_7volMeshEEERKNS9_IS6_SB_SC_EE()  ??:0
13 0x00000000001625ac _ZNK4Foam19linearViscousStressINS_29IncompressibleTurbulenceModelINS_14transportModelEEEE13divDevRhoReffERNS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEE()  ??:0
14 0x00000000000a78cd _ZNK4Foam29IncompressibleTurbulenceModelINS_14transportModelEE10divDevReffERNS_14GeometricFieldINS_6VectorIdEENS_12fvPatchFieldENS_7volMeshEEE()  ??:0
15 0x00000000004239cf main()  ??:0
16 0x0000000000021b35 __libc_start_main()  ??:0
17 0x000000000042546c _start()  ??:0
===================
Floating point exception (core dumped)

Thanks,

Muriel
muriell96 is offline   Reply With Quote

Reply

Tags
blockmeshdict, floating point exception, surfaceinterpolation


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
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
icoFoam floating point exception (8) leizhao512 OpenFOAM Running, Solving & CFD 7 November 1, 2018 12:43
simpleFoam Floating point exception error -help sudhasran OpenFOAM Running, Solving & CFD 3 March 12, 2012 17:23
Floating point exception error with small DeltaT rassilon OpenFOAM Running, Solving & CFD 19 September 2, 2009 08:39
[Gmsh] Gmsh and samplesurface touf OpenFOAM Meshing & Mesh Conversion 2 December 10, 2007 03:27


All times are GMT -4. The time now is 12:19.