From 5d55a1f60f8b073614dea67c51eecd40e79472ee Mon Sep 17 00:00:00 2001
From: william <william>
Date: Mon, 6 Jan 2014 14:16:41 +0000
Subject: [PATCH] ENH: Added noLift model for twoPhaseEulerFoam

---
 .../interfacialModels/Make/files              |  1 +
 .../constantCoefficient/constantCoefficient.C |  3 +-
 .../constantCoefficient/constantCoefficient.H |  3 +
 .../liftModels/liftModel/liftModel.H          |  4 +
 .../liftModels/liftModel/newLiftModel.C       |  2 +-
 .../liftModels/noLift/noLift.C                | 97 ++++++++++++++++++
 .../liftModels/noLift/noLift.H                | 98 +++++++++++++++++++
 .../LES/bubbleColumn/constant/phaseProperties | 12 +--
 .../RAS/bubbleColumn/constant/phaseProperties | 12 +--
 .../RAS/fluidisedBed/constant/phaseProperties | 12 +--
 .../bubbleColumn/constant/phaseProperties     | 12 +--
 .../bubbleColumnIATE/constant/phaseProperties | 12 +--
 .../fluidisedBed/constant/phaseProperties     | 12 +--
 .../mixerVessel2D/constant/phaseProperties    | 12 +--
 14 files changed, 220 insertions(+), 72 deletions(-)
 create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C
 create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.H

diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files
index e754fa07b8b..a8f1b61119b 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files
@@ -14,6 +14,7 @@ heatTransferModels/RanzMarshall/RanzMarshall.C
 
 liftModels/liftModel/liftModel.C
 liftModels/liftModel/newLiftModel.C
+liftModels/noLift/noLift.C
 liftModels/constantCoefficient/constantCoefficient.C
 
 LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantCoefficient/constantCoefficient.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantCoefficient/constantCoefficient.C
index 069a9838849..110f92e7d44 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantCoefficient/constantCoefficient.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantCoefficient/constantCoefficient.C
@@ -56,7 +56,8 @@ Foam::liftModels::constantCoefficient::constantCoefficient
 )
 :
     liftModel(dict, alpha1, phase1, phase2),
-    Cl_("Cl", dimless, dict.lookup("Cl"))
+    coeffDict_(dict.subDict(typeName + "Coeffs")),
+    Cl_("Cl", dimless, coeffDict_.lookup("Cl"))
 {}
 
 
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantCoefficient/constantCoefficient.H b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantCoefficient/constantCoefficient.H
index 054dc858bea..8eb5cdeeac7 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantCoefficient/constantCoefficient.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantCoefficient/constantCoefficient.H
@@ -53,6 +53,9 @@ class constantCoefficient
 {
     // Private data
 
+        //- Coefficient dictionary
+        const dictionary& coeffDict_;
+
         //- Constant lift coefficient
         dimensionedScalar Cl_;
 
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/liftModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/liftModel.H
index ef16d166058..3c22be1f00a 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/liftModel.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/liftModel.H
@@ -85,6 +85,10 @@ public:
 
     // Constructors
 
+        //- Construct null
+        liftModel();
+
+        //- Construct from components
         liftModel
         (
             const dictionary& dict,
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C
index 21aad9034ef..96b0e2f0647 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C
@@ -61,7 +61,7 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
     return
         cstrIter()
         (
-            dict.subDict(phase1.name()).subDict(liftModelType + "Coeffs"),
+            dict.subDict(phase1.name()),
             alpha1,
             phase1,
             phase2
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C
new file mode 100644
index 00000000000..98d07249559
--- /dev/null
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C
@@ -0,0 +1,97 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+     \\/     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 3 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, see <http://www.gnu.org/licenses/>.
+
+\*---------------------------------------------------------------------------*/
+
+#include "noLift.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace liftModels
+{
+    defineTypeNameAndDebug(noLift, 0);
+
+    addToRunTimeSelectionTable
+    (
+        liftModel,
+        noLift,
+        dictionary
+    );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
+
+Foam::liftModels::noLift::noLift
+(
+    const dictionary& dict,
+    const volScalarField& alpha1,
+    const phaseModel& phase1,
+    const phaseModel& phase2
+)
+:
+    liftModel(dict, alpha1, phase1, phase2)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
+
+Foam::liftModels::noLift::~noLift()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
+Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F
+(
+    const volVectorField& U
+) const
+{
+    return
+        tmp<volVectorField>
+        (
+            new volVectorField
+            (
+                IOobject
+                (
+                    "zero",
+                    U.time().timeName(),
+                    U.mesh()
+                ),
+                U.mesh(),
+                dimensionedVector
+                (
+                    "zero",
+                    dimensionSet(1, -2, -2, 0, 0, 0, 0),
+                    vector::zero
+                )
+            )
+        );
+}
+
+
+// ************************************************************************* //
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.H b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.H
new file mode 100644
index 00000000000..68af5802a44
--- /dev/null
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.H
@@ -0,0 +1,98 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | Copyright (C) 2014 OpenFOAM Foundation
+     \\/     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 3 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, see <http://www.gnu.org/licenses/>.
+
+Class
+    Foam::liftModels::noLift
+
+Description
+
+SourceFiles
+    noLift.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef noLift_H
+#define noLift_H
+
+#include "liftModel.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace liftModels
+{
+
+/*---------------------------------------------------------------------------*\
+                           Class noLift Declaration
+\*---------------------------------------------------------------------------*/
+
+class noLift
+:
+    public liftModel
+{
+    // Private data
+
+        //- Constant lift coefficient
+        dimensionedScalar Cl_;
+
+
+public:
+
+    //- Runtime type information
+    TypeName("none");
+
+
+    // Constructors
+
+        //- Construct from components
+        noLift
+        (
+            const dictionary& dict,
+            const volScalarField& alpha1,
+            const phaseModel& phase1,
+            const phaseModel& phase2
+        );
+
+
+    //- Destructor
+    virtual ~noLift();
+
+
+    // Member Functions
+
+        //- Lift force
+        tmp<volVectorField> F(const volVectorField& U) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace liftModels
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties
index 47cc4896887..443b39213e5 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties
+++ b/tutorials/multiphase/twoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties
@@ -55,19 +55,11 @@ lift
 {
     air
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
     water
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
 }
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties
index 47cc4896887..443b39213e5 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties
+++ b/tutorials/multiphase/twoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties
@@ -55,19 +55,11 @@ lift
 {
     air
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
     water
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
 }
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties
index b44f6c59349..c04f267f53a 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties
+++ b/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties
@@ -54,19 +54,11 @@ lift
 {
     particles
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
     air
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
 }
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties
index 99146f4bc03..0da3a3d89bf 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties
@@ -55,19 +55,11 @@ lift
 {
     air
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
     water
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
 }
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties
index d91a9d1da71..d87591c22cc 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties
@@ -75,19 +75,11 @@ lift
 {
     air
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
     water
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
 }
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties
index 91671832abd..15f85c3e98f 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties
@@ -54,19 +54,11 @@ lift
 {
     particles
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
     air
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
 }
 
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties
index 427e6ef28f8..8ec38de9ea6 100644
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties
@@ -55,19 +55,11 @@ lift
 {
     air
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
     water
     {
-        type constantCoefficient;
-        constantCoefficientCoeffs
-        {
-            Cl          0;
-        }
+        type            none;
     }
 }
 
-- 
GitLab