CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Compressible turbulent flow in a C-D Nozzle (https://www.cfd-online.com/Forums/openfoam/243431-compressible-turbulent-flow-c-d-nozzle.html)

darshan123 June 17, 2022 11:16

Compressible turbulent flow in a C-D Nozzle
 
Hi guys, I am pretty new in OpenFOAM. I am quite comfortable in compressible laminar flows simulations but I am facing problems in compressible turbulent flow simulations. from last five days, I am trying to simulate flow in a CD nozzle. I am using rhoSimpleFoam solver and using komegaSST model, but I am not getting success. I am getting floating point exception error every time.

please help. Much appreciated.

I have uploaded all files here: https://drive.google.com/drive/folde...lF?usp=sharing,

please have a look.

boundary conditions:-

FoamFile
{
format ascii;
class volScalarField;
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

boundaryField
{

Inlet
{
type calculated;
value uniform 0;
}
frontback
{
type empty;
}
nozzleWall
{
type compressible::alphatWallFunction;
Prt 0.71;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
symmetry
{
type symmetryPlane;
}
}

FoamFile
{
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 6.464664;

boundaryField
{

Inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.03;
value uniform 6.464664;
}
frontback
{
type empty;
}
nozzleWall
{
type kqRWallFunction;
value uniform 6.464664;
}
outlet
{
type zeroGradient;
}
symmetry
{
type symmetryPlane;
}

}

FoamFile
{
format ascii;
class volScalarField;
object mut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

boundaryField
{
Inlet
{
type calculated;
value uniform 0;
}
frontback
{
type empty;
}
nozzleWall
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
symmetry
{
type symmetryPlane;
}

}


FoamFile
{
format ascii;
class volScalarField;
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


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

internalField uniform 1031.887318;

boundaryField
{

Inlet
{
type turbulentMixingLengthFrequencyInlet;
mixingLength 0.002464;
value uniform 1031.887318;
}
frontback
{
type empty;
}
nozzleWall
{
type omegaWallFunction;
value uniform 1031.887318;

}
outlet
{
type zeroGradient;
}
symmetry
{
type symmetryPlane;
}

}


FoamFile
{
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


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

internalField uniform 1.3e5;

boundaryField
{
Inlet
{
type fixedValue;
value uniform 1.3e5;
}
frontback
{
type empty;
}
nozzleWall
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
symmetry
{
type symmetryPlane;
}

}


FoamFile
{
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //



dimensions [0 0 0 1 0 0 0];

internalField uniform 298;

boundaryField
{

Inlet
{
type fixedValue;
value uniform 298;
}
frontback
{
type empty;
}
nozzleWall
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
symmetry
{
type symmetryPlane;
}
}


FoamFile
{
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (69.2 0 0);

boundaryField
{

Inlet
{
type fixedValue;
value uniform (69.2 0 0)
}
frontback
{
type empty;
}
nozzleWall
{
type noSlip;
}
outlet
{
type zeroGradient;
}
symmetry
{
type symmetryPlane;
}

}

FoamFile
{
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

mixture // air at room temperature (293 K)
{
specie
{
molWeight 28.96;
}
thermodynamics
{
Cp 1005;
Hf 0;
}
transport
{
mu 1.82e-05;
Pr 0.71;
}
}


FoamFile
{
format ascii;
class dictionary;
object momentumTransport;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType RAS;

RAS
{
model kOmegaSST;
turbulence on;
printCoeffs on;
}

FoamFile
{
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application rhoSimpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 2000;

deltaT 1;

writeControl adjustableRunTime;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

graphFormat raw;

runTimeModifiable true;


FoamFile
{
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;

limited cellLimited Gauss linear 1;
grad(U) $limited;
grad(k) $limited;
grad(omega) $limited;
}

divSchemes
{
default none;

div(phi,U) bounded Gauss linearUpwind limited;

turbulence bounded Gauss upwind;
energy bounded Gauss linearUpwind limited;

div(phi,k) $turbulence;
div(phi,omega) $turbulence;

div(phi,e) $energy;
div(phi,K) $energy;
div(phi,Ekp) $energy;

div(phid,p) Gauss upwind;
div((phi|interpolate(rho)),p) bounded Gauss upwind;

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

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

wallDist
{
method meshWave;
}


FoamFile
{
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
p
{
solver GAMG;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.01;
}

"(U|k|omega|e)"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-10;
relTol 0.1;
}
}

SIMPLE
{
residualControl
{
p 1e-6;
U 1e-5;
"(k|omega|e)" 1e-5;
}

nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
fields
{
p 0.3;
rho 0.01;
}
equations
{
U 0.7;
e 0.7;
"(k|omega)" 0.7;
}
}


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