Commit 46ba7267 authored by Henry Weller's avatar Henry Weller
Browse files

TurbulenceModels: Reorganized support macros to simplify the creation of...

TurbulenceModels: Reorganized support macros to simplify the creation of additional turbulence model libraries
parent 04f73903
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -32,6 +32,17 @@ License
#include "turbulentTransportModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeTurbulenceModelTypes
(
volScalarField,
geometricOneField,
incompressibleTurbulenceModel,
PhaseIncompressibleTurbulenceModel,
singlePhaseTransportModel
);
makeBaseTurbulenceModel
(
volScalarField,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -32,6 +32,17 @@ License
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeTurbulenceModelTypes
(
geometricOneField,
volScalarField,
compressibleTurbulenceModel,
CompressibleTurbulenceModel,
incompressibleTwoPhaseInteractingMixture
);
makeBaseTurbulenceModel
(
geometricOneField,
......
......@@ -135,17 +135,19 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::YiEqn
(
(inertIndex_ != -1)
&& (
Yi.name()
== IOobject::groupName
(
this->thermo_->composition().species()[inertIndex_],
this->name()
Yi.name()
== IOobject::groupName
(
this->thermo_->composition().species()[inertIndex_],
this->name()
)
)
)
|| (
!this->thermo_->composition().active
(
this->thermo_->composition().species()[Yi.member()]
|| (
!this->thermo_->composition().active
(
this->thermo_->composition().species()[Yi.member()]
)
)
)
)
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -31,6 +31,18 @@ License
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeTurbulenceModelTypes
(
volScalarField,
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
phaseModel
);
makeBaseTurbulenceModel
(
volScalarField,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -31,6 +31,18 @@ License
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeTurbulenceModelTypes
(
volScalarField,
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
phaseModel
);
makeBaseTurbulenceModel
(
volScalarField,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -36,6 +36,18 @@ License
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeTurbulenceModelTypes
(
volScalarField,
volScalarField,
compressibleTurbulenceModel,
PhaseCompressibleTurbulenceModel,
ThermalDiffusivity,
phaseModel
);
makeBaseTurbulenceModel
(
volScalarField,
......
......@@ -25,6 +25,23 @@ License
#include "EddyDiffusivity.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeTurbulenceModelTypes( \
Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \
\
namespace Foam \
{ \
typedef TDModel<BaseModel<Transport>> \
Transport##BaseModel; \
typedef laminar<Transport##BaseModel> Laminar##Transport##BaseModel; \
typedef RASModel<EddyDiffusivity<Transport##BaseModel>> \
RAS##Transport##BaseModel; \
typedef LESModel<EddyDiffusivity<Transport##BaseModel>> \
LES##Transport##BaseModel; \
}
#define makeBaseTurbulenceModel( \
Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \
\
......
......@@ -23,18 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "CompressibleTurbulenceModel.H"
#include "compressibleTransportModel.H"
#include "fluidThermo.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminar.H"
#include "RASModel.H"
#include "LESModel.H"
#include "turbulentFluidThermoModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -48,15 +37,6 @@ makeBaseTurbulenceModel
fluidThermo
);
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(fluidThermoCompressibleTurbulenceModel, RAS, Type)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(fluidThermoCompressibleTurbulenceModel, LES, Type)
// -------------------------------------------------------------------------- //
// RAS models
// -------------------------------------------------------------------------- //
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 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/>.
\*---------------------------------------------------------------------------*/
#include "CompressibleTurbulenceModel.H"
#include "compressibleTransportModel.H"
#include "fluidThermo.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "ThermalDiffusivity.H"
#include "EddyDiffusivity.H"
#include "laminar.H"
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeTurbulenceModelTypes
(
geometricOneField,
volScalarField,
compressibleTurbulenceModel,
CompressibleTurbulenceModel,
ThermalDiffusivity,
fluidThermo
);
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(fluidThermoCompressibleTurbulenceModel, RAS, Type)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(fluidThermoCompressibleTurbulenceModel, LES, Type)
// ************************************************************************* //
......@@ -23,14 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "IncompressibleTurbulenceModel.H"
#include "incompressible/transportModel/transportModel.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "laminar.H"
#include "RASModel.H"
#include "LESModel.H"
#include "turbulentTransportModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -43,15 +36,6 @@ makeBaseTurbulenceModel
transportModel
);
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(transportModelIncompressibleTurbulenceModel, RAS, Type)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(transportModelIncompressibleTurbulenceModel, LES, Type)
// -------------------------------------------------------------------------- //
// RAS models
// -------------------------------------------------------------------------- //
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 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/>.
\*---------------------------------------------------------------------------*/
#include "IncompressibleTurbulenceModel.H"
#include "incompressible/transportModel/transportModel.H"
#include "addToRunTimeSelectionTable.H"
#include "makeTurbulenceModel.H"
#include "laminar.H"
#include "RASModel.H"
#include "LESModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeTurbulenceModelTypes
(
geometricOneField,
geometricOneField,
incompressibleTurbulenceModel,
IncompressibleTurbulenceModel,
transportModel
);
#define makeRASModel(Type) \
makeTemplatedTurbulenceModel \
(transportModelIncompressibleTurbulenceModel, RAS, Type)
#define makeLESModel(Type) \
makeTemplatedTurbulenceModel \
(transportModelIncompressibleTurbulenceModel, LES, Type)
// ************************************************************************* //
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -23,6 +23,17 @@ License
\*---------------------------------------------------------------------------*/
#define makeTurbulenceModelTypes(Alpha, Rho, baseModel, BaseModel, Transport) \
\
namespace Foam \
{ \
typedef BaseModel<Transport> Transport##BaseModel; \
typedef laminar<Transport##BaseModel> Laminar##Transport##BaseModel; \
typedef RASModel<Transport##BaseModel> RAS##Transport##BaseModel; \
typedef LESModel<Transport##BaseModel> LES##Transport##BaseModel; \
}
#define makeBaseTurbulenceModel(Alpha, Rho, baseModel, BaseModel, Transport) \
\
namespace Foam \
......@@ -41,10 +52,6 @@ License
dictionary \
); \
\
typedef BaseModel<Transport> Transport##BaseModel; \
\
\
typedef laminar<Transport##BaseModel> Laminar##Transport##BaseModel; \
\
defineNamedTemplateTypeNameAndDebug(Laminar##Transport##BaseModel, 0); \
\
......@@ -56,8 +63,6 @@ License
); \
\
\
typedef RASModel<Transport##BaseModel> RAS##Transport##BaseModel; \
\
defineNamedTemplateTypeNameAndDebug(RAS##Transport##BaseModel, 0); \
\
defineTemplateRunTimeSelectionTable \
......@@ -71,8 +76,6 @@ License
); \
\
\
typedef LESModel<Transport##BaseModel> LES##Transport##BaseModel; \
\
defineNamedTemplateTypeNameAndDebug(LES##Transport##BaseModel, 0); \
\
defineTemplateRunTimeSelectionTable \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment