TurbulenceModels: New macros to instantiate models
This commit is contained in:
parent
bb8be32f13
commit
20220a26cf
@ -29,7 +29,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::kineticTheoryModel::kineticTheoryModel
|
Foam::RASModels::kineticTheoryModel::kineticTheoryModel
|
||||||
(
|
(
|
||||||
const volScalarField& alpha,
|
const volScalarField& alpha,
|
||||||
const geometricOneField& rho,
|
const geometricOneField& rho,
|
||||||
@ -139,13 +139,13 @@ Foam::kineticTheoryModel::kineticTheoryModel
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::kineticTheoryModel::~kineticTheoryModel()
|
Foam::RASModels::kineticTheoryModel::~kineticTheoryModel()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::kineticTheoryModel::read()
|
bool Foam::RASModels::kineticTheoryModel::read()
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -175,21 +175,24 @@ bool Foam::kineticTheoryModel::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModel::k() const
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModels::kineticTheoryModel::k() const
|
||||||
{
|
{
|
||||||
notImplemented("kineticTheoryModel::k()");
|
notImplemented("kineticTheoryModel::k()");
|
||||||
return nut_;
|
return nut_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModel::epsilon() const
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModels::kineticTheoryModel::epsilon() const
|
||||||
{
|
{
|
||||||
notImplemented("kineticTheoryModel::epsilon()");
|
notImplemented("kineticTheoryModel::epsilon()");
|
||||||
return nut_;
|
return nut_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volSymmTensorField> Foam::kineticTheoryModel::R() const
|
Foam::tmp<Foam::volSymmTensorField>
|
||||||
|
Foam::RASModels::kineticTheoryModel::R() const
|
||||||
{
|
{
|
||||||
return tmp<volSymmTensorField>
|
return tmp<volSymmTensorField>
|
||||||
(
|
(
|
||||||
@ -211,7 +214,8 @@ Foam::tmp<Foam::volSymmTensorField> Foam::kineticTheoryModel::R() const
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModel::pp() const
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModels::kineticTheoryModel::pp() const
|
||||||
{
|
{
|
||||||
|
|
||||||
// Particle pressure coefficient
|
// Particle pressure coefficient
|
||||||
@ -244,7 +248,8 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModel::pp() const
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModel::pPrime() const
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModels::kineticTheoryModel::pPrime() const
|
||||||
{
|
{
|
||||||
// Local references
|
// Local references
|
||||||
const volScalarField& alpha = this->alpha_;
|
const volScalarField& alpha = this->alpha_;
|
||||||
@ -271,7 +276,8 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModel::pPrime() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::surfaceScalarField> Foam::kineticTheoryModel::pPrimef() const
|
Foam::tmp<Foam::surfaceScalarField>
|
||||||
|
Foam::RASModels::kineticTheoryModel::pPrimef() const
|
||||||
{
|
{
|
||||||
// Local references
|
// Local references
|
||||||
const volScalarField& alpha = this->alpha_;
|
const volScalarField& alpha = this->alpha_;
|
||||||
@ -298,7 +304,8 @@ Foam::tmp<Foam::surfaceScalarField> Foam::kineticTheoryModel::pPrimef() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volSymmTensorField> Foam::kineticTheoryModel::devRhoReff() const
|
Foam::tmp<Foam::volSymmTensorField>
|
||||||
|
Foam::RASModels::kineticTheoryModel::devRhoReff() const
|
||||||
{
|
{
|
||||||
return tmp<volSymmTensorField>
|
return tmp<volSymmTensorField>
|
||||||
(
|
(
|
||||||
@ -320,7 +327,8 @@ Foam::tmp<Foam::volSymmTensorField> Foam::kineticTheoryModel::devRhoReff() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::fvVectorMatrix> Foam::kineticTheoryModel::divDevRhoReff
|
Foam::tmp<Foam::fvVectorMatrix>
|
||||||
|
Foam::RASModels::kineticTheoryModel::divDevRhoReff
|
||||||
(
|
(
|
||||||
volVectorField& U
|
volVectorField& U
|
||||||
) const
|
) const
|
||||||
@ -338,7 +346,7 @@ Foam::tmp<Foam::fvVectorMatrix> Foam::kineticTheoryModel::divDevRhoReff
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::kineticTheoryModel::correct()
|
void Foam::RASModels::kineticTheoryModel::correct()
|
||||||
{
|
{
|
||||||
// Local references
|
// Local references
|
||||||
volScalarField alpha(max(this->alpha_, 0.0));
|
volScalarField alpha(max(this->alpha_, 0.0));
|
||||||
|
@ -61,6 +61,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace RASModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class kineticTheoryModel Declaration
|
Class kineticTheoryModel Declaration
|
||||||
@ -212,6 +214,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace RASModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
@ -26,258 +26,62 @@ License
|
|||||||
#include "PhaseIncompressibleTurbulenceModel.H"
|
#include "PhaseIncompressibleTurbulenceModel.H"
|
||||||
#include "phaseModel.H"
|
#include "phaseModel.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "makeTurbulenceModel.H"
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef TurbulenceModel
|
|
||||||
<
|
|
||||||
volScalarField,
|
|
||||||
geometricOneField,
|
|
||||||
incompressibleTurbulenceModel,
|
|
||||||
phaseModel
|
|
||||||
> basePhaseIncompressibleTransportTurbulenceModel;
|
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
basePhaseIncompressibleTransportTurbulenceModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef PhaseIncompressibleTurbulenceModel<phaseModel>
|
|
||||||
incompressibleTransportTurbulenceModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "laminar.H"
|
#include "laminar.H"
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef laminar<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleLaminar;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleLaminar, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
basePhaseIncompressibleTransportTurbulenceModel,
|
|
||||||
incompressibleLaminar,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
|
#include "LESModel.H"
|
||||||
|
|
||||||
|
makeBaseTurbulenceModel
|
||||||
|
(
|
||||||
|
volScalarField,
|
||||||
|
geometricOneField,
|
||||||
|
incompressibleTurbulenceModel,
|
||||||
|
PhaseIncompressibleTurbulenceModel,
|
||||||
|
phaseModel
|
||||||
|
);
|
||||||
|
|
||||||
|
#define makeRASModel(Type) \
|
||||||
|
makeTemplatedTurbulenceModel \
|
||||||
|
(phaseModelPhaseIncompressibleTurbulenceModel, RAS, Type)
|
||||||
|
|
||||||
|
#define makeLESModel(Type) \
|
||||||
|
makeTemplatedTurbulenceModel \
|
||||||
|
(phaseModelPhaseIncompressibleTurbulenceModel, LES, Type)
|
||||||
|
|
||||||
#include "kEpsilon.H"
|
#include "kEpsilon.H"
|
||||||
|
makeRASModel(kEpsilon);
|
||||||
|
|
||||||
#include "LaheyKEpsilon.H"
|
#include "LaheyKEpsilon.H"
|
||||||
|
makeRASModel(LaheyKEpsilon);
|
||||||
|
|
||||||
#include "continuousGasKEpsilon.H"
|
#include "continuousGasKEpsilon.H"
|
||||||
|
makeRASModel(continuousGasKEpsilon);
|
||||||
|
|
||||||
namespace Foam
|
#include "Smagorinsky.H"
|
||||||
{
|
makeLESModel(Smagorinsky);
|
||||||
typedef RASModel<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleRASModel;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleRASModel, 0);
|
#include "kEqn.H"
|
||||||
|
makeLESModel(kEqn);
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable(incompressibleRASModel, dictionary);
|
#include "SmagorinskyZhang.H"
|
||||||
|
makeLESModel(SmagorinskyZhang);
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
#include "NicenoKEqn.H"
|
||||||
(
|
makeLESModel(NicenoKEqn);
|
||||||
basePhaseIncompressibleTransportTurbulenceModel,
|
|
||||||
incompressibleRASModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
namespace RASModels
|
#include "continuousGasKEqn.H"
|
||||||
{
|
makeLESModel(continuousGasKEqn);
|
||||||
typedef kEpsilon<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressiblekEpsilon;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressiblekEpsilon, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleRASModel,
|
|
||||||
incompressiblekEpsilon,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace RASModels
|
|
||||||
{
|
|
||||||
typedef LaheyKEpsilon<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleLaheyKEpsilon;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleLaheyKEpsilon, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleRASModel,
|
|
||||||
incompressibleLaheyKEpsilon,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace RASModels
|
|
||||||
{
|
|
||||||
typedef continuousGasKEpsilon<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressiblecontinuousGasKEpsilon;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug
|
|
||||||
(
|
|
||||||
incompressiblecontinuousGasKEpsilon,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleRASModel,
|
|
||||||
incompressiblecontinuousGasKEpsilon,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "kineticTheoryModel.H"
|
#include "kineticTheoryModel.H"
|
||||||
|
makeTurbulenceModel
|
||||||
namespace Foam
|
(phaseModelPhaseIncompressibleTurbulenceModel, RAS, kineticTheoryModel);
|
||||||
{
|
|
||||||
typedef PhaseIncompressibleTurbulenceModel<phaseModel>
|
|
||||||
incompressibleTransportTurbulenceModel;
|
|
||||||
|
|
||||||
typedef RASModel<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleRASModel;
|
|
||||||
|
|
||||||
defineTypeNameAndDebug(kineticTheoryModel, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleRASModel,
|
|
||||||
kineticTheoryModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "phasePressureModel.H"
|
#include "phasePressureModel.H"
|
||||||
|
makeTurbulenceModel
|
||||||
namespace Foam
|
(phaseModelPhaseIncompressibleTurbulenceModel, RAS, phasePressureModel);
|
||||||
{
|
|
||||||
typedef PhaseIncompressibleTurbulenceModel<phaseModel>
|
|
||||||
incompressibleTransportTurbulenceModel;
|
|
||||||
|
|
||||||
typedef RASModel<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleRASModel;
|
|
||||||
|
|
||||||
defineTypeNameAndDebug(phasePressureModel, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleRASModel,
|
|
||||||
phasePressureModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "LESModel.H"
|
|
||||||
#include "Smagorinsky.H"
|
|
||||||
#include "SmagorinskyZhang.H"
|
|
||||||
#include "kEqn.H"
|
|
||||||
#include "NicenoKEqn.H"
|
|
||||||
#include "continuousGasKEqn.H"
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef LESModel<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleLESModel;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleLESModel, 0);
|
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable(incompressibleLESModel, dictionary);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
basePhaseIncompressibleTransportTurbulenceModel,
|
|
||||||
incompressibleLESModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
namespace LESModels
|
|
||||||
{
|
|
||||||
typedef Smagorinsky<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleSmagorinsky;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleSmagorinsky, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleLESModel,
|
|
||||||
incompressibleSmagorinsky,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace LESModels
|
|
||||||
{
|
|
||||||
typedef SmagorinskyZhang<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleSmagorinskyZhang;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleSmagorinskyZhang, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleLESModel,
|
|
||||||
incompressibleSmagorinskyZhang,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace LESModels
|
|
||||||
{
|
|
||||||
typedef kEqn<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressiblekEqn;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressiblekEqn, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleLESModel,
|
|
||||||
incompressiblekEqn,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace LESModels
|
|
||||||
{
|
|
||||||
typedef NicenoKEqn<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleNicenoKEqn;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleNicenoKEqn, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleLESModel,
|
|
||||||
incompressibleNicenoKEqn,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace LESModels
|
|
||||||
{
|
|
||||||
typedef continuousGasKEqn<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressiblecontinuousGasKEqn;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressiblecontinuousGasKEqn, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleLESModel,
|
|
||||||
incompressiblecontinuousGasKEqn,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
@ -28,7 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::phasePressureModel::phasePressureModel
|
Foam::RASModels::phasePressureModel::phasePressureModel
|
||||||
(
|
(
|
||||||
const volScalarField& alpha,
|
const volScalarField& alpha,
|
||||||
const geometricOneField& rho,
|
const geometricOneField& rho,
|
||||||
@ -75,13 +75,13 @@ Foam::phasePressureModel::phasePressureModel
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::phasePressureModel::~phasePressureModel()
|
Foam::RASModels::phasePressureModel::~phasePressureModel()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::phasePressureModel::read()
|
bool Foam::RASModels::phasePressureModel::read()
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -105,21 +105,24 @@ bool Foam::phasePressureModel::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::phasePressureModel::k() const
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModels::phasePressureModel::k() const
|
||||||
{
|
{
|
||||||
notImplemented("phasePressureModel::k()");
|
notImplemented("phasePressureModel::k()");
|
||||||
return nut_;
|
return nut_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::phasePressureModel::epsilon() const
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModels::phasePressureModel::epsilon() const
|
||||||
{
|
{
|
||||||
notImplemented("phasePressureModel::epsilon()");
|
notImplemented("phasePressureModel::epsilon()");
|
||||||
return nut_;
|
return nut_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volSymmTensorField> Foam::phasePressureModel::R() const
|
Foam::tmp<Foam::volSymmTensorField>
|
||||||
|
Foam::RASModels::phasePressureModel::R() const
|
||||||
{
|
{
|
||||||
return tmp<volSymmTensorField>
|
return tmp<volSymmTensorField>
|
||||||
(
|
(
|
||||||
@ -145,7 +148,8 @@ Foam::tmp<Foam::volSymmTensorField> Foam::phasePressureModel::R() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::phasePressureModel::pPrime() const
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModels::phasePressureModel::pPrime() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
g0_
|
g0_
|
||||||
@ -157,7 +161,8 @@ Foam::tmp<Foam::volScalarField> Foam::phasePressureModel::pPrime() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::surfaceScalarField> Foam::phasePressureModel::pPrimef() const
|
Foam::tmp<Foam::surfaceScalarField>
|
||||||
|
Foam::RASModels::phasePressureModel::pPrimef() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
g0_
|
g0_
|
||||||
@ -169,7 +174,8 @@ Foam::tmp<Foam::surfaceScalarField> Foam::phasePressureModel::pPrimef() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volSymmTensorField> Foam::phasePressureModel::devRhoReff() const
|
Foam::tmp<Foam::volSymmTensorField>
|
||||||
|
Foam::RASModels::phasePressureModel::devRhoReff() const
|
||||||
{
|
{
|
||||||
return tmp<volSymmTensorField>
|
return tmp<volSymmTensorField>
|
||||||
(
|
(
|
||||||
@ -195,7 +201,8 @@ Foam::tmp<Foam::volSymmTensorField> Foam::phasePressureModel::devRhoReff() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::fvVectorMatrix> Foam::phasePressureModel::divDevRhoReff
|
Foam::tmp<Foam::fvVectorMatrix>
|
||||||
|
Foam::RASModels::phasePressureModel::divDevRhoReff
|
||||||
(
|
(
|
||||||
volVectorField& U
|
volVectorField& U
|
||||||
) const
|
) const
|
||||||
@ -211,7 +218,7 @@ Foam::tmp<Foam::fvVectorMatrix> Foam::phasePressureModel::divDevRhoReff
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::phasePressureModel::correct()
|
void Foam::RASModels::phasePressureModel::correct()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,6 +60,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace RASModels
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class phasePressureModel Declaration
|
Class phasePressureModel Declaration
|
||||||
@ -179,6 +181,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace RASModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
@ -26,116 +26,37 @@ License
|
|||||||
#include "CompressibleTurbulenceModel.H"
|
#include "CompressibleTurbulenceModel.H"
|
||||||
#include "fluidThermo.H"
|
#include "fluidThermo.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "makeTurbulenceModel.H"
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef TurbulenceModel
|
|
||||||
<
|
|
||||||
geometricOneField,
|
|
||||||
volScalarField,
|
|
||||||
compressibleTurbulenceModel,
|
|
||||||
fluidThermo
|
|
||||||
> baseCompressibleFluidThermoTurbulenceModel;
|
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
baseCompressibleFluidThermoTurbulenceModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
typedef CompressibleTurbulenceModel<fluidThermo>
|
|
||||||
compressibleFluidThermoTurbulenceModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "laminar.H"
|
#include "laminar.H"
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef laminar<compressibleFluidThermoTurbulenceModel> compressibleLaminar;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(compressibleLaminar, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
baseCompressibleFluidThermoTurbulenceModel,
|
|
||||||
compressibleLaminar,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "kEpsilon.H"
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef RASModel<compressibleFluidThermoTurbulenceModel>
|
|
||||||
compressibleRASModel;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(compressibleRASModel, 0);
|
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable(compressibleRASModel, dictionary);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
baseCompressibleFluidThermoTurbulenceModel,
|
|
||||||
compressibleRASModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
namespace RASModels
|
|
||||||
{
|
|
||||||
typedef kEpsilon<compressibleFluidThermoTurbulenceModel>
|
|
||||||
compressibleKEpsilon;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(compressibleKEpsilon, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
compressibleRASModel,
|
|
||||||
compressibleKEpsilon,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "LESModel.H"
|
#include "LESModel.H"
|
||||||
|
|
||||||
|
makeBaseTurbulenceModel
|
||||||
|
(
|
||||||
|
geometricOneField,
|
||||||
|
volScalarField,
|
||||||
|
compressibleTurbulenceModel,
|
||||||
|
CompressibleTurbulenceModel,
|
||||||
|
fluidThermo
|
||||||
|
);
|
||||||
|
|
||||||
|
#define makeRASModel(Type) \
|
||||||
|
makeTemplatedTurbulenceModel \
|
||||||
|
(fluidThermoCompressibleTurbulenceModel, RAS, Type)
|
||||||
|
|
||||||
|
#define makeLESModel(Type) \
|
||||||
|
makeTemplatedTurbulenceModel \
|
||||||
|
(fluidThermoCompressibleTurbulenceModel, LES, Type)
|
||||||
|
|
||||||
|
#include "kEpsilon.H"
|
||||||
|
makeRASModel(kEpsilon);
|
||||||
|
|
||||||
#include "Smagorinsky.H"
|
#include "Smagorinsky.H"
|
||||||
|
makeLESModel(Smagorinsky);
|
||||||
|
|
||||||
namespace Foam
|
#include "kEqn.H"
|
||||||
{
|
makeLESModel(kEqn);
|
||||||
typedef LESModel<compressibleFluidThermoTurbulenceModel>
|
|
||||||
compressibleLESModel;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(compressibleLESModel, 0);
|
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable(compressibleLESModel, dictionary);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
baseCompressibleFluidThermoTurbulenceModel,
|
|
||||||
compressibleLESModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
namespace LESModels
|
|
||||||
{
|
|
||||||
typedef Smagorinsky<compressibleFluidThermoTurbulenceModel>
|
|
||||||
compressibleSmagorinsky;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(compressibleSmagorinsky, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
compressibleLESModel,
|
|
||||||
compressibleSmagorinsky,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
@ -26,136 +26,37 @@ License
|
|||||||
#include "IncompressibleTurbulenceModel.H"
|
#include "IncompressibleTurbulenceModel.H"
|
||||||
#include "transportModel.H"
|
#include "transportModel.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "makeTurbulenceModel.H"
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef TurbulenceModel
|
|
||||||
<
|
|
||||||
geometricOneField,
|
|
||||||
geometricOneField,
|
|
||||||
incompressibleTurbulenceModel,
|
|
||||||
transportModel
|
|
||||||
> baseIncompressibleTransportTurbulenceModel;
|
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
baseIncompressibleTransportTurbulenceModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef IncompressibleTurbulenceModel
|
|
||||||
<
|
|
||||||
transportModel
|
|
||||||
> incompressibleTransportTurbulenceModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "laminar.H"
|
#include "laminar.H"
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef laminar<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleLaminar;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleLaminar, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
baseIncompressibleTransportTurbulenceModel,
|
|
||||||
incompressibleLaminar,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "kEpsilon.H"
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef RASModel<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleRASModel;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleRASModel, 0);
|
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable(incompressibleRASModel, dictionary);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
baseIncompressibleTransportTurbulenceModel,
|
|
||||||
incompressibleRASModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
namespace RASModels
|
|
||||||
{
|
|
||||||
typedef kEpsilon<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleKEpsilon;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleKEpsilon, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleRASModel,
|
|
||||||
incompressibleKEpsilon,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "LESModel.H"
|
#include "LESModel.H"
|
||||||
|
|
||||||
|
makeBaseTurbulenceModel
|
||||||
|
(
|
||||||
|
geometricOneField,
|
||||||
|
geometricOneField,
|
||||||
|
incompressibleTurbulenceModel,
|
||||||
|
IncompressibleTurbulenceModel,
|
||||||
|
transportModel
|
||||||
|
);
|
||||||
|
|
||||||
|
#define makeRASModel(Type) \
|
||||||
|
makeTemplatedTurbulenceModel \
|
||||||
|
(transportModelIncompressibleTurbulenceModel, RAS, Type)
|
||||||
|
|
||||||
|
#define makeLESModel(Type) \
|
||||||
|
makeTemplatedTurbulenceModel \
|
||||||
|
(transportModelIncompressibleTurbulenceModel, LES, Type)
|
||||||
|
|
||||||
|
#include "kEpsilon.H"
|
||||||
|
makeRASModel(kEpsilon);
|
||||||
|
|
||||||
#include "Smagorinsky.H"
|
#include "Smagorinsky.H"
|
||||||
|
makeLESModel(Smagorinsky);
|
||||||
|
|
||||||
#include "kEqn.H"
|
#include "kEqn.H"
|
||||||
|
makeLESModel(kEqn);
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
typedef LESModel<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleLESModel;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleLESModel, 0);
|
|
||||||
|
|
||||||
defineTemplateRunTimeSelectionTable(incompressibleLESModel, dictionary);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
baseIncompressibleTransportTurbulenceModel,
|
|
||||||
incompressibleLESModel,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
|
|
||||||
namespace LESModels
|
|
||||||
{
|
|
||||||
typedef Smagorinsky<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressibleSmagorinsky;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressibleSmagorinsky, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleLESModel,
|
|
||||||
incompressibleSmagorinsky,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace LESModels
|
|
||||||
{
|
|
||||||
typedef kEqn<incompressibleTransportTurbulenceModel>
|
|
||||||
incompressiblekEqn;
|
|
||||||
|
|
||||||
defineNamedTemplateTypeNameAndDebug(incompressiblekEqn, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
incompressibleLESModel,
|
|
||||||
incompressiblekEqn,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
126
src/TurbulenceModels/turbulenceModels/makeTurbulenceModel.H
Normal file
126
src/TurbulenceModels/turbulenceModels/makeTurbulenceModel.H
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
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/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#define makeBaseTurbulenceModel(Alpha, Rho, baseModel, BaseModel, Transport) \
|
||||||
|
\
|
||||||
|
namespace Foam \
|
||||||
|
{ \
|
||||||
|
typedef TurbulenceModel \
|
||||||
|
< \
|
||||||
|
Alpha, \
|
||||||
|
Rho, \
|
||||||
|
baseModel, \
|
||||||
|
Transport \
|
||||||
|
> Transport##baseModel; \
|
||||||
|
\
|
||||||
|
defineTemplateRunTimeSelectionTable \
|
||||||
|
( \
|
||||||
|
Transport##baseModel, \
|
||||||
|
dictionary \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
typedef BaseModel<Transport> Transport##BaseModel; \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
typedef laminar<Transport##BaseModel> Laminar##Transport##BaseModel; \
|
||||||
|
\
|
||||||
|
defineNamedTemplateTypeNameAndDebug(Laminar##Transport##BaseModel, 0); \
|
||||||
|
\
|
||||||
|
addToRunTimeSelectionTable \
|
||||||
|
( \
|
||||||
|
Transport##baseModel, \
|
||||||
|
Laminar##Transport##BaseModel, \
|
||||||
|
dictionary \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
typedef RASModel<Transport##BaseModel> RAS##Transport##BaseModel; \
|
||||||
|
\
|
||||||
|
defineNamedTemplateTypeNameAndDebug(RAS##Transport##BaseModel, 0); \
|
||||||
|
\
|
||||||
|
defineTemplateRunTimeSelectionTable \
|
||||||
|
(RAS##Transport##BaseModel, dictionary); \
|
||||||
|
\
|
||||||
|
addToRunTimeSelectionTable \
|
||||||
|
( \
|
||||||
|
Transport##baseModel, \
|
||||||
|
RAS##Transport##BaseModel, \
|
||||||
|
dictionary \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
typedef LESModel<Transport##BaseModel> LES##Transport##BaseModel; \
|
||||||
|
\
|
||||||
|
defineNamedTemplateTypeNameAndDebug(LES##Transport##BaseModel, 0); \
|
||||||
|
\
|
||||||
|
defineTemplateRunTimeSelectionTable \
|
||||||
|
(LES##Transport##BaseModel, dictionary); \
|
||||||
|
\
|
||||||
|
addToRunTimeSelectionTable \
|
||||||
|
( \
|
||||||
|
Transport##baseModel, \
|
||||||
|
LES##Transport##BaseModel, \
|
||||||
|
dictionary \
|
||||||
|
); \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define makeTemplatedTurbulenceModel(BaseModel, SType, Type) \
|
||||||
|
namespace Foam \
|
||||||
|
{ \
|
||||||
|
namespace SType##Models \
|
||||||
|
{ \
|
||||||
|
typedef Type<BaseModel> Type##SType##BaseModel; \
|
||||||
|
\
|
||||||
|
defineNamedTemplateTypeNameAndDebug(Type##SType##BaseModel, 0); \
|
||||||
|
\
|
||||||
|
addToRunTimeSelectionTable \
|
||||||
|
( \
|
||||||
|
SType##BaseModel, \
|
||||||
|
Type##SType##BaseModel, \
|
||||||
|
dictionary \
|
||||||
|
); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define makeTurbulenceModel(BaseModel, SType, Type) \
|
||||||
|
namespace Foam \
|
||||||
|
{ \
|
||||||
|
namespace SType##Models \
|
||||||
|
{ \
|
||||||
|
defineTypeNameAndDebug(Type, 0); \
|
||||||
|
\
|
||||||
|
addToRunTimeSelectionTable \
|
||||||
|
( \
|
||||||
|
SType##BaseModel, \
|
||||||
|
Type, \
|
||||||
|
dictionary \
|
||||||
|
); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
Loading…
Reference in New Issue
Block a user