From 8b76dbf712ee0fa237f2e4181ae48bbb88037dc6 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 30 Oct 2020 08:38:58 +0000 Subject: [PATCH] combustionModels: Removed templating on the ThermoType combustionModels now use the virtual functions provided by SpecieMixture to avoid the complexity in code and compilation of templating on the ThermoType. Additionally the models based on singleStepCombustion now use the concrete reaction base class to avoid the templating on ThermoType introduced by the Reaction type. --- src/combustionModels/FSD/FSD.C | 34 +++++++------- src/combustionModels/FSD/FSD.H | 9 +--- src/combustionModels/FSD/FSDs.C | 38 --------------- src/combustionModels/Make/files | 10 ++-- src/combustionModels/diffusion/diffusion.C | 32 ++++++------- src/combustionModels/diffusion/diffusion.H | 10 +--- src/combustionModels/diffusion/diffusions.C | 38 --------------- .../infinitelyFastChemistry.C | 37 ++++++++------- .../infinitelyFastChemistry.H | 10 +--- .../infinitelyFastChemistrys.C | 38 --------------- .../mixtureFraction/mixtureFraction.C | 39 ++++++++++++---- .../mixtureFraction/mixtureFraction.H | 7 --- .../mixtureFraction/mixtureFractions.C | 40 ---------------- .../singleStepCombustion.C | 46 +++++-------------- .../singleStepCombustion.H | 7 --- .../singleStepCombustionI.H | 34 ++++---------- .../reaction/Reactions/Reaction/Reaction.H | 3 ++ 17 files changed, 117 insertions(+), 315 deletions(-) delete mode 100644 src/combustionModels/FSD/FSDs.C delete mode 100644 src/combustionModels/diffusion/diffusions.C delete mode 100644 src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C delete mode 100644 src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFractions.C diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index d6b4e6e12d..b92a9162dd 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -28,16 +28,24 @@ License #include "LESModel.H" #include "fvcGrad.H" #include "fvcDiv.H" +#include "addToRunTimeSelectionTable.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { namespace combustionModels { + defineTypeNameAndDebug(FSD, 0); + addToRunTimeSelectionTable(combustionModel, FSD, dictionary); +} +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -FSD::FSD +Foam::combustionModels::FSD::FSD ( const word& modelType, const fluidReactionThermo& thermo, @@ -45,7 +53,7 @@ FSD::FSD const word& combustionProperties ) : - singleStepCombustion + singleStepCombustion ( modelType, thermo, @@ -87,15 +95,13 @@ FSD::FSD // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template -FSD::~FSD() +Foam::combustionModels::FSD::~FSD() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -template -void FSD::calculateSourceNorm() +void Foam::combustionModels::FSD::calculateSourceNorm() { this->fresCorrect(); @@ -309,8 +315,7 @@ void FSD::calculateSourceNorm() } -template -void FSD::correct() +void Foam::combustionModels::FSD::correct() { this->wFuel_ == dimensionedScalar(dimMass/pow3(dimLength)/dimTime, 0); @@ -319,10 +324,9 @@ void FSD::correct() } -template -bool FSD::read() +bool Foam::combustionModels::FSD::read() { - if (singleStepCombustion::read()) + if (singleStepCombustion::read()) { this->coeffs().lookup("Cv") >> Cv_ ; this->coeffs().lookup("ftVarMin") >> ftVarMin_; @@ -335,9 +339,5 @@ bool FSD::read() } } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/combustionModels/FSD/FSD.H b/src/combustionModels/FSD/FSD.H index 5bc4d0de66..60b0a2b953 100644 --- a/src/combustionModels/FSD/FSD.H +++ b/src/combustionModels/FSD/FSD.H @@ -77,10 +77,9 @@ namespace combustionModels Class FSD Declaration \*---------------------------------------------------------------------------*/ -template class FSD : - public singleStepCombustion + public singleStepCombustion { // Private Data @@ -169,12 +168,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef NoRepository - #include "FSD.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/combustionModels/FSD/FSDs.C b/src/combustionModels/FSD/FSDs.C deleted file mode 100644 index 757445b80e..0000000000 --- a/src/combustionModels/FSD/FSDs.C +++ /dev/null @@ -1,38 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 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 "FSD.H" - -#include "forCommonGases.H" -#include "makeThermoCombustionModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - forCommonGases(makeThermoCombustionModel, FSD); -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/Make/files b/src/combustionModels/Make/files index ba56321eb7..96cdf4255a 100644 --- a/src/combustionModels/Make/files +++ b/src/combustionModels/Make/files @@ -3,9 +3,11 @@ combustionModel/combustionModelNew.C chemistryCombustion/chemistryCombustion.C -diffusion/diffusions.C +singleStepCombustion/singleStepCombustion.C -infinitelyFastChemistry/infinitelyFastChemistrys.C +diffusion/diffusion.C + +infinitelyFastChemistry/infinitelyFastChemistry.C PaSR/PaSR.C @@ -17,7 +19,7 @@ FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C FSD/reactionRateFlameAreaModels/relaxation/relaxation.C -FSD/FSDs.C +FSD/FSD.C zoneCombustion/zoneCombustion.C @@ -27,6 +29,6 @@ functionObjects/Qdot/Qdot.C radiationModels/absorptionEmissionModels/greyMeanCombustion/greyMeanCombustion.C radiationModels/absorptionEmissionModels/wideBandCombustion/wideBandCombustion.C -radiationModels/sootModels/mixtureFraction/mixtureFractions.C +radiationModels/sootModels/mixtureFraction/mixtureFraction.C LIB = $(FOAM_LIBBIN)/libcombustionModels diff --git a/src/combustionModels/diffusion/diffusion.C b/src/combustionModels/diffusion/diffusion.C index 7e6c4e6fbd..0e832ef40f 100644 --- a/src/combustionModels/diffusion/diffusion.C +++ b/src/combustionModels/diffusion/diffusion.C @@ -25,16 +25,24 @@ License #include "diffusion.H" #include "fvcGrad.H" +#include "addToRunTimeSelectionTable.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { namespace combustionModels { + defineTypeNameAndDebug(diffusion, 0); + addToRunTimeSelectionTable(combustionModel, diffusion, dictionary); +} +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -diffusion::diffusion +Foam::combustionModels::diffusion::diffusion ( const word& modelType, const fluidReactionThermo& thermo, @@ -42,7 +50,7 @@ diffusion::diffusion const word& combustionProperties ) : - singleStepCombustion + singleStepCombustion ( modelType, thermo, @@ -56,15 +64,13 @@ diffusion::diffusion // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template -diffusion::~diffusion() +Foam::combustionModels::diffusion::~diffusion() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -template -void diffusion::correct() +void Foam::combustionModels::diffusion::correct() { this->wFuel_ == dimensionedScalar(dimMass/pow3(dimLength)/dimTime, 0); @@ -88,10 +94,9 @@ void diffusion::correct() } -template -bool diffusion::read() +bool Foam::combustionModels::diffusion::read() { - if (singleStepCombustion::read()) + if (singleStepCombustion::read()) { this->coeffs().lookup("C") >> C_ ; this->coeffs().readIfPresent("oxidant", oxidantName_); @@ -104,9 +109,4 @@ bool diffusion::read() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/combustionModels/diffusion/diffusion.H b/src/combustionModels/diffusion/diffusion.H index 0ed39e538e..10f8e39dd1 100644 --- a/src/combustionModels/diffusion/diffusion.H +++ b/src/combustionModels/diffusion/diffusion.H @@ -50,10 +50,9 @@ namespace combustionModels Class diffusion Declaration \*---------------------------------------------------------------------------*/ -template class diffusion : - public singleStepCombustion + public singleStepCombustion { // Private Data @@ -110,13 +109,6 @@ public: } // End namespace combustionModels } // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "diffusion.C" -#endif - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/src/combustionModels/diffusion/diffusions.C b/src/combustionModels/diffusion/diffusions.C deleted file mode 100644 index 5b4c0fc38f..0000000000 --- a/src/combustionModels/diffusion/diffusions.C +++ /dev/null @@ -1,38 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2020 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 "diffusion.H" - -#include "forCommonGases.H" -#include "makeThermoCombustionModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - forCommonGases(makeThermoCombustionModel, diffusion); -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C index 63c88111d0..542a208f77 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -24,16 +24,29 @@ License \*---------------------------------------------------------------------------*/ #include "infinitelyFastChemistry.H" +#include "addToRunTimeSelectionTable.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { namespace combustionModels { + defineTypeNameAndDebug(infinitelyFastChemistry, 0); + addToRunTimeSelectionTable + ( + combustionModel, + infinitelyFastChemistry, + dictionary + ); +} +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -infinitelyFastChemistry::infinitelyFastChemistry +Foam::combustionModels::infinitelyFastChemistry::infinitelyFastChemistry ( const word& modelType, const fluidReactionThermo& thermo, @@ -41,7 +54,7 @@ infinitelyFastChemistry::infinitelyFastChemistry const word& combustionProperties ) : - singleStepCombustion + singleStepCombustion ( modelType, thermo, @@ -54,15 +67,13 @@ infinitelyFastChemistry::infinitelyFastChemistry // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template -infinitelyFastChemistry::~infinitelyFastChemistry() +Foam::combustionModels::infinitelyFastChemistry::~infinitelyFastChemistry() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -template -void infinitelyFastChemistry::correct() +void Foam::combustionModels::infinitelyFastChemistry::correct() { this->wFuel_ == dimensionedScalar(dimMass/pow3(dimLength)/dimTime, 0); @@ -86,10 +97,9 @@ void infinitelyFastChemistry::correct() } -template -bool infinitelyFastChemistry::read() +bool Foam::combustionModels::infinitelyFastChemistry::read() { - if (singleStepCombustion::read()) + if (singleStepCombustion::read()) { this->coeffs().lookup("C") >> C_ ; return true; @@ -101,9 +111,4 @@ bool infinitelyFastChemistry::read() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H index c8137be22a..006c14ebcb 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H @@ -50,10 +50,9 @@ namespace combustionModels Class infinitelyFastChemistry Declaration \*---------------------------------------------------------------------------*/ -template class infinitelyFastChemistry : - public singleStepCombustion + public singleStepCombustion { // Private Data @@ -107,13 +106,6 @@ public: } // End namespace combustionModels } // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "infinitelyFastChemistry.C" -#endif - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C deleted file mode 100644 index ecd60933f0..0000000000 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C +++ /dev/null @@ -1,38 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 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 "infinitelyFastChemistry.H" - -#include "forCommonGases.H" -#include "makeThermoCombustionModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - forCommonGases(makeThermoCombustionModel, infinitelyFastChemistry); -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFraction.C b/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFraction.C index 927dc912d0..b3b063f972 100644 --- a/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFraction.C +++ b/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFraction.C @@ -25,11 +25,33 @@ License #include "mixtureFraction.H" #include "singleStepCombustion.H" +#include "addToRunTimeSelectionTable.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace radiationModels +{ +namespace sootModels +{ + defineTypeNameAndDebug(mixtureFraction, 0); + + addToRunTimeSelectionTable + ( + sootModel, + mixtureFraction, + dictionary + ); +} +} +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::radiationModels::sootModels::mixtureFraction::mixtureFraction +Foam::radiationModels::sootModels::mixtureFraction::mixtureFraction ( const dictionary& dict, const fvMesh& mesh, @@ -59,8 +81,8 @@ Foam::radiationModels::sootModels::mixtureFraction::mixtureFraction ), mapFieldMax_(1) { - const combustionModels::singleStepCombustion& combustion = - mesh.lookupObject> + const combustionModels::singleStepCombustion& combustion = + mesh.lookupObject ( combustionModel::combustionPropertiesName ); @@ -118,16 +140,13 @@ Foam::radiationModels::sootModels::mixtureFraction::mixtureFraction // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template -Foam::radiationModels::sootModels::mixtureFraction:: -~mixtureFraction() +Foam::radiationModels::sootModels::mixtureFraction::~mixtureFraction() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template -void Foam::radiationModels::sootModels::mixtureFraction::correct() +void Foam::radiationModels::sootModels::mixtureFraction::correct() { const volScalarField& mapField = mesh_.lookupObject(mappingFieldName_); @@ -136,4 +155,4 @@ void Foam::radiationModels::sootModels::mixtureFraction::correct() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFraction.H b/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFraction.H index d10f11e46b..676dca9339 100644 --- a/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFraction.H +++ b/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFraction.H @@ -73,7 +73,6 @@ namespace sootModels Class mixtureFraction Declaration \*---------------------------------------------------------------------------*/ -template class mixtureFraction : public sootModel @@ -148,12 +147,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef NoRepository - #include "mixtureFraction.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFractions.C b/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFractions.C deleted file mode 100644 index e61d794a5f..0000000000 --- a/src/combustionModels/radiationModels/sootModels/mixtureFraction/mixtureFractions.C +++ /dev/null @@ -1,40 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 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 "mixtureFraction.H" - -#include "forCommonGases.H" -#include "makeThermoSootModel.H" - -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - forCommonGases(makeThermoSootModel, mixtureFraction); -} - -// ************************************************************************* // diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index 8b9f1769d4..8e7c22d159 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -26,17 +26,10 @@ License #include "singleStepCombustion.H" #include "fvmSup.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace combustionModels -{ // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -template -void singleStepCombustion::calculateqFuel() +void Foam::combustionModels::singleStepCombustion::calculateqFuel() { const scalar Wu = mixture_.Wi(fuelIndex_); @@ -63,8 +56,7 @@ void singleStepCombustion::calculateqFuel() } -template -void singleStepCombustion::massAndAirStoichRatios() +void Foam::combustionModels::singleStepCombustion::massAndAirStoichRatios() { const label O2Index = mixture_.species()["O2"]; const scalar Wu = mixture_.Wi(fuelIndex_); @@ -84,8 +76,7 @@ void singleStepCombustion::massAndAirStoichRatios() } -template -void singleStepCombustion::calculateMaxProducts() +void Foam::combustionModels::singleStepCombustion::calculateMaxProducts() { scalar Wm = 0.0; scalar totalMol = 0.0; @@ -131,8 +122,7 @@ void singleStepCombustion::calculateMaxProducts() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -singleStepCombustion::singleStepCombustion +Foam::combustionModels::singleStepCombustion::singleStepCombustion ( const word& modelType, const fluidReactionThermo& thermo, @@ -206,18 +196,14 @@ singleStepCombustion::singleStepCombustion // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -template -singleStepCombustion::~singleStepCombustion() +Foam::combustionModels::singleStepCombustion::~singleStepCombustion() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -template -tmp singleStepCombustion::R -( - volScalarField& Y -) const +Foam::tmp +Foam::combustionModels::singleStepCombustion::R(volScalarField& Y) const { const label specieI = mixture_.species()[Y.member()]; @@ -241,9 +227,8 @@ tmp singleStepCombustion::R } -template -tmp -singleStepCombustion::Qdot() const +Foam::tmp +Foam::combustionModels::singleStepCombustion::Qdot() const { const label fuelI = fuelIndex(); volScalarField& YFuel = @@ -253,8 +238,7 @@ singleStepCombustion::Qdot() const } -template -bool singleStepCombustion::read() +bool Foam::combustionModels::singleStepCombustion::read() { if (combustionModel::read()) { @@ -267,8 +251,7 @@ bool singleStepCombustion::read() } -template -void singleStepCombustion::fresCorrect() +void Foam::combustionModels::singleStepCombustion::fresCorrect() { const label O2Index = mixture_.species()["O2"]; const volScalarField& YFuel = mixture_.Y()[fuelIndex_]; @@ -320,9 +303,4 @@ void singleStepCombustion::fresCorrect() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace combustionModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.H b/src/combustionModels/singleStepCombustion/singleStepCombustion.H index 0e294aa240..8386489559 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.H +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.H @@ -50,7 +50,6 @@ namespace combustionModels Class singleStepCombustion Declaration \*---------------------------------------------------------------------------*/ -template class singleStepCombustion : public combustionModel @@ -195,12 +194,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef NoRepository - #include "singleStepCombustion.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustionI.H b/src/combustionModels/singleStepCombustion/singleStepCombustionI.H index 450668fc80..8499b40f00 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustionI.H +++ b/src/combustionModels/singleStepCombustion/singleStepCombustionI.H @@ -34,54 +34,43 @@ namespace combustionModels // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -template -const Foam::basicSpecieMixture& -singleStepCombustion::mixture() const +inline const Foam::basicSpecieMixture& singleStepCombustion::mixture() const { return mixture_; } -template -inline const Foam::reaction& -singleStepCombustion::singleReaction() const +inline const Foam::reaction& singleStepCombustion::singleReaction() const { return reaction_; } -template -inline const dimensionedScalar& -singleStepCombustion::stoicRatio() const +inline const dimensionedScalar& singleStepCombustion::stoicRatio() const { return stoicRatio_; } -template -inline const dimensionedScalar& singleStepCombustion::s() const +inline const dimensionedScalar& singleStepCombustion::s() const { return s_; } -template -inline const dimensionedScalar& singleStepCombustion::qFuel() const +inline const dimensionedScalar& singleStepCombustion::qFuel() const { return qFuel_; } -template -inline const List& -singleStepCombustion::specieStoichCoeffs() const +inline const List& singleStepCombustion::specieStoichCoeffs() const { return specieStoichCoeffs_; } -template -inline tmp singleStepCombustion::fres +inline tmp singleStepCombustion::fres ( const label index ) const @@ -90,22 +79,19 @@ inline tmp singleStepCombustion::fres } -template -inline label singleStepCombustion::fuelIndex() const +inline label singleStepCombustion::fuelIndex() const { return fuelIndex_; } -template -inline const List& singleStepCombustion::specieProd() const +inline const List& singleStepCombustion::specieProd() const { return specieProd_; } -template -inline const scalarList& singleStepCombustion::Yprod0() const +inline const scalarList& singleStepCombustion::Yprod0() const { return Yprod0_; } diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H index cbc250f9f7..2185421ec4 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H +++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H @@ -203,6 +203,9 @@ public: // Access + //- Return the name of the reaction + using reaction::name; + //- Return the lower temperature limit for the reaction inline scalar Tlow() const;