mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
thermophysicalModels/basic: generalised makeThermo to handle psiThermo and rhoThermo
This commit is contained in:
@ -23,7 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makePsiThermo.H"
|
||||
#include "psiThermo.H"
|
||||
#include "makeThermo.H"
|
||||
|
||||
#include "perfectGas.H"
|
||||
|
||||
@ -47,8 +48,9 @@ namespace Foam
|
||||
|
||||
/* * * * * * * * * * * * * * * * * Enthalpy-based * * * * * * * * * * * * * */
|
||||
|
||||
makePsiThermo
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
@ -57,8 +59,9 @@ makePsiThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makePsiThermo
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
@ -67,8 +70,9 @@ makePsiThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makePsiThermo
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
@ -80,8 +84,9 @@ makePsiThermo
|
||||
|
||||
/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */
|
||||
|
||||
makePsiThermo
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
@ -90,8 +95,9 @@ makePsiThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makePsiThermo
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
@ -100,8 +106,9 @@ makePsiThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makePsiThermo
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
@ -110,8 +117,9 @@ makePsiThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makePsiThermo
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
@ -120,8 +128,9 @@ makePsiThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makePsiThermo
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
|
||||
@ -1,98 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 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/>.
|
||||
|
||||
InClass
|
||||
Foam::psiThermo
|
||||
|
||||
Description
|
||||
Macros for creating 'basic' compresibility-based thermo packages
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef makePsiThermo_H
|
||||
#define makePsiThermo_H
|
||||
|
||||
#include "psiThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "sensibleEnthalpy.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makePsiThermo(Cthermo,Mixture,Transport,Type,Thermo,EqnOfState) \
|
||||
\
|
||||
typedef Cthermo \
|
||||
< \
|
||||
Mixture \
|
||||
< \
|
||||
Transport \
|
||||
< \
|
||||
specieThermo \
|
||||
< \
|
||||
Thermo \
|
||||
< \
|
||||
EqnOfState \
|
||||
>, \
|
||||
Type \
|
||||
> \
|
||||
> \
|
||||
> \
|
||||
> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState; \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
|
||||
#Cthermo \
|
||||
"<" \
|
||||
#Mixture \
|
||||
"<" \
|
||||
#Transport \
|
||||
"<specieThermo<" \
|
||||
#Thermo \
|
||||
"<" \
|
||||
#EqnOfState \
|
||||
">," \
|
||||
#Type \
|
||||
">>>>", \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
psiThermo, \
|
||||
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
|
||||
fvMesh \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
basicThermo, \
|
||||
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
|
||||
fvMesh \
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -23,7 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeRhoThermo.H"
|
||||
#include "rhoThermo.H"
|
||||
#include "makeThermo.H"
|
||||
|
||||
#include "perfectGas.H"
|
||||
#include "isobaricPerfectGas.H"
|
||||
@ -52,8 +53,9 @@ namespace Foam
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
makeRhoThermo
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
@ -62,8 +64,9 @@ makeRhoThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeRhoThermo
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
@ -72,8 +75,9 @@ makeRhoThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeRhoThermo
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
@ -82,8 +86,9 @@ makeRhoThermo
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeRhoThermo
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
@ -92,24 +97,27 @@ makeRhoThermo
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeRhoPolyThermo
|
||||
makePolyThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
3,
|
||||
sensibleEnthalpy
|
||||
);
|
||||
|
||||
makeRhoPolyThermo
|
||||
makePolyThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
8,
|
||||
sensibleEnthalpy
|
||||
);
|
||||
|
||||
makeRhoThermo
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
@ -118,8 +126,9 @@ makeRhoThermo
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
makeRhoThermo
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
@ -128,8 +137,9 @@ makeRhoThermo
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
makeRhoThermo
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
@ -138,6 +148,7 @@ makeRhoThermo
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -22,22 +22,21 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
InClass
|
||||
Foam::rhoThermo
|
||||
Foam::basicThermo
|
||||
|
||||
Description
|
||||
Macros for creating 'basic' density-based thermo packages
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef makeRhoThermo_H
|
||||
#define makeRhoThermo_H
|
||||
#ifndef makeThermo_H
|
||||
#define makeThermo_H
|
||||
|
||||
#include "rhoThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makeRhoThermo(Cthermo,Mixture,Transport,Type,Thermo,EqnOfState) \
|
||||
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState)\
|
||||
\
|
||||
typedef Cthermo \
|
||||
< \
|
||||
@ -77,7 +76,7 @@ defineTemplateTypeNameAndDebugWithName \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
rhoThermo, \
|
||||
BaseThermo, \
|
||||
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
|
||||
fvMesh \
|
||||
); \
|
||||
@ -90,7 +89,7 @@ addToRunTimeSelectionTable \
|
||||
);
|
||||
|
||||
|
||||
#define makeRhoPolyThermo(Cthermo,Mixture,Order,Type) \
|
||||
#define makePolyThermo(BaseThermo,Cthermo,Mixture,Order,Type) \
|
||||
\
|
||||
typedef polynomialTransport \
|
||||
< \
|
||||
@ -118,7 +117,7 @@ defineTemplateTypeNameAndDebugWithName \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
rhoThermo, \
|
||||
BaseThermo, \
|
||||
Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \
|
||||
fvMesh \
|
||||
); \
|
||||
Reference in New Issue
Block a user