Commit ef8b6810 authored by Henry's avatar Henry
Browse files

Thermodynamics: add specie type as argument to the "makeThermo" macros

Added "8" as the default Order of polynomial thermodynamic functions
parent dd341c50
......@@ -25,18 +25,19 @@ InClass
Foam::fluidThermo
Description
Macros for creating 'basic' density-based thermo packages
Macros for creating basic fluid thermo packages
\*---------------------------------------------------------------------------*/
#ifndef makeThermo_H
#define makeThermo_H
#include "fluidThermo.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState)\
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
\
typedef Cthermo \
< \
......@@ -48,17 +49,20 @@ typedef Cthermo \
< \
Thermo \
< \
EqnOfState<specie> \
EqnOfState \
< \
Specie \
> \
>, \
Type \
> \
> \
> \
> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState; \
> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
\
defineTemplateTypeNameAndDebugWithName \
( \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
#Cthermo \
"<" \
#Mixture \
......@@ -68,6 +72,9 @@ defineTemplateTypeNameAndDebugWithName \
#Thermo \
"<" \
#EqnOfState \
"<" \
#Specie \
">" \
">," \
#Type \
">>>", \
......@@ -77,55 +84,14 @@ defineTemplateTypeNameAndDebugWithName \
addToRunTimeSelectionTable \
( \
BaseThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
fvMesh \
); \
\
addToRunTimeSelectionTable \
( \
fluidThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
fvMesh \
);
#define makePolyThermo(BaseThermo,Cthermo,Mixture,Order,Type) \
\
typedef polynomialTransport \
< \
species::thermo \
< \
hPolynomialThermo \
< \
icoPolynomial<specie, Order>, \
Order \
>, \
Type \
>, \
Order \
> icoPoly##Order##Type##ThermoPhysics; \
\
typedef Cthermo<Mixture<icoPoly##Order##Type##ThermoPhysics> > \
Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics; \
\
defineTemplateTypeNameAndDebugWithName \
( \
Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \
#Cthermo"<"#Mixture"<icoPoly"#Order#Type"ThermoPhysics>>", \
0 \
); \
\
addToRunTimeSelectionTable \
( \
BaseThermo, \
Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \
fvMesh \
); \
\
addToRunTimeSelectionTable \
( \
fluidThermo, \
Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
fvMesh \
);
......
......@@ -68,7 +68,8 @@ makeBasicMixture
constTransport,
sensibleEnthalpy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeBasicMixture
......@@ -77,7 +78,8 @@ makeBasicMixture
sutherlandTransport,
sensibleEnthalpy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeBasicMixture
......@@ -86,7 +88,8 @@ makeBasicMixture
sutherlandTransport,
sensibleEnthalpy,
janafThermo,
perfectGas
perfectGas,
specie
);
makeBasicMixture
......@@ -95,31 +98,28 @@ makeBasicMixture
constTransport,
sensibleEnthalpy,
hConstThermo,
rhoConst
rhoConst,
specie
);
makeBasicPolyMixture
(
pureMixture,
3,
sensibleEnthalpy
);
makeBasicPolyMixture
makeBasicMixture
(
pureMixture,
8,
sensibleEnthalpy
polynomialTransport,
sensibleEnthalpy,
hPolynomialThermo,
icoPolynomial,
specie
);
makeBasicMixture
(
pureMixture,
constTransport,
sensibleEnthalpy,
hConstThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
makeBasicMixture
......@@ -128,7 +128,8 @@ makeBasicMixture
sutherlandTransport,
sensibleEnthalpy,
hConstThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
makeBasicMixture
......@@ -137,7 +138,8 @@ makeBasicMixture
sutherlandTransport,
sensibleEnthalpy,
janafThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
......@@ -149,7 +151,8 @@ makeBasicMixture
constTransport,
sensibleInternalEnergy,
eConstThermo,
perfectGas
perfectGas,
specie
);
makeBasicMixture
......@@ -158,7 +161,8 @@ makeBasicMixture
sutherlandTransport,
sensibleInternalEnergy,
eConstThermo,
perfectGas
perfectGas,
specie
);
makeBasicMixture
......@@ -167,7 +171,8 @@ makeBasicMixture
constTransport,
sensibleInternalEnergy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeBasicMixture
......@@ -176,7 +181,8 @@ makeBasicMixture
sutherlandTransport,
sensibleInternalEnergy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeBasicMixture
......@@ -185,7 +191,8 @@ makeBasicMixture
sutherlandTransport,
sensibleInternalEnergy,
janafThermo,
perfectGas
perfectGas,
specie
);
makeBasicMixture
......@@ -194,31 +201,28 @@ makeBasicMixture
constTransport,
sensibleInternalEnergy,
hConstThermo,
rhoConst
rhoConst,
specie
);
makeBasicPolyMixture
(
pureMixture,
3,
sensibleInternalEnergy
);
makeBasicPolyMixture
makeBasicMixture
(
pureMixture,
8,
sensibleInternalEnergy
polynomialTransport,
sensibleInternalEnergy,
hPolynomialThermo,
icoPolynomial,
specie
);
makeBasicMixture
(
pureMixture,
constTransport,
sensibleInternalEnergy,
hConstThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
makeBasicMixture
......@@ -227,7 +231,8 @@ makeBasicMixture
sutherlandTransport,
sensibleInternalEnergy,
hConstThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
makeBasicMixture
......@@ -236,7 +241,8 @@ makeBasicMixture
sutherlandTransport,
sensibleInternalEnergy,
janafThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
......
......@@ -25,6 +25,7 @@ InClass
Foam::basicMixture
Description
Macros for creating 'basic' mixtures for basic fluid thermo packages
\*---------------------------------------------------------------------------*/
......@@ -32,44 +33,19 @@ Description
#define makeBasicMixture_H
#include "basicMixture.H"
#include "sensibleEnthalpy.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeBasicMixture(Mixture,Transport,Type,Thermo,EqnOfState) \
#define makeBasicMixture(Mixture,Transport,Type,Thermo,EqnOfState,Specie) \
\
typedef \
Mixture<Transport<species::thermo<Thermo<EqnOfState<specie> >, Type> > > \
Mixture##Transport##Type##Thermo##EqnOfState; \
Mixture<Transport<species::thermo<Thermo<EqnOfState<Specie> >, Type> > > \
Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
\
defineTemplateTypeNameAndDebugWithName \
(Mixture##Transport##Type##Thermo##EqnOfState, \
#Mixture"<"#Transport"<"#Thermo"<"#EqnOfState">,"#Type">>", 0)
#define makeBasicPolyMixture(Mixture,Order,Type) \
\
typedef polynomialTransport \
< \
species::thermo \
< \
hPolynomialThermo \
< \
icoPolynomial<specie, Order>, \
Order \
>, \
Type \
>, \
Order \
> icoPoly##Order##Type##ThermoPhysics; \
\
typedef Mixture<icoPoly##Order##Type##ThermoPhysics> \
Mixture##icoPoly##Order##Type##ThermoPhysics; \
\
defineTemplateTypeNameAndDebugWithName \
(Mixture##icoPoly##Order##Type##ThermoPhysics, \
#Mixture"<icoPoly"#Order#Type"ThermoPhysics>", 0)
(Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
#Mixture"<"#Transport"<"#Thermo"<"#EqnOfState"<"#Specie">>,"#Type">>", 0)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -56,7 +56,8 @@ makeThermo
constTransport,
sensibleEnthalpy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -67,7 +68,8 @@ makeThermo
sutherlandTransport,
sensibleEnthalpy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -78,7 +80,8 @@ makeThermo
sutherlandTransport,
sensibleEnthalpy,
janafThermo,
perfectGas
perfectGas,
specie
);
......@@ -92,7 +95,8 @@ makeThermo
constTransport,
sensibleInternalEnergy,
eConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -103,7 +107,8 @@ makeThermo
sutherlandTransport,
sensibleInternalEnergy,
eConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -114,7 +119,8 @@ makeThermo
constTransport,
sensibleInternalEnergy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -125,7 +131,8 @@ makeThermo
sutherlandTransport,
sensibleInternalEnergy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -136,7 +143,8 @@ makeThermo
sutherlandTransport,
sensibleInternalEnergy,
janafThermo,
perfectGas
perfectGas,
specie
);
......
......@@ -55,15 +55,17 @@ Foam::autoPtr<Foam::psiThermo> Foam::psiThermo::New
word mixture(thermoTypeDict.lookup("mixture"));
word transport(thermoTypeDict.lookup("transport"));
word thermo(thermoTypeDict.lookup("thermo"));
word equationOfState(thermoTypeDict.lookup("equationOfState"));
word energy(thermoTypeDict.lookup("energy"));
word equationOfState(thermoTypeDict.lookup("equationOfState"));
word specie(thermoTypeDict.lookup("specie"));
thermoTypeName =
type + '<'
+ mixture + '<'
+ transport + '<'
+ thermo + '<'
+ equationOfState + ">,"
+ equationOfState + '<'
+ specie + ">>,"
+ energy + ">>>";
}
else
......
......@@ -26,10 +26,10 @@ License
#include "rhoThermo.H"
#include "makeThermo.H"
#include "specie.H"
#include "perfectGas.H"
#include "incompressiblePerfectGas.H"
#include "rhoConst.H"
#include "hConstThermo.H"
#include "janafThermo.H"
#include "sensibleEnthalpy.H"
......@@ -61,7 +61,8 @@ makeThermo
constTransport,
sensibleEnthalpy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -72,7 +73,8 @@ makeThermo
sutherlandTransport,
sensibleEnthalpy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -83,7 +85,8 @@ makeThermo
sutherlandTransport,
sensibleEnthalpy,
janafThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -94,25 +97,20 @@ makeThermo
constTransport,
sensibleEnthalpy,
hConstThermo,
rhoConst
rhoConst,
specie
);
makePolyThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
3,
sensibleEnthalpy
);
makePolyThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
8,
sensibleEnthalpy
polynomialTransport,
sensibleEnthalpy,
hPolynomialThermo,
icoPolynomial,
specie
);
makeThermo
......@@ -123,7 +121,8 @@ makeThermo
constTransport,
sensibleEnthalpy,
hConstThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
makeThermo
......@@ -134,7 +133,8 @@ makeThermo
sutherlandTransport,
sensibleEnthalpy,
hConstThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
makeThermo
......@@ -145,7 +145,8 @@ makeThermo
sutherlandTransport,
sensibleEnthalpy,
janafThermo,
incompressiblePerfectGas
incompressiblePerfectGas,
specie
);
......@@ -159,7 +160,8 @@ makeThermo
constTransport,
sensibleInternalEnergy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -170,7 +172,8 @@ makeThermo
sutherlandTransport,
sensibleInternalEnergy,
hConstThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -181,7 +184,8 @@ makeThermo
sutherlandTransport,
sensibleInternalEnergy,
janafThermo,
perfectGas
perfectGas,
specie
);
makeThermo
......@@ -192,25 +196,20 @@ makeThermo
constTransport,
sensibleInternalEnergy,
hConstThermo,
rhoConst
rhoConst,
specie
);
makePolyThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
3,
sensibleInternalEnergy
);
makePolyThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
8,
sensibleInternalEnergy