From 7cbcc02d099aa24b4a509a1aa35016d428a6484e Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Fri, 10 Jul 2009 21:47:58 +0200
Subject: [PATCH] turbulence models get thermal dissipation source term(s)

- thermalDissipation()
  corresponds to the energy lost due to viscous efffects and
  what exits the energy cascade via dissipation.

- thermalDissipationEff()
  corresponds to the energy lost due to effective viscous efffects.
  Everything that is lost from momentum. Thus essentially assumes
  turbulent equilibrium, but is what STAR-CD and Fluent seem to be using.
  Thus even if it's wrong, provide it anyhow.

- minor consistency update in comments
---
 .../compressible/LES/LESModel/LESModel.C      | 50 +++++++++++++++
 .../compressible/LES/LESModel/LESModel.H      | 22 +++++--
 .../compressible/RAS/RASModel/RASModel.C      | 49 ++++++++++++++
 .../compressible/RAS/RASModel/RASModel.H      |  9 +++
 .../compressible/RAS/laminar/laminar.C        | 44 +++++++++++++
 .../compressible/RAS/laminar/laminar.H        | 30 +++++----
 .../turbulenceModel/laminar/laminar.C         | 64 ++++++++++++++-----
 .../turbulenceModel/laminar/laminar.H         | 30 +++++++--
 .../turbulenceModel/turbulenceModel.C         |  6 --
 .../turbulenceModel/turbulenceModel.H         | 14 +++-
 .../incompressible/LES/LESModel/LESModel.C    | 55 ++++++++++++++--
 .../incompressible/LES/LESModel/LESModel.H    | 24 +++++--
 .../LES/dynOneEqEddy/dynOneEqEddy.C           |  6 --
 .../LES/dynOneEqEddy/dynOneEqEddy.H           |  3 +-
 .../LES/dynSmagorinsky/dynSmagorinsky.C       |  6 --
 .../LES/dynSmagorinsky/dynSmagorinsky.H       |  3 +-
 .../LES/locDynOneEqEddy/locDynOneEqEddy.C     |  6 --
 .../LES/locDynOneEqEddy/locDynOneEqEddy.H     |  3 +-
 .../LES/scaleSimilarity/scaleSimilarity.C     |  6 --
 .../LES/scaleSimilarity/scaleSimilarity.H     |  3 +-
 .../incompressible/RAS/RASModel/RASModel.C    | 51 +++++++++++++--
 .../incompressible/RAS/RASModel/RASModel.H    | 18 ++++--
 .../incompressible/RAS/laminar/laminar.C      | 50 +++++++++++++--
 .../incompressible/RAS/laminar/laminar.H      | 16 ++++-
 .../turbulenceModel/laminar/laminar.C         | 44 +++++++++++++
 .../turbulenceModel/laminar/laminar.H         | 11 +++-
 .../turbulenceModel/turbulenceModel.C         |  6 --
 .../turbulenceModel/turbulenceModel.H         | 12 +++-
 .../les/pitzDaily/constant/LESProperties      |  2 +
 .../les/pitzDaily3D/constant/LESProperties    |  2 +
 .../les/pitzDaily/constant/LESProperties      |  2 +
 31 files changed, 534 insertions(+), 113 deletions(-)

diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C
index 7301318b160..1bf5cc2b523 100644
--- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C
+++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C
@@ -76,6 +76,7 @@ LESModel::LESModel
         )
     ),
 
+    turbulence_(true),  // TODO: turbulence_(lookup("turbulence")),
     printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)),
     coeffDict_(subDictPtr(type + "Coeffs")),
 
