From 1d679022bb43ca5393032d50a82e5899f7d6f558 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Thu, 14 Nov 2013 09:56:43 +0000
Subject: [PATCH] ENH: TJunctionFan: new createBaffles syntax

---
 .../pimpleFoam/TJunctionFan/Allclean          |  10 ++
 .../pimpleFoam/TJunctionFan/Allrun            |   2 +
 .../TJunctionFan/system/createBafflesDict     | 133 +++++++-----------
 3 files changed, 59 insertions(+), 86 deletions(-)
 create mode 100755 tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean

diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean b/tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean
new file mode 100755
index 00000000000..3c02c946550
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/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
+
+cleanCase
+rm -rf 0
+
+# ----------------------------------------------------------------- end-of-file
diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun b/tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun
index 932dded90be..628bd511a94 100755
--- a/tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun
+++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun
@@ -11,6 +11,8 @@ runApplication blockMesh
 # Create faceZones for baffles and fan
 runApplication topoSet
 
+cp -r 0.org 0
+
 # Create wall and cyclic baffles and the fields on them
 runApplication createBaffles -overwrite
 
diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/createBafflesDict b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/createBafflesDict
index f70ad3e89bd..19ea37dfdba 100644
--- a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/createBafflesDict
+++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/createBafflesDict
@@ -29,60 +29,46 @@ baffles
         type        faceZone;
         zoneName    baffleFaces;
 
-
-        //- Optional flip
-        //flip        false;
-
-        patches
+        patchPairs
         {
-            master
-            {
-                //- Master side patch
-                name            baffles;
-                type            wall;
+            type            wall;
 
-                patchFields
+            patchFields
+            {
+                epsilon
                 {
-                    epsilon
-                    {
-                        type            epsilonWallFunction;
-                        Cmu             0.09;
-                        kappa           0.41;
-                        E               9.8;
-                        value           uniform 0;
-                    }
-                    k
-                    {
-                        type            kqRWallFunction;
-                        value           uniform 0;
-                    }
-                    nut
-                    {
-                        type            nutkWallFunction;
-                        Cmu             0.09;
-                        kappa           0.41;
-                        E               9.8;
-                        value           uniform 0;
-                    }
-                    nuTilda
-                    {
-                        type            zeroGradient;
-                    }
-                    p
-                    {
-                        type            zeroGradient;
-                    }
-                    U
-                    {
-                        type            fixedValue;
-                        value           uniform (0 0 0);
-                    }
+                    type            epsilonWallFunction;
+                    Cmu             0.09;
+                    kappa           0.41;
+                    E               9.8;
+                    value           uniform 0;
+                }
+                k
+                {
+                    type            kqRWallFunction;
+                    value           uniform 0;
+                }
+                nut
+                {
+                    type            nutkWallFunction;
+                    Cmu             0.09;
+                    kappa           0.41;
+                    E               9.8;
+                    value           uniform 0;
+                }
+                nuTilda
+                {
+                    type            zeroGradient;
+                }
+                p
+                {
+                    type            zeroGradient;
+                }
+                U
+                {
+                    type            fixedValue;
+                    value           uniform (0 0 0);
                 }
-            }
-            slave
-            {
-                // Reuse master data
-                ${..master}
             }
         }
     }
@@ -97,46 +83,21 @@ baffles
         origin      (0.099 -0.006 0.004);
         span        (0 0.012 0.012);
 
-        patches
+        patchPairs
         {
-            master
-            {
-                //- Master side patch
-
-                name            fan_half0;
-                type            cyclic;
-                neighbourPatch  fan_half1;
+            type            cyclic;
 
-                //- Optional override of added patchfields. If not specified
-                //  any added patchfields are of type calculated.
-                patchFields
-                {
-                    p
-                    {
-                        type            fan;
-                        patchType       cyclic;
-                        jump            uniform 0;
-                        value           uniform 0;
-                        jumpTable       polynomial 1((100 0));
-                    }
-                }
-            }
-            slave
+            //- Optional override of added patchfields. If not specified
+            //  any added patchfields are of type calculated.
+            patchFields
             {
-                //- Slave side patch
-
-                name            fan_half1;
-                type            cyclic;
-                neighbourPatch  fan_half0;
-
-                patchFields
+                p
                 {
-                    p
-                    {
-                        type            fan;
-                        patchType       cyclic;
-                        value           uniform 0;
-                    }
+                    type            fan;
+                    patchType       cyclic;
+                    jump            uniform 0;
+                    value           uniform 0;
+                    jumpTable       polynomial 1((100 0));
                 }
             }
         }
-- 
GitLab