From 269483f0bfb671235453bd01ddf1b2260ce5c802 Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Mon, 16 Nov 2015 10:25:42 +0000
Subject: [PATCH] src/combustionModels: Updated LES model lookup

---
 .../LES/SpalartAllmarasDES/SpalartAllmarasDES.H |  2 +-
 .../SpalartAllmarasIDDES/SpalartAllmarasIDDES.H |  2 +-
 src/combustionModels/FSD/FSD.C                  |  5 ++++-
 src/combustionModels/FSD/FSD.H                  |  2 +-
 .../relaxation/relaxation.C                     | 17 +++++++++++------
 5 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.H b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.H
index 4c512487a3f..b64ed0d593f 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.H
@@ -184,7 +184,7 @@ public:
 
     // Member Functions
 
-        //- Read LESProperties dictionary
+        //- Read model coefficients if they have changed
         virtual bool read();
 
         //- Return the effective diffusivity for nuTilda
diff --git a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H
index 2bfaf6089a1..e2f64aa6bbc 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H
+++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H
@@ -146,7 +146,7 @@ public:
 
     // Member Functions
 
-        //- Read LESProperties dictionary
+        //- Read model coefficients if they have changed
         virtual bool read();
 };
 
diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C
index 9d79904cd40..6d846b3d95e 100644
--- a/src/combustionModels/FSD/FSD.C
+++ b/src/combustionModels/FSD/FSD.C
@@ -189,7 +189,10 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
 
     // Calculation of the mixture fraction variance (ftVar)
     const compressible::LESModel& lesModel =
-        YO2.db().lookupObject<compressible::LESModel>("LESProperties");
+        YO2.db().lookupObject<compressible::LESModel>
+        (
+            turbulenceModel::propertiesName
+        );
 
     const volScalarField& delta = lesModel.delta();
     const volScalarField ftVar(Cv_*sqr(delta)*sqr(mgft));
diff --git a/src/combustionModels/FSD/FSD.H b/src/combustionModels/FSD/FSD.H
index 6e3609abdb9..10be2acdfa0 100644
--- a/src/combustionModels/FSD/FSD.H
+++ b/src/combustionModels/FSD/FSD.H
@@ -52,7 +52,7 @@ Description
     is large (>1e-04) then a beta pdf is used for filtering.
 
     At the moment the flame area combustion model is only fit to work in a LES
-    frame work. In RAS the subgrid fluctiuation has to be solved by an extra
+    frame work. In RAS the subgrid fluctuation has to be solved by an extra
     transport equation.
 
 SourceFiles
diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C
index 9352dd83961..f26b698b6fe 100644
--- a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C
+++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -75,7 +75,6 @@ void Foam::reactionRateFlameAreaModels::relaxation::correct
     const volScalarField& sigma
 )
 {
-
     dimensionedScalar omega0
     (
         "omega0",
@@ -97,13 +96,19 @@ void Foam::reactionRateFlameAreaModels::relaxation::correct
         1e-4
     );
 
-    const compressible::LESModel& lesModel =
-        omega_.db().lookupObject<compressible::LESModel>("LESProperties");
+    dimensionedScalar kMin
+    (
+        "kMin",
+        sqr(dimVelocity),
+        SMALL
+    );
+
+    const compressibleTurbulenceModel& turbulence = combModel_.turbulence();
 
-    // Total strain : resolved and sub-grid (just LES for now)
+    // Total strain
     const volScalarField sigmaTotal
     (
-        sigma + alpha_*lesModel.epsilon()/(lesModel.k() + lesModel.kMin())
+        sigma + alpha_*turbulence.epsilon()/(turbulence.k() + kMin)
     );
 
     const volScalarField omegaInf(correlation_.omega0Sigma(sigmaTotal));
-- 
GitLab