From ec5a0e75b42e9e4d3bf18e7b5dd02cb75a86ec9d Mon Sep 17 00:00:00 2001
From: Prashant <prashantS.sonakar@esi-group.com>
Date: Fri, 3 Jun 2016 16:38:34 +0530
Subject: [PATCH] ENH: Update tutorial for features
 directionalPressureGradient, Global file handling

---
 .../system/cabin/fvOptions                    |   4 +-
 .../windshieldCondensation/system/controlDict |  18 ++--
 .../system/controlDict.0                      | 101 ------------------
 .../system/controlDict.20                     | 101 ------------------
 .../system/controlDict.5                      | 101 ------------------
 .../system/controlDict.60                     | 101 ------------------
 .../system/solverControls                     |  17 +++
 .../system/solverControls.0                   |  17 +++
 .../system/solverControls.20                  |  17 +++
 .../system/solverControls.5                   |  17 +++
 .../system/solverControls.60                  |  17 +++
 11 files changed, 94 insertions(+), 417 deletions(-)
 delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.0
 delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.20
 delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.5
 delete mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.60
 create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls
 create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.0
 create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.20
 create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.5
 create mode 100644 tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.60

diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/cabin/fvOptions b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/cabin/fvOptions
index b89e7983dcd..64f9f68fc73 100644
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/cabin/fvOptions
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/cabin/fvOptions
@@ -14,7 +14,7 @@ FoamFile
     object      fvOptions;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-/*
+
 airDeflection
 {
     type            directionalPressureGradientExplicitSource;
@@ -47,5 +47,5 @@ airDeflection
         fileName        "volFlowRateTable";
     }
 }
-*/
+
 // ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict
index c54c7b0ea6b..27c6d67a841 100644
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict
@@ -15,6 +15,8 @@ FoamFile
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
+#include "solverControls"
+
 libs            ("libliquidPropertiesFvPatchFields.so");
 
 application     chtMultiRegionFoam;
@@ -31,8 +33,6 @@ deltaT          0.01;
 
 writeControl    adjustableRunTime;
 
-writeInterval   2.5;
-
 purgeWrite      0;
 
 writeFormat     binary;
@@ -49,12 +49,8 @@ runTimeModifiable true;
 
 adjustTimeStep  yes;
 
-maxCo           12;
-
 maxDi           10;
 
