From 7f17a71f9c96151f65e38899f9992e80ea371d65 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Thu, 17 Dec 2020 00:24:20 +0100
Subject: [PATCH] ENH: make PDRsetField ground, outer patch names configurable

- previously hard-coded, now adjustable within PDRsetFieldsDict

    // Change some predefined patch names
    patchNames
    {
        ground      ground;
        outer       outer;
    }

ENH: additions to PDRutils, improve comments

- expose enumerated expansion names and gridControl (PDRblock).
  Not commonly needed, but useful to have access when defining
  other grid generators

TUT: update PDRsetFieldsDict and tutorials to use "ground"

- remove tutorial references to unused types and legacy obstacles

- use "ground" for the boundary conditions instead of "seaGround".
  Consistent with PDRblockMesh
---
 .../PDR/pdrFields/PDRarraysCalc.C             |  32 ++--
 .../preProcessing/PDR/pdrFields/PDRparams.C   |  16 +-
 .../preProcessing/PDR/pdrFields/PDRparams.H   |  11 +-
 .../preProcessing/PDR/pdrFields/PDRutils.H    |  11 +-
 .../PDR/pdrFields/obstacles/PDRobstacle.H     |   2 +
 .../PDR/pdrFields/obstacles/PDRobstacleIO.C   |  10 +-
 .../obstacles/PDRobstacleLegacyRead.C         |  10 +-
 .../PDR/pdrFields/optionalData/optionalData.H | 171 ++++++++++++++++++
 src/mesh/blockMesh/PDRblockMesh/PDRblock.H    |  24 ++-
 .../blockMesh/PDRblockMesh/PDRblockLocation.C |  45 +++++
 .../PDRFoam/pipeLattice/0.orig/GRep           |   4 +-
 .../PDRFoam/pipeLattice/0.orig/GRxp           |   4 +-
 .../PDRFoam/pipeLattice/0.orig/RPers          |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/Su  |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/T   |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/Tu  |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/U   |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/Xi  |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/Xp  |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/b   |   4 +-
 .../PDRFoam/pipeLattice/0.orig/epsilon        |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/ft  |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/k   |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/nut |   4 +-
 .../combustion/PDRFoam/pipeLattice/0.orig/p   |   4 +-
 .../pipeLattice/system/PDRsetFieldsDict       |  19 +-
 .../PDRsetFields/simplePipeCage/0.orig/GRep   |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/GRxp   |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/RPers  |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/Su     |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/T      |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/Tu     |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/U      |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/Xi     |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/Xp     |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/b      |   4 +-
 .../simplePipeCage/0.orig/epsilon             |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/ft     |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/k      |   4 +-
 .../PDRsetFields/simplePipeCage/0.orig/p      |   4 +-
 .../simplePipeCage/system/PDRsetFieldsDict    |  29 ++-
 41 files changed, 380 insertions(+), 116 deletions(-)
 create mode 100644 applications/utilities/preProcessing/PDR/pdrFields/optionalData/optionalData.H