@@ -180,6 +181,55 @@ autoPtr<LESModel> LESModel::New
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+tmp<volScalarField> LESModel::thermalDissipation() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipation",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            (
+                ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
+            ) + this->rho() * this->epsilon()
+        )
+    );
+}
+
+
+tmp<volScalarField> LESModel::thermalDissipationEff() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipationEff",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            (
+                this->muEff()*dev(twoSymm(tgradU()))
+              - ((2.0/3.0)*I) * this->rho() * this->k()
+            ) && tgradU()
+        )
+    );
+}
+
+
 void LESModel::correct(const tmp<volTensorField>&)
 {
     delta_().correct();
diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H
index ca87dd64ed8..7a87a71315f 100644
--- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H
+++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H
@@ -33,13 +33,13 @@ Class
     Foam::compressible::LESModel
 
 Description
-    Class for all compressible flow LES SGS models.
+    Base class for all compressible flow LES SGS models.
 
-    This class defines the basic interface for a compressible flow SGS model,
-    and encapsulates data of value to all possible models. In particular
-    this includes references to all the dependent fields (rho, U, phi),
-    the physical viscosity mu, and the LESProperties dictionary,
-    which contains the model selection and model coefficients.
+    This class defines the basic interface for a compressible flow SGS
+    model, and encapsulates data of value to all possible models.
+    In particular this includes references to all the dependent fields
+    (rho, U, phi), the physical viscosity mu, and the LESProperties
+    dictionary, which contains the model selection and model coefficients.
 
 SourceFiles
     LESModel.C
@@ -80,6 +80,7 @@ protected:
 
     // Protected data
 
+        Switch turbulence_;
         Switch printCoeffs_;
         dictionary coeffDict_;
 
@@ -292,6 +293,15 @@ public:
             }
 
 
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const;
+
         //- Correct Eddy-Viscosity and related properties.
         //  This calls correct(const tmp<volTensorField>& gradU) by supplying
         //  gradU calculated locally.
diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C
index 5d46b78788d..849f25f01af 100644
--- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C
+++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C
@@ -191,6 +191,55 @@ autoPtr<RASModel> RASModel::New
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+tmp<volScalarField> RASModel::thermalDissipation() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipation",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            (
+                ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
+            ) + this->rho() * this->epsilon()
+        )
+    );
+}
+
+
+tmp<volScalarField> RASModel::thermalDissipationEff() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipationEff",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            (
+                this->muEff()*dev(twoSymm(tgradU()))
+              - ((2.0/3.0)*I) * this->rho() * this->k()
+            ) && tgradU()
+        )
+    );
+}
+
+
 scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const
 {
     scalar ypl = 11.0;
diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H
index 7c787d8ceb6..22295848d44 100644
--- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H
+++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H
@@ -345,6 +345,15 @@ public:
         //- Return the source term for the momentum equation
         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0;
 
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const;
+
         //- Return yPlus for the given patch
         virtual tmp<scalarField> yPlus(const label patchI) const;
 
diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C
index 415dedee72b..2f55ecdee50 100644
--- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C
+++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C
@@ -177,6 +177,50 @@ tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
 }
 
 
+tmp<volScalarField> laminar::thermalDissipation() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipation",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
+        )
+    );
+}
+
+
+tmp<volScalarField> laminar::thermalDissipationEff() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipationEff",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
+        )
+    );
+}
+
+
 bool laminar::read()
 {
     return RASModel::read();
diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H
index cfd5e573527..1e26261da77 100644
--- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H
+++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.H
@@ -30,7 +30,6 @@ Description
 
 SourceFiles
     laminar.C
-    laminarCorrect.C
 
 \*---------------------------------------------------------------------------*/
 
@@ -82,42 +81,51 @@ public:
     // Member Functions
 
         //- Return the turbulence viscosity, i.e. 0 for laminar flow
-        tmp<volScalarField> mut() const;
+        virtual tmp<volScalarField> mut() const;
 
         //- Return the effective viscosity, i.e. the laminar viscosity
-        tmp<volScalarField> muEff() const
+        virtual tmp<volScalarField> muEff() const
         {
             return tmp<volScalarField>(new volScalarField("muEff", mu()));
         }
 
         //- Return the effective turbulent thermal diffusivity,
         //  i.e. the laminar thermal diffusivity
-        tmp<volScalarField> alphaEff() const
+        virtual tmp<volScalarField> alphaEff() const
         {
             return tmp<volScalarField>(new volScalarField("alphaEff", alpha()));
         }
 
         //- Return the turbulence kinetic energy, i.e. 0 for laminar flow
-        tmp<volScalarField> k() const;
+        virtual tmp<volScalarField> k() const;
 
         //- Return the turbulence kinetic energy dissipation rate,
         //  i.e. 0 for laminar flow
-        tmp<volScalarField> epsilon() const;
+        virtual tmp<volScalarField> epsilon() const;
 
         //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
-        tmp<volSymmTensorField> R() const;
+        virtual tmp<volSymmTensorField> R() const;
 
         //- Return the effective stress tensor, i.e. the laminar stress
-        tmp<volSymmTensorField> devRhoReff() const;
+        virtual tmp<volSymmTensorField> devRhoReff() const;
 
         //- Return the source term for the momentum equation
-        tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
+        virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
+
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const;
 
         //- Correct the laminar viscosity
-        void correct();
+        virtual void correct();
 
         //- Read RASProperties dictionary
-        bool read();
+        virtual bool read();
 };
 
 
diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C
index c4213fdd8a6..be8e2f1da64 100644
--- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C
+++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C
@@ -52,10 +52,10 @@ laminar::laminar
     const volScalarField& rho,
     const volVectorField& U,
     const surfaceScalarField& phi,
-    const basicThermo& thermoPhysicalModel
+    const basicThermo& thermophysicalModel
 )
 :
-    turbulenceModel(rho, U, phi, thermoPhysicalModel)
+    turbulenceModel(rho, U, phi, thermophysicalModel)
 {}
 
 
@@ -66,10 +66,10 @@ autoPtr<laminar> laminar::New
     const volScalarField& rho,
     const volVectorField& U,
     const surfaceScalarField& phi,
-    const basicThermo& thermoPhysicalModel
+    const basicThermo& thermophysicalModel
 )
 {
-    return autoPtr<laminar>(new laminar(rho, U, phi, thermoPhysicalModel));
+    return autoPtr<laminar>(new laminar(rho, U, phi, thermophysicalModel));
 }
 
 
@@ -96,18 +96,6 @@ tmp<volScalarField> laminar::mut() const
 }
 
 
-tmp<volScalarField> laminar::muEff() const
-{
-    return tmp<volScalarField>(new volScalarField("muEff", mu()));
-}
-
-
-tmp<volScalarField> laminar::alphaEff() const
-{
-    return tmp<volScalarField>(new volScalarField("alphaEff", alpha()));
-}
-
-
 tmp<volScalarField> laminar::k() const
 {
     return tmp<volScalarField>
@@ -207,6 +195,50 @@ tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
 }
 
 
+tmp<volScalarField> laminar::thermalDissipation() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipation",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
+        )
+    );
+}
+
+
+tmp<volScalarField> laminar::thermalDissipationEff() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipationEff",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
+        )
+    );
+}
+
+
 bool laminar::read()
 {
     return true;
diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H
index 7931e45bee4..3b9b4d8fbd8 100644
--- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H
+++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H
@@ -67,7 +67,7 @@ public:
             const volScalarField& rho,
             const volVectorField& U,
             const surfaceScalarField& phi,
-            const basicThermo& thermoPhysicalModel
+            const basicThermo& thermophysicalModel
         );
 
 
@@ -79,7 +79,7 @@ public:
             const volScalarField& rho,
             const volVectorField& U,
             const surfaceScalarField& phi,
-            const basicThermo& thermoPhysicalModel
+            const basicThermo& thermophysicalModel
         );
 
 
@@ -94,10 +94,17 @@ public:
         virtual tmp<volScalarField> mut() const;
 
         //- Return the effective viscosity, i.e. the laminar viscosity
-        virtual tmp<volScalarField> muEff() const;
-
-        //- Return the effective turbulent thermal diffusivity
-        virtual tmp<volScalarField> alphaEff() const;
+        virtual tmp<volScalarField> muEff() const
+        {
+            return tmp<volScalarField>(new volScalarField("muEff", mu()));
+        }
+
+        //- Return the effective turbulent thermal diffusivity,
+        //  i.e. the laminar thermal diffusivity
+        virtual tmp<volScalarField> alphaEff() const
+        {
+            return tmp<volScalarField>(new volScalarField("alphaEff", alpha()));
+        }
 
         //- Return the turbulence kinetic energy, i.e. 0 for laminar flow
         virtual tmp<volScalarField> k() const;
@@ -109,12 +116,21 @@ public:
         //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
         virtual tmp<volSymmTensorField> R() const;
 
-        //- Return the effective stress tensor including the laminar stress
+        //- Return the effective stress tensor, i.e. the laminar stress
         virtual tmp<volSymmTensorField> devRhoReff() const;
 
         //- Return the source term for the momentum equation
         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
 
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const;
+
         //- Correct the laminar viscosity
         virtual void correct();
 
diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C
index 18f61ea2864..15cce81cc14 100644
--- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C
+++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C
@@ -117,12 +117,6 @@ autoPtr<turbulenceModel> turbulenceModel::New
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-turbulenceModel::~turbulenceModel()
-{}
-
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void turbulenceModel::correct()
diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H
index a3cce25b515..3e4ff24e43c 100644
--- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H
+++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H
@@ -65,7 +65,7 @@ namespace compressible
 {
 
 /*---------------------------------------------------------------------------*\
-                           Class turbulenceModel Declaration
+                       Class turbulenceModel Declaration
 \*---------------------------------------------------------------------------*/
 
 class turbulenceModel
@@ -144,7 +144,8 @@ public:
 
 
     //- Destructor
-    virtual ~turbulenceModel();
+    virtual ~turbulenceModel()
+    {}
 
 
     // Member Functions
@@ -209,6 +210,15 @@ public:
         //- Return the source term for the momentum equation
         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0;
 
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const = 0;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const = 0;
+
         //- Solve the turbulence equations and correct the turbulence viscosity
         virtual void correct() = 0;
 
diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C
index 3ee9619340d..62f18f39816 100644
--- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C
+++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C
@@ -125,8 +125,8 @@ autoPtr<LESModel> LESModel::New
     {
         FatalErrorIn
         (
-            "LESModel::select(const volVectorField&, const "
-            "surfaceScalarField&, transportModel&)"
+            "LESModel::New(const volVectorField& U, const "
+            "surfaceScalarField& phi, transportModel&)"
         )   << "Unknown LESModel type " << modelName
             << endl << endl
             << "Valid LESModel types are :" << endl
@@ -138,13 +138,56 @@ autoPtr<LESModel> LESModel::New
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+tmp<volScalarField> LESModel::thermalDissipation() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
 
-LESModel::~LESModel()
-{}
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipation",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            (
+                ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
+            ) + this->epsilon()
+        )
+    );
+}
 
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+tmp<volScalarField> LESModel::thermalDissipationEff() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipationEff",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            (
+                this->nuEff()*dev(twoSymm(tgradU()))
+              - ((2.0/3.0)*I) * this->k()
+            ) && tgradU()
+        )
+    );
+}
+
 
 void LESModel::correct(const tmp<volTensorField>&)
 {
diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H
index 766cc63fc05..5c0c615eb6a 100644
--- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H
+++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H
@@ -35,10 +35,10 @@ Description
     Base class for all incompressible flow LES SGS models.
 
     This class defines the basic interface for an incompressible flow SGS
-    model, and encapsulates data of value to all possible models. In
-    particular this includes references to all the dependent fields (U,
-    phi), the physical viscosity nu, and the LESProperties
-    dictionary which contains the model selection and model coefficients.
+    model, and encapsulates data of value to all possible models.
+    In particular this includes references to all the dependent fields
+    (U, phi), the physical viscosity nu, and the LESProperties
+    dictionary, which contains the model selection and model coefficients.
 
 SourceFiles
     LESModel.C
@@ -152,7 +152,8 @@ public:
 
 
     //- Destructor
-    virtual ~LESModel();
+    virtual ~LESModel()
+    {}
 
 
     // Member Functions
@@ -241,14 +242,23 @@ public:
             }
 
 
-        //- Correct Eddy-Viscosity and related properties
-        virtual void correct(const tmp<volTensorField>& gradU);
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const;
 
         //- Correct Eddy-Viscosity and related properties.
         //  This calls correct(const tmp<volTensorField>& gradU) by supplying
         //  gradU calculated locally.
         void correct();
 
+        //- Correct Eddy-Viscosity and related properties
+        virtual void correct(const tmp<volTensorField>& gradU);
+
         //- Read LESProperties dictionary
         virtual bool read() = 0;
 };
diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C
index 4342712d806..4aadf02bf2e 100644
--- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C
+++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C
@@ -133,12 +133,6 @@ dynOneEqEddy::dynOneEqEddy
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-dynOneEqEddy::~dynOneEqEddy()
-{}
-
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void dynOneEqEddy::correct(const tmp<volTensorField>& gradU)
diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H
index 15f0ac56d10..9b1a4064d6d 100644
--- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H
+++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H
@@ -116,7 +116,8 @@ public:
 
 
     //- Destructor
-    virtual ~dynOneEqEddy();
+    virtual ~dynOneEqEddy()
+    {}
 
 
     // Member Functions
