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

Compressible flow solving - issues with "Floating point exception"

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2021, 19:02
Unhappy Compressible flow solving - issues with "Floating point exception"
  #1
New Member
 
Ben
Join Date: Aug 2021
Location: Ontario
Posts: 3
Rep Power: 5
Ben786 is on a distinguished road
Hello everyone! I'm having trouble with solving this compressible flows problem and it seems like I can't get the solver to get going no matter what I do. The most common error I'm seeing is "Floating point exception" - perhaps my Google-fu isn't strong enough, but I can't seem to find a straight answer for what this actually means.

A little background on the problem:
I'm trying to simulate a CD nozzle that takes air (1500 K, 500 m/s, 10MPa) at its inlet. I've designed the nozzle such that the flow will be fully expanded and supersonic at the exit (100 kPa). Eventually, I want to be able to simulate the addition of solid nanoparticles in the flow, but that may be way above my current understanding...

The characteristic length is the nozzle inlet diameter (0.02 m) and calculated exit speed is 1610 m/s, giving deltaT an order of magnitude of around 1e-7.

I've attached my .geo(.txt) use for my mesh and a recent error output to this post, and also relayed my settings below.

Thank you in advance to anyone willing to take the time to help me!

####
# 0 #
################################################

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

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

internalField   uniform 1e5;

boundaryField
{
    inlet
    {
//        type            totalPressure;
//        p0              uniform 1.29036e+07;
//        gamma		1.3;
//        value           uniform 1.29036e+07;

        type            fixedValue;
        value           uniform 1e7;

    }

    exit
    {
//        type            zeroGradient;
        type            fixedValue;
        value           uniform 1e5;
    }

    top
    {
        type            zeroGradient;
    }
    bottom
    {
        type            zeroGradient;
    }

    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }


}

// ************************************************************************* //
T
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    inlet
    {
//        type            totalTemperature;
//        gamma           1.3;
//        T0              uniform 1725;

        type            fixedValue;
        value           uniform 1500;


    }

    exit
    {
        type            zeroGradient;
    }

    top
    {
//        type slip;
        type            zeroGradient;
    }
    bottom
    {
//        type slip;
        type            zeroGradient;
    }

    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
}

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

U
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     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;

        type            fixedValue;
        value           uniform (500 0 0);

//        type            pressureInletVelocity;
//        value           uniform (0 0 0);
    }

    exit
    {
        type            zeroGradient;

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

    top
    {
        type            slip;
    }
    bottom
    {
        type            slip;
    }

    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }

}

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

########
# System #
################################################

controlDict
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     rhoSimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.5;

deltaT          1.7391e-07; //1.7391e-07

writeControl    adjustableRunTime;

//writeControl    adjustable;

//writeControl    timeStep;

//writeInterval   575000;

writeInterval   0.01;

purgeWrite      0;

writeFormat     ascii;

writePrecision  7;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  true;

maxCo           0.5;

maxDeltaT       1;

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

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss vanLeerV 1; 

    div(phi,nuTilda) bounded Gauss vanLeer 1;

    div((muEff*dev2(T(grad(U))))) Gauss linear;

    // Sxx - Szz are variables for Spalart-Shur correction
    div(phi,Sxx)    bounded Gauss linear;
    div(phi,Sxy)    bounded Gauss linear;
    div(phi,Sxz)    bounded Gauss linear;
    div(phi,Syx)    bounded Gauss linear;
    div(phi,Syy)    bounded Gauss linear;
    div(phi,Syz)    bounded Gauss linear;
    div(phi,Szx)    bounded Gauss linear;
    div(phi,Szy)    bounded Gauss linear;
    div(phi,Szz)    bounded Gauss linear;

    div(phid,p)     bounded Gauss linear;
    div(phiv,p)     bounded Gauss linear;
    div(phi,K)      bounded Gauss linear;
    div(phi,h)      bounded Gauss vanLeer 1;

    div(phi,Ekp)    bounded Gauss linear;
    div(phi,e)    bounded Gauss linear;    

    div(((rho*nuEff)*dev2(T(grad(U)))))        Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes

{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}

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

