diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.C index 3e61b358af..5e4d4c8bd7 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,7 +107,6 @@ void Foam::StandardChemistryModel::omega scalarField& dcdt ) const { - dcdt = Zero; forAll(reactions_, i) @@ -306,6 +305,8 @@ Foam::StandardChemistryModel::tc() const if (this->chemistry_) { + reactionEvaluationScope scope(*this); + forAll(rho, celli) { const scalar rhoi = rho[celli]; @@ -358,6 +359,8 @@ Foam::StandardChemistryModel::Qdot() const if (this->chemistry_) { + reactionEvaluationScope scope(*this); + scalarField& Qdot = tQdot.ref(); forAll(Y_, i) @@ -400,6 +403,8 @@ Foam::StandardChemistryModel::calculateRR const scalarField& T = this->thermo().T(); const scalarField& p = this->thermo().p(); + reactionEvaluationScope scope(*this); + scalar pf, cf, pr, cr; label lRef, rRef; @@ -458,6 +463,8 @@ void Foam::StandardChemistryModel::calculate() const scalarField& T = this->thermo().T(); const scalarField& p = this->thermo().p(); + reactionEvaluationScope scope(*this); + forAll(rho, celli) { const scalar rhoi = rho[celli]; @@ -502,6 +509,8 @@ Foam::scalar Foam::StandardChemistryModel::solve const scalarField& T = this->thermo().T(); const scalarField& p = this->thermo().p(); + reactionEvaluationScope scope(*this); + scalarField c0(nSpecie_); forAll(rho, celli) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.H index 26df3165eb..86a1663963 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/StandardChemistryModel/StandardChemistryModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,6 +71,40 @@ class StandardChemistryModel protected: + // Protected classes + + //- Class to define scope of reaction evaluation. Runs pre-evaluate + // hook on all reactions on construction and post-evaluate on + // destruction. + class reactionEvaluationScope + { + const StandardChemistryModel& chemistry_; + + public: + + reactionEvaluationScope + ( + const StandardChemistryModel& chemistry + ) + : + chemistry_(chemistry) + { + forAll(chemistry_.reactions_, i) + { + chemistry_.reactions_[i].preEvaluate(); + } + } + + ~reactionEvaluationScope() + { + forAll(chemistry_.reactions_, i) + { + chemistry_.reactions_[i].postEvaluate(); + } + } + }; + + // Protected data //- Reference to the field of specie mass fractions diff --git a/src/thermophysicalModels/chemistryModel/reactions/fluxLimitedLangmuirHinshelwood/fluxLimitedLangmuirHinshelwoodReactionRate.H b/src/thermophysicalModels/chemistryModel/reactions/fluxLimitedLangmuirHinshelwood/fluxLimitedLangmuirHinshelwoodReactionRate.H index 6609b481c1..a8eabfcf3e 100644 --- a/src/thermophysicalModels/chemistryModel/reactions/fluxLimitedLangmuirHinshelwood/fluxLimitedLangmuirHinshelwoodReactionRate.H +++ b/src/thermophysicalModels/chemistryModel/reactions/fluxLimitedLangmuirHinshelwood/fluxLimitedLangmuirHinshelwoodReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,6 +127,12 @@ public: return "fluxLimitedLangmuirHinshelwood"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/chemistryModel/reactions/fluxLimitedLangmuirHinshelwood/fluxLimitedLangmuirHinshelwoodReactionRateI.H b/src/thermophysicalModels/chemistryModel/reactions/fluxLimitedLangmuirHinshelwood/fluxLimitedLangmuirHinshelwoodReactionRateI.H index 9ffe7c2add..0d65f3f379 100644 --- a/src/thermophysicalModels/chemistryModel/reactions/fluxLimitedLangmuirHinshelwood/fluxLimitedLangmuirHinshelwoodReactionRateI.H +++ b/src/thermophysicalModels/chemistryModel/reactions/fluxLimitedLangmuirHinshelwood/fluxLimitedLangmuirHinshelwoodReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,6 +206,16 @@ fluxLimitedLangmuirHinshelwoodReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void +Foam::fluxLimitedLangmuirHinshelwoodReactionRate::preEvaluate() const +{} + + +inline void +Foam::fluxLimitedLangmuirHinshelwoodReactionRate::postEvaluate() const +{} + + inline Foam::scalar Foam::fluxLimitedLangmuirHinshelwoodReactionRate::operator() ( diff --git a/src/thermophysicalModels/chemistryModel/reactions/surfaceArrheniusReactionRate/surfaceArrheniusReactionRate.H b/src/thermophysicalModels/chemistryModel/reactions/surfaceArrheniusReactionRate/surfaceArrheniusReactionRate.H index c909e828d0..33281d9006 100644 --- a/src/thermophysicalModels/chemistryModel/reactions/surfaceArrheniusReactionRate/surfaceArrheniusReactionRate.H +++ b/src/thermophysicalModels/chemistryModel/reactions/surfaceArrheniusReactionRate/surfaceArrheniusReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,6 +92,12 @@ public: return "surfaceArrhenius"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + //- Evaluate the rate inline scalar operator() ( diff --git a/src/thermophysicalModels/chemistryModel/reactions/surfaceArrheniusReactionRate/surfaceArrheniusReactionRateI.H b/src/thermophysicalModels/chemistryModel/reactions/surfaceArrheniusReactionRate/surfaceArrheniusReactionRateI.H index 82023f8f02..3b9ef912d5 100644 --- a/src/thermophysicalModels/chemistryModel/reactions/surfaceArrheniusReactionRate/surfaceArrheniusReactionRateI.H +++ b/src/thermophysicalModels/chemistryModel/reactions/surfaceArrheniusReactionRate/surfaceArrheniusReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,6 +43,18 @@ inline Foam::surfaceArrheniusReactionRate::surfaceArrheniusReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void Foam::surfaceArrheniusReactionRate::preEvaluate() const +{ + ArrheniusReactionRate::preEvaluate(); +} + + +inline void Foam::surfaceArrheniusReactionRate::postEvaluate() const +{ + ArrheniusReactionRate::postEvaluate(); +} + + inline Foam::scalar Foam::surfaceArrheniusReactionRate::operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.C b/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.C index 640b0ecf3d..17024bc4f1 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -84,6 +84,22 @@ IrreversibleReaction // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +void +Foam::IrreversibleReaction::preEvaluate() const +{ + k_.preEvaluate(); +} + + +template +void +Foam::IrreversibleReaction::postEvaluate() const +{ + k_.postEvaluate(); +} + + template Foam::scalar Foam::IrreversibleReaction::kf ( diff --git a/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.H b/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.H index 457e0cb3fb..800b341548 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.H +++ b/src/thermophysicalModels/specie/reaction/Reactions/IrreversibleReaction/IrreversibleReaction.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,6 +128,15 @@ public: // Member Functions + // Hooks + + //- Pre-evaluation hook + virtual void preEvaluate() const; + + //- Post-evaluation hook + virtual void postEvaluate() const; + + // IrreversibleReaction rate coefficients //- Forward rate constant diff --git a/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.C b/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.C index 6f8a327fce..3656063b92 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -89,6 +89,24 @@ NonEquilibriumReversibleReaction // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +void Foam::NonEquilibriumReversibleReaction:: +preEvaluate() const +{ + fk_.preEvaluate(); + rk_.preEvaluate(); +} + + +template +void Foam::NonEquilibriumReversibleReaction:: +postEvaluate() const +{ + fk_.postEvaluate(); + rk_.postEvaluate(); +} + + template Foam::scalar Foam::NonEquilibriumReversibleReaction::kf diff --git a/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.H b/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.H index 759f95ef92..946d85dade 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.H +++ b/src/thermophysicalModels/specie/reaction/Reactions/NonEquilibriumReversibleReaction/NonEquilibriumReversibleReaction.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -143,6 +143,15 @@ public: // Member Functions + // Hooks + + //- Pre-evaluation hook + virtual void preEvaluate() const; + + //- Post-evaluation hook + virtual void postEvaluate() const; + + // NonEquilibriumReversibleReaction rate coefficients //- Forward rate constant diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H index 2185421ec4..16ed80d706 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H +++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -213,6 +213,15 @@ public: inline scalar Thigh() const; + // Hooks + + //- Pre-evaluation hook + virtual void preEvaluate() const = 0; + + //- Post-evaluation hook + virtual void postEvaluate() const = 0; + + // Reaction rate coefficients //- Forward reaction rate diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReactionProxy/ReactionProxy.C b/src/thermophysicalModels/specie/reaction/Reactions/ReactionProxy/ReactionProxy.C index 4a26822ba7..7610898bc3 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/ReactionProxy/ReactionProxy.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/ReactionProxy/ReactionProxy.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,6 +101,16 @@ Foam::ReactionProxy::clone // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +void Foam::ReactionProxy::preEvaluate() const +{} + + +template +void Foam::ReactionProxy::postEvaluate() const +{} + + template Foam::scalar Foam::ReactionProxy::kf ( diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReactionProxy/ReactionProxy.H b/src/thermophysicalModels/specie/reaction/Reactions/ReactionProxy/ReactionProxy.H index 61fb2d0b63..477f7482bf 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/ReactionProxy/ReactionProxy.H +++ b/src/thermophysicalModels/specie/reaction/Reactions/ReactionProxy/ReactionProxy.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,6 +100,15 @@ public: // Member Functions + // Hooks + + //- Pre-evaluation hook + virtual void preEvaluate() const; + + //- Post-evaluation hook + virtual void postEvaluate() const; + + // Reaction rate coefficients //- Forward rate constant diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.C b/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.C index 4f525b78aa..f9b465accc 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -84,6 +84,22 @@ ReversibleReaction // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +void +Foam::ReversibleReaction::preEvaluate() const +{ + k_.preEvaluate(); +} + + +template +void +Foam::ReversibleReaction::postEvaluate() const +{ + k_.postEvaluate(); +} + + template Foam::scalar Foam::ReversibleReaction::kf ( diff --git a/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.H b/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.H index af855cc858..517f3868c0 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.H +++ b/src/thermophysicalModels/specie/reaction/Reactions/ReversibleReaction/ReversibleReaction.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -129,6 +129,15 @@ public: // Member Functions + // Hooks + + //- Pre-evaluation hook + virtual void preEvaluate() const; + + //- Post-evaluation hook + virtual void postEvaluate() const; + + // ReversibleReaction rate coefficients //- Forward rate constant diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRate.H index 021d68cf1c..4e64520d97 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,6 +93,12 @@ public: return "Arrhenius"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H index af6ae34dad..850f0cf177 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/ArrheniusReactionRate/ArrheniusReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,6 +52,14 @@ inline Foam::ArrheniusReactionRate::ArrheniusReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void Foam::ArrheniusReactionRate::preEvaluate() const +{} + + +inline void Foam::ArrheniusReactionRate::postEvaluate() const +{} + + inline Foam::scalar Foam::ArrheniusReactionRate::operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/ChemicallyActivatedReactionRate/ChemicallyActivatedReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/ChemicallyActivatedReactionRate/ChemicallyActivatedReactionRate.H index 3bec9f542c..adc2cdb450 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/ChemicallyActivatedReactionRate/ChemicallyActivatedReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/ChemicallyActivatedReactionRate/ChemicallyActivatedReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,6 +103,12 @@ public: + "ChemicallyActivated"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/ChemicallyActivatedReactionRate/ChemicallyActivatedReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/ChemicallyActivatedReactionRate/ChemicallyActivatedReactionRateI.H index 782fbfe239..8d104b8080 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/ChemicallyActivatedReactionRate/ChemicallyActivatedReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/ChemicallyActivatedReactionRate/ChemicallyActivatedReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,6 +82,30 @@ inline Foam::ChemicallyActivatedReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +inline void Foam::ChemicallyActivatedReactionRate +< + ReactionRate, + ChemicallyActivationFunction +>::preEvaluate() const +{ + k0_.preEvaluate(); + kInf_.preEvaluate(); +} + + +template +inline void Foam::ChemicallyActivatedReactionRate +< + ReactionRate, + ChemicallyActivationFunction +>::postEvaluate() const +{ + k0_.postEvaluate(); + kInf_.postEvaluate(); +} + + template inline Foam::scalar Foam::ChemicallyActivatedReactionRate < diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRate.H index 12e8547865..7534200cdb 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,6 +100,12 @@ public: return ReactionRate::type() + FallOffFunction::type() + "FallOff"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H index d07410c0f3..2300527234 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/FallOffReactionRate/FallOffReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,6 +76,24 @@ FallOffReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +inline void +Foam::FallOffReactionRate::preEvaluate() const +{ + k0_.preEvaluate(); + kInf_.preEvaluate(); +} + + +template +inline void +Foam::FallOffReactionRate::postEvaluate() const +{ + k0_.postEvaluate(); + kInf_.postEvaluate(); +} + + template inline Foam::scalar Foam::FallOffReactionRate::operator() diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRate.H index cf4f12afc8..9c9e291ab2 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,6 +96,12 @@ public: return "Janev"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H index 0919f63399..ec9aefe00e 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/JanevReactionRate/JanevReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,6 +55,14 @@ inline Foam::JanevReactionRate::JanevReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void Foam::JanevReactionRate::preEvaluate() const +{} + + +inline void Foam::JanevReactionRate::postEvaluate() const +{} + + inline Foam::scalar Foam::JanevReactionRate::operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRate.H index 60c8d70110..221e240a5b 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,6 +95,12 @@ public: return "LandauTeller"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H index 513156da1f..884d2b89c9 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/LandauTellerReactionRate/LandauTellerReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,6 +58,14 @@ inline Foam::LandauTellerReactionRate::LandauTellerReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void Foam::LandauTellerReactionRate::preEvaluate() const +{} + + +inline void Foam::LandauTellerReactionRate::postEvaluate() const +{} + + inline Foam::scalar Foam::LandauTellerReactionRate::operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRate.H index f59536e425..72f26e14a4 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,6 +98,12 @@ public: return "LangmuirHinshelwood"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRateI.H index a2c08e4811..b0439e5753 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/LangmuirHinshelwood/LangmuirHinshelwoodReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,6 +64,14 @@ inline Foam::LangmuirHinshelwoodReactionRate::LangmuirHinshelwoodReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void Foam::LangmuirHinshelwoodReactionRate::preEvaluate() const +{} + + +inline void Foam::LangmuirHinshelwoodReactionRate::postEvaluate() const +{} + + inline Foam::scalar Foam::LangmuirHinshelwoodReactionRate::operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRate.H index 7c044585d6..65f0f484c5 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,6 +100,12 @@ public: return "MichaelisMenten"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRateI.H index 9f2a366e0b..6e2b2697a7 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/MichaelisMenten/MichaelisMentenReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,6 +42,14 @@ inline Foam::MichaelisMentenReactionRate::MichaelisMentenReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void Foam::MichaelisMentenReactionRate::preEvaluate() const +{} + + +inline void Foam::MichaelisMentenReactionRate::postEvaluate() const +{} + + inline Foam::scalar Foam::MichaelisMentenReactionRate::operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRate.H index 4a3ecaa959..6e903200cf 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,6 +96,12 @@ public: return "powerSeries"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H index c591cc772d..14ee608f74 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/powerSeries/powerSeriesReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,6 +55,14 @@ inline Foam::powerSeriesReactionRate::powerSeriesReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void Foam::powerSeriesReactionRate::preEvaluate() const +{} + + +inline void Foam::powerSeriesReactionRate::postEvaluate() const +{} + + inline Foam::scalar Foam::powerSeriesReactionRate::operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyArrheniusReactionRate/thirdBodyArrheniusReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyArrheniusReactionRate/thirdBodyArrheniusReactionRate.H index 52cb5df6da..596ff47922 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyArrheniusReactionRate/thirdBodyArrheniusReactionRate.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyArrheniusReactionRate/thirdBodyArrheniusReactionRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,6 +93,12 @@ public: return "thirdBodyArrhenius"; } + //- Pre-evaluation hook + inline void preEvaluate() const; + + //- Post-evaluation hook + inline void postEvaluate() const; + inline scalar operator() ( const scalar p, diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyArrheniusReactionRate/thirdBodyArrheniusReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyArrheniusReactionRate/thirdBodyArrheniusReactionRateI.H index eca08c3475..2fabaf78c3 100644 --- a/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyArrheniusReactionRate/thirdBodyArrheniusReactionRateI.H +++ b/src/thermophysicalModels/specie/reaction/reactionRate/thirdBodyArrheniusReactionRate/thirdBodyArrheniusReactionRateI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,6 +72,18 @@ inline Foam::thirdBodyArrheniusReactionRate::thirdBodyArrheniusReactionRate // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +inline void Foam::thirdBodyArrheniusReactionRate::preEvaluate() const +{ + ArrheniusReactionRate::preEvaluate(); +} + + +inline void Foam::thirdBodyArrheniusReactionRate::postEvaluate() const +{ + ArrheniusReactionRate::postEvaluate(); +} + + inline Foam::scalar Foam::thirdBodyArrheniusReactionRate::operator() ( const scalar p,