From 249975bb75cc365f9b864cb2ca21273399c63955 Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Fri, 20 Jul 2012 16:56:14 +0100
Subject: [PATCH] rhoCentralFoam/biconic25-55Run35: Reduced the Courant number
 to improve boundedness and stability

---
 tutorials/multiphase/interFoam/ras/Allclean   |   2 +-
 tutorials/multiphase/interFoam/ras/Allrun     |   3 +
 .../multiphase/interFoam/ras/waterChannel/0/U |  51 +++++++++
 .../interFoam/ras/waterChannel/0/alpha1.org   |  48 ++++++++
 .../multiphase/interFoam/ras/waterChannel/0/k |  44 ++++++++
 .../interFoam/ras/waterChannel/0/nut          |  38 +++++++
 .../interFoam/ras/waterChannel/0/omega        |  43 +++++++
 .../interFoam/ras/waterChannel/0/p_rgh        |  42 +++++++
 .../interFoam/ras/waterChannel/Allclean       |  10 ++
 .../interFoam/ras/waterChannel/Allrun         |  25 +++++
 .../LTSInterFoam/system/controlDict           |  86 ++++++++++++++
 .../LTSInterFoam/system/fvSchemes             |  61 ++++++++++
 .../LTSInterFoam/system/fvSolution            | 106 ++++++++++++++++++
 .../LTSInterFoam/system/setFieldsDict         |  45 ++++++++
 .../interFoam/ras/waterChannel/README         |   6 +
 .../ras/waterChannel/constant/RASProperties   |  25 +++++
 .../interFoam/ras/waterChannel/constant/g     |  21 ++++
 .../constant/polyMesh/blockMeshDict           | 101 +++++++++++++++++
 .../waterChannel/constant/polyMesh/boundary   |  46 ++++++++
 .../waterChannel/constant/transportProperties |  35 ++++++
 .../constant/turbulenceProperties             |  21 ++++
 .../ras/waterChannel/system/controlDict       |  86 ++++++++++++++
 .../ras/waterChannel/system/extrudeMeshDict   |  37 ++++++
 .../ras/waterChannel/system/extrudeMeshDict.1 |  37 ++++++
 .../ras/waterChannel/system/extrudeMeshDict.2 |  37 ++++++
 .../ras/waterChannel/system/fvSchemes         |  62 ++++++++++
 .../ras/waterChannel/system/fvSolution        |  88 +++++++++++++++
 .../ras/waterChannel/system/setFieldsDict     |  36 ++++++
 28 files changed, 1241 insertions(+), 1 deletion(-)
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/0/U
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/0/alpha1.org
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/0/k
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/0/nut
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/0/omega
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/0/p_rgh
 create mode 100755 tutorials/multiphase/interFoam/ras/waterChannel/Allclean
 create mode 100755 tutorials/multiphase/interFoam/ras/waterChannel/Allrun
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/controlDict
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSolution
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/setFieldsDict
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/README
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/constant/RASProperties
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/constant/g
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/constant/polyMesh/blockMeshDict
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/constant/polyMesh/boundary
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/constant/transportProperties
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/constant/turbulenceProperties
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/system/controlDict
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict.1
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict.2
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/system/fvSolution
 create mode 100644 tutorials/multiphase/interFoam/ras/waterChannel/system/setFieldsDict

diff --git a/tutorials/multiphase/interFoam/ras/Allclean b/tutorials/multiphase/interFoam/ras/Allclean
index bd5bed38568..63a607fe3ff 100755
--- a/tutorials/multiphase/interFoam/ras/Allclean
+++ b/tutorials/multiphase/interFoam/ras/Allclean
@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1    # run from this directory
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
 
-keepCases="damBreak damBreakPorousBaffle weirOverflow"
+keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel"
 loseCases="damBreakFine"
 
 for case in $keepCases
diff --git a/tutorials/multiphase/interFoam/ras/Allrun b/tutorials/multiphase/interFoam/ras/Allrun
index 85cfa0fbfb1..f130490987b 100755
--- a/tutorials/multiphase/interFoam/ras/Allrun
+++ b/tutorials/multiphase/interFoam/ras/Allrun
@@ -52,4 +52,7 @@ cloneCase damBreak damBreakFine
 # Do weirOverflow
 (cd weirOverflow && foamRunTutorials)
 
