diff --git a/etc/controlDict b/etc/controlDict index 693a3f4dd21f78a40dacf61cf4fb81f42c636fba..5550a0961a4c493e7a11431a44747a6a23fa703b 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -510,7 +510,6 @@ DebugSwitches gradientUnburntEnthalpy 0; granularPressureModel 0; hCombustionThermo 0; - hMixtureThermo<dieselMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0; hMixtureThermo<homogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0; hMixtureThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>> 0; hMixtureThermo<inhomogeneousMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>> 0; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C index 71e7d31ab9fbc4cad56304c2fec8c1f5a8e73abd..a51aef04c78bb51b9ad7c6e812800c4bcaf851e7 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C @@ -39,18 +39,34 @@ Description namespace Foam { + makeChemistryModel + ( + ODEChemistryModel, + psiChemistryModel, + constGasThermoPhysics + ); + makeChemistryModel ( ODEChemistryModel, psiChemistryModel, gasThermoPhysics ); + + makeChemistryModel + ( + ODEChemistryModel, + psiChemistryModel, + constIsobaricGasThermoPhysics + ); + makeChemistryModel ( ODEChemistryModel, psiChemistryModel, - constGasThermoPhysics + isobaricGasThermoPhysics ); + makeChemistryModel ( ODEChemistryModel, diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C index 461e838b9afcadf841962433d42e456c650dfe2a..f0cbbecec79cc6648a1c958e63fff5d4f7d71617 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C @@ -39,18 +39,34 @@ Description namespace Foam { + makeChemistryModel + ( + ODEChemistryModel, + rhoChemistryModel, + constGasThermoPhysics + ); + makeChemistryModel ( ODEChemistryModel, rhoChemistryModel, gasThermoPhysics ); + + makeChemistryModel + ( + ODEChemistryModel, + rhoChemistryModel, + constIsobaricGasThermoPhysics + ); + makeChemistryModel ( ODEChemistryModel, rhoChemistryModel, - constGasThermoPhysics + isobaricGasThermoPhysics ); + makeChemistryModel ( ODEChemistryModel, diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C index aa3b58664b598c0e8a2c6c7b039afca209b1c983..54239f49578f8a93a0eed82a35b48330cbec6c44 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,11 +33,15 @@ License namespace Foam { - makeChemistrySolverTypes(psiChemistryModel, gasThermoPhysics); makeChemistrySolverTypes(psiChemistryModel, constGasThermoPhysics); + makeChemistrySolverTypes(psiChemistryModel, gasThermoPhysics); + makeChemistrySolverTypes(psiChemistryModel, constIsobaricGasThermoPhysics); + makeChemistrySolverTypes(psiChemistryModel, isobaricGasThermoPhysics); makeChemistrySolverTypes(psiChemistryModel, icoPoly8ThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, gasThermoPhysics); makeChemistrySolverTypes(rhoChemistryModel, constGasThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, gasThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, constIsobaricGasThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, isobaricGasThermoPhysics); makeChemistrySolverTypes(rhoChemistryModel, icoPoly8ThermoPhysics); } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C index e731b5004ddc0b9e56f660dd62bc005c0ef60695..61c0ae6fb5edbac813ecabb7f04b8bcee8b36c6d 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "makeReaction.H" +#include "makeReactionThermo.H" #include "thermoPhysicsTypes.H" #include "chemistryReader.H" @@ -38,9 +38,14 @@ namespace Foam makeChemistryReader(constGasThermoPhysics); makeChemistryReader(gasThermoPhysics); +makeChemistryReader(constIsobaricGasThermoPhysics); +makeChemistryReader(isobaricGasThermoPhysics); makeChemistryReader(icoPoly8ThermoPhysics); +makeChemistryReaderType(foamChemistryReader, constGasThermoPhysics); makeChemistryReaderType(foamChemistryReader, gasThermoPhysics); +makeChemistryReaderType(foamChemistryReader, constIsobaricGasThermoPhysics); +makeChemistryReaderType(foamChemistryReader, isobaricGasThermoPhysics); makeChemistryReaderType(foamChemistryReader, icoPoly8ThermoPhysics); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C deleted file mode 100644 index 1b43304552e5fc4daab24de066daab7e382e4afa..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C +++ /dev/null @@ -1,134 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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 "dieselMixture.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -template<class ThermoType> -const char* Foam::dieselMixture<ThermoType>::specieNames_[2] = {"ft", "fu"}; - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class ThermoType> -Foam::dieselMixture<ThermoType>::dieselMixture -( - const dictionary& thermoDict, - const fvMesh& mesh -) -: - basicMultiComponentMixture - ( - thermoDict, - speciesTable(nSpecies_, specieNames_), - mesh - ), - - stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")), - - fuel_(thermoDict.subDict("fuel")), - oxidant_(thermoDict.subDict("oxidant")), - products_(thermoDict.subDict("burntProducts")), - - mixture_("mixture", fuel_), - - ft_(Y("ft")), - fu_(Y("fu")) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class ThermoType> -const ThermoType& Foam::dieselMixture<ThermoType>::mixture -( - const scalar ft, - const scalar fu -) const -{ - if (ft < 0.0001) - { - return oxidant_; - } - else - { - scalar ox = 1 - ft - (ft - fu)*stoicRatio().value(); - scalar pr = 1 - fu - ox; - - mixture_ = fu/fuel_.W()*fuel_; - mixture_ += ox/oxidant_.W()*oxidant_; - mixture_ += pr/products_.W()*products_; - - return mixture_; - } -} - - -template<class ThermoType> -void Foam::dieselMixture<ThermoType>::read(const dictionary& thermoDict) -{ - fuel_ = ThermoType(thermoDict.subDict("fuel")); - oxidant_ = ThermoType(thermoDict.subDict("oxidant")); - products_ = ThermoType(thermoDict.subDict("burntProducts")); -} - - -template<class ThermoType> -const ThermoType& Foam::dieselMixture<ThermoType>::getLocalThermo -( - const label specieI -) const -{ - if (specieI == 0) - { - return fuel_; - } - else if (specieI == 1) - { - return oxidant_; - } - else if (specieI == 2) - { - return products_; - } - else - { - FatalErrorIn - ( - "const ThermoType& Foam::dieselMixture<ThermoType>::getLocalThermo" - "(" - "const label " - ") const" - ) << "Unknown specie index " << specieI << ". Valid indices are 0..2" - << abort(FatalError); - - return fuel_; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H deleted file mode 100644 index 3e0c15583dc4b2d47ed78b0da6a469a8c512cce8..0000000000000000000000000000000000000000 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H +++ /dev/null @@ -1,174 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-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/>. - -Class - Foam::dieselMixture - -Description - Foam::dieselMixture - -SourceFiles - dieselMixture.C - -\*---------------------------------------------------------------------------*/ - -#ifndef dieselMixture_H -#define dieselMixture_H - -#include "basicMultiComponentMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class dieselMixture Declaration -\*---------------------------------------------------------------------------*/ - -template<class ThermoType> -class dieselMixture -: - public basicMultiComponentMixture -{ - // Private data - - static const int nSpecies_ = 2; - static const char* specieNames_[2]; - - dimensionedScalar stoicRatio_; - - ThermoType fuel_; - ThermoType oxidant_; - ThermoType products_; - - mutable ThermoType mixture_; - - volScalarField& ft_; - volScalarField& fu_; - - //- Construct as copy (not implemented) - dieselMixture(const dieselMixture<ThermoType>&); - - -public: - - //- The type of thermodynamics this mixture is instantiated for - typedef ThermoType thermoType; - - - // Constructors - - //- Construct from dictionary and mesh - dieselMixture(const dictionary&, const fvMesh&); - - - //- Destructor - virtual ~dieselMixture() - {} - - - // Member functions - - const dimensionedScalar& stoicRatio() const - { - return stoicRatio_; - } - - const ThermoType& mixture(const scalar, const scalar) const; - - const ThermoType& cellMixture(const label celli) const - { - return mixture(ft_[celli], fu_[celli]); - } - - const ThermoType& patchFaceMixture - ( - const label patchi, - const label facei - ) const - { - return mixture - ( - ft_.boundaryField()[patchi][facei], - fu_.boundaryField()[patchi][facei] - ); - } - - const ThermoType& cellReactants(const label celli) const - { - return mixture(ft_[celli], ft_[celli]); - } - - const ThermoType& patchFaceReactants - ( - const label patchi, - const label facei - ) const - { - return mixture - ( - ft_.boundaryField()[patchi][facei], - ft_.boundaryField()[patchi][facei] - ); - } - - const ThermoType& cellProducts(const label celli) const - { - scalar ft = ft_[celli]; - return mixture(ft, fres(ft, stoicRatio().value())); - } - - const ThermoType& patchFaceProducts - ( - const label patchi, - const label facei - ) const - { - scalar ft = ft_.boundaryField()[patchi][facei]; - return mixture(ft, fres(ft, stoicRatio().value())); - } - - //- Read dictionary - void read(const dictionary&); - - //- Return thermo based on index - const ThermoType& getLocalThermo(const label specieI) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "dieselMixture.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C index 4a8438f9dee7287db423135fc88596e515aadc54..159a1e8ef038f4d3255996e8f1f0280cc7d145d2 100644 --- a/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C @@ -41,7 +41,6 @@ License #include "homogeneousMixture.H" #include "inhomogeneousMixture.H" #include "veryInhomogeneousMixture.H" -#include "dieselMixture.H" #include "multiComponentMixture.H" #include "reactingMixture.H" #include "singleStepReactingMixture.H" @@ -172,18 +171,6 @@ makeReactionThermo ); -makeReactionThermo -( - psiThermo, - psiReactionThermo, - hePsiReactionThermo, - dieselMixture, - sutherlandTransport, - sensibleEnthalpy, - janafThermo, - perfectGas -); - // Multi-component thermo makeReactionMixtureThermo diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C index 3aad01b13b5773505bd33b9e47919682647539ac..bf42991d9cd6d887a46a0d9378ef1898cdca53af 100644 --- a/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C @@ -42,7 +42,6 @@ License #include "homogeneousMixture.H" #include "inhomogeneousMixture.H" #include "veryInhomogeneousMixture.H" -#include "dieselMixture.H" #include "multiComponentMixture.H" #include "egrMixture.H" @@ -126,7 +125,6 @@ makeReactionThermo perfectGas ); - makeReactionThermo ( psiThermo, @@ -139,8 +137,6 @@ makeReactionThermo perfectGas ); - - makeReactionThermo ( psiThermo, diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C index fc26cdc8928b966eb2617095f2c44fd687be3781..74fb78cb1665f65e1d005bbf7344868a34be2c4c 100644 --- a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C @@ -29,6 +29,7 @@ License #include "heRhoReactionThermo.H" #include "perfectGas.H" +#include "isobaricPerfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" @@ -41,7 +42,6 @@ License #include "homogeneousMixture.H" #include "inhomogeneousMixture.H" #include "veryInhomogeneousMixture.H" -#include "dieselMixture.H" #include "multiComponentMixture.H" #include "reactingMixture.H" #include "singleStepReactingMixture.H" @@ -133,11 +133,71 @@ makeReactionThermo rhoThermo, rhoReactionThermo, heRhoReactionThermo, - dieselMixture, + homogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + isobaricPerfectGas +); + +makeReactionThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + inhomogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + isobaricPerfectGas +); + +makeReactionThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + veryInhomogeneousMixture, + constTransport, + sensibleEnthalpy, + hConstThermo, + isobaricPerfectGas +); + +makeReactionThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + homogeneousMixture, sutherlandTransport, sensibleEnthalpy, janafThermo, - perfectGas + isobaricPerfectGas +); + +makeReactionThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + inhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + isobaricPerfectGas +); + +makeReactionThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + veryInhomogeneousMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + isobaricPerfectGas ); @@ -158,7 +218,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoReactionThermo, multiComponentMixture, - icoPoly8ThermoPhysics + gasThermoPhysics ); makeReactionMixtureThermo @@ -167,7 +227,25 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoReactionThermo, multiComponentMixture, - gasThermoPhysics + constIsobaricGasThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + multiComponentMixture, + isobaricGasThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + multiComponentMixture, + icoPoly8ThermoPhysics ); @@ -188,7 +266,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoReactionThermo, reactingMixture, - icoPoly8ThermoPhysics + gasThermoPhysics ); makeReactionMixtureThermo @@ -197,7 +275,25 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoReactionThermo, reactingMixture, - gasThermoPhysics + constIsobaricGasThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + reactingMixture, + isobaricGasThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, + reactingMixture, + icoPoly8ThermoPhysics ); makeReactionMixtureThermo diff --git a/src/thermophysicalModels/specie/Make/files b/src/thermophysicalModels/specie/Make/files index 87d6a0380f9580dbdf6bb19cfe1f4dc853cf2041..0d1d4f73da197edbb486410b190d73e894c9eadc 100644 --- a/src/thermophysicalModels/specie/Make/files +++ b/src/thermophysicalModels/specie/Make/files @@ -8,7 +8,6 @@ $(specie)/specie.C $(equationOfState)/perfectGas/perfectGas.C $(equationOfState)/incompressible/incompressible.C $(equationOfState)/isobaricPerfectGas/isobaricPerfectGas.C -$(reactions)/makeChemkinReactions.C $(reactions)/makeReactionThermoReactions.C $(reactions)/makeLangmuirHinshelwoodReactions.C diff --git a/src/thermophysicalModels/specie/include/reactionTypes.H b/src/thermophysicalModels/specie/include/reactionTypes.H index c9e5b2bf5a0b7167d84d63eca0e1c4fe876f6f0e..2d42804c68c16cda4df9edef22e9af29633d0bcb 100644 --- a/src/thermophysicalModels/specie/include/reactionTypes.H +++ b/src/thermophysicalModels/specie/include/reactionTypes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,9 +43,13 @@ Description namespace Foam { + typedef Reaction<constGasThermoPhysics> constGasReaction; + typedef Reaction<gasThermoPhysics> gasReaction; - typedef Reaction<constGasThermoPhysics> constGasReaction; + typedef Reaction<constIsobaricGasThermoPhysics> constIsobaricGasReaction; + + typedef Reaction<isobaricGasThermoPhysics> isobaricGasReaction; typedef Reaction<icoPoly8ThermoPhysics> icoPoly8Reaction; } @@ -55,4 +59,3 @@ namespace Foam #endif // ************************************************************************* // - diff --git a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H index 6e2af6f8ff61667f526224a62f33f6bd7b1b9627..e301be5614f29ee1088d9195f34316045cfaa87e 100644 --- a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H +++ b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H @@ -33,6 +33,7 @@ Description #define thermoPhysicsTypes_H #include "perfectGas.H" +#include "isobaricPerfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" #include "sensibleEnthalpy.H" @@ -49,48 +50,71 @@ Description namespace Foam { typedef - sutherlandTransport + constTransport + < + specieThermo < - specieThermo + hConstThermo < - janafThermo - < - perfectGas - >, - sensibleEnthalpy - > + perfectGas + >, + sensibleEnthalpy > - gasThermoPhysics; + > constGasThermoPhysics; typedef - constTransport + sutherlandTransport + < + specieThermo < - specieThermo + janafThermo < - hConstThermo - < - perfectGas - >, - sensibleEnthalpy - > + perfectGas + >, + sensibleEnthalpy > - constGasThermoPhysics; + > gasThermoPhysics; typedef - polynomialTransport + constTransport + < + specieThermo < - specieThermo + hConstThermo < - hPolynomialThermo - < - icoPolynomial<8>, - 8 - >, - sensibleEnthalpy + isobaricPerfectGas >, - 8 + sensibleEnthalpy > - icoPoly8ThermoPhysics; + > constIsobaricGasThermoPhysics; + + typedef + sutherlandTransport + < + specieThermo + < + janafThermo + < + isobaricPerfectGas + >, + sensibleEnthalpy + > + > isobaricGasThermoPhysics; + + typedef + polynomialTransport + < + specieThermo + < + hPolynomialThermo + < + icoPolynomial<8>, + 8 + >, + sensibleEnthalpy + >, + 8 + > icoPoly8ThermoPhysics; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C index 42f5af0ff29d700152c9078611b25d3d2c633ab6..5d7b3de1f23ae196b1756bd127313c38378fdf5c 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C @@ -43,50 +43,51 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTemplateTypeNameAndDebug(icoPoly8Reaction, 0); -defineTemplateRunTimeSelectionTable(icoPoly8Reaction, Istream); -defineTemplateRunTimeSelectionTable(icoPoly8Reaction, dictionary); - - -// * * * * * * * * * * * * * Make CHEMKIN reactions * * * * * * * * * * * * // - -makeIRNReactions(icoPoly8ThermoPhysics, ArrheniusReactionRate) -makeIRNReactions(icoPoly8ThermoPhysics, infiniteReactionRate) -makeIRNReactions(icoPoly8ThermoPhysics, LandauTellerReactionRate) -makeIRNReactions(icoPoly8ThermoPhysics, thirdBodyArrheniusReactionRate) - -makeIRReactions(icoPoly8ThermoPhysics, JanevReactionRate) -makeIRReactions(icoPoly8ThermoPhysics, powerSeriesReactionRate) - -makePressureDependentReactions -( - icoPoly8ThermoPhysics, - ArrheniusReactionRate, - LindemannFallOffFunction -) - -makePressureDependentReactions -( - icoPoly8ThermoPhysics, - ArrheniusReactionRate, - TroeFallOffFunction -) - -makePressureDependentReactions -( - icoPoly8ThermoPhysics, - ArrheniusReactionRate, - SRIFallOffFunction -) +#define makeReactions(Thermo, Reaction) \ + \ + defineTemplateTypeNameAndDebug(Reaction, 0); \ + defineTemplateRunTimeSelectionTable(Reaction, Istream); \ + defineTemplateRunTimeSelectionTable(Reaction, dictionary); \ + \ + makeIRNReactions(Thermo, ArrheniusReactionRate) \ + makeIRNReactions(Thermo, infiniteReactionRate) \ + makeIRNReactions(Thermo, LandauTellerReactionRate) \ + makeIRNReactions(Thermo, thirdBodyArrheniusReactionRate) \ + \ + makeIRReactions(Thermo, JanevReactionRate) \ + makeIRReactions(Thermo, powerSeriesReactionRate) \ + \ + makePressureDependentReactions \ + ( \ + Thermo, \ + ArrheniusReactionRate, \ + LindemannFallOffFunction \ + ) \ + \ + makePressureDependentReactions \ + ( \ + Thermo, \ + ArrheniusReactionRate, \ + TroeFallOffFunction \ + ) \ + \ + makePressureDependentReactions \ + ( \ + Thermo, \ + ArrheniusReactionRate, \ + SRIFallOffFunction \ + ) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam +namespace Foam +{ + makeReactions(constGasThermoPhysics, constGasReaction) + makeReactions(gasThermoPhysics, gasReaction) + makeReactions(constIsobaricGasThermoPhysics, constIsobaricGasReaction) + makeReactions(isobaricGasThermoPhysics, isobaricGasReaction) + makeReactions(icoPoly8ThermoPhysics, icoPoly8Reaction) +} // ************************************************************************* // diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 6b750b5cbc66fc3866f2894b274b8cffef3c0059..33ebaa390906aa604e2003532f494d3f595a7182 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -125,6 +125,15 @@ public: //- Construct from dictionary constTransport(const dictionary& dict); + //- Construct and return a clone + inline autoPtr<constTransport> clone() const; + + // Selector from Istream + inline static autoPtr<constTransport> New(Istream& is); + + // Selector from dictionary + inline static autoPtr<constTransport> New(const dictionary& dict); + // Member functions diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index 9d6805eb0c965197c596704298d114d4706b5c28..e58aa79efa95828f2525b1349de8360ae48fcb0b 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -52,6 +52,45 @@ inline Foam::constTransport<Thermo>::constTransport {} +template<class Thermo> +inline Foam::autoPtr<Foam::constTransport<Thermo> > +Foam::constTransport<Thermo>::clone() const +{ + return autoPtr<constTransport<Thermo> > + ( + new constTransport<Thermo>(*this) + ); +} + + +template<class Thermo> +inline Foam::autoPtr<Foam::constTransport<Thermo> > +Foam::constTransport<Thermo>::New +( + Istream& is +) +{ + return autoPtr<constTransport<Thermo> > + ( + new constTransport<Thermo>(is) + ); +} + + +template<class Thermo> +inline Foam::autoPtr<Foam::constTransport<Thermo> > +Foam::constTransport<Thermo>::New +( + const dictionary& dict +) +{ + return autoPtr<constTransport<Thermo> > + ( + new constTransport<Thermo>(dict) + ); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Thermo>