From 149a584cfe68cc8d0d867a49b07a01323458097d Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 30 Sep 2012 21:26:12 +0100 Subject: [PATCH] Solid thermodynamic: rationalize and update selection mechanism for consistency with fluid thermo --- .../basicChemistryModelTemplates.C | 191 ++++++++++++++++++ .../makeSolidChemistryModel.H | 61 ++++++ .../solidChemistryModels.C | 2 +- .../makeSolidChemistrySolverType.H | 5 - .../radiation/const/constSolidRad.H | 28 ++- .../transport/const/constIsoSolidTransport.H | 28 ++- .../exponential/exponentialSolidTransport.H | 28 ++- .../solidThermo/heSolidThermo/heSolidThermo.C | 53 +++-- .../solidThermo/heSolidThermo/heSolidThermo.H | 6 +- .../basicSolidMixture/basicSolidMixture.H | 1 - .../multiComponentSolidMixture.H | 3 - .../pureSolidMixture/pureSolidMixture.H | 4 - .../reactingSolidMixture.H | 2 - .../solidThermo/solidThermo/makeSolidThermo.H | 110 +++------- .../solidThermo/solidThermo/solidThermo.C | 2 +- .../solidThermo/solidThermo/solidThermo.H | 3 +- .../solidThermo/solidThermo/solidThermoNew.C | 8 +- .../leftSolid/thermophysicalProperties | 2 +- .../rightSolid/thermophysicalProperties | 2 +- .../leftSolid/thermophysicalProperties | 2 +- .../rightSolid/thermophysicalProperties | 2 +- .../leftSolid/thermophysicalProperties | 2 +- .../rightSolid/thermophysicalProperties | 2 +- .../leftSolid/thermophysicalProperties | 2 +- .../rightSolid/thermophysicalProperties | 2 +- .../leftSolid/thermophysicalProperties | 2 +- .../rightSolid/thermophysicalProperties | 2 +- 27 files changed, 380 insertions(+), 175 deletions(-) create mode 100644 src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C create mode 100644 src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C new file mode 100644 index 0000000000..e842b4b27b --- /dev/null +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C @@ -0,0 +1,191 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "basicChemistryModel.H" +#include "basicThermo.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +template +Foam::autoPtr Foam::basicChemistryModel::New +( + const fvMesh& mesh +) +{ + IOdictionary chemistryDict + ( + IOobject + ( + "chemistryProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ); + + word chemistryTypeName; + + if (chemistryDict.isDict("chemistryType")) + { + const dictionary& chemistryTypeDict + ( + chemistryDict.subDict("chemistryType") + ); + + Info<< "Selecting chemistry type " << chemistryTypeDict << endl; + + const int nCmpt = 8; + const char* cmptNames[nCmpt] = + { + "chemistrySolver", + "chemistryModel", + "???ChemistryModel", + "transport", + "thermo", + "equationOfState", + "specie", + "energy" + }; + + IOdictionary thermoDict + ( + IOobject + ( + "thermophysicalProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false + ) + ); + + word thermoTypeName; + + if (thermoDict.isDict("thermoType")) + { + const dictionary& thermoTypeDict(thermoDict.subDict("thermoType")); + thermoTypeName = + word(thermoTypeDict.lookup("transport")) + '<' + + word(thermoTypeDict.lookup("thermo")) + '<' + + word(thermoTypeDict.lookup("equationOfState")) + '<' + + word(thermoTypeDict.lookup("specie")) + ">>," + + word(thermoTypeDict.lookup("energy")) + ">"; + } + else + { + FatalIOErrorIn + ( + (ChemistryModel::typeName + "::New(const mesh&)").c_str(), + thermoDict + ) << "thermoType is in the old format and must be upgraded" + << exit(FatalIOError); + } + + // Construct the name of the chemistry type from the components + chemistryTypeName = + word(chemistryTypeDict.lookup("chemistrySolver")) + '<' + + word(chemistryTypeDict.lookup("chemistryModel")) + '<' + + ChemistryModel::typeName + ',' + + thermoTypeName + ">>"; + + typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter = + ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName); + + if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end()) + { + FatalErrorIn(ChemistryModel::typeName + "::New(const mesh&)") + << "Unknown " << ChemistryModel::typeName << " type " << nl + << "chemistryType" << chemistryTypeDict << nl << nl + << "Valid " << ChemistryModel ::typeName << " types are:" + << nl << nl; + + // Get the list of all the suitable chemistry packages available + wordList validChemistryTypeNames + ( + ChemistryModel::fvMeshConstructorTablePtr_->sortedToc() + ); + + // Build a table of the thermo packages constituent parts + // Note: row-0 contains the names of constituent parts + List validChemistryTypeNameCmpts + ( + validChemistryTypeNames.size() + 1 + ); + + validChemistryTypeNameCmpts[0].setSize(nCmpt); + forAll(validChemistryTypeNameCmpts[0], j) + { + validChemistryTypeNameCmpts[0][j] = cmptNames[j]; + } + + // Split the thermo package names into their constituent parts + forAll(validChemistryTypeNames, i) + { + validChemistryTypeNameCmpts[i+1] = basicThermo::splitThermoName + ( + validChemistryTypeNames[i], + nCmpt + ); + } + + // Print the table of available packages + // in terms of their constituent parts + printTable(validChemistryTypeNameCmpts, FatalError); + + FatalError<< exit(FatalError); + } + + return autoPtr + (cstrIter()(mesh, typeName, chemistryTypeName)); + } + else + { + chemistryTypeName = + word(chemistryDict.lookup("chemistryType")); + + Info<< "Selecting chemistry type " << chemistryTypeName << endl; + + typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter = + ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName); + + if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end()) + { + FatalErrorIn(ChemistryModel::typeName + "::New(const mesh&)") + << "Unknown " << ChemistryModel::typeName << " type " + << chemistryTypeName << nl << nl + << "Valid ChemistryModel types are:" << nl + << ChemistryModel::fvMeshConstructorTablePtr_->sortedToc() << nl + << exit(FatalError); + } + + return autoPtr + (cstrIter()(mesh, typeName, chemistryTypeName)); + } +} + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H new file mode 100644 index 0000000000..95fa907441 --- /dev/null +++ b/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Description + Macros for instantiating solid chemistry models + +\*---------------------------------------------------------------------------*/ + +#ifndef makeSolidChemistryModel_H +#define makeSolidChemistryModel_H + +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeSolidChemistryModel(SS, Comp, SThermo, GThermo) \ + \ + typedef SS SS##Comp##SThermo##GThermo; \ + \ + defineTemplateTypeNameAndDebugWithName \ + ( \ + SS##Comp##SThermo##GThermo, \ + #SS"<"#Comp","#SThermo","#GThermo">", \ + 0 \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C index bad1a77bbe..104fa11a7d 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C @@ -30,7 +30,7 @@ Description \*---------------------------------------------------------------------------*/ -#include "makeChemistryModel.H" +#include "makeSolidChemistryModel.H" #include "ODESolidChemistryModel.H" #include "solidChemistryModel.H" diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H index 39e49524e4..f528bc50a5 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H @@ -41,11 +41,6 @@ namespace Foam #define makeSolidChemistrySolverType(SS, ODEChem, Comp, SThermo, GThermo) \ \ - typedef ODESolidChemistryModel \ - ODESolidChemistryModel##Comp##SThermo##GThermo; \ - \ - makeChemistrySolver(ODESolidChemistryModel##Comp##SThermo##GThermo) \ - \ typedef SS > \ SS##ODEChem##Comp##SThermo##GThermo; \ \ diff --git a/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.H b/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.H index 60977f6e83..b9d19591b3 100644 --- a/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.H +++ b/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.H @@ -41,30 +41,30 @@ SourceFiles namespace Foam { -template class constSolidRad; +template class constSolidRad; -template -inline constSolidRad operator* +template +inline constSolidRad operator* ( const scalar, - const constSolidRad& + const constSolidRad& ); -template +template Ostream& operator<< ( Ostream&, - const constSolidRad& + const constSolidRad& ); /*---------------------------------------------------------------------------*\ Class constSolidRad Declaration \*---------------------------------------------------------------------------*/ -template +template class constSolidRad : - public thermo + public Thermo { // Private data @@ -81,7 +81,7 @@ class constSolidRad //- Construct from components inline constSolidRad ( - const thermo& t, + const Thermo& t, const scalar kappaRad, const scalar sigmaS, const scalar emissivity @@ -107,6 +107,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "const<" + Thermo::typeName() + '>'; + } + //- Return absorption coefficient [1/m] inline scalar kappaRad(scalar T) const; @@ -129,7 +135,7 @@ public: // Friend operators - friend constSolidRad operator* + friend constSolidRad operator* ( const scalar, const constSolidRad& @@ -138,7 +144,7 @@ public: // Ostream Operator - friend Ostream& operator<< + friend Ostream& operator<< ( Ostream&, const constSolidRad& diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H index b32ae358ee..126589f00b 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H @@ -45,20 +45,20 @@ SourceFiles namespace Foam { -template class constIsoSolidTransport; +template class constIsoSolidTransport; -template -inline constIsoSolidTransport operator* +template +inline constIsoSolidTransport operator* ( const scalar, - const constIsoSolidTransport& + const constIsoSolidTransport& ); -template +template Ostream& operator<< ( Ostream&, - const constIsoSolidTransport& + const constIsoSolidTransport& ); @@ -66,10 +66,10 @@ Ostream& operator<< Class constIsoSolidTransport Declaration \*---------------------------------------------------------------------------*/ -template +template class constIsoSolidTransport : - public thermo + public Thermo { // Private data @@ -80,7 +80,7 @@ class constIsoSolidTransport // Private Member Functions //- Construct from components - inline constIsoSolidTransport(const thermo& t, const scalar kappa); + inline constIsoSolidTransport(const Thermo& t, const scalar kappa); public: @@ -100,6 +100,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "constIso<" + Thermo::typeName() + '>'; + } + //- Isotropic thermal conductivity [W/mK] inline scalar kappa(const scalar T) const; @@ -122,7 +128,7 @@ public: // Friend operators - friend constIsoSolidTransport operator* + friend constIsoSolidTransport operator* ( const scalar, const constIsoSolidTransport& @@ -131,7 +137,7 @@ public: // Ostream Operator - friend Ostream& operator<< + friend Ostream& operator<< ( Ostream&, const constIsoSolidTransport& diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H index 1ace8a3c45..1531b25f03 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H @@ -42,20 +42,20 @@ SourceFiles namespace Foam { -template class exponentialSolidTransport; +template class exponentialSolidTransport; -template -inline exponentialSolidTransport operator* +template +inline exponentialSolidTransport operator* ( const scalar, - const exponentialSolidTransport& + const exponentialSolidTransport& ); -template +template Ostream& operator<< ( Ostream&, - const exponentialSolidTransport& + const exponentialSolidTransport& ); @@ -63,10 +63,10 @@ Ostream& operator<< Class exponentialSolidTransport Declaration \*---------------------------------------------------------------------------*/ -template +template class exponentialSolidTransport : - public thermo + public Thermo { // Private data @@ -85,7 +85,7 @@ class exponentialSolidTransport //- Construct from components inline exponentialSolidTransport ( - const thermo& t, + const Thermo& t, const scalar kappa0, const scalar n0, const scalar Tref @@ -110,6 +110,12 @@ public: // Member functions + //- Return the instantiated type name + static word typeName() + { + return "exponential<" + Thermo::typeName() + '>'; + } + //- Thermal conductivity [W/mK] inline scalar kappa(const scalar T) const; @@ -132,7 +138,7 @@ public: // Friend operators - friend exponentialSolidTransport operator* + friend exponentialSolidTransport operator* ( const scalar, const exponentialSolidTransport& @@ -140,7 +146,7 @@ public: // Ostream Operator - friend Ostream& operator<< + friend Ostream& operator<< ( Ostream&, const exponentialSolidTransport& diff --git a/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.C b/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.C index c59f6419a9..3ce0c43e14 100644 --- a/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.C +++ b/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.C @@ -28,10 +28,9 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -template -void Foam::heSolidThermo::calculate() +template +void Foam::heSolidThermo::calculate() { - scalarField& TCells = this->T_.internalField(); const scalarField& hCells = this->he_.internalField(); @@ -123,8 +122,8 @@ void Foam::heSolidThermo::calculate() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::heSolidThermo:: +template +Foam::heSolidThermo:: heSolidThermo(const fvMesh& mesh) : heThermo(mesh) @@ -133,8 +132,8 @@ heSolidThermo(const fvMesh& mesh) } -template -Foam::heSolidThermo:: +template +Foam::heSolidThermo:: heSolidThermo(const fvMesh& mesh, const dictionary& dict) : heThermo(mesh, dict) @@ -145,15 +144,15 @@ heSolidThermo(const fvMesh& mesh, const dictionary& dict) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template -Foam::heSolidThermo::~heSolidThermo() +template +Foam::heSolidThermo::~heSolidThermo() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template -void Foam::heSolidThermo::correct() +template +void Foam::heSolidThermo::correct() { if (debug) { @@ -169,9 +168,9 @@ void Foam::heSolidThermo::correct() } -template +template Foam::tmp -Foam::heSolidThermo::Kappa() const +Foam::heSolidThermo::Kappa() const { const fvMesh& mesh = this->T_.mesh(); @@ -231,9 +230,9 @@ Foam::heSolidThermo::Kappa() const } -template +template Foam::tmp -Foam::heSolidThermo::kappaRad() const +Foam::heSolidThermo::kappaRad() const { const fvMesh& mesh = this->T_.mesh(); @@ -293,9 +292,9 @@ Foam::heSolidThermo::kappaRad() const } -template +template Foam::tmp -Foam::heSolidThermo::sigmaS() const +Foam::heSolidThermo::sigmaS() const { const fvMesh& mesh = this->T_.mesh(); @@ -355,9 +354,9 @@ Foam::heSolidThermo::sigmaS() const } -template +template Foam::tmp -Foam::heSolidThermo::emissivity() const +Foam::heSolidThermo::emissivity() const { const fvMesh& mesh = this->T_.mesh(); @@ -417,9 +416,9 @@ Foam::heSolidThermo::emissivity() const } -template +template Foam::tmp -Foam::heSolidThermo::Kappa +Foam::heSolidThermo::Kappa ( const label patchi ) const @@ -446,9 +445,9 @@ Foam::heSolidThermo::Kappa } -template +template Foam::tmp -Foam::heSolidThermo::kappaRad +Foam::heSolidThermo::kappaRad ( const label patchi ) const @@ -474,9 +473,9 @@ Foam::heSolidThermo::kappaRad } -template +template Foam::tmp -Foam::heSolidThermo::sigmaS +Foam::heSolidThermo::sigmaS ( const label patchi ) const @@ -503,9 +502,9 @@ Foam::heSolidThermo::sigmaS } -template +template Foam::tmp -Foam::heSolidThermo::emissivity +Foam::heSolidThermo::emissivity ( const label patchi ) const diff --git a/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.H b/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.H index 3a154f7fee..f5c5a405be 100644 --- a/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.H +++ b/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.H @@ -36,8 +36,6 @@ SourceFiles #define heSolidThermo_H #include "heThermo.H" -#include "solidThermo.H" -#include "coordinateSystem.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +46,7 @@ namespace Foam Class heSolidThermo Declaration \*---------------------------------------------------------------------------*/ -template +template class heSolidThermo : public heThermo @@ -60,7 +58,7 @@ class heSolidThermo void calculate(); //- Construct as copy (not implemented) - heSolidThermo(const heSolidThermo&); + heSolidThermo(const heSolidThermo&); public: diff --git a/src/thermophysicalModels/solidThermo/mixtures/basicSolidMixture/basicSolidMixture.H b/src/thermophysicalModels/solidThermo/mixtures/basicSolidMixture/basicSolidMixture.H index d5cce4600a..93fb35276b 100644 --- a/src/thermophysicalModels/solidThermo/mixtures/basicSolidMixture/basicSolidMixture.H +++ b/src/thermophysicalModels/solidThermo/mixtures/basicSolidMixture/basicSolidMixture.H @@ -208,7 +208,6 @@ public: //- Specific heat capacity virtual scalar Cp(scalar p, scalar T, label celli) const = 0; - }; diff --git a/src/thermophysicalModels/solidThermo/mixtures/multiComponentSolidMixture/multiComponentSolidMixture.H b/src/thermophysicalModels/solidThermo/mixtures/multiComponentSolidMixture/multiComponentSolidMixture.H index 494b839ce6..4b772f4233 100644 --- a/src/thermophysicalModels/solidThermo/mixtures/multiComponentSolidMixture/multiComponentSolidMixture.H +++ b/src/thermophysicalModels/solidThermo/mixtures/multiComponentSolidMixture/multiComponentSolidMixture.H @@ -82,9 +82,6 @@ public: //- The type of thermodynamics this mixture is instantiated for typedef ThermoType thermoType; - //- Runtime type information - TypeName("multiComponentSolidMixture"); - // Constructors diff --git a/src/thermophysicalModels/solidThermo/mixtures/pureSolidMixture/pureSolidMixture.H b/src/thermophysicalModels/solidThermo/mixtures/pureSolidMixture/pureSolidMixture.H index f2dae829cd..2605843a6a 100644 --- a/src/thermophysicalModels/solidThermo/mixtures/pureSolidMixture/pureSolidMixture.H +++ b/src/thermophysicalModels/solidThermo/mixtures/pureSolidMixture/pureSolidMixture.H @@ -65,10 +65,6 @@ public: typedef ThermoType thermoType; - //- Runtime type information - TypeName("pureSolidMixture"); - - // Constructors //- Construct from dictionary and mesh diff --git a/src/thermophysicalModels/solidThermo/mixtures/reactingSolidMixture/reactingSolidMixture.H b/src/thermophysicalModels/solidThermo/mixtures/reactingSolidMixture/reactingSolidMixture.H index a252517591..66443f4324 100644 --- a/src/thermophysicalModels/solidThermo/mixtures/reactingSolidMixture/reactingSolidMixture.H +++ b/src/thermophysicalModels/solidThermo/mixtures/reactingSolidMixture/reactingSolidMixture.H @@ -67,8 +67,6 @@ public: //- The type of thermo package this mixture is instantiated for typedef ThermoSolidType thermoType; - //- Runtime type information - TypeName("reactingSolidMixture"); // Constructors diff --git a/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H b/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H index 12dde56bd1..3f44c6b825 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H +++ b/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H @@ -39,59 +39,7 @@ Description #define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Radiation,Type,Thermo,EqnOfState,Specie)\ \ -typedef Cthermo \ -< \ - Mixture \ - < \ - Transport \ - < \ - Radiation \ - < \ - species::thermo \ - < \ - Thermo \ - < \ - EqnOfState \ - < \ - Specie \ - > \ - >, \ - Type \ - > \ - > \ - > \ - >, \ - BaseThermo \ -> Cthermo##Mixture##Transport##Radiation##Type##Thermo \ - ##EqnOfState##Specie##BaseThermo; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - Cthermo##Mixture##Transport##Radiation##Type##Thermo \ - ##EqnOfState##Specie##BaseThermo, \ - #Cthermo \ - "<" \ - #Mixture \ - "<" \ - #Transport \ - "<" \ - #Radiation \ - "<" \ - #Thermo \ - "<" \ - #EqnOfState \ - "<" \ - #Specie \ - ">" \ - ">," \ - #Type \ - ">>>>", \ - 0 \ -); \ - \ - \ -typedef Mixture \ -< \ +typedef \ Transport \ < \ Radiation \ @@ -108,41 +56,39 @@ typedef Mixture \ Type \ > \ > \ - > \ -> Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie; \ + > Transport##Radiation##Type##Thermo##EqnOfState##Specie; \ \ +typedef \ + Mixture \ + < \ + Transport##Radiation##Type##Thermo##EqnOfState##Specie \ + > Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie; \ + \ +typedef \ + Cthermo \ + < \ + BaseThermo, \ + Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie \ + > Cthermo##Mixture##Transport##Radiation##Type##Thermo \ + ##EqnOfState##Specie; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie, \ - #Mixture \ - "<" \ - #Transport \ - "<" \ - #Radiation \ - "<" \ - #Thermo \ - "<" \ - #EqnOfState \ - ">," \ - #Type \ - ">>>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - BaseThermo, \ Cthermo##Mixture##Transport##Radiation##Type##Thermo \ - ##EqnOfState##Specie##BaseThermo, \ - mesh \ + ##EqnOfState##Specie, \ + ( \ + #Cthermo"<"#Mixture"<" \ + + Transport##Radiation##Type##Thermo##EqnOfState##Specie::typeName() \ + + ">>" \ + ).c_str(), \ + 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ basicThermo, \ Cthermo##Mixture##Transport##Radiation##Type##Thermo \ - ##EqnOfState##Specie##BaseThermo, \ + ##EqnOfState##Specie, \ fvMesh \ ); \ \ @@ -150,7 +96,15 @@ addToRunTimeSelectionTable \ ( \ BaseThermo, \ Cthermo##Mixture##Transport##Radiation##Type##Thermo \ - ##EqnOfState##Specie##BaseThermo, \ + ##EqnOfState##Specie, \ + fvMesh \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + BaseThermo, \ + Cthermo##Mixture##Transport##Radiation##Type##Thermo \ + ##EqnOfState##Specie, \ dictionary \ ); diff --git a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C index e5bb9fa274..c5ebf5731c 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C +++ b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C @@ -32,7 +32,7 @@ License namespace Foam { defineTypeNameAndDebug(solidThermo, 0); - defineRunTimeSelectionTable(solidThermo, mesh); + defineRunTimeSelectionTable(solidThermo, fvMesh); defineRunTimeSelectionTable(solidThermo, dictionary); } diff --git a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H index 075907903a..bc30f74370 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H +++ b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H @@ -77,12 +77,11 @@ public: ( autoPtr, solidThermo, - mesh, + fvMesh, (const fvMesh& mesh), (mesh) ); - // Declare run-time constructor selection tables declareRunTimeSelectionTable ( diff --git a/src/thermophysicalModels/solidThermo/solidThermo/solidThermoNew.C b/src/thermophysicalModels/solidThermo/solidThermo/solidThermoNew.C index 1fbb1afca2..28871b9f75 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/solidThermoNew.C +++ b/src/thermophysicalModels/solidThermo/solidThermo/solidThermoNew.C @@ -55,10 +55,10 @@ Foam::autoPtr Foam::solidThermo::New ).lookup("thermoType") ); - meshConstructorTable::iterator cstrIter = - meshConstructorTablePtr_->find(thermoType); + fvMeshConstructorTable::iterator cstrIter = + fvMeshConstructorTablePtr_->find(thermoType); - if (cstrIter == meshConstructorTablePtr_->end()) + if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn ( @@ -66,7 +66,7 @@ Foam::autoPtr Foam::solidThermo::New ) << "Unknown solidThermo type " << thermoType << endl << endl << "Valid solidThermo types are :" << endl - << meshConstructorTablePtr_->toc() + << fvMeshConstructorTablePtr_->toc() << exit(FatalError); } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/leftSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/leftSolid/thermophysicalProperties index 13a2e81f03..884f3f652c 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/leftSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/leftSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/rightSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/rightSolid/thermophysicalProperties index 13a2e81f03..884f3f652c 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/rightSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/rightSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/leftSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/leftSolid/thermophysicalProperties index a4c501e063..d4f02fb677 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/leftSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/leftSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/rightSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/rightSolid/thermophysicalProperties index a4c501e063..d4f02fb677 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/rightSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/rightSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/thermophysicalProperties index a4c501e063..d4f02fb677 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/thermophysicalProperties index a4c501e063..d4f02fb677 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/thermophysicalProperties index a4c501e063..d4f02fb677 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/thermophysicalProperties index a4c501e063..d4f02fb677 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/leftSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/leftSolid/thermophysicalProperties index 9ac37aef59..99794189d6 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/leftSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/leftSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/rightSolid/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/rightSolid/thermophysicalProperties index 9ac37aef59..99794189d6 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/rightSolid/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/rightSolid/thermophysicalProperties @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heSolidThermo>,sensibleEnthalpy>>>>; +thermoType heSolidThermo>,sensibleEnthalpy>>>>; mixture {