COMP: RASModelBase adjustments

- naming more consistent with DESModelBase etc for 'isA' dynamic
  casting
This commit is contained in:
Mark Olesen
2022-11-24 13:57:50 +01:00
parent 3f87aec01a
commit e401e8f132
5 changed files with 82 additions and 21 deletions

View File

@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef DESModelBase_H #ifndef Foam_DESModelBase_H
#define DESModelBase_H #define Foam_DESModelBase_H
#include "className.H" #include "className.H"
#include "tmp.H" #include "tmp.H"
@ -55,15 +55,18 @@ class DESModelBase
{ {
public: public:
//- Runtime type information
ClassName("DESModelBase");
// Constructors
//- Constructor //- Constructor
DESModelBase() DESModelBase() noexcept = default;
{}
//- Destructor //- Destructor
virtual ~DESModelBase() = default; virtual ~DESModelBase() = default;
ClassName("DESModelBase");
// Public Member Functions // Public Member Functions

View File

@ -21,8 +21,8 @@ $(LESfilters)/laplaceFilter/laplaceFilter.C
$(LESfilters)/anisotropicFilter/anisotropicFilter.C $(LESfilters)/anisotropicFilter/anisotropicFilter.C
/* Base class for DES models */
DES/DESModel/DESModelBase.C DES/DESModel/DESModelBase.C
RAS/RASModel/RASModelBase.C
/* Turbulence BCs */ /* Turbulence BCs */

View File

@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef RASModel_H #ifndef Foam_RASModel_H
#define RASModel_H #define Foam_RASModel_H
#include "TurbulenceModel.H" #include "TurbulenceModel.H"
@ -45,7 +45,28 @@ SourceFiles
namespace Foam namespace Foam
{ {
TemplateName(RASModelBase); /*---------------------------------------------------------------------------*\
Class RASModelBase Declaration
\*---------------------------------------------------------------------------*/
class RASModelBase
{
public:
//- Runtime type information
ClassName("RASModelBase");
// Constructors
//- Constructor
RASModelBase() noexcept = default;
//- Destructor
virtual ~RASModelBase() = default;
};
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class RASModel Declaration Class RASModel Declaration
@ -54,13 +75,12 @@ TemplateName(RASModelBase);
template<class BasicTurbulenceModel> template<class BasicTurbulenceModel>
class RASModel class RASModel
: :
public RASModelBaseName, public RASModelBase,
public BasicTurbulenceModel public BasicTurbulenceModel
{ {
protected: protected:
// Protected data // Protected Data
//- RAS coefficients dictionary //- RAS coefficients dictionary
dictionary RASDict_; dictionary RASDict_;
@ -171,37 +191,37 @@ public:
// Access // Access
//- Return the lower allowable limit for k (default: SMALL) //- Return the lower allowable limit for k (default: SMALL)
const dimensionedScalar& kMin() const const dimensionedScalar& kMin() const noexcept
{ {
return kMin_; return kMin_;
} }
//- Return the lower allowable limit for epsilon (default: SMALL) //- Return the lower allowable limit for epsilon (default: SMALL)
const dimensionedScalar& epsilonMin() const const dimensionedScalar& epsilonMin() const noexcept
{ {
return epsilonMin_; return epsilonMin_;
} }
//- Return the lower allowable limit for omega (default: SMALL) //- Return the lower allowable limit for omega (default: SMALL)
const dimensionedScalar& omegaMin() const const dimensionedScalar& omegaMin() const noexcept
{ {
return omegaMin_; return omegaMin_;
} }
//- Allow kMin to be changed //- Allow kMin to be changed
dimensionedScalar& kMin() dimensionedScalar& kMin() noexcept
{ {
return kMin_; return kMin_;
} }
//- Allow epsilonMin to be changed //- Allow epsilonMin to be changed
dimensionedScalar& epsilonMin() dimensionedScalar& epsilonMin() noexcept
{ {
return epsilonMin_; return epsilonMin_;
} }
//- Allow omegaMin to be changed //- Allow omegaMin to be changed
dimensionedScalar& omegaMin() dimensionedScalar& omegaMin() noexcept
{ {
return omegaMin_; return omegaMin_;
} }

View File

@ -0,0 +1,38 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "RASModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(RASModelBase, 0);
}
// ************************************************************************* //

View File

@ -69,7 +69,7 @@ Foam::functionObjects::resolutionIndex::~resolutionIndex()
bool Foam::functionObjects::resolutionIndex::read(const dictionary& dict) bool Foam::functionObjects::resolutionIndex::read(const dictionary& dict)
{ {
if (mesh_.foundObject<RASModelBaseName>(turbulenceModel::propertiesName)) if (mesh_.foundObject<RASModelBase>(turbulenceModel::propertiesName))
{ {
FatalIOErrorInFunction(dict) FatalIOErrorInFunction(dict)
<< type() << " " << name() << type() << " " << name()