I'm trying to follow this OpenFOAM tutorial for using Gmsh to generate Axisymmetric mesh. The files are provided here. However when I try to solve the problem using the pimpleFoam
solver I get the error:
--> FOAM FATAL ERROR: Unknown TurbulenceModel type RASModel
Valid TurbulenceModel types:
3 ( LES RAS laminar )
From function static Foam::autoPtr > Foam::TurbulenceModel::New(const alphaField&, const rhoField&, const volVecto rField&, const surfaceScalarField&, const surfaceScalarField&, const transportMo del&, const Foam::word&) [with Alpha = Foam::geometricOneField; Rho = Foam::geom etricOneField; BasicTurbulenceModel = Foam::incompressibleTurbulenceModel; Trans portModel = Foam::transportModel; Foam::TurbulenceModel::alphaField = Foam::geometricOneField; Foam::Turbulenc eModel::rhoField = Foam::geome tricOneField; Foam::volVectorField = Foam::GeometricField; Foam::surfaceScalarField = Foam::GeometricFi eld; Foam::TurbulenceModel::transportModel = Foam::transportMo del] in file /opt/CFDSupportFOAM4.0/beta/OpenFOAM-dev/src/TurbulenceModels/turbul enceModels/lnInclude/TurbulenceModel.C at line 113.
As explained in this page apparently the syntax of turbulenceProperties
in case/constant
has changed. So I edited the turbulenceProperties
file from:
simulationType RASModel;
to
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
but then I get a different error:
FOAM FATAL IO ERROR: attempt to read beyond EOF
file: .../Axisymmetric2D/case/system/fvSchemes.divSchemes.default at line 29.
From function virtual Foam::Istream& Foam::ITstream::read(Foam::token&) in file db/IOstreams/Tstreams/ITstream.C at line 82. FOAM exiting
It seems like the tutorial is meant for an older version of OpenFOAM. I would appreciate if you could help me know what is the problem and how I can solve it.
The goal for me is to learn how to make axisymmetric mesh using Gmsh. so out of the box solutions or tutorials for the newer versions of OpenFOAM als would do.
P.S. I have reported the issue here in the Github repo
I was able to solve the issue by looking into the different versions of axisymmetricJet
template provided in official OpenFOAM GitHub repo (version 2.3.x and version 5.x). Changes to be made:
case/constant/RASProperties
add these at the end:kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.3;
}
case/constant/turbulenceProperties
replace the line simulationType RASModel;
with:simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
case/system/fvSchemes
change the line div((nuEff*dev(T(grad(U))))) Gauss linear;
to div((nuEff*dev2(T(grad(U))))) Gauss linear;
It the solver converges as expected. I still don't know what these changes mean and how they work. I will add them as soon as I figure that out. I have forked the GitHub repo here including the required edits.