From 1e36c995883585856c5a181d4a0f74c91024e519 Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Fri, 20 Jan 2017 17:17:14 +0000
Subject: [PATCH] PaSR: Removed deprecated "turbulentReaction" switch

To run with laminar reaction rates choose the "laminar" combustion model rather
than setting "turbulentReaction no;" in the "PaSR" model.
---
 src/combustionModels/PaSR/PaSR.C              | 50 ++++++++-----------
 src/combustionModels/PaSR/PaSR.H              |  5 +-
 src/combustionModels/laminar/laminar.C        |  6 +--
 .../constant/chemistryProperties              |  2 -
 .../constant/combustionProperties             |  2 -
 .../cylinder/constant/combustionProperties    |  1 -
 .../hotBoxes/constant/combustionProperties    |  9 ++--
 .../constant/combustionProperties             |  9 ++--
 .../splashPanel/constant/combustionProperties |  9 ++--
 .../filter/constant/combustionProperties      |  9 ++--
 .../parcelInBox/constant/combustionProperties |  9 ++--
 .../constant/combustionProperties             |  9 ++--
 .../constant/combustionProperties             |  9 ++--
 .../constant/combustionProperties             | 10 ++--
 .../aachenBomb/constant/combustionProperties  |  1 -
 .../constant/combustionProperties.gas         | 11 ++--
 .../constant/combustionProperties.gas         |  5 +-
 .../constant/combustionProperties.gas         |  5 +-
 18 files changed, 56 insertions(+), 105 deletions(-)

diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C
index fa3b7feaede..6bb51755d3f 100644
--- a/src/combustionModels/PaSR/PaSR.C
+++ b/src/combustionModels/PaSR/PaSR.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2017 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -24,7 +24,6 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "PaSR.H"
-#include "fvmSup.H"
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
@@ -39,7 +38,6 @@ Foam::combustionModels::PaSR<Type>::PaSR
 :
     laminar<Type>(modelType, mesh, combustionProperties, phaseName),
     Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
-    turbulentReaction_(this->coeffs().lookup("turbulentReaction")),
     kappa_
     (
         IOobject
@@ -72,35 +70,28 @@ void Foam::combustionModels::PaSR<Type>::correct()
     {
         laminar<Type>::correct();
 
-        if (turbulentReaction_)
+        tmp<volScalarField> tepsilon(this->turbulence().epsilon());
+        const scalarField& epsilon = tepsilon();
+        tmp<volScalarField> tmuEff(this->turbulence().muEff());
+        const scalarField& muEff = tmuEff();
+        tmp<volScalarField> ttc(this->tc());
+        const scalarField& tc = ttc();
+        tmp<volScalarField> trho(this->rho());
+        const scalarField& rho = trho();
+
+        forAll(epsilon, i)
         {
-            tmp<volScalarField> tepsilon(this->turbulence().epsilon());
-            const volScalarField& epsilon = tepsilon();
-            tmp<volScalarField> tmuEff(this->turbulence().muEff());
-            const volScalarField& muEff = tmuEff();
-            tmp<volScalarField> ttc(this->tc());
-            const volScalarField& tc = ttc();
-            tmp<volScalarField> trho(this->rho());
-            const volScalarField& rho = trho();
-
-            forAll(epsilon, i)
+            const scalar tk =
+                Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0));
+
+            if (tk > SMALL)
             {
-                scalar tk =
-                    Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0));
-
-                if (tk > SMALL)
-                {
-                    kappa_[i] = tc[i]/(tc[i] + tk);
-                }
-                else
-                {
-                    kappa_[i] = 1.0;
-                }
+                kappa_[i] = tc[i]/(tc[i] + tk);
+            }
+            else
+            {
+                kappa_[i] = 1.0;
             }
-        }
-        else
-        {
-            kappa_ = 1.0;
         }
     }
 }
@@ -135,7 +126,6 @@ bool Foam::combustionModels::PaSR<Type>::read()
     if (laminar<Type>::read())
     {
         this->coeffs().lookup("Cmix") >> Cmix_;
-        this->coeffs().lookup("turbulentReaction") >> turbulentReaction_;
         return true;
     }
     else