diff --git a/applications/utilities/preProcessing/PDR/pdrFields/PDRarraysCalc.C b/applications/utilities/preProcessing/PDR/pdrFields/PDRarraysCalc.C
index ada22eb6a05..c434e37db90 100644
--- a/applications/utilities/preProcessing/PDR/pdrFields/PDRarraysCalc.C
+++ b/applications/utilities/preProcessing/PDR/pdrFields/PDRarraysCalc.C
@@ -1149,9 +1149,9 @@ static void tail_field
     const UList<PDRpatchDef>& patches
 )
 {
-    // seaGround
+    // ground
     {
-        os.beginBlock("seaGround");
+        os.beginBlock(pars.groundPatchName);
         os.writeKeyword("type") << wall_bc << token::END_STATEMENT << nl;
         putUniform(os, "value", deflt);
         os.endBlock();
@@ -1222,13 +1222,14 @@ static void tail_field
         os.endBlock();
     }
 
-    if ( pars.two_d )
+    if (pars.two_d)
     {
         os.beginBlock("z_boundaries");
         os.writeEntry("type", "empty");
         os.endBlock();
     }
-    if ( pars.outer_orthog )
+
+    if (pars.outer_orthog)
     {
         os.beginBlock("outer_inner");
         os.writeEntry("type", "cyclicAMI");
@@ -1285,9 +1286,10 @@ void write_scalarField
     os << nl;
     os.beginBlock("boundaryField");
 
+
     // outer
     {
-        os.beginBlock("outer");
+        os.beginBlock(pars.outerPatchName);
 
         os.writeEntry("type", "inletOutlet");
         putUniform(os, "inletValue", deflt);
@@ -1329,7 +1331,8 @@ void write_uniformField
 
     // outer
     {
-        os.beginBlock("outer");
+        os.beginBlock(pars.outerPatchName);
+
         if (fieldName == "alphat" || fieldName == "nut")
         {
             // Different b.c. for alphat & nut
@@ -1377,17 +1380,17 @@ void write_pU_fields
         os << nl;
         os.beginBlock("boundaryField");
 
-        // "outer"
+        // outer
         {
-            os.beginBlock("outer");
+            os.beginBlock(pars.outerPatchName);
             os.writeEntry("type", "inletOutlet");
             putUniform(os, "inletValue", vector::zero);
             os.endBlock();
         }
 
-        // seaGround
+        // ground
         {
-            os.beginBlock("seaGround");
+            os.beginBlock(pars.groundPatchName);
             os.writeEntry("type", "zeroGradient");
             os.endBlock();
         }
@@ -1497,9 +1500,10 @@ void write_pU_fields
         os << nl;
         os.beginBlock("boundaryField");
 
-        // "outer"
+        // outer
         {
-            os.beginBlock("outer");
+            os.beginBlock(pars.outerPatchName);
+
             os.writeEntry("type", "waveTransmissive");
             os.writeEntry("gamma", 1.3);
             os.writeEntry("fieldInf", deflt);
@@ -1560,7 +1564,7 @@ void write_symmTensorField
 
     // outer
     {
-        os.beginBlock("outer");
+        os.beginBlock(pars.outerPatchName);
 
         os.writeEntry("type", "inletOutlet");
         putUniform(os, "inletValue", deflt);
@@ -1628,7 +1632,7 @@ void write_symmTensorFieldV
 
     // outer
     {
-        os.beginBlock("outer");
+        os.beginBlock(pars.outerPatchName);
 
         os.writeEntry("type", "inletOutlet");
         putUniform(os, "inletValue", deflt);
diff --git a/applications/utilities/preProcessing/PDR/pdrFields/PDRparams.C b/applications/utilities/preProcessing/PDR/pdrFields/PDRparams.C
index 9554f8618fb..921716621a4 100644
--- a/applications/utilities/preProcessing/PDR/pdrFields/PDRparams.C
+++ b/applications/utilities/preProcessing/PDR/pdrFields/PDRparams.C
@@ -5,7 +5,7 @@
     \\  /    A nd           | www.openfoam.com
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
-    Copyright (C) 2019 OpenCFD Ltd.
+    Copyright (C) 2019-2020 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -84,6 +84,20 @@ void Foam::PDRparams::readDefaults(const dictionary& dict)
     dict.readIfPresent("blockageNoCT", blockageNoCT);
     dict.readIfPresent("scale", scale);
 
+
+    const dictionary* dictptr;
+
+    groundPatchName = "ground";
+    outerPatchName = "outer";
+
+    if ((dictptr = dict.findDict("patchNames")) != nullptr)
+    {
+        const dictionary& d = *dictptr;
+
+        d.readIfPresent("ground", groundPatchName);
+        d.readIfPresent("outer", outerPatchName);
+    }
+
     UPatchBc = "fixedValue;value uniform (0 0 0)";
     if (dict.readIfPresent("UPatchBc", UPatchBc))
     {
diff --git a/applications/utilities/preProcessing/PDR/pdrFields/PDRparams.H b/applications/utilities/preProcessing/PDR/pdrFields/PDRparams.H
index 0d383021f69..f3b7c29a333 100644
--- a/applications/utilities/preProcessing/PDR/pdrFields/PDRparams.H
+++ b/applications/utilities/preProcessing/PDR/pdrFields/PDRparams.H
@@ -6,7 +6,7 @@
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
     Copyright (C) 2016 Shell Research Ltd.
-    Copyright (C) 2018-2019 OpenCFD Ltd.
+    Copyright (C) 2018-2020 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -62,6 +62,13 @@ public:
         fileName obsfile_dir;
         wordList obsfile_names;
         word    timeName;
+
+        //- The name for the "ground" patch
+        word    groundPatchName;
+
+        //- The name for the "outer" patch
+        word    outerPatchName;
+
         string  UPatchBc;   //!< "fixedValue;value uniform (0 0 0)"
 
         bool legacyMeshSpec{false};
@@ -136,7 +143,7 @@ public:
 
     // Constructors
 
-        //- Construct null
+        //- Default construct
         PDRparams() = default;
 
 
diff --git a/applications/utilities/preProcessing/PDR/pdrFields/PDRutils.H b/applications/utilities/preProcessing/PDR/pdrFields/PDRutils.H
index 9d28f5b2c6d..9eecfb7a372 100644
--- a/applications/utilities/preProcessing/PDR/pdrFields/PDRutils.H
+++ b/applications/utilities/preProcessing/PDR/pdrFields/PDRutils.H
@@ -5,7 +5,7 @@
     \\  /    A nd           | www.openfoam.com
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
-    Copyright (C) 2019 OpenCFD Ltd.
+    Copyright (C) 2019-2020 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -29,9 +29,6 @@ Namespace
 Description
     Utilities for PDR (eg, for setFields)
 
-SourceFiles
-    PDRUtils.C
-
 \*---------------------------------------------------------------------------*/
 
 #ifndef PDRutils_H
@@ -48,11 +45,17 @@ namespace Foam
 // Forward Declarations
 class PDRobstacle;
 
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 namespace PDRutils
 {
 
 
 } // End namespace PDRutils
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 } // End namespace Foam
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacle.H b/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacle.H
index 0580a8015f1..7328b7ecb0b 100644
--- a/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacle.H
+++ b/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacle.H
@@ -264,6 +264,8 @@ public:
         );
 
         //- Trim obstacle to ensure it is within the specified bounding box
+        //- and return the intersection type.
+        //  Returns UNKNOWN for unknown types and invalid bounding boxes
         volumeType trim(const boundBox& bb);
 
         //- Surface (points, faces) representation
diff --git a/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleIO.C b/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleIO.C
index 1d4c9182f86..342a3175cfc 100644
--- a/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleIO.C
+++ b/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleIO.C
@@ -5,7 +5,7 @@
     \\  /    A nd           | www.openfoam.com
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
-    Copyright (C) 2019 OpenCFD Ltd.
+    Copyright (C) 2019-2020 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -199,8 +199,8 @@ Foam::scalar Foam::PDRobstacle::readFiles
                         obs.dia() -= floatSMALL;
 
 
-                        // Trim against the mesh bounds
-                        // - ignore if it doesn't overlap
+                        // Trim against the mesh bounds.
+                        // Ignore if it doesn't overlap, or bounds are invalid
                         const volumeType vt = obs.trim(meshBb);
 
                         switch (vt)
@@ -288,8 +288,8 @@ Foam::scalar Foam::PDRobstacle::readFiles
                         obs.span += point::uniform(shift2);
 
 
-                        // Trim against the mesh bounds
-                        // - ignore if it doesn't overlap
+                        // Trim against the mesh bounds.
+                        // Ignore if it doesn't overlap, or bounds are invalid
                         const volumeType vt = obs.trim(meshBb);
 
                         switch (vt)
diff --git a/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleLegacyRead.C b/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleLegacyRead.C
index 27b1dd4fe64..658f98b58fd 100644
--- a/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleLegacyRead.C
+++ b/applications/utilities/preProcessing/PDR/pdrFields/obstacles/PDRobstacleLegacyRead.C
@@ -6,7 +6,7 @@
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
     Copyright (C) 2016 Shell Research Ltd.
-    Copyright (C) 2019 OpenCFD Ltd.
+    Copyright (C) 2019-2020 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -385,8 +385,8 @@ Foam::scalar Foam::PDRlegacy::readObstacleFiles
                         obs.dia() -= floatSMALL;
 
 
-                        // Trim against the mesh bounds
-                        // - ignore if it doesn't overlap
+                        // Trim against the mesh bounds.
+                        // Ignore if it doesn't overlap, or bounds are invalid
                         const volumeType vt = obs.trim(meshBb);
 
                         switch (vt)
@@ -474,8 +474,8 @@ Foam::scalar Foam::PDRlegacy::readObstacleFiles
                         obs.span += point::uniform(shift2);
 
 
-                        // Trim against the mesh bounds
-                        // - ignore if it doesn't overlap
+                        // Trim against the mesh bounds.
+                        // Ignore if it doesn't overlap, or bounds are invalid
                         const volumeType vt = obs.trim(meshBb);
 
                         switch (vt)
diff --git a/applications/utilities/preProcessing/PDR/pdrFields/optionalData/optionalData.H b/applications/utilities/preProcessing/PDR/pdrFields/optionalData/optionalData.H
new file mode 100644
index 00000000000..b9a1cd7ffa7
--- /dev/null
+++ b/applications/utilities/preProcessing/PDR/pdrFields/optionalData/optionalData.H
@@ -0,0 +1,171 @@
+/*---------------------------------------------------------------------------*\
+  =========                 |
+  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+   \\    /   O peration     |
+    \\  /    A nd           | www.openfoam.com
+     \\/     M anipulation  |
+-------------------------------------------------------------------------------
+    Copyright (C) 2020 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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::optionalData
+
+Description
+    A simplified version of std::optional (c++17), with much simpler
+    construction semantics.
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef optionalData_H
+#define optionalData_H
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+                        Class optionalData Declaration
+\*---------------------------------------------------------------------------*/
+
+template<class T>
+class optionalData
+{
+    // Private Data
+
+        //- Validity of the value
+        bool good_;
+
+        //- The value
+        T value_;
+
+
+public:
+
+    // Generated Methods
+
+        //- Copy construct
+        optionalData(const optionalData<T>&) = default;
+
+        //- Move construct
+        optionalData(optionalData<T>&&) = default;
+
+        //- Copy assignment
+        optionalData<T>& operator=(const optionalData<T>&) = default;
+
+        //- Move assignment
+        optionalData<T>& operator=(optionalData<T>&&) = default;
+
+
+    // Constructors
+
+        //- Default construct
+        optionalData()
+        :
+            good_(false),
+            value_()
+        {}
+
+        //- Copy construct from value
+        optionalData(const T& val)
+        :
+            good_(true),
+            value_(val)
+        {}
+
+        //- Move construct from value
+        optionalData(T&& val)
+        :
+            good_(true),
+            value_(std::move(val))
+        {}
+
+
+    // Member Functions
+
+        //- True if it has a value
+        bool has_value() const noexcept
+        {
+            return good_;
+        }
+
+        //- Access to the value
+        T& value() noexcept
+        {
+            return value_;
+        }
+
+        //- Access to the value
+        const T& value() const noexcept
+        {
+            return value_;
+        }
+
+        //- Return value or default
+        const T& value_or(const T& deflt) const
+        {
+            return good_ ? value_ : deflt;
+        }
+
+
+    // Member Operators
+
+        //- True if it has a value
+        explicit operator bool() const noexcept
+        {
+            return good_;
+        }
+
+        //- Access the value
+        const T& operator*() const noexcept
+        {
+            return value_;
+        }
+
+        //- Access the value
+        T& operator*() noexcept
+        {
+            return value_;
+        }
+
+        //- Copy assignment from value
+        void operator=(const T& val)
+        {
+            good_ = true;
+            value_ = val;
+        }
+
+        //- Move assignment from value
+        void operator=(T&& val)
+        {
+            good_ = true;
+            value_ = std::move(val);
+        }
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/mesh/blockMesh/PDRblockMesh/PDRblock.H b/src/mesh/blockMesh/PDRblockMesh/PDRblock.H
index 0072cd01ea0..d9cffa01316 100644
--- a/src/mesh/blockMesh/PDRblockMesh/PDRblock.H
+++ b/src/mesh/blockMesh/PDRblockMesh/PDRblock.H
@@ -107,6 +107,9 @@ public:
             EXPAND_RELATIVE     //!< Relative expansion ratio
         };
 
+        //- Named enumerations for the expansion type
+        const static Enum<expansionType> expansionNames_;
+
 
     // Public Classes
 
@@ -176,18 +179,9 @@ public:
         };
 
 
-private:
-
-    // Data Types
-
-        //- Named enumerations for the expansion type
-        const static Enum<expansionType> expansionNames_;
-
-
-    // Private Classes
-
         //- The begin/end nodes for each segment,
         //- with divisions and expansion for each segment
+        //  Not normally used outside of PDRblock
         struct gridControl
         :
             public scalarList
@@ -205,14 +199,24 @@ private:
             //  \see Foam::gradingDescriptor
             gradingDescriptors grading() const;
 
+            //- Resize lists
+            void resize(label len);
+
             //- Add point/divisions/expand to end of list (push_back)
             void append(const scalar p, label nDiv, scalar expRatio=1);
 
             //- Add point/divisions/expand to front of list (push_front)
             void prepend(const scalar p, label nDiv, scalar expRatio=1);
+
+            //- Write as dictionary contents for specified vector direction
+            void writeDict(Ostream& os, const direction cmpt) const;
         };
 
 
+private:
+
+    // Private Classes
+
         //- Extracted patch settings
         struct boundaryEntry
         {
diff --git a/src/mesh/blockMesh/PDRblockMesh/PDRblockLocation.C b/src/mesh/blockMesh/PDRblockMesh/PDRblockLocation.C
index 6003c08a798..05138a4c2a9 100644
--- a/src/mesh/blockMesh/PDRblockMesh/PDRblockLocation.C
+++ b/src/mesh/blockMesh/PDRblockMesh/PDRblockLocation.C
@@ -129,6 +129,20 @@ Foam::gradingDescriptors Foam::PDRblock::gridControl::grading() const
 }
 
 
+void Foam::PDRblock::gridControl::resize(label len)
+{
+    // Begin/end nodes for each segment
+    scalarList& knots = *this;
+
+    knots.resize(len, Zero);
+
+    len = Foam::max(0, len-1);
+
+    divisions_.resize(len, Zero);
+    expansion_.resize(len, Zero);
+}
+
+
 void Foam::PDRblock::gridControl::append
 (
     const scalar p,
@@ -215,6 +229,37 @@ void Foam::PDRblock::gridControl::prepend
 }
 
 
+void Foam::PDRblock::gridControl::writeDict
+(
+    Ostream& os,
+    const direction cmpt
+) const
+{
+    if (cmpt < vector::nComponents)
+    {
+        os.beginBlock(vector::componentNames[cmpt]);
+    }
+
+
+    const scalarList& knots = *this;
+
+    os  << indent << "points  "
+        << flatOutput(knots) << token::END_STATEMENT << nl;
+
+    os  << indent << "nCells  "
+        << flatOutput(divisions_) << token::END_STATEMENT << nl;
+
+    os  << indent << "ratios  "
+        << flatOutput(expansion_) << token::END_STATEMENT << nl;
+
+    if (cmpt < vector::nComponents)
+    {
+        os.endBlock();
+    }
+    os << nl;
+}
+
+
 Foam::scalarMinMax Foam::PDRblock::location::edgeLimits() const
 {
     scalarMinMax limits;
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/GRep b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/GRep
index 135677cf4b9..251f659554e 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/GRep
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/GRep
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/GRxp b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/GRxp
index 50806f8b8ce..e46ee2e1502 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/GRxp
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/GRxp
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/RPers b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/RPers
index b6500ef1d80..5f78a2b2d93 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/RPers
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/RPers
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Su b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Su
index 32323dac299..6fa68063ef0 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Su
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Su
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/T b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/T
index cc2b748f96e..9c8c02b37a5 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/T
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/T
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Tu b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Tu
index f3b34fa31e8..4a42bdcad0c 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Tu
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Tu
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/U b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/U
index 6a37f90694a..ead6b49f366 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/U
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/U
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Xi b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Xi
index 65c5f777fa2..09798c67903 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Xi
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Xi
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Xp b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Xp
index 0bc77bcf287..0b86e718e54 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Xp
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/Xp
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/b b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/b
index 67ba0efffb7..9e09285daec 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/b
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/b
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/epsilon b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/epsilon
index 152ee3e10fe..204b06fd5e5 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/epsilon
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/epsilon
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            epsilonWallFunction;
         value           $internalField;
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/ft b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/ft
index efd9134b467..0bb5f74c56b 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/ft
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/ft
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/k b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/k
index bf2db6bb27a..a33bd0b8446 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/k
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/k
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            kqRWallFunction;
         value           $internalField;
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/nut b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/nut
index cabb6343a32..fc194580ebd 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/nut
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/nut
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -28,7 +28,7 @@ boundaryField
         value       $internalField;
     }
 
-    seaGround
+    ground
     {
         type    nutkWallFunction;
         value   $internalField;
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/p b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/p
index 217f8854c00..18d68502aab 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/0.orig/p
+++ b/tutorials/combustion/PDRFoam/pipeLattice/0.orig/p
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -28,7 +28,7 @@ boundaryField
         lInf            5;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/combustion/PDRFoam/pipeLattice/system/PDRsetFieldsDict b/tutorials/combustion/PDRFoam/pipeLattice/system/PDRsetFieldsDict
index 3988d35d623..bddaceafdc5 100644
--- a/tutorials/combustion/PDRFoam/pipeLattice/system/PDRsetFieldsDict
+++ b/tutorials/combustion/PDRFoam/pipeLattice/system/PDRsetFieldsDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -21,18 +21,19 @@ obsFileDir      "<case>/geometry";
 
 obsFileNames    (obstaclesDict);
 
-// legacyObsSpec   true;
-//
-// obsFileNames    (position.obs base.obs);
 
-// Some parameters for PDRfitMesh are read from this file, including
+// ------------------
+// PDRfitMesh
+// ------------------
 
-cellWidth       0.22;
+// Some parameters for PDRfitMesh are read from this file,
+// including the following
 
-outer           (20 0);
+// Mandatory (here or in PDRfitMeshDict)
+cellWidth       0.22;
 
-outerCombFac    0;
+// Optional
+cellWidthFactor 1.0;
 
-sea_ground      0.0;
 
 // ************************************************************************* //
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/GRep b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/GRep
index 135677cf4b9..251f659554e 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/GRep
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/GRep
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/GRxp b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/GRxp
index 50806f8b8ce..e46ee2e1502 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/GRxp
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/GRxp
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/RPers b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/RPers
index b6500ef1d80..5f78a2b2d93 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/RPers
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/RPers
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Su b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Su
index 32323dac299..6fa68063ef0 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Su
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Su
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/T b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/T
index cc2b748f96e..9c8c02b37a5 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/T
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/T
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Tu b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Tu
index f3b34fa31e8..4a42bdcad0c 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Tu
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Tu
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/U b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/U
index 387f9bc426c..9b0f1f616b9 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/U
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/U
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Xi b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Xi
index 65c5f777fa2..09798c67903 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Xi
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Xi
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Xp b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Xp
index 0bc77bcf287..0b86e718e54 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Xp
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/Xp
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/b b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/b
index 67ba0efffb7..9e09285daec 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/b
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/b
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/epsilon b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/epsilon
index 6bc9795f75b..a7dd6eca0be 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/epsilon
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/epsilon
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            compressible::epsilonWallFunction;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/ft b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/ft
index efd9134b467..0bb5f74c56b 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/ft
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/ft
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/k b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/k
index 18b4e206ea4..aca1be01569 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/k
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/k
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -26,7 +26,7 @@ boundaryField
         inletValue      $internalField;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            compressible::kqRWallFunction;
         value           $internalField;
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/p b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/p
index 217f8854c00..18d68502aab 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/p
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/0.orig/p
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -28,7 +28,7 @@ boundaryField
         lInf            5;
         value           $internalField;
     }
-    seaGround
+    ground
     {
         type            zeroGradient;
     }
diff --git a/tutorials/preProcessing/PDRsetFields/simplePipeCage/system/PDRsetFieldsDict b/tutorials/preProcessing/PDRsetFields/simplePipeCage/system/PDRsetFieldsDict
index 3988d35d623..3609db612c7 100644
--- a/tutorials/preProcessing/PDRsetFields/simplePipeCage/system/PDRsetFieldsDict
+++ b/tutorials/preProcessing/PDRsetFields/simplePipeCage/system/PDRsetFieldsDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2006                                 |
+|  \\    /   O peration     | Version:  v2012                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -21,18 +21,31 @@ obsFileDir      "<case>/geometry";
 
 obsFileNames    (obstaclesDict);
 
-// legacyObsSpec   true;
-//
-// obsFileNames    (position.obs base.obs);
 
-// Some parameters for PDRfitMesh are read from this file, including
+// ------------------
+// PDRfitMesh
+// ------------------
 
+// Some parameters for PDRfitMesh are read from this file,
+// including the following
+
+// Mandatory (here or in PDRfitMeshDict)
 cellWidth       0.22;
 
-outer           (20 0);
+// Optional
+cellWidthFactor 1.0;
+
+
+// ------------------
+// Advanced
+// ------------------
 
-outerCombFac    0;
+// Change some predefined patch names
+patchNames
+{
+    ground      ground;
+    outer       outer;
+}
 
-sea_ground      0.0;
 
 // ************************************************************************* //
-- 
GitLab