Skip to content
Snippets Groups Projects
Commit f1bfeba1 authored by Henry's avatar Henry
Browse files

Thermodynamics: rename specieThermo -> species::thermo and create the species namespace

Also remove the "<thermo" part of the names of thermodynamics packages
parent 969756b8
Branches
Tags
No related merge requests found
Showing
with 204 additions and 49 deletions
......@@ -36,14 +36,14 @@ Description
#include "IFstream.H"
#include "OSspecific.H"
#include "specieThermo.H"
#include "thermo.H"
#include "absoluteEnthalpy.H"
#include "janafThermo.H"
#include "perfectGas.H"
using namespace Foam;
typedef specieThermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo;
typedef species::thermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -35,7 +35,7 @@ Description
#include "OSspecific.H"
#include "IOmanip.H"
#include "specieThermo.H"
#include "thermo.H"
#include "absoluteEnthalpy.H"
#include "janafThermo.H"
#include "perfectGas.H"
......@@ -43,7 +43,7 @@ Description
using namespace Foam;
typedef specieThermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo;
typedef species::thermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
......
......@@ -38,14 +38,14 @@ Description
#include "OSspecific.H"
#include "IOmanip.H"
#include "specieThermo.H"
#include "thermo.H"
#include "absoluteEnthalpy.H"
#include "janafThermo.H"
#include "perfectGas.H"
using namespace Foam;
typedef specieThermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo;
typedef species::thermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -35,7 +35,7 @@ Description
#include "IFstream.H"
#include "OSspecific.H"
#include "specieThermo.H"
#include "thermo.H"
#include "absoluteEnthalpy.H"
#include "janafThermo.H"
#include "perfectGas.H"
......@@ -43,7 +43,7 @@ Description
using namespace Foam;
typedef specieThermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo;
typedef species::thermo<janafThermo<perfectGas>, absoluteEnthalpy> thermo;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -510,30 +510,30 @@ DebugSwitches
gradientUnburntEnthalpy 0;
granularPressureModel 0;
hCombustionThermo 0;
hMixtureThermo<homogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hMixtureThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hMixtureThermo<inhomogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hMixtureThermo<multiComponentMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hMixtureThermo<homogeneousMixture<constTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hMixtureThermo<homogeneousMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
hMixtureThermo<inhomogeneousMixture<constTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hMixtureThermo<inhomogeneousMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
hMixtureThermo<multiComponentMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
hMixtureThermo<reactingMixture> 0;
hMixtureThermo<veryInhomogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hMixtureThermo<veryInhomogeneousMixture<constTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
hThermo<pureMixture<constTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hThermo<pureMixture<sutherlandTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hThermo<pureMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
harmonic 0;
heatTransferModel 0;
hexCellLooper 0;
hexRef8 0;
hhuCombustionThermo 0;
hhuMixtureThermo<egrMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<egrMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hhuMixtureThermo<homogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hhuMixtureThermo<inhomogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hhuMixtureThermo<veryInhomogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0;
hhuMixtureThermo<egrMixture<constTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<egrMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
hhuMixtureThermo<homogeneousMixture<constTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<homogeneousMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
hhuMixtureThermo<inhomogeneousMixture<constTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
hhuMixtureThermo<veryInhomogeneousMixture<constTransport<thermo<hConstThermo<perfectGas>>>>> 0;
hhuMixtureThermo<veryInhomogeneousMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>>> 0;
hierarchical 0;
hollowConeInjector 0;
iC3H8O 0;
......@@ -711,9 +711,9 @@ DebugSwitches
processor 0;
processorLduInterface 0;
processorLduInterfaceField 0;
pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>> 0;
pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>> 0;
pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>> 0;
pureMixture<constTransport<thermo<hConstThermo<perfectGas>>>> 0;
pureMixture<sutherlandTransport<thermo<hConstThermo<perfectGas>>>> 0;
pureMixture<sutherlandTransport<thermo<janafThermo<perfectGas>>>> 0;
quadratic 0;
quadraticFit 0;
quadraticLinearFit 0;
......
......@@ -58,7 +58,7 @@ Description
<pureSolidMixture
<constIsoSolidTransport
<constSolidRad
<specieThermo
<thermo
<hConstThermo<incompressible>,sensibleEnthalpy>
>
>
......
......@@ -2,7 +2,10 @@ mixtures/basicMixture/basicMixture.C
mixtures/basicMixture/basicMixtures.C
basicThermo/basicThermo.C
basicThermo/basicThermoNew.C
fluidThermo/fluidThermo.C
fluidThermo/fluidThermoNew.C
psiThermo/psiThermo/psiThermo.C
psiThermo/psiThermo/psiThermoNew.C
......
......@@ -29,6 +29,7 @@ Description
SourceFiles
basicThermo.C
basicThermoNew.C
\*---------------------------------------------------------------------------*/
......@@ -101,6 +102,10 @@ public:
basicThermo(const fvMesh&, const dictionary&);
//- Selector
static autoPtr<basicThermo> New(const fvMesh&);
//- Destructor
virtual ~basicThermo();
......
/*---------------------------------------------------------------------------*\
========= |
\\ / 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/>.
\*---------------------------------------------------------------------------*/
#include "basicThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::basicThermo> Foam::basicThermo::New
(
const fvMesh& mesh
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("thermoType")
);
Info<< "Selecting thermodynamics package " << modelType << endl;
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(modelType);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("basicThermo::New(const fvMesh&)")
<< "Unknown basicThermo type " << modelType << nl << nl
<< "Valid basicThermo types are:" << nl
<< fvMeshConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError);
}
return autoPtr<basicThermo>(cstrIter()(mesh));
}
// ************************************************************************* //
......@@ -29,6 +29,7 @@ Description
SourceFiles
fluidThermo.C
fluidThermoNew.C
\*---------------------------------------------------------------------------*/
......@@ -76,6 +77,10 @@ public:
fluidThermo(const fvMesh&, const dictionary&);
//- Selector
static autoPtr<fluidThermo> New(const fvMesh&);
//- Destructor
virtual ~fluidThermo();
......
/*---------------------------------------------------------------------------*\
========= |
\\ / 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/>.
\*---------------------------------------------------------------------------*/
#include "fluidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::fluidThermo> Foam::fluidThermo::New
(
const fvMesh& mesh
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("thermoType")
);
Info<< "Selecting thermodynamics package " << modelType << endl;
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(modelType);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("fluidThermo::New(const fvMesh&)")
<< "Unknown fluidThermo type " << modelType << nl << nl
<< "Valid fluidThermo types are:" << nl
<< fvMeshConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError);
}
return autoPtr<fluidThermo>(cstrIter()(mesh));
}
// ************************************************************************* //
......@@ -44,7 +44,7 @@ typedef Cthermo \
< \
Transport \
< \
specieThermo \
species::thermo \
< \
Thermo \
< \
......@@ -64,13 +64,13 @@ defineTemplateTypeNameAndDebugWithName \
#Mixture \
"<" \
#Transport \
"<specieThermo<" \
"<" \
#Thermo \
"<" \
#EqnOfState \
">," \
#Type \
">>>>", \
">>>", \
0 \
); \
\
......@@ -93,7 +93,7 @@ addToRunTimeSelectionTable \
\
typedef polynomialTransport \
< \
specieThermo \
species::thermo \
< \
hPolynomialThermo \
< \
......
......@@ -41,7 +41,7 @@ Description
#include "janafThermo.H"
#include "sensibleInternalEnergy.H"
#include "sensibleEnthalpy.H"
#include "specieThermo.H"
#include "thermo.H"
#include "constTransport.H"
#include "sutherlandTransport.H"
......
......@@ -39,19 +39,19 @@ Description
#define makeBasicMixture(Mixture,Transport,Type,Thermo,EqnOfState) \
\
typedef \
Mixture<Transport<specieThermo<Thermo<EqnOfState>, Type> > > \
Mixture<Transport<species::thermo<Thermo<EqnOfState>, Type> > > \
Mixture##Transport##Type##Thermo##EqnOfState; \
\
defineTemplateTypeNameAndDebugWithName \
(Mixture##Transport##Type##Thermo##EqnOfState, \
#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">,"#Type">>>", 0)
#Mixture"<"#Transport"<"#Thermo"<"#EqnOfState">,"#Type">>", 0)
#define makeBasicPolyMixture(Mixture,Order,Type) \
\
typedef polynomialTransport \
< \
specieThermo \
species::thermo \
< \
hPolynomialThermo \
< \
......
......@@ -33,7 +33,7 @@ License
#include "janafThermo.H"
#include "sensibleEnthalpy.H"
#include "sensibleInternalEnergy.H"
#include "specieThermo.H"
#include "thermo.H"
#include "constTransport.H"
#include "sutherlandTransport.H"
......
......@@ -61,10 +61,10 @@ Foam::autoPtr<Foam::psiThermo> Foam::psiThermo::New
thermoTypeName =
type + '<'
+ mixture + '<'
+ transport + "<specieThermo<"
+ transport + '<'
+ thermo + '<'
+ equationOfState + ">,"
+ energy + ">>>>";
+ energy + ">>>";
}
else
{
......
......@@ -34,7 +34,7 @@ License
#include "janafThermo.H"
#include "sensibleEnthalpy.H"
#include "sensibleInternalEnergy.H"
#include "specieThermo.H"
#include "thermo.H"
#include "constTransport.H"
#include "sutherlandTransport.H"
......
......@@ -41,7 +41,7 @@ typedef MixtureThermo \
< \
Transport \
< \
specieThermo \
species::thermo \
< \
Thermo \
< \
......@@ -62,13 +62,13 @@ defineTemplateTypeNameAndDebugWithName \
#Mixture \
"<" \
#Transport \
"<specieThermo<" \
"<" \
#Thermo \
"<" \
#EqnOfState \
">," \
#Type \
">>>>", \
">>>", \
0 \
); \
\
......
......@@ -71,20 +71,20 @@ Foam::multiComponentMixture<ThermoType>::multiComponentMixture
(
const dictionary& thermoDict,
const wordList& specieNames,
const HashPtrTable<ThermoType>& specieThermoData,
const HashPtrTable<ThermoType>& thermoData,
const fvMesh& mesh
)
:
basicMultiComponentMixture(thermoDict, specieNames, mesh),
speciesData_(species_.size()),
mixture_("mixture", *specieThermoData[specieNames[0]])
mixture_("mixture", *thermoData[specieNames[0]])
{
forAll(species_, i)
{
speciesData_.set
(
i,
new ThermoType(*specieThermoData[species_[i]])
new ThermoType(*thermoData[species_[i]])
);
}
......
......@@ -87,7 +87,7 @@ public:
(
const dictionary&,
const wordList& specieNames,
const HashPtrTable<ThermoType>& specieThermoData,
const HashPtrTable<ThermoType>& thermoData,
const fvMesh&
);
......
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