Ben786 |
August 7, 2021 18:02 |
Compressible flow solving - issues with "Floating point exception"
2 Attachment(s)
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;
}
)
// ************************************************************************* //
|