From c6e6cddeb5083e177fb422903bb8413a47374f2c Mon Sep 17 00:00:00 2001
From: andy <andy>
Date: Thu, 17 Mar 2011 16:30:18 +0000
Subject: [PATCH] ENH: Added and updated Sergio's infiniteReactionRate

---
 .../infiniteReactionRate.H                    | 110 ++++++++++++++++++
 .../infiniteReactionRateI.H                   |  70 +++++++++++
 .../reaction/reactions/makeChemkinReactions.C |  17 ++-
 .../reactions/makeReactionThermoReactions.C   |  17 ++-
 4 files changed, 202 insertions(+), 12 deletions(-)
 create mode 100644 src/thermophysicalModels/specie/reaction/reactionRate/infiniteReactionRate/infiniteReactionRate.H
 create mode 100644 src/thermophysicalModels/specie/reaction/reactionRate/infiniteReactionRate/infiniteReactionRateI.H

diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/infiniteReactionRate/infiniteReactionRate.H b/src/thermophysicalModels/specie/reaction/reactionRate/infiniteReactionRate/infiniteReactionRate.H
new file mode 100644
index 00000000000..c31e750de22
--- /dev/null
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/infiniteReactionRate/infiniteReactionRate.H
@@ -0,0 +1,110 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2009-2011 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+Class
+    Foam::infiniteReactionRate
+
+Description
+    infinite reaction rate.
+
+SourceFiles
+    infiniteReactionRateI.H
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef infiniteReactionRate_H
+#define infiniteReactionRate_H
+
+#include "scalarField.H"
+#include "typeInfo.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                    Class infiniteReactionRate Declaration
+\*---------------------------------------------------------------------------*/
+
+class infiniteReactionRate
+{
+public:
+
+    // Constructors
+
+        //- Null constructor
+        inline infiniteReactionRate
+        ();
+
+        //- Construct from Istream
+        inline infiniteReactionRate
+        (
+            const speciesTable& species,
+            const dictionary& dict
+        );
+
+
+    // Member Functions
+
+        //- Return the type name
+        static word type()
+        {
+            return "infinite";
+        }
+
+        inline scalar operator()
+        (
+            const scalar T,
+            const scalar p,
+            const scalarField& c
+        ) const;
+
+        //- Write to stream
+        inline void write(Ostream& os) const;
+
+
+    // Ostream Operator
+
+        inline friend Ostream& operator<<
+        (
+            Ostream&,
+            const infiniteReactionRate&
+        );
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "infiniteReactionRateI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/specie/reaction/reactionRate/infiniteReactionRate/infiniteReactionRateI.H b/src/thermophysicalModels/specie/reaction/reactionRate/infiniteReactionRate/infiniteReactionRateI.H
new file mode 100644
index 00000000000..bfb09b32bf4
--- /dev/null
+++ b/src/thermophysicalModels/specie/reaction/reactionRate/infiniteReactionRate/infiniteReactionRateI.H
@@ -0,0 +1,70 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2009-2011 OpenCFD Ltd.
+     \\/     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 2 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, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+inline Foam::infiniteReactionRate::infiniteReactionRate()
+{}
+
+
+inline Foam::infiniteReactionRate::infiniteReactionRate
+(
+    const speciesTable&,
+    const dictionary&
+)
+{}
+
+
+inline void Foam::infiniteReactionRate::write(Ostream& os) const
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+inline Foam::scalar Foam::infiniteReactionRate::operator()
+(
+    const scalar,
+    const scalar,
+    const scalarField&
+) const
+{
+    return (1);
+}
+
+
+inline Foam::Ostream& Foam::operator<<
+(
+    Ostream& os,
+    const infiniteReactionRate& rr
+)
+{
+    os  << token::BEGIN_LIST
+        << token::END_LIST;
+    return os;
+}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C
index f8cac0a2719..450eaf23710 100644
--- a/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C
+++ b/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,16 +27,19 @@ License
 #include "makeReactionThermo.H"
 
 #include "ArrheniusReactionRate.H"
+#include "infiniteReactionRate.H"
+#include "LandauTellerReactionRate.H"
 #include "thirdBodyArrheniusReactionRate.H"
-#include "FallOffReactionRate.H"
+
 #include "ChemicallyActivatedReactionRate.H"
-#include "LindemannFallOffFunction.H"
-#include "TroeFallOffFunction.H"
-#include "SRIFallOffFunction.H"
-#include "LandauTellerReactionRate.H"
 #include "JanevReactionRate.H"
 #include "powerSeriesReactionRate.H"
 
+#include "FallOffReactionRate.H"
+#include "LindemannFallOffFunction.H"
+#include "SRIFallOffFunction.H"
+#include "TroeFallOffFunction.H"
+
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -53,8 +56,10 @@ defineTemplateRunTimeSelectionTable(gasReaction, dictionary);
 // * * * * * * * * * * * * * Make CHEMKIN reactions  * * * * * * * * * * * * //
 
 makeIRNReactions(gasThermoPhysics, ArrheniusReactionRate)
+makeIRNReactions(gasThermoPhysics, infiniteReactionRate)
 makeIRNReactions(gasThermoPhysics, LandauTellerReactionRate)
 makeIRNReactions(gasThermoPhysics, thirdBodyArrheniusReactionRate)
+
 makeIRReactions(gasThermoPhysics, JanevReactionRate)
 makeIRReactions(gasThermoPhysics, powerSeriesReactionRate)
 
diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C
index d6f0e84dcdb..9006dc2b15e 100644
--- a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C
+++ b/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -27,16 +27,19 @@ License
 #include "makeReactionThermo.H"
 
 #include "ArrheniusReactionRate.H"
+#include "infiniteReactionRate.H"
+#include "LandauTellerReactionRate.H"
 #include "thirdBodyArrheniusReactionRate.H"
-#include "FallOffReactionRate.H"
+
 #include "ChemicallyActivatedReactionRate.H"
-#include "LindemannFallOffFunction.H"
-#include "TroeFallOffFunction.H"
-#include "SRIFallOffFunction.H"
-#include "LandauTellerReactionRate.H"
 #include "JanevReactionRate.H"
 #include "powerSeriesReactionRate.H"
 
+#include "FallOffReactionRate.H"
+#include "LindemannFallOffFunction.H"
+#include "SRIFallOffFunction.H"
+#include "TroeFallOffFunction.H"
+
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
@@ -53,8 +56,10 @@ defineTemplateRunTimeSelectionTable(icoPoly8Reaction, dictionary);
 // * * * * * * * * * * * * * Make CHEMKIN reactions  * * * * * * * * * * * * //
 
 makeIRNReactions(icoPoly8ThermoPhysics, ArrheniusReactionRate)
+makeIRNReactions(icoPoly8ThermoPhysics, infiniteReactionRate)
 makeIRNReactions(icoPoly8ThermoPhysics, LandauTellerReactionRate)
 makeIRNReactions(icoPoly8ThermoPhysics, thirdBodyArrheniusReactionRate)
+
 makeIRReactions(icoPoly8ThermoPhysics, JanevReactionRate)
 makeIRReactions(icoPoly8ThermoPhysics, powerSeriesReactionRate)
 
-- 
GitLab