mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TurbulenceModels: Reorganized support macros to simplify the creation of additional turbulence model libraries
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,6 +32,17 @@ License
|
|||||||
#include "turbulentTransportModel.H"
|
#include "turbulentTransportModel.H"
|
||||||
#include "LESModel.H"
|
#include "LESModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makeTurbulenceModelTypes
|
||||||
|
(
|
||||||
|
volScalarField,
|
||||||
|
geometricOneField,
|
||||||
|
incompressibleTurbulenceModel,
|
||||||
|
PhaseIncompressibleTurbulenceModel,
|
||||||
|
singlePhaseTransportModel
|
||||||
|
);
|
||||||
|
|
||||||
makeBaseTurbulenceModel
|
makeBaseTurbulenceModel
|
||||||
(
|
(
|
||||||
volScalarField,
|
volScalarField,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,6 +32,17 @@ License
|
|||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "LESModel.H"
|
#include "LESModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makeTurbulenceModelTypes
|
||||||
|
(
|
||||||
|
geometricOneField,
|
||||||
|
volScalarField,
|
||||||
|
compressibleTurbulenceModel,
|
||||||
|
CompressibleTurbulenceModel,
|
||||||
|
incompressibleTwoPhaseInteractingMixture
|
||||||
|
);
|
||||||
|
|
||||||
makeBaseTurbulenceModel
|
makeBaseTurbulenceModel
|
||||||
(
|
(
|
||||||
geometricOneField,
|
geometricOneField,
|
||||||
|
|||||||
@ -135,17 +135,19 @@ Foam::MultiComponentPhaseModel<BasePhaseModel>::YiEqn
|
|||||||
(
|
(
|
||||||
(inertIndex_ != -1)
|
(inertIndex_ != -1)
|
||||||
&& (
|
&& (
|
||||||
Yi.name()
|
|
||||||
== IOobject::groupName
|
|
||||||
(
|
(
|
||||||
this->thermo_->composition().species()[inertIndex_],
|
Yi.name()
|
||||||
this->name()
|
== IOobject::groupName
|
||||||
|
(
|
||||||
|
this->thermo_->composition().species()[inertIndex_],
|
||||||
|
this->name()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|| (
|
||||||
|| (
|
!this->thermo_->composition().active
|
||||||
!this->thermo_->composition().active
|
(
|
||||||
(
|
this->thermo_->composition().species()[Yi.member()]
|
||||||
this->thermo_->composition().species()[Yi.member()]
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,6 +31,18 @@ License
|
|||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "LESModel.H"
|
#include "LESModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makeTurbulenceModelTypes
|
||||||
|
(
|
||||||
|
volScalarField,
|
||||||
|
volScalarField,
|
||||||
|
compressibleTurbulenceModel,
|
||||||
|
PhaseCompressibleTurbulenceModel,
|
||||||
|
ThermalDiffusivity,
|
||||||
|
phaseModel
|
||||||
|
);
|
||||||
|
|
||||||
makeBaseTurbulenceModel
|
makeBaseTurbulenceModel
|
||||||
(
|
(
|
||||||
volScalarField,
|
volScalarField,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,6 +31,18 @@ License
|
|||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "LESModel.H"
|
#include "LESModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makeTurbulenceModelTypes
|
||||||
|
(
|
||||||
|
volScalarField,
|
||||||
|
volScalarField,
|
||||||
|
compressibleTurbulenceModel,
|
||||||
|
PhaseCompressibleTurbulenceModel,
|
||||||
|
ThermalDiffusivity,
|
||||||
|
phaseModel
|
||||||
|
);
|
||||||
|
|
||||||
makeBaseTurbulenceModel
|
makeBaseTurbulenceModel
|
||||||
(
|
(
|
||||||
volScalarField,
|
volScalarField,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -36,6 +36,18 @@ License
|
|||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "LESModel.H"
|
#include "LESModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makeTurbulenceModelTypes
|
||||||
|
(
|
||||||
|
volScalarField,
|
||||||
|
volScalarField,
|
||||||
|
compressibleTurbulenceModel,
|
||||||
|
PhaseCompressibleTurbulenceModel,
|
||||||
|
ThermalDiffusivity,
|
||||||
|
phaseModel
|
||||||
|
);
|
||||||
|
|
||||||
makeBaseTurbulenceModel
|
makeBaseTurbulenceModel
|
||||||
(
|
(
|
||||||
volScalarField,
|
volScalarField,
|
||||||
|
|||||||
@ -25,6 +25,23 @@ License
|
|||||||
|
|
||||||
#include "EddyDiffusivity.H"
|
#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( \
|
#define makeBaseTurbulenceModel( \
|
||||||
Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \
|
Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \
|
||||||
\
|
\
|
||||||
|
|||||||
@ -23,18 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "CompressibleTurbulenceModel.H"
|
#include "turbulentFluidThermoModels.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"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -48,15 +37,6 @@ makeBaseTurbulenceModel
|
|||||||
fluidThermo
|
fluidThermo
|
||||||
);
|
);
|
||||||
|
|
||||||
#define makeRASModel(Type) \
|
|
||||||
makeTemplatedTurbulenceModel \
|
|
||||||
(fluidThermoCompressibleTurbulenceModel, RAS, Type)
|
|
||||||
|
|
||||||
#define makeLESModel(Type) \
|
|
||||||
makeTemplatedTurbulenceModel \
|
|
||||||
(fluidThermoCompressibleTurbulenceModel, LES, Type)
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
// RAS models
|
// RAS models
|
||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
|
|||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / 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 "turbulentTransportModels.H"
|
||||||
#include "incompressible/transportModel/transportModel.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
#include "makeTurbulenceModel.H"
|
|
||||||
|
|
||||||
#include "laminar.H"
|
|
||||||
#include "RASModel.H"
|
|
||||||
#include "LESModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -43,15 +36,6 @@ makeBaseTurbulenceModel
|
|||||||
transportModel
|
transportModel
|
||||||
);
|
);
|
||||||
|
|
||||||
#define makeRASModel(Type) \
|
|
||||||
makeTemplatedTurbulenceModel \
|
|
||||||
(transportModelIncompressibleTurbulenceModel, RAS, Type)
|
|
||||||
|
|
||||||
#define makeLESModel(Type) \
|
|
||||||
makeTemplatedTurbulenceModel \
|
|
||||||
(transportModelIncompressibleTurbulenceModel, LES, Type)
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
// RAS models
|
// RAS models
|
||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
|
|||||||
@ -0,0 +1,55 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / 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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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) \
|
#define makeBaseTurbulenceModel(Alpha, Rho, baseModel, BaseModel, Transport) \
|
||||||
\
|
\
|
||||||
namespace Foam \
|
namespace Foam \
|
||||||
@ -41,10 +52,6 @@ License
|
|||||||
dictionary \
|
dictionary \
|
||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
typedef BaseModel<Transport> Transport##BaseModel; \
|
|
||||||
\
|
|
||||||
\
|
|
||||||
typedef laminar<Transport##BaseModel> Laminar##Transport##BaseModel; \
|
|
||||||
\
|
\
|
||||||
defineNamedTemplateTypeNameAndDebug(Laminar##Transport##BaseModel, 0); \
|
defineNamedTemplateTypeNameAndDebug(Laminar##Transport##BaseModel, 0); \
|
||||||
\
|
\
|
||||||
@ -56,8 +63,6 @@ License
|
|||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
typedef RASModel<Transport##BaseModel> RAS##Transport##BaseModel; \
|
|
||||||
\
|
|
||||||
defineNamedTemplateTypeNameAndDebug(RAS##Transport##BaseModel, 0); \
|
defineNamedTemplateTypeNameAndDebug(RAS##Transport##BaseModel, 0); \
|
||||||
\
|
\
|
||||||
defineTemplateRunTimeSelectionTable \
|
defineTemplateRunTimeSelectionTable \
|
||||||
@ -71,8 +76,6 @@ License
|
|||||||
); \
|
); \
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
typedef LESModel<Transport##BaseModel> LES##Transport##BaseModel; \
|
|
||||||
\
|
|
||||||
defineNamedTemplateTypeNameAndDebug(LES##Transport##BaseModel, 0); \
|
defineNamedTemplateTypeNameAndDebug(LES##Transport##BaseModel, 0); \
|
||||||
\
|
\
|
||||||
defineTemplateRunTimeSelectionTable \
|
defineTemplateRunTimeSelectionTable \
|
||||||
|
|||||||
Reference in New Issue
Block a user