openfoamtutorials / OpenFOAM_Tutorials_

OpenFOAM Tutorials!
349 stars 231 forks source link

Axisymmetric2D example no solving #2

Open Foadsf opened 6 years ago

Foadsf commented 6 years ago

I tried to go through this tutorial. things went well just before solving. this is the error I got:

--> FOAM FATAL ERROR: Unknown TurbulenceModel type RASModel

Valid TurbulenceModel types:

3 ( LES RAS laminar )

From function static Foam::autoPtr<Foam::TurbulenceModel<Alpha, Rho, BasicTu rbulenceModel, TransportModel> > Foam::TurbulenceModel<Alpha, Rho, BasicTurbulen ceModel, TransportModel>::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<Alpha, Rho, BasicTurbule nceModel, TransportModel>::alphaField = Foam::geometricOneField; Foam::Turbulenc eModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::rhoField = Foam::geome tricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricFi eld<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::TurbulenceModel<Alpha , Rho, BasicTurbulenceModel, TransportModel>::transportModel = Foam::transportMo del] in file /opt/CFDSupportFOAM4.0/beta/OpenFOAM-dev/src/TurbulenceModels/turbul enceModels/lnInclude/TurbulenceModel.C at line 113.

Foadsf commented 6 years ago

As explained in this page apparently the syntax of turbulenceProperties in case/constant has changed.

Foadsf commented 6 years ago

I edited the turbulenceProperties file from: simulationType RASModel;

to

` simulationType RAS;

RAS { RASModel kEpsilon;

turbulence      on;

printCoeffs     on;
}

`

and now I get a new 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

From this page it seems that either there is something wrong in the format (e.g. typing mistake) or obviously this tutorial is for an old depriciated version of OpenFOAM.

Foadsf commented 6 years ago

I was able to resolve the issue. I have explained the solution here in this post.