solvers
{

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

    "rho.*"
    {
        solver          diagonal;
    }

    "p.*"
    {
        tolerance        1e-8;
        relTol           0;

        solver           PBiCG;
        preconditioner   DILU;
/*
        preconditioner  
        {
        preconditioner   GAMG;
        smoother         DIC;
        nPreSweeps       1;
        nPostSweeps      2;
        nFinestSweeps    2;
        nCellsInCoarsestLevel 10;
        agglomerator     faceAreaPair;
        mergeLevels      1;
        }
*/         minIter         3;
        maxIter         1000;
    }

    "U.*"
    {
        type             coupled;
        solver           PBiCICG;
        preconditioner   DILU;
        tolerance        (1e-8 1e-8 1e-8);
        relTol           (0 0 0);
    }

    "h.*"
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-8;
        relTol           0;
    }

    "nuTilda.*"
    {
        $h;
        tolerance        1e-8;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 3; // 0
    pRefCell 0;
    pRefValue 0;
    rhoMin          rhoMin [1 -3 0 0 0] 0.1; // 0.5
    rhoMax          rhoMax [1 -3 0 0 0] 30; // 2.0
    transonic       yes;
}

relaxationFactors
{
    fields
    {
        p                 0.2;
        rho               1.0;    
    }
    equations
    {
        U                 0.8;
        "(e|h)"           0.8;
        nuTilda           0.8;
    }
}

// ************************************************************************* //
#########
# Constant #
################################################

thermophysicalProperties
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       sutherland;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

// We refer to absolute energy where heat of formation is included, and sensible energy where it is not

mixture
{
    specie
    {
        nMoles          1;
        molWeight       28.96;
    }
    thermodynamics
    {
        Cp              1243.7;
        Hf              0;
    }
    transport
    {
        As              1.458e-6;
        Ts              110.4;
    }
}


// ************************************************************************* //
turbulenceProperties
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType  laminar;


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

6
(
    back
    {
        type            empty;
        physicalType    empty;
        nFaces          2293;
        startFace       3376;
    }
    top
    {
        type            wall;
        physicalType    wall;
        nFaces          44;
        startFace       5669;
    }
    exit
    {
        type            patch;
        physicalType    patch;
        nFaces          28;
        startFace       5713;
    }
    bottom
    {
        type            wall;
        physicalType    wall;
        nFaces          44;
        startFace       5741;
    }
    inlet
    {
        type            patch;
        physicalType    patch;
        nFaces          11;
        startFace       5785;
    }
    front
    {
        type            empty;
        physicalType    empty;
        nFaces          2293;
        startFace       5796;
    }
)

// ************************************************************************* //
Attached Files
File Type: txt Nozzle2D.geo.txt (7.7 KB, 2 views)
File Type: txt errorlog.txt (5.3 KB, 4 views)

Last edited by Ben786; August 8, 2021 at 00:01. Reason: Potential self-doxxing
Ben786 is offline   Reply With Quote

Old   August 7, 2021, 23:59
Default Update
  #2
New Member
 
Ben
Join Date: Aug 2021
Location: Ontario
Posts: 3
Rep Power: 5
Ben786 is on a distinguished road
I think I may have narrowed the issues down to the mesh itself, but I have zero idea what could be wrong with it??
Ben786 is offline   Reply With Quote

Old   August 8, 2021, 06:50
Default
  #3
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi,
You should pay attention to the warning ta the begining of the log :
Code:
 rhoMin' specified rather than 'pMin' or 'pMinFactor'
    This is supported for backward-compatibility but 'pMin' or 'pMinFactor' are more reliable.
You may try with pMinFactor and pMaxFactor instead of rhoMin rhoMax and see if it’s better.

Cheers.
Fouch is offline   Reply With Quote

Old   August 8, 2021, 11:31
Default Didn't work :(
  #4
New Member
 
Ben
Join Date: Aug 2021
Location: Ontario
Posts: 3
Rep Power: 5
Ben786 is on a distinguished road
Quote:
Originally Posted by Fouch View Post
Hi,
You should pay attention to the warning ta the begining of the log :
Code:
 rhoMin' specified rather than 'pMin' or 'pMinFactor'
    This is supported for backward-compatibility but 'pMin' or 'pMinFactor' are more reliable.
You may try with pMinFactor and pMaxFactor instead of rhoMin rhoMax and see if it’s better.

Cheers.

Unfortunately, that didn't seem to do anything other than remove the warning...
Ben786 is offline   Reply With Quote

Reply

Tags
compressible, nozzle, rhosimplefoam, transonic


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
Maximum number of iterations exceeded chtmultiregionsimpleFoam Moncef OpenFOAM Running, Solving & CFD 28 July 13, 2020 15:26
chtMultiRegionSimpleFoam: maximum number of iterations excedeed. Nkl OpenFOAM Running, Solving & CFD 19 October 10, 2019 03:42
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 14:12
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 14:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


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