-maxDeltaT       1;
-
 functions
 {
     H2O
@@ -85,14 +81,14 @@ functions
         outputControl       timeStep;
         outputInterval      1;
         region              cabin;
-        fileToUpdate        "$FOAM_CASE/system/controlDict";
+        fileToUpdate        "$FOAM_CASE/system/solverControls";
 
         timeVsFile
         (
-            ( 1     "$FOAM_CASE/system/controlDict.0" )
-            ( 5     "$FOAM_CASE/system/controlDict.5")
-            ( 20    "$FOAM_CASE/system/controlDict.20")
-            ( 60    "$FOAM_CASE/system/controlDict.60")
+            ( 1     "$FOAM_CASE/system/solverControls.0" )
+            ( 5     "$FOAM_CASE/system/solverControls.5")
+            ( 20    "$FOAM_CASE/system/solverControls.20")
+            ( 60    "$FOAM_CASE/system/solverControls.60")
         );
     }
 }
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.0 b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.0
deleted file mode 100644
index bffddf09986..00000000000
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.0
+++ /dev/null
@@ -1,101 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  plus                                  |
-|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      controlDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-libs            ("libliquidPropertiesFvPatchFields.so");
-
-application     chtMultiRegionFoam;
-
-startFrom       startTime;
-
-startTime       0;
-
-stopAt          endTime;
-
-endTime         90;
-
-deltaT          0.01;
-
-writeControl    adjustableRunTime;
-
-writeInterval   10;
-
-purgeWrite      0;
-
-writeFormat     binary;
-
-writePrecision  10;
-
-writeCompression off;
-
-timeFormat      general;
-
-timePrecision   6;
-
-runTimeModifiable true;
-
-adjustTimeStep  yes;
-
-maxCo           2.5;
-
-maxDi           10;
-
-maxDeltaT       0.3;
-
-functions
-{
-    H2O
-    {
-        type            scalarTransport;
-
-        functionObjectLibs ("libutilityFunctionObjects.so");
-
-        resetOnStartUp  no;
-
-        region cabin;
-
-
-        // employ schemes used by U to the scalar transport equation
-        // note: field name is given by the name of the function, in this case
-        // 'scalar1'
-        autoSchemes     no;
-
-        fvOptions
-        {
-        }
-    }
-
-    fileUpdate
-    {
-        type                timeActivatedFileUpdate;
-        functionObjectLibs  ("libutilityFunctionObjects.so");
-        outputControl       timeStep;
-        outputInterval      1;
-        region              cabin;
-        fileToUpdate        "$FOAM_CASE/system/controlDict";
-
-        timeVsFile
-        (
-            ( 1     "$FOAM_CASE/system/controlDict.0" )
-            ( 5     "$FOAM_CASE/system/controlDict.5")
-            ( 20    "$FOAM_CASE/system/controlDict.20")
-            ( 60    "$FOAM_CASE/system/controlDict.60")
-        );
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.20 b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.20
deleted file mode 100644
index e02e741e4a8..00000000000
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.20
+++ /dev/null
@@ -1,101 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  plus                                  |
-|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      controlDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-libs            ("libliquidPropertiesFvPatchFields.so");
-
-application     chtMultiRegionFoam;
-
-startFrom       startTime;
-
-startTime       0;
-
-stopAt          endTime;
-
-endTime         90;
-
-deltaT          0.01;
-
-writeControl    adjustableRunTime;
-
-writeInterval   10;
-
-purgeWrite      0;
-
-writeFormat     binary;
-
-writePrecision  10;
-
-writeCompression off;
-
-timeFormat      general;
-
-timePrecision   6;
-
-runTimeModifiable true;
-
-adjustTimeStep  yes;
-
-maxCo           8;
-
-maxDi           10;
-
-maxDeltaT       1;
-
-functions
-{
-    H2O
-    {
-        type            scalarTransport;
-
-        functionObjectLibs ("libutilityFunctionObjects.so");
-
-        resetOnStartUp  no;
-
-        region cabin;
-
-
-        // employ schemes used by U to the scalar transport equation
-        // note: field name is given by the name of the function, in this case
-        // 'scalar1'
-        autoSchemes     no;
-
-        fvOptions
-        {
-        }
-    }
-
-    fileUpdate
-    {
-        type                timeActivatedFileUpdate;
-        functionObjectLibs  ("libutilityFunctionObjects.so");
-        outputControl       timeStep;
-        outputInterval      1;
-        region              cabin;
-        fileToUpdate        "$FOAM_CASE/system/controlDict";
-
-        timeVsFile
-        (
-            ( 1     "$FOAM_CASE/system/controlDict.0" )
-            ( 5     "$FOAM_CASE/system/controlDict.5")
-            ( 20    "$FOAM_CASE/system/controlDict.20")
-            ( 60    "$FOAM_CASE/system/controlDict.60")
-        );
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.5 b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.5
deleted file mode 100644
index 81cea0f6d34..00000000000
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.5
+++ /dev/null
@@ -1,101 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  plus                                  |
-|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      controlDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-libs            ("libliquidPropertiesFvPatchFields.so");
-
-application     chtMultiRegionFoam;
-
-startFrom       startTime;
-
-startTime       0;
-
-stopAt          endTime;
-
-endTime         90;
-
-deltaT          0.01;
-
-writeControl    adjustableRunTime;
-
-writeInterval   10;
-
-purgeWrite      0;
-
-writeFormat     binary;
-
-writePrecision  10;
-
-writeCompression off;
-
-timeFormat      general;
-
-timePrecision   6;
-
-runTimeModifiable true;
-
-adjustTimeStep  yes;
-
-maxCo           5;
-
-maxDi           10;
-
-maxDeltaT       1;
-
-functions
-{
-    H2O
-    {
-        type            scalarTransport;
-
-        functionObjectLibs ("libutilityFunctionObjects.so");
-
-        resetOnStartUp  no;
-
-        region cabin;
-
-
-        // employ schemes used by U to the scalar transport equation
-        // note: field name is given by the name of the function, in this case
-        // 'scalar1'
-        autoSchemes     no;
-
-        fvOptions
-        {
-        }
-    }
-
-    fileUpdate
-    {
-        type                timeActivatedFileUpdate;
-        functionObjectLibs  ("libutilityFunctionObjects.so");
-        outputControl       timeStep;
-        outputInterval      1;
-        region              cabin;
-        fileToUpdate        "$FOAM_CASE/system/controlDict";
-
-        timeVsFile
-        (
-            ( 1     "$FOAM_CASE/system/controlDict.0" )
-            ( 5     "$FOAM_CASE/system/controlDict.5")
-            ( 20    "$FOAM_CASE/system/controlDict.20")
-            ( 60    "$FOAM_CASE/system/controlDict.60")
-        );
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.60 b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.60
deleted file mode 100644
index c54c7b0ea6b..00000000000
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/controlDict.60
+++ /dev/null
@@ -1,101 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| =========                 |                                                 |
-| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  plus                                  |
-|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
-|    \\/     M anipulation  |                                                 |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
-    version     2.0;
-    format      ascii;
-    class       dictionary;
-    location    "system";
-    object      controlDict;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-libs            ("libliquidPropertiesFvPatchFields.so");
-
-application     chtMultiRegionFoam;
-
-startFrom       startTime;
-
-startTime       0;
-
-stopAt          endTime;
-
-endTime         90;
-
-deltaT          0.01;
-
-writeControl    adjustableRunTime;
-
-writeInterval   2.5;
-
-purgeWrite      0;
-
-writeFormat     binary;
-
-writePrecision  10;
-
-writeCompression off;
-
-timeFormat      general;
-
-timePrecision   6;
-
-runTimeModifiable true;
-
-adjustTimeStep  yes;
-
-maxCo           12;
-
-maxDi           10;
-
-maxDeltaT       1;
-
-functions
-{
-    H2O
-    {
-        type            scalarTransport;
-
-        functionObjectLibs ("libutilityFunctionObjects.so");
-
-        resetOnStartUp  no;
-
-        region cabin;
-
-
-        // employ schemes used by U to the scalar transport equation
-        // note: field name is given by the name of the function, in this case
-        // 'scalar1'
-        autoSchemes     no;
-
-        fvOptions
-        {
-        }
-    }
-
-    fileUpdate
-    {
-        type                timeActivatedFileUpdate;
-        functionObjectLibs  ("libutilityFunctionObjects.so");
-        outputControl       timeStep;
-        outputInterval      1;
-        region              cabin;
-        fileToUpdate        "$FOAM_CASE/system/controlDict";
-
-        timeVsFile
-        (
-            ( 1     "$FOAM_CASE/system/controlDict.0" )
-            ( 5     "$FOAM_CASE/system/controlDict.5")
-            ( 20    "$FOAM_CASE/system/controlDict.20")
-            ( 60    "$FOAM_CASE/system/controlDict.60")
-        );
-    }
-}
-
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls
new file mode 100644
index 00000000000..f23b6a4f10b
--- /dev/null
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls
@@ -0,0 +1,17 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+writeInterval   10;
+
+maxCo           2.5;
+
+maxDeltaT       0.3;
+
+#inputMode           merge
+
+// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.0 b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.0
new file mode 100644
index 00000000000..f23b6a4f10b
--- /dev/null
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.0
@@ -0,0 +1,17 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+writeInterval   10;
+
+maxCo           2.5;
+
+maxDeltaT       0.3;
+
+#inputMode           merge
+
+// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.20 b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.20
new file mode 100644
index 00000000000..c1143ac2dc3
--- /dev/null
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.20
@@ -0,0 +1,17 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+writeInterval   10;
+
+maxCo           8;
+
+maxDeltaT       1;
+
+#inputMode           merge
+
+// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.5 b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.5
new file mode 100644
index 00000000000..be96ad74298
--- /dev/null
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.5
@@ -0,0 +1,17 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+writeInterval   10;
+
+maxCo           5;
+
+maxDeltaT       1;
+
+#inputMode           merge
+
+// ************************************************************************* //
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.60 b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.60
new file mode 100644
index 00000000000..63d17474fbe
--- /dev/null
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/solverControls.60
@@ -0,0 +1,17 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| =========                 |                                                 |
+| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
+|  \\    /   O peration     | Version:  plus                                  |
+|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
+|    \\/     M anipulation  |                                                 |
+\*---------------------------------------------------------------------------*/
+
+writeInterval   2.5;
+
+maxCo           12;
+
+maxDeltaT       1;
+
+#inputMode           merge
+
+// ************************************************************************* //
-- 
GitLab