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
#define DESModelBase_H
#ifndef Foam_DESModelBase_H
#define Foam_DESModelBase_H
#include "className.H"
#include "tmp.H"
@ -55,15 +55,18 @@ class DESModelBase
{
public:
//- Runtime type information
ClassName("DESModelBase");
// Constructors
//- Constructor
DESModelBase()
{}
DESModelBase() noexcept = default;
//- Destructor
virtual ~DESModelBase() = default;
ClassName("DESModelBase");
// Public Member Functions

View File

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

View File

@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef RASModel_H
#define RASModel_H
#ifndef Foam_RASModel_H
#define Foam_RASModel_H
#include "TurbulenceModel.H"
@ -45,7 +45,28 @@ SourceFiles
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
@ -54,13 +75,12 @@ TemplateName(RASModelBase);
template<class BasicTurbulenceModel>
class RASModel
:
public RASModelBaseName,
public RASModelBase,
public BasicTurbulenceModel
{
protected:
// Protected data
// Protected Data
//- RAS coefficients dictionary
dictionary RASDict_;
@ -171,37 +191,37 @@ public:
// Access
//- Return the lower allowable limit for k (default: SMALL)
const dimensionedScalar& kMin() const
const dimensionedScalar& kMin() const noexcept
{
return kMin_;
}
//- Return the lower allowable limit for epsilon (default: SMALL)
const dimensionedScalar& epsilonMin() const
const dimensionedScalar& epsilonMin() const noexcept
{
return epsilonMin_;
}
//- Return the lower allowable limit for omega (default: SMALL)
const dimensionedScalar& omegaMin() const
const dimensionedScalar& omegaMin() const noexcept
{
return omegaMin_;
}
//- Allow kMin to be changed
dimensionedScalar& kMin()
dimensionedScalar& kMin() noexcept
{
return kMin_;
}
//- Allow epsilonMin to be changed
dimensionedScalar& epsilonMin()
dimensionedScalar& epsilonMin() noexcept
{
return epsilonMin_;
}
//- Allow omegaMin to be changed
dimensionedScalar& omegaMin()
dimensionedScalar& omegaMin() noexcept
{
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)
{
if (mesh_.foundObject<RASModelBaseName>(turbulenceModel::propertiesName))
if (mesh_.foundObject<RASModelBase>(turbulenceModel::propertiesName))
{
FatalIOErrorInFunction(dict)
<< type() << " " << name()