From 4cf7d57480bd1d28425ef52b8635550801e18fe4 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Sun, 29 Jan 2012 11:49:15 +0000 Subject: [PATCH] Added constant chemistry --- .../psiChemistryModel/psiChemistryModels.C | 6 ++++ .../chemistrySolver/makeChemistrySolvers.C | 1 + .../chemistryReader/makeChemistryReaders.C | 2 ++ .../hsCombustionThermo/hsCombustionThermos.C | 8 +++++ .../reaction/reactions/makeChemkinReactions.C | 35 +++++++++++++++++++ .../makeLangmuirHinshelwoodReactions.C | 1 + .../specie/transport/const/constTransport.H | 6 ++++ .../specie/transport/const/constTransportI.H | 26 ++++++++++++++ 8 files changed, 85 insertions(+) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C index 6b45b0f4e..265e07bf6 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C @@ -40,6 +40,12 @@ Description namespace Foam { + makeChemistryModel + ( + ODEChemistryModel, + psiChemistryModel, + constGasThermoPhysics + ); makeChemistryModel ( ODEChemistryModel, diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C index 5e6b8ec99..a03b46ef0 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C @@ -38,6 +38,7 @@ License namespace Foam { + makeChemistrySolver(psiChemistryModel, constGasThermoPhysics) makeChemistrySolver(psiChemistryModel, gasThermoPhysics) makeChemistrySolverType(EulerImplicit, psiChemistryModel, gasThermoPhysics) makeChemistrySolverType(ode, psiChemistryModel, gasThermoPhysics) diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C index 6246203b9..f7a44ddb2 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C @@ -37,9 +37,11 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +makeChemistryReader(constGasThermoPhysics); makeChemistryReader(gasThermoPhysics); makeChemistryReader(icoPoly8ThermoPhysics); +makeChemistryReaderType(foamChemistryReader, constGasThermoPhysics); makeChemistryReaderType(foamChemistryReader, gasThermoPhysics); makeChemistryReaderType(foamChemistryReader, icoPoly8ThermoPhysics); diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C index 02d859c98..ef77eff70 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C @@ -138,6 +138,14 @@ makeHsCombustionMixtureThermo // Multi-component reaction thermo +makeHsCombustionMixtureThermo +( + hsCombustionThermo, + hsPsiMixtureThermo, + reactingMixture, + constGasThermoPhysics +); + makeHsCombustionMixtureThermo ( hsCombustionThermo, diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C index 8c3d3a1a7..e89c631b8 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C @@ -48,12 +48,47 @@ namespace Foam // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +defineTemplateTypeNameAndDebug(constGasReaction, 0); +defineTemplateRunTimeSelectionTable(constGasReaction, Istream); + defineTemplateTypeNameAndDebug(gasReaction, 0); defineTemplateRunTimeSelectionTable(gasReaction, Istream); // * * * * * * * * * * * * * Make CHEMKIN reactions * * * * * * * * * * * * // +// constGasThermoPhysics + +makeIRNReactions(constGasThermoPhysics, ArrheniusReactionRate) +makeIRNReactions(constGasThermoPhysics, LandauTellerReactionRate) +makeIRNReactions(constGasThermoPhysics, thirdBodyArrheniusReactionRate) +makeIRReactions(constGasThermoPhysics, JanevReactionRate) +makeIRReactions(constGasThermoPhysics, powerSeriesReactionRate) + +makePressureDependentReactions +( + constGasThermoPhysics, + ArrheniusReactionRate, + LindemannFallOffFunction +) + +makePressureDependentReactions +( + constGasThermoPhysics, + ArrheniusReactionRate, + TroeFallOffFunction +) + +makePressureDependentReactions +( + constGasThermoPhysics, + ArrheniusReactionRate, + SRIFallOffFunction +) + + +// gasThermoPhysics + makeIRNReactions(gasThermoPhysics, ArrheniusReactionRate) makeIRNReactions(gasThermoPhysics, LandauTellerReactionRate) makeIRNReactions(gasThermoPhysics, thirdBodyArrheniusReactionRate) diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C index a9e3850c0..eceea2228 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C @@ -34,6 +34,7 @@ Description namespace Foam { + makeIRReactions(constGasThermoPhysics, LangmuirHinshelwoodReactionRate) makeIRReactions(gasThermoPhysics, LangmuirHinshelwoodReactionRate) makeIRReactions(icoPoly8ThermoPhysics, LangmuirHinshelwoodReactionRate) } diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index c2d4d376b..194dca619 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -120,6 +120,12 @@ public: //- Construct from Istream constTransport(Istream&); + //- Construct and return a clone + inline autoPtr clone() const; + + // Selector from Istream + inline static autoPtr New(Istream& is); + // Member functions diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index a1c79b67c..fe9785f6d 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -60,6 +60,32 @@ inline constTransport::constTransport {} +// Construct and return a clone +template +inline autoPtr > constTransport::clone +() const +{ + return autoPtr > + ( + new constTransport(*this) + ); +} + + +// Selector from Istream +template +inline autoPtr > constTransport::New +( + Istream& is +) +{ + return autoPtr > + ( + new constTransport(is) + ); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // Dynamic viscosity [kg/ms]