diff --git a/src/combustionModels/PaSR/PaSR.H b/src/combustionModels/PaSR/PaSR.H
index 88e347134a6..067f788b97c 100644
--- a/src/combustionModels/PaSR/PaSR.H
+++ b/src/combustionModels/PaSR/PaSR.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2017 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -61,9 +61,6 @@ class PaSR
         //- Mixing constant
         scalar Cmix_;
 
-        //- Turbulent reaction switch
-        Switch turbulentReaction_;
-
         //- Mixing parameter
         volScalarField kappa_;
 
diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C
index 679a0867803..b33f302b18c 100644
--- a/src/combustionModels/laminar/laminar.C
+++ b/src/combustionModels/laminar/laminar.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2013-2016 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2013-2017 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -170,8 +170,8 @@ bool Foam::combustionModels::laminar<Type>::read()
 {
     if (Type::read())
     {
-        this->coeffs().lookup("integrateReactionRate")
-            >> integrateReactionRate_;
+        integrateReactionRate_ =
+            this->coeffs().lookupOrDefault("integrateReactionRate", true);
         return true;
     }
     else
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/constant/chemistryProperties b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/constant/chemistryProperties
index 62fbf8fb247..8fbc88a1b3e 100644
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/constant/chemistryProperties
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/constant/chemistryProperties
@@ -23,8 +23,6 @@ chemistryType
 
 chemistry       off;
 
-turbulentReaction off;
-
 initialChemicalTimeStep 1e-07;
 
 
diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/combustionProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/combustionProperties
index 1832dddf0ae..0499ba48e25 100644
--- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/combustionProperties
+++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/combustionProperties
@@ -19,11 +19,9 @@ combustionModel  PaSR<psiChemistryCombustion>;
 
 active  true;
 
-
 PaSRCoeffs
 {
     Cmix                1.0;
-    turbulentReaction   on;
 }
 
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/combustionProperties
index 4fe87a31322..466df195fe7 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/combustionProperties
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/combustionProperties
@@ -22,7 +22,6 @@ active  false;
 PaSRCoeffs
 {
     Cmix                1.0;
-    turbulentReaction   on;
 }
 
 
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/combustionProperties
index 87d04695b80..345ec862410 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/combustionProperties
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/combustionProperties
@@ -15,15 +15,12 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel  PaSR<psiChemistryCombustion>;
+combustionModel  laminar<psiChemistryCombustion>;
 
 active  false;
 
-PaSRCoeffs
-{
-    Cmix                1.0;
-    turbulentReaction   off;
-}
+laminarCoeffs
+{}
 
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/combustionProperties
index 87d04695b80..345ec862410 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/combustionProperties
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/combustionProperties
@@ -15,15 +15,12 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel  PaSR<psiChemistryCombustion>;
+combustionModel  laminar<psiChemistryCombustion>;
 
 active  false;
 
-PaSRCoeffs
-{
-    Cmix                1.0;
-    turbulentReaction   off;
-}
+laminarCoeffs
+{}
 
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/combustionProperties
index 87d04695b80..345ec862410 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/combustionProperties
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/combustionProperties
@@ -15,15 +15,12 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel  PaSR<psiChemistryCombustion>;
+combustionModel  laminar<psiChemistryCombustion>;
 
 active  false;
 
-PaSRCoeffs
-{
-    Cmix                1.0;
-    turbulentReaction   off;
-}
+laminarCoeffs
+{}
 
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFoam/filter/constant/combustionProperties
index 334391590cc..5d6309e9bbc 100644
--- a/tutorials/lagrangian/reactingParcelFoam/filter/constant/combustionProperties
+++ b/tutorials/lagrangian/reactingParcelFoam/filter/constant/combustionProperties
@@ -15,15 +15,12 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel  PaSR<rhoChemistryCombustion>;
+combustionModel  laminar<rhoChemistryCombustion>;
 
 active  false;
 
-PaSRCoeffs
-{
-    Cmix                1.0;
-    turbulentReaction   off;
-}
+laminarCoeffs
+{}
 
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFoam/parcelInBox/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFoam/parcelInBox/constant/combustionProperties
index 334391590cc..5d6309e9bbc 100644
--- a/tutorials/lagrangian/reactingParcelFoam/parcelInBox/constant/combustionProperties
+++ b/tutorials/lagrangian/reactingParcelFoam/parcelInBox/constant/combustionProperties
@@ -15,15 +15,12 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel  PaSR<rhoChemistryCombustion>;
+combustionModel  laminar<rhoChemistryCombustion>;
 
 active  false;
 
-PaSRCoeffs
-{
-    Cmix                1.0;
-    turbulentReaction   off;
-}
+laminarCoeffs
+{}
 
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/combustionProperties
index 334391590cc..5d6309e9bbc 100644
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/combustionProperties
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/combustionProperties
@@ -15,15 +15,12 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel  PaSR<rhoChemistryCombustion>;
+combustionModel  laminar<rhoChemistryCombustion>;
 
 active  false;
 
-PaSRCoeffs
-{
-    Cmix                1.0;
-    turbulentReaction   off;
-}
+laminarCoeffs
+{}
 
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/constant/combustionProperties
index 41d0c32b80d..5d6309e9bbc 100644
--- a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/constant/combustionProperties
+++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/constant/combustionProperties
@@ -15,15 +15,12 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel  PaSR<rhoChemistryCombustion>;
+combustionModel  laminar<rhoChemistryCombustion>;
 
 active  false;
 
-PaSRCoeffs
-{
-    Cmix                0.1;
-    turbulentReaction   off;
-}
+laminarCoeffs
+{}
 
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/combustionProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/combustionProperties
index 41d0c32b80d..d1d89671bf3 100644
--- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/combustionProperties
+++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/combustionProperties
@@ -15,15 +15,11 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel  PaSR<rhoChemistryCombustion>;
+combustionModel laminar<rhoChemistryCombustion>;
 
 active  false;
 
-PaSRCoeffs
-{
-    Cmix                0.1;
-    turbulentReaction   off;
-}
-
+laminarCoeffs
+{}
 
 // ************************************************************************* //
diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties
index f7b1cae9b7e..a1e8dc93d83 100644
--- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties
+++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties
@@ -22,7 +22,6 @@ active          yes;
 PaSRCoeffs
 {
     Cmix                1.0;
-    turbulentReaction   yes;
 }
 
 
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/combustionProperties.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/combustionProperties.gas
index 78cfe510443..debb0d9fada 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/combustionProperties.gas
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/combustionProperties.gas
@@ -15,22 +15,19 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel    PaSR<rhoChemistryCombustion>;
+combustionModel PaSR<rhoChemistryCombustion>;
 
-active  true;
+active true;
 
 laminarCoeffs
-{
-}
+{}
 
 noCombustionCoeffs
-{
-}
+{}
 
 PaSRCoeffs
 {
     Cmix                1.0;
-    turbulentReaction   yes;
 }
 
 // ************************************************************************* //
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/combustionProperties.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/combustionProperties.gas
index 51002472936..2a92e4a1747 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/combustionProperties.gas
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/combustionProperties.gas
@@ -15,9 +15,9 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel    PaSR<rhoChemistryCombustion>;
+combustionModel PaSR<rhoChemistryCombustion>;
 
-active  false;
+active false;
 
 laminarCoeffs
 {}
@@ -28,7 +28,6 @@ noCombustionCoeffs
 PaSRCoeffs
 {
     Cmix                1.0;
-    turbulentReaction   yes;
 }
 
 // ************************************************************************* //
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/constant/combustionProperties.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/constant/combustionProperties.gas
index 51002472936..2a92e4a1747 100644
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/constant/combustionProperties.gas
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/constant/combustionProperties.gas
@@ -15,9 +15,9 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-combustionModel    PaSR<rhoChemistryCombustion>;
+combustionModel PaSR<rhoChemistryCombustion>;
 
-active  false;
+active false;
 
 laminarCoeffs
 {}
@@ -28,7 +28,6 @@ noCombustionCoeffs
 PaSRCoeffs
 {
     Cmix                1.0;
-    turbulentReaction   yes;
 }
 
 // ************************************************************************* //
-- 
GitLab