diff --git a/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C
index e260a6d16d8..fedd18ee7d1 100644
--- a/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C
+++ b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C
@@ -124,12 +124,6 @@ dynSmagorinsky::dynSmagorinsky
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-dynSmagorinsky::~dynSmagorinsky()
-{}
-
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void dynSmagorinsky::correct(const tmp<volTensorField>& gradU)
diff --git a/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H
index 93e85a808b1..b0bd7868f08 100644
--- a/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H
+++ b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H
@@ -125,7 +125,8 @@ public:
 
 
     //- Destructor
-    virtual ~dynSmagorinsky();
+    virtual ~dynSmagorinsky()
+    {}
 
 
     // Member Functions
diff --git a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C
index 7d34bbb981f..f463e3f2082 100644
--- a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C
+++ b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C
@@ -126,12 +126,6 @@ locDynOneEqEddy::locDynOneEqEddy
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-locDynOneEqEddy::~locDynOneEqEddy()
-{}
-
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void locDynOneEqEddy::correct(const tmp<volTensorField>& gradU)
diff --git a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H
index 1ff8fc07dd9..ef6a9edcfff 100644
--- a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H
+++ b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H
@@ -138,7 +138,8 @@ public:
 
 
     //- Destructor
-    virtual ~locDynOneEqEddy();
+    virtual ~locDynOneEqEddy()
+    {}
 
 
     // Member Functions
diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C
index 0499ffca687..226054bf142 100644
--- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C
+++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C
@@ -56,12 +56,6 @@ scaleSimilarity::scaleSimilarity
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-scaleSimilarity::~scaleSimilarity()
-{}
-
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 tmp<volScalarField> scaleSimilarity::k() const
diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H
index 3f4f55535f2..69d06a892c2 100644
--- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H
+++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H
@@ -90,7 +90,8 @@ public:
 
 
     //- Destructor
-    virtual ~scaleSimilarity();
+    virtual ~scaleSimilarity()
+    {}
 
 
     // Member Functions
diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C
index 272d0f60feb..4cc9fd07b95 100644
--- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C
+++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C
@@ -174,13 +174,56 @@ autoPtr<RASModel> RASModel::New
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-RASModel::~RASModel()
-{}
+tmp<volScalarField> RASModel::thermalDissipation() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
 
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipation",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            (
+                ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
+            ) + this->epsilon()
+        )
+    );
+}
+
+
+tmp<volScalarField> RASModel::thermalDissipationEff() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipationEff",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            (
+                this->nuEff()*dev(twoSymm(tgradU()))
+              - ((2.0/3.0)*I) * this->k()
+            ) && tgradU()
+        )
+    );
+}
 
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const
 {
diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H
index c934488bb38..3a2f0aa7e90 100644
--- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H
+++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H
@@ -182,7 +182,8 @@ public:
 
 
     //- Destructor
-    virtual ~RASModel();
+    virtual ~RASModel()
+    {}
 
 
     // Member Functions
@@ -310,9 +311,6 @@ public:
             );
         }
 
-        //- Return yPlus for the given patch
-        virtual tmp<scalarField> yPlus(const label patchI) const;
-
         //- Return the turbulence kinetic energy
         virtual tmp<volScalarField> k() const = 0;
 
@@ -328,6 +326,18 @@ public:
         //- Return the source term for the momentum equation
         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0;
 
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const;
+
+        //- Return yPlus for the given patch
+        virtual tmp<scalarField> yPlus(const label patchI) const;
+
         //- Solve the turbulence equations and correct the turbulence viscosity
         virtual void correct() = 0;
 
diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C
index a88b319268c..83e89135258 100644
--- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C
+++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C
@@ -77,12 +77,6 @@ tmp<volScalarField> laminar::nut() const
 }
 
 
-tmp<volScalarField> laminar::nuEff() const
-{
-    return tmp<volScalarField>(new volScalarField("nuEff", nu()));
-}
-
-
 tmp<volScalarField> laminar::k() const
 {
     return tmp<volScalarField>
@@ -182,6 +176,50 @@ tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
 }
 
 
