Commit 2d238139 authored by Will Bainbridge's avatar Will Bainbridge Committed by Andrew Heather
Browse files

STYLE: thermo: Macro renaming

Thermo and reaction thermo macros have been renamed and refactored. If
the name is plural (make???Thermos) then it adds the model to all
selection tables. If not (make???Thermo) then it only adds to the
requested psi or rho table.
parent 8aabbec7
......@@ -136,7 +136,7 @@ constTransport
// pureMixture, sensibleEnthalpy:
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -148,7 +148,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -160,7 +160,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -175,7 +175,7 @@ makeThermo
// pureMixture, sensibleInternalEnergy:
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -187,7 +187,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -199,7 +199,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -214,7 +214,7 @@ makeThermo
// multiComponentMixture, sensibleInternalEnergy:
makeReactionMixtureThermos
makeThermoPhysicsReactionThermos
(
rhoThermo,
rhoReactionThermo,
......@@ -223,7 +223,7 @@ makeReactionMixtureThermos
constRefGasEThermoPhysics
);
makeReactionMixtureThermos
makeThermoPhysicsReactionThermos
(
rhoThermo,
rhoReactionThermo,
......@@ -232,7 +232,7 @@ makeReactionMixtureThermos
constRefFluidEThermoPhysics
);
makeReactionMixtureThermos
makeThermoPhysicsReactionThermos
(
rhoThermo,
rhoReactionThermo,
......@@ -244,7 +244,7 @@ makeReactionMixtureThermos
// multiComponentMixture, sensibleEnthalpy:
makeReactionMixtureThermos
makeThermoPhysicsReactionThermos
(
rhoThermo,
rhoReactionThermo,
......@@ -253,7 +253,7 @@ makeReactionMixtureThermos
constRefRhoConstHThermoPhysics
);
makeReactionMixtureThermos
makeThermoPhysicsReactionThermos
(
rhoThermo,
rhoReactionThermo,
......@@ -262,7 +262,7 @@ makeReactionMixtureThermos
constRefFluidHThermoPhysics
);
makeReactionMixtureThermos
makeThermoPhysicsReactionThermos
(
rhoThermo,
rhoReactionThermo,
......
......@@ -37,79 +37,95 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeThermoTypedefs(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
#define typedefThermoPhysics(Transport,Type,Thermo,EqnOfState,Specie) \
\
typedef \
Transport \
< \
species::thermo \
typedef \
Transport \
< \
Thermo \
species::thermo \
< \
EqnOfState \
Thermo \
< \
Specie \
> \
>, \
Type \
EqnOfState \
< \
Specie \
> \
>, \
Type \
> \
> \
> Transport##Type##Thermo##EqnOfState##Specie; \
Transport##Type##Thermo##EqnOfState##Specie
#define defineThermoPhysicsThermo(BaseThermo,CThermo,Mixture,ThermoPhys) \
\
typedef \
Cthermo \
< \
BaseThermo, \
Mixture<Transport##Type##Thermo##EqnOfState##Specie> \
> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
typedef \
CThermo \
< \
BaseThermo, \
Mixture<ThermoPhys> \
> \
CThermo##Mixture##ThermoPhys; \
\
defineTemplateTypeNameAndDebugWithName \
( \
CThermo##Mixture##ThermoPhys, \
(#CThermo"<" + Mixture<ThermoPhys>::typeName() + ">").c_str(), \
0 \
)
#define addThermoPhysicsThermo(BaseThermo,CThermoMixtureThermoPhys) \
\
defineTemplateTypeNameAndDebugWithName \
( \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
addToRunTimeSelectionTable \
( \
#Cthermo"<" \
+ Mixture<Transport##Type##Thermo##EqnOfState##Specie>::typeName() \
+ ">" \
).c_str(), \
0 \
);
BaseThermo, \
CThermoMixtureThermoPhys, \
fvMesh \
); \
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
#define makeThermoPhysicsThermo(BaseThermo,CThermo,Mixture,ThermoPhys) \
\
makeThermoTypedefs \
( \
BaseThermo, \
Cthermo, \
Mixture, \
Transport, \
Type, \
Thermo, \
EqnOfState, \
Specie \
) \
defineThermoPhysicsThermo(BaseThermo, CThermo, Mixture, ThermoPhys); \
\
addToRunTimeSelectionTable \
( \
basicThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
fvMesh \
); \
addThermoPhysicsThermo(BaseThermo, CThermo##Mixture##ThermoPhys)
#define makeThermoPhysicsThermos(BaseThermo,CThermo,Mixture,ThermoPhys) \
\
addToRunTimeSelectionTable \
( \
fluidThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
fvMesh \
); \
defineThermoPhysicsThermo(BaseThermo, CThermo, Mixture, ThermoPhys); \
\
addToRunTimeSelectionTable \
( \
BaseThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
fvMesh \
);
addThermoPhysicsThermo(basicThermo, CThermo##Mixture##ThermoPhys); \
addThermoPhysicsThermo(fluidThermo, CThermo##Mixture##ThermoPhys); \
addThermoPhysicsThermo(BaseThermo, CThermo##Mixture##ThermoPhys)
#define makeThermo(BaseThermo,CThermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie) \
\
typedefThermoPhysics(Transport,Type,Thermo,EqnOfState,Specie); \
\
makeThermoPhysicsThermo \
( \
BaseThermo, \
CThermo, \
Mixture, \
Transport##Type##Thermo##EqnOfState##Specie \
)
#define makeThermos(BaseThermo,CThermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie) \
\
typedefThermoPhysics(Transport,Type,Thermo,EqnOfState,Specie); \
\
makeThermoPhysicsThermos \
( \
BaseThermo, \
CThermo, \
Mixture, \
Transport##Type##Thermo##EqnOfState##Specie \
)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -45,6 +45,8 @@ License
#include "hePsiThermo.H"
#include "pureMixture.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
......@@ -52,7 +54,7 @@ namespace Foam
/* * * * * * * * * * * * * * * * * Enthalpy-based * * * * * * * * * * * * * */
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -64,7 +66,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -76,7 +78,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -88,7 +90,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -100,7 +102,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -112,7 +114,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -124,7 +126,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -139,7 +141,7 @@ makeThermo
/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -151,7 +153,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -163,7 +165,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -175,7 +177,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -187,7 +189,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......@@ -199,7 +201,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
psiThermo,
hePsiThermo,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -58,7 +58,7 @@ namespace Foam
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -70,7 +70,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -82,7 +82,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -94,7 +94,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -106,7 +106,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -118,7 +118,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -130,7 +130,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -142,7 +142,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -154,7 +154,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -166,7 +166,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -178,7 +178,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -190,7 +190,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -202,7 +202,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -214,7 +214,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -226,7 +226,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -238,7 +238,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -252,7 +252,7 @@ makeThermo
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -264,7 +264,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -276,7 +276,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -288,7 +288,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -300,7 +300,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -312,7 +312,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -324,7 +324,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -336,7 +336,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -348,7 +348,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -360,7 +360,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -372,7 +372,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -384,7 +384,7 @@ makeThermo
specie
);
makeThermo
makeThermos
(
rhoThermo,
heRhoThermo,
......@@ -396,7 +396,7 @@ makeThermo
specie