+# Do waterChannel
+(cd waterChannel && foamRunTutorials)
+
 # ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/U b/tutorials/multiphase/interFoam/ras/waterChannel/0/U
new file mode 100644
index 00000000000..526fadc3444
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/U
@@ -0,0 +1,51 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volVectorField;
+    object      U;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 1 -1 0 0 0 0];
+
+internalField   uniform (2 0 0);
+
+boundaryField
+{
+    inlet
+    {
+        type            flowRateInletVelocity;
+        flowRate        constant 50;
+        value           uniform (0 0 0);
+    }
+
+    walls
+    {
+        type            fixedValue;
+        value           uniform (0 0 0);
+    }
+
+    atmosphere
+    {
+        type            pressureInletOutletVelocity;
+        value           uniform (0 0 0);
+    }
+
+    outlet
+    {
+        type            inletOutlet;
+        inletValue      uniform (0 0 0);
+        value           $internalField;
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/alpha1.org b/tutorials/multiphase/interFoam/ras/waterChannel/0/alpha1.org
new file mode 100644
index 00000000000..914cb9ee1a0
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/alpha1.org
@@ -0,0 +1,48 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      alpha;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 0 0 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedValue;
+        value           uniform 1;
+    }
+
+    walls
+    {
+        type            zeroGradient;
+    }
+
+    outlet
+    {
+        type            zeroGradient;
+        value           uniform 0;
+    }
+
+    atmosphere
+    {
+        type            inletOutlet;
+        inletValue      uniform 0;
+        value           uniform 0;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/k b/tutorials/multiphase/interFoam/ras/waterChannel/0/k
new file mode 100644
index 00000000000..8025412250e
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/k
@@ -0,0 +1,44 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      k;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 2 -2 0 0 0 0];
+
+internalField   uniform 0.0001;
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedValue;
+        intensity       0.05;
+        value           $internalField;
+    }
+
+    walls
+    {
+        type            kqRWallFunction;
+        value           $internalField;
+    }
+
+    ".*"
+    {
+        type            inletOutlet;
+        inletValue      $internalField;
+        value           $internalField ;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/nut b/tutorials/multiphase/interFoam/ras/waterChannel/0/nut
new file mode 100644
index 00000000000..2498d72cf1f
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/nut
@@ -0,0 +1,38 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    location    "0";
+    object      nut;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 2 -1 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    walls
+    {
+        type            nutkWallFunction;
+        value           uniform 0;
+    }
+
+    ".*"
+    {
+        type            calculated;
+        value           uniform 0;
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/omega b/tutorials/multiphase/interFoam/ras/waterChannel/0/omega
new file mode 100644
index 00000000000..1db5db7122c
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/omega
@@ -0,0 +1,43 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      omega;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 0 -1 0 0 0 0];
+
+internalField   uniform 0.003;
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedValue;
+        value           $internalField;
+    }
+
+    walls
+    {
+        type            omegaWallFunction;
+        value           $internalField;
+    }
+
+    ".*"
+    {
+        type            inletOutlet;
+        inletValue      $internalField;
+        value           $internalField;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/p_rgh b/tutorials/multiphase/interFoam/ras/waterChannel/0/p_rgh
new file mode 100644
index 00000000000..d30fb854876
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/p_rgh
@@ -0,0 +1,42 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      p_rgh;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [1 -1 -2 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    atmosphere
+    {
+        type            totalPressure;
+        p0              uniform 0;
+        U               U;
+        phi             phi;
+        rho             rho;
+        psi             none;
+        gamma           1;
+        value           uniform 0;
+    }
+
+    ".*"
+    {
+        type            buoyantPressure;
+        value           uniform 0;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/Allclean b/tutorials/multiphase/interFoam/ras/waterChannel/Allclean
new file mode 100755
index 00000000000..0c04649fe1b
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/Allclean
@@ -0,0 +1,10 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+rm 0/alpha1.gz 0/alpha1 2>/dev/null
+rm -rf *Flux
+
+cleanCase
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/Allrun b/tutorials/multiphase/interFoam/ras/waterChannel/Allrun
new file mode 100755
index 00000000000..813ad03d793
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/Allrun
@@ -0,0 +1,25 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+application=`getApplication`
+
+runApplication blockMesh
+
+echo "Creating channel"
+i=1
+while [ "$i" -lt 3 ] ; do
+    cp system/extrudeMeshDict.${i} system/extrudeMeshDict
+    echo "Running extrudeMesh, instance" ${i}
+    extrudeMesh > log.extrudeMesh.${i}
+    i=`expr $i + 1`
+done
+
+cp 0/alpha1.org 0/alpha1
+runApplication setFields
+
+runApplication $application
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/controlDict b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/controlDict
new file mode 100644
index 00000000000..64eae52fe0c
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/controlDict
@@ -0,0 +1,86 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      controlDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+application     LTSInterFoam;
+
+startFrom       latestTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         5000;
+
+deltaT          1;
+
+writeControl    timeStep;
+
+writeInterval   200;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression compressed;
+
+timeFormat      general;
+
+timePrecision   6;
+
+runTimeModifiable yes;
+
+adjustTimeStep  yes;
+maxCo           0.5;
+maxAlphaCo      0.5;
+maxDeltaT       1;
+
+functions
+{
+    inletFlux
+    {
+        type            faceSource;
+        functionObjectLibs ("libfieldFunctionObjects.so");
+        outputControl   timeStep;
+        log             true;
+        // Output field values as well
+        valueOutput     false;
+        source          patch;
+        sourceName      inlet;
+        operation       sum;
+
+        fields
+        (
+            rho*phi
+        );
+    }
+
+    outletFlux
+    {
+        $inletFlux;
+        sourceName      outlet;
+    }
+
+    atmosphereFlux
+    {
+        $inletFlux;
+        sourceName      atmosphere;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes
new file mode 100644
index 00000000000..22366f437b7
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes
@@ -0,0 +1,61 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSchemes;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ddtSchemes
+{
+    default         localEuler rDeltaT;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    div(rho*phi,U)  Gauss linearUpwind grad(U);
+    div(phi,alpha)  Gauss vanLeer;
+    div(phirb,alpha) Gauss interfaceCompression;
+    div(phi,k)      Gauss upwind;
+    div(phi,omega)  Gauss upwind;
+}
+
+laplacianSchemes
+{
+    default         Gauss linear corrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         corrected;
+}
+
+fluxRequired
+{
+    default         no;
+    p_rgh;
+    pcorr;
+    alpha1;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSolution b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSolution
new file mode 100644
index 00000000000..7a6ad628f6c
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSolution
@@ -0,0 +1,106 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSolution;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+solvers
+{
+    pcorr
+    {
+        solver          PCG;
+        preconditioner
+        {
+            preconditioner  GAMG;
+            tolerance       1e-05;
+            relTol          0;
+            smoother        DICGaussSeidel;
+            nPreSweeps      0;
+            nPostSweeps     2;
+            nFinestSweeps   2;
+            cacheAgglomeration false;
+            nCellsInCoarsestLevel 10;
+            agglomerator    faceAreaPair;
+            mergeLevels     1;
+        }
+        tolerance       1e-05;
+        relTol          0;
+        maxIter         100;
+    }
+
+/*    pcorr
+    {
+        solver          PCG;
+        preconditioner  DIC;
+        tolerance       1e-10;
+        relTol          0;
+    };
+*/
+    p_rgh
+    {
+        $pcorr;
+        tolerance       1e-6;
+        relTol          0.01;
+    };
+
+    p_rghFinal
+    {
+        $p_rgh;
+        tolerance       1e-6;
+        relTol          0;
+    }
+
+    "(U|k|omega).*"
+    {
+        solver          smoothSolver;
+
+        smoother        GaussSeidel;
+        nSweeps         1;
+
+        tolerance       1e-7;
+        relTol          0.1;
+    };
+}
+
+PIMPLE
+{
+    momentumPredictor no;
+    nCorrectors     2;
+    nNonOrthogonalCorrectors 0;
+
+    nAlphaCorr      1;
+    nAlphaSubCycles 3;
+    cAlpha          1;
+
+    maxCo           0.5;
+    maxAlphaCo      0.2;
+    nAlphaSweepIter 1;
+
+    rDeltaTSmoothingCoeff 0.1;
+    rDeltaTDampingCoeff 1;
+    maxDeltaT       100;
+}
+
+relaxationFactors
+{
+    fields
+    {
+    }
+    equations
+    {
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/setFieldsDict b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/setFieldsDict
new file mode 100644
index 00000000000..468fd9778ba
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/setFieldsDict
@@ -0,0 +1,45 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      setFieldsDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+defaultFieldValues
+(
+    volScalarFieldValue alpha1 0
+);
+
+regions
+(
+    boxToCell
+    {
+        box (0 0 0) (50 130 27);
+        fieldValues
+        (
+            volScalarFieldValue alpha1 1
+        );
+    }
+
+    boxToFace
+    {
+        box (0 0 0) (50 10.0001 24);
+        fieldValues
+        (
+            volScalarFieldValue alpha1 1
+        );
+    }
+);
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/README b/tutorials/multiphase/interFoam/ras/waterChannel/README
new file mode 100644
index 00000000000..965538a764c
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/README
@@ -0,0 +1,6 @@
+- This case uses blockMesh and extrudeMesh to create a channel geometry.
+  - See Allrun script to generate geometry.
+- The case is set up to run with interFoam.
+- For running with LTSInterFoam, an alternative set of main files from
+  system directory (controlDict, etc) are included in LTSInterFoam
+  subdirectory to replace the existing files set up for interFoam.
\ No newline at end of file
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/constant/RASProperties b/tutorials/multiphase/interFoam/ras/waterChannel/constant/RASProperties
new file mode 100644
index 00000000000..e0e6b776a27
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/constant/RASProperties
@@ -0,0 +1,25 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      RASProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+RASModel        kOmegaSST;
+
+turbulence      on;
+
+printCoeffs     on;
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/constant/g b/tutorials/multiphase/interFoam/ras/waterChannel/constant/g
new file mode 100644
index 00000000000..a0d7102656f
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/constant/g
@@ -0,0 +1,21 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       uniformDimensionedVectorField;
+    location    "constant";
+    object      g;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 1 -2 0 0 0 0];
+value           (0 0 -9.81);
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interFoam/ras/waterChannel/constant/polyMesh/blockMeshDict
new file mode 100644
index 00000000000..ccbeabfc986
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/constant/polyMesh/blockMeshDict
@@ -0,0 +1,101 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      blockMeshDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+convertToMeters 1;
+
+vertices
+(
+    ( 0 -10   2) // 0
+    (20 -10   2) // 1
+    ( 0  -3   2) // 2
+    (20  -3   2) // 3
+    ( 0   3   2) // 4
+    (20   3   2) // 5
+    ( 0  10   2) // 6
+    (20  10   2) // 7
+
+    ( 0 -10   8) // 8
+    (20 -10   8) // 9
+    ( 0  -4   8) // 10
+    (20  -4   8) // 11
+    ( 0   4   8) // 12
+    (20   4   8) // 13
+    ( 0  10   8) // 14
+    (20  10   8) // 15
+);
+
+blocks
+(
+    hex (0 1 3 2  8  9 11 10) (20  5 20) simpleGrading (1 1 1)
+    hex (2 3 5 4 10 11 13 12) (20 10 20) simpleGrading (1 1 1)
+    hex (4 5 7 6 12 13 15 14) (20  5 20) simpleGrading (1 1 1)
+);
+
+edges
+(
+);
+
+boundary
+(
+    inlet
+    {
+        type patch;
+        faces
+        (
+            (0 1 3 2)
+            (4 5 7 6)
+        );
+    }
+
+    walls
+    {
+        type wall;
+        faces
+        (
+            (2 3 5 4)
+            (0 1 9 8)
+            (0 2 10 8)
+            (1 3 11 9)
+            (2 4 12 10)
+            (5 7 15 13)
+            (6 7 15 14)
+            (4 6 14 12)
+        );
+    }
+
+    outlet
+    {
+        type patch;
+        faces
+        (
+            (3 5 13 11)
+        );
+    }
+
+    atmosphere
+    {
+        type patch;
+        faces
+        (
+            (8  9 11 10)
+            (10 11 13 12)
+            (12 13 15 14)
+        );
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/waterChannel/constant/polyMesh/boundary
new file mode 100644
index 00000000000..eed322680a7
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/constant/polyMesh/boundary
@@ -0,0 +1,46 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       polyBoundaryMesh;
+    location    "constant/polyMesh";
+    object      boundary;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+4
+(
+    inlet
+    {
+        type            patch;
+        nFaces          200;
+        startFace       79800;
+    }
+    walls
+    {
+        type            wall;
+        nFaces          6600;
+        startFace       80000;
+    }
+    outlet
+    {
+        type            patch;
+        nFaces          200;
+        startFace       86600;
+    }
+    atmosphere
+    {
+        type            patch;
+        nFaces          1400;
+        startFace       86800;
+    }
+)
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/constant/transportProperties b/tutorials/multiphase/interFoam/ras/waterChannel/constant/transportProperties
new file mode 100644
index 00000000000..c90677dd56f
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/constant/transportProperties
@@ -0,0 +1,35 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      transportProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+phase1
+{
+    transportModel  Newtonian;
+    nu              nu [ 0 2 -1 0 0 0 0 ]  1e-06;
+    rho             rho [ 1 -3 0 0 0 0 0 ] 1000;
+}
+
+phase2
+{
+    transportModel  Newtonian;
+    nu              nu [ 0 2 -1 0 0 0 0 ]  1.48e-05;
+    rho             rho [ 1 -3 0 0 0 0 0 ] 1;
+}
+
+sigma           sigma [ 1 0 -2 0 0 0 0 ] 0.07;
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/constant/turbulenceProperties b/tutorials/multiphase/interFoam/ras/waterChannel/constant/turbulenceProperties
new file mode 100644
index 00000000000..3721a46a2ea
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/constant/turbulenceProperties
@@ -0,0 +1,21 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      turbulenceProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+simulationType  RASModel;
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/controlDict b/tutorials/multiphase/interFoam/ras/waterChannel/system/controlDict
new file mode 100644
index 00000000000..be315b40ace
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/controlDict
@@ -0,0 +1,86 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      controlDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+application     interFoam;
+
+startFrom       latestTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         100;
+
+deltaT          0.01;
+
+writeControl    adjustableRunTime;
+
+writeInterval   5;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression compressed;
+
+timeFormat      general;
+
+timePrecision   6;
+
+runTimeModifiable yes;
+
+adjustTimeStep  yes;
+maxCo           0.5;
+maxAlphaCo      0.5;
+maxDeltaT       1;
+
+functions
+{
+    inletFlux
+    {
+        type            faceSource;
+        functionObjectLibs ("libfieldFunctionObjects.so");
+        outputControl   timeStep;
+        log             true;
+        // Output field values as well
+        valueOutput     false;
+        source          patch;
+        sourceName      inlet;
+        operation       sum;
+
+        fields
+        (
+            rho*phi
+        );
+    }
+
+    outletFlux
+    {
+        $inletFlux;
+        sourceName      outlet;
+    }
+
+    atmosphereFlux
+    {
+        $inletFlux;
+        sourceName      atmosphere;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict b/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict
new file mode 100644
index 00000000000..ffa39b334a4
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict
@@ -0,0 +1,37 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      extrudeProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+constructFrom mesh;
+sourceCase "$FOAM_CASE";
+sourcePatches (outlet);
+
+flipNormals false;
+
+extrudeModel        linearDirection;
+
+nLayers             40;
+expansionRatio      1.0;
+
+linearDirectionCoeffs
+{
+    axisPt          (0 0 0);
+    direction       (1 -0.2 -0.02);
+    thickness       40;
+}
+
+mergeFaces false;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict.1 b/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict.1
new file mode 100644
index 00000000000..8204a892dd8
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict.1
@@ -0,0 +1,37 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      extrudeProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+constructFrom mesh;
+sourceCase "$FOAM_CASE";
+sourcePatches (outlet);
+
+flipNormals false;
+
+extrudeModel        linearDirection;
+
+nLayers             60;
+expansionRatio      1.0;
+
+linearDirectionCoeffs
+{
+    axisPt          (0 0 0);
+    direction       (1 0.2 -0.02);
+    thickness       60;
+}
+
+mergeFaces false;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict.2 b/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict.2
new file mode 100644
index 00000000000..ffa39b334a4
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/extrudeMeshDict.2
@@ -0,0 +1,37 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    object      extrudeProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+constructFrom mesh;
+sourceCase "$FOAM_CASE";
+sourcePatches (outlet);
+
+flipNormals false;
+
+extrudeModel        linearDirection;
+
+nLayers             40;
+expansionRatio      1.0;
+
+linearDirectionCoeffs
+{
+    axisPt          (0 0 0);
+    direction       (1 -0.2 -0.02);
+    thickness       40;
+}
+
+mergeFaces false;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes
new file mode 100644
index 00000000000..43847dd8414
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes
@@ -0,0 +1,62 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSchemes;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ddtSchemes
+{
+    default         Euler;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    div(rho*phi,U)  Gauss linearUpwind grad(U);
+    div(phi,alpha)  Gauss vanLeer;
+    div(phirb,alpha) Gauss interfaceCompression;
+
+    div(phi,k)      Gauss upwind;
+    div(phi,omega)  $div(phi,k);
+}
+
+laplacianSchemes
+{
+    default         Gauss linear corrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         corrected;
+}
+
+fluxRequired
+{
+    default         no;
+    p_rgh;
+    pcorr;
+    alpha1;
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSolution b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSolution
new file mode 100644
index 00000000000..8b86c656c8f
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSolution
@@ -0,0 +1,88 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSolution;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+solvers
+{
+    pcorr
+    {
+        solver          PCG;
+        preconditioner
+        {
+            preconditioner  GAMG;
+            tolerance       1e-05;
+            relTol          0;
+            smoother        DICGaussSeidel;
+            nPreSweeps      0;
+            nPostSweeps     2;
+            nFinestSweeps   2;
+            cacheAgglomeration false;
+            nCellsInCoarsestLevel 10;
+            agglomerator    faceAreaPair;
+            mergeLevels     1;
+        }
+        tolerance       1e-10;
+        relTol          0;
+        maxIter         100;
+    }
+
+    p_rgh
+    {
+        $pcorr;
+        tolerance       1e-6;
+        relTol          0.01;
+    };
+
+    p_rghFinal
+    {
+        $p_rgh;
+        tolerance       1e-6;
+        relTol          0;
+    }
+
+    "(U|k|omega).*"
+    {
+        solver          smoothSolver;
+        smoother        GaussSeidel;
+        nSweeps         1;
+        tolerance       1e-7;
+        relTol          0.1;
+    };
+}
+
+PIMPLE
+{
+    momentumPredictor no;
+    nCorrectors     2;
+    nNonOrthogonalCorrectors 0;
+
+    nAlphaCorr      1;
+    nAlphaSubCycles 3;
+    cAlpha          1;
+}
+
+relaxationFactors
+{
+    fields
+    {
+    }
+    equations
+    {
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/setFieldsDict b/tutorials/multiphase/interFoam/ras/waterChannel/system/setFieldsDict
new file mode 100644
index 00000000000..f4f1c444762
--- /dev/null
+++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/setFieldsDict
@@ -0,0 +1,36 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  dev                                   |
+|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      setFieldsDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+defaultFieldValues
+(
+    volScalarFieldValue alpha1 0
+);
+
+regions
+(
+    boxToCell
+    {
+        box (-10 -20 -10) (200 20 4);
+        fieldValues
+        (
+            volScalarFieldValue alpha1 1
+        );
+    }
+);
+
+
+// ************************************************************************* //
-- 
GitLab