+tmp<volScalarField> laminar::thermalDissipation() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipation",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
+        )
+    );
+}
+
+
+tmp<volScalarField> laminar::thermalDissipationEff() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipationEff",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
+        )
+    );
+}
+
+
 bool laminar::read()
 {
     return RASModel::read();
diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H
index b139f0fad3f..1617d60064a 100644
--- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H
+++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H
@@ -83,7 +83,10 @@ public:
         virtual tmp<volScalarField> nut() const;
 
         //- Return the effective viscosity, i.e. the laminar viscosity
-        virtual tmp<volScalarField> nuEff() const;
+        virtual tmp<volScalarField> nuEff() const
+        {
+            return tmp<volScalarField>(new volScalarField("nuEff", nu()));
+        }
 
         //- Return the turbulence kinetic energy, i.e. 0 for laminar flow
         virtual tmp<volScalarField> k() const;
@@ -95,12 +98,21 @@ public:
         //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
         virtual tmp<volSymmTensorField> R() const;
 
-        //- Return the effective stress tensor including the laminar stress
+        //- Return the effective stress tensor, i.e. the laminar stress
         virtual tmp<volSymmTensorField> devReff() const;
 
         //- Return the source term for the momentum equation
         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
 
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const;
+
         //- Correct the laminar viscosity
         virtual void correct();
 
diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C
index f1dca5b4add..e3a9c30fd77 100644
--- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C
+++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C
@@ -199,6 +199,50 @@ tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
 }
 
 
+tmp<volScalarField> laminar::thermalDissipation() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipation",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
+        )
+    );
+}
+
+
+tmp<volScalarField> laminar::thermalDissipationEff() const
+{
+    tmp<volTensorField> tgradU = fvc::grad(this->U());
+
+    return tmp<volScalarField>
+    (
+        new volScalarField
+        (
+            IOobject
+            (
+                "thermalDissipationEff",
+                runTime_.timeName(),
+                mesh_,
+                IOobject::NO_READ,
+                IOobject::NO_WRITE
+            ),
+            ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
+        )
+    );
+}
+
+
 bool laminar::read()
 {
     return true;
diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H
index a64884da91c..aa83346820f 100644
--- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H
+++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H
@@ -104,12 +104,21 @@ public:
         //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
         virtual tmp<volSymmTensorField> R() const;
 
-        //- Return the effective stress tensor including the laminar stress
+        //- Return the effective stress tensor, i.e. the laminar stress
         virtual tmp<volSymmTensorField> devReff() const;
 
         //- Return the source term for the momentum equation
         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
 
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const;
+
         //- Correct the laminar viscosity
         virtual void correct();
 
diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C
index da4c39dcaa5..cdbb61fa706 100644
--- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C
+++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C
@@ -110,12 +110,6 @@ autoPtr<turbulenceModel> turbulenceModel::New
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-turbulenceModel::~turbulenceModel()
-{}
-
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void turbulenceModel::correct()
diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H
index 4399e851201..a9d1465e772 100644
--- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H
+++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H
@@ -139,7 +139,8 @@ public:
 
 
     //- Destructor
-    virtual ~turbulenceModel();
+    virtual ~turbulenceModel()
+    {}
 
 
     // Member Functions
@@ -189,6 +190,15 @@ public:
         //- Return the source term for the momentum equation
         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0;
 
+        //- The source for the enthalpy equation resulting from
+        //  viscous and turbulent dissipation
+        virtual tmp<volScalarField> thermalDissipation() const = 0;
+
+        //- The source for the enthalpy equation resulting from
+        //  the effective viscous dissipation
+        //  (ie, when turbulent production and dissipation are in equilibrium)
+        virtual tmp<volScalarField> thermalDissipationEff() const = 0;
+
         //- Solve the turbulence equations and correct the turbulence viscosity
         virtual void correct() = 0;
 
diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties b/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties
index 56c915c9248..5e1ce2213ae 100644
--- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties
+++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties
@@ -19,6 +19,8 @@ LESModel        oneEqEddy;
 
 delta           cubeRootVol;
 
+turbulence      on;
+
 printCoeffs     on;
 
 laminarCoeffs
diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties
index 95bb1c14f8c..a051384982e 100644
--- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties
+++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties
@@ -19,6 +19,8 @@ LESModel        oneEqEddy;
 
 delta           cubeRootVol;
 
+turbulence      on;
+
 printCoeffs     on;
 
 laminarCoeffs
diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties b/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties
index 25be4174a3f..251fe1ae80b 100644
--- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties
+++ b/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties
@@ -17,6 +17,8 @@ FoamFile
 
 LESModel        oneEqEddy;
 
+turbulence      on;
+
 printCoeffs     on;
 
 delta           cubeRootVol;
-- 
GitLab