View Issue Details

IDProjectCategoryView StatusLast Update
0002685OpenFOAMPatchpublic2017-09-09 23:03
Reporterwyldckat Assigned Tohenry  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Versiondev 
Summary0002685: createPatch will always dump 'cyclic' matches to '.obj' files
DescriptionI stumbled on this issue sometime ago at work, with cases that had several cyclic patches that were being created with 'createPatch'. The '.obj' files with the cyclic matches were always dumped, without any option to not dump them to disk, unless I hacked into the source code.

But the really annoying part is that it dumps the '.obj' files into the directory from which the application was launched from... because the scripting was done outside of the case folder and therefore the option '-case' was being used, hence _contaminating_ the folder from which the application was launched :(

Attached is a proposition to at least add an obligatory option to 'createPatch' to not dump these files by default.

But it still leaves open the need to assign a default folder within the case structure for these kinds of files; I don't know if this was a decision by design (the user can choose by running from within the dumping folder) or this was left open to be decided in the future.


Therefore, attached are the following files:

 - 'proposition_v1.patch' provides an easy was to inspect the changes online.

 - 'proposition_v1.tar.gz' provides the following modified/new files:

   - 'applications/utilities/mesh/manipulation/createPatch/createPatch.C' - has a new obligatory switch 'dumpCyclicMatches' and it's used whenever the function 'dumpCyclicMatch' is called.

   - 'applications/utilities/mesh/manipulation/createPatch/createPatchDict' - was updated to have the new option 'dumpCyclicMatches', it's set to false by default and has a comment indicating what it's for.

   - All 'createPatchDict' files have been updated with the new obligatory option 'dumpCyclicMatches' in the 'tutorials' folder.

   - 'tutorials/incompressible/pimpleFoam/laminar/planarCouette' - a new tutorial case was added, based on the one from 'planarPoiseuille' on the same parent directory, but using a modified mesh from 'icoFoam/cavity/cavity'.

     - This tutorial case is based on the principle described at https://en.wikipedia.org/wiki/Couette_flow

     - The main objective of this tutorial was to test if the new option was working with 'createPatchDict', because all other tutorial cases have their cyclics created by the meshers or are created as cyclicAMI, which are not dumped to '.obj' by 'createPatchDict'.

     - It's configured to run only 25 seconds instead of 1000 (= 0.1*0.1/1e-5 = h^2/nu <- this is the expected time needed to reach steady-state), so that is left to the end-user to perform any validation and experimentation. In addition, several example settings were left in 'transportProperties' were left in it for the end-user to test, but perhaps those should be taken out due to maintenance?

     - I haven't created any validation for this tutorial, since I didn't know if this was necessary.
TagsNo tags attached.

Activities

wyldckat

2017-09-03 19:37

updater  

proposition_v1.patch (32,586 bytes)   
diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
index f240270..a64fc1f 100644
--- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C
+++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
@@ -532,6 +532,9 @@ int main(int argc, char *argv[])
     // Whether to synchronise points
     const Switch pointSync(dict.lookup("pointSync"));
 
+    // Whether to dump cyclic matches to .OBJ files
+    const Switch dumpCyclicMatches(dict.lookup("dumpCyclicMatches"));
+
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
@@ -539,7 +542,10 @@ int main(int argc, char *argv[])
     patches.checkParallelSync(true);
 
 
-    dumpCyclicMatch("initial_", mesh);
+    if(dumpCyclicMatches)
+    {
+        dumpCyclicMatch("initial_", mesh);
+    }
 
     // Read patch construct info from dictionary
     PtrList<dictionary> patchSources(dict.lookup("patches"));
@@ -758,7 +764,10 @@ int main(int argc, char *argv[])
     autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, true);
     mesh.movePoints(map().preMotionPoints());
 
-    dumpCyclicMatch("coupled_", mesh);
+    if(dumpCyclicMatches)
+    {
+        dumpCyclicMatch("coupled_", mesh);
+    }
 
     // Synchronise points.
     if (!pointSync)
@@ -869,7 +878,10 @@ int main(int argc, char *argv[])
     filterPatches(mesh, addedPatchNames);
 
 
-    dumpCyclicMatch("final_", mesh);
+    if(dumpCyclicMatches)
+    {
+        dumpCyclicMatch("final_", mesh);
+    }
 
 
     // Set the precision of the points data to 10
diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatchDict b/applications/utilities/mesh/manipulation/createPatch/createPatchDict
index 62e6cf6..66262a0 100644
--- a/applications/utilities/mesh/manipulation/createPatch/createPatchDict
+++ b/applications/utilities/mesh/manipulation/createPatch/createPatchDict
@@ -44,6 +44,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/createPatchDict b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/createPatchDict
index 8fb65d5..aeec10a 100644
--- a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/createPatchDict
@@ -17,6 +17,8 @@ FoamFile
 
 pointSync false;
 
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/filmRegion/createPatchDict b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/filmRegion/createPatchDict
index 09a0c7f..1792b00 100644
--- a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/filmRegion/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/filmRegion/createPatchDict
@@ -12,12 +12,15 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 matchTolerance 1E-3;
 
 pointSync false;
 
+dumpCyclicMatches  false;
+
 patches
 (
     {
diff --git a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/system/createPatchDict b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/system/createPatchDict
index deb7202..bb9da7c 100644
--- a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/system/createPatchDict b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/system/createPatchDict
index d8182f3..ece679f 100644
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/system/createPatchDict b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/system/createPatchDict
index d8182f3..ece679f 100644
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict b/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict
index d83f0bc..a34dafb 100644
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Do a synchronisation of coupled points after creation of any patches.
@@ -19,6 +20,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
index 137b9a2..bb79d8f 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
@@ -14,8 +14,11 @@ FoamFile
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 pointSync false;
 
+dumpCyclicMatches  false;
+
 patches
 (
     {
diff --git a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/system/createPatchDict b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/system/createPatchDict
index 2a4e08a..3be3ff9 100644
--- a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/system/createPatchDict
+++ b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/system/createPatchDict
@@ -12,10 +12,13 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 pointSync false;
 
+dumpCyclicMatches  false;
+
 patches
 (
     {
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/U b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/U
new file mode 100644
index 0000000..d76d835
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/U
@@ -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       volVectorField;
+    object      U;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 1 -1 0 0 0 0];
+
+internalField   uniform (0 0 0);
+
+boundaryField
+{
+    movingWall
+    {
+        type            fixedValue;
+        value           uniform (1 0 0);
+    }
+
+    bottomWall
+    {
+        type            noSlip;
+    }
+
+    #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/p b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/p
new file mode 100644
index 0000000..604b78e
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/p
@@ -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       volScalarField;
+    object      p;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 2 -2 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    movingWall
+    {
+        type            zeroGradient;
+    }
+
+    bottomWall
+    {
+        type            zeroGradient;
+    }
+
+    #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/sigma b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/sigma
new file mode 100644
index 0000000..17f8635
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/sigma
@@ -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       volSymmTensorField;
+    object      R;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 2 -2 0 0 0 0];
+
+internalField   uniform (0 0 0 0 0 0);
+
+boundaryField
+{
+    movingWall
+    {
+        type            zeroGradient;
+    }
+
+    bottomWall
+    {
+        type            zeroGradient;
+    }
+
+    #includeEtc "caseDicts/setConstraintTypes"
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean
new file mode 100755
index 0000000..bf98fa6
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean
@@ -0,0 +1,13 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+
+# Delete OBJ files that are created by createPatch,
+# when 'dumpCyclicMatches' set to true.
+rm -f $objFiles > /dev/null 2>&1
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allrun b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allrun
new file mode 100755
index 0000000..916e0ba
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allrun
@@ -0,0 +1,13 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+runApplication blockMesh
+
+runApplication createPatch -overwrite
+
+runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/transportProperties b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/transportProperties
new file mode 100644
index 0000000..2a62bb7
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/transportProperties
@@ -0,0 +1,53 @@
+/*--------------------------------*- 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      transportProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+transportModel  Newtonian;
+
+nu              [0 2 -1 0 0 0 0] 1.5e-05;
+
+BirdCarreauCoeffs
+{
+    nu0             [0 2 -1 0 0 0 0] 1e-03;
+    nuInf           [0 2 -1 0 0 0 0] 1e-05;
+    k               [0 0  1 0 0 0 0] 1;
+    n               [0 0  0 0 0 0 0] 0.5;
+}
+
+CrossPowerLawCoeffs
+{
+    nu0             [0 2 -1 0 0 0 0] 1e-03;
+    nuInf           [0 2 -1 0 0 0 0] 1e-05;
+    m               [0 0  1 0 0 0 0] 1;
+    n               [0 0  0 0 0 0 0] 0.5;
+}
+
+powerLawCoeffs
+{
+    nuMax           [0 2 -1 0 0 0 0] 1e-03;
+    nuMin           [0 2 -1 0 0 0 0] 1e-05;
+    k               [0 2 -1 0 0 0 0] 1e-05;
+    n               [0 0  0 0 0 0 0] 1;
+}
+
+HerschelBulkleyCoeffs
+{
+    nu0             [0 2 -1 0 0 0 0] 1e-03;
+    tau0            [0 2 -2 0 0 0 0] 1;
+    k               [0 2 -1 0 0 0 0] 1e-05;
+    n               [0 0  0 0 0 0 0] 1;
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/turbulenceProperties
new file mode 100644
index 0000000..e7cf615
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/turbulenceProperties
@@ -0,0 +1,32 @@
+/*--------------------------------*- 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      turbulenceProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+simulationType laminar;
+
+laminar
+{
+    laminarModel        Maxwell;
+
+    MaxwellCoeffs
+    {
+        nuM             1;
+        lambda          5;
+    }
+
+    printCoeffs         on;
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/blockMeshDict b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/blockMeshDict
new file mode 100644
index 0000000..f96ec72
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/blockMeshDict
@@ -0,0 +1,89 @@
+/*--------------------------------*- 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 0.1;
+
+vertices
+(
+    (0 0 0)
+    (1 0 0)
+    (1 1 0)
+    (0 1 0)
+    (0 0 0.1)
+    (1 0 0.1)
+    (1 1 0.1)
+    (0 1 0.1)
+);
+
+blocks
+(
+    hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
+);
+
+edges
+(
+);
+
+boundary
+(
+    movingWall
+    {
+        type wall;
+        faces
+        (
+            (3 7 6 2)
+        );
+    }
+    bottomWall
+    {
+        type wall;
+        faces
+        (
+            (1 5 4 0)
+        );
+    }
+    left
+    {
+        type wall;
+        faces
+        (
+            (0 4 7 3)
+        );
+    }
+    right
+    {
+        type wall;
+        faces
+        (
+            (2 6 5 1)
+        );
+    }
+    frontAndBack
+    {
+        type empty;
+        faces
+        (
+            (0 3 2 1)
+            (4 5 6 7)
+        );
+    }
+);
+
+mergePatchPairs
+(
+);
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/controlDict b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/controlDict
new file mode 100644
index 0000000..7d6ef2a
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/controlDict
@@ -0,0 +1,49 @@
+/*--------------------------------*- 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     pimpleFoam;
+
+startFrom       startTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         25;
+
+deltaT          0.005;
+
+writeControl    runTime;
+
+writeInterval   0.5;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression off;
+
+timeFormat      general;
+
+timePrecision   6;
+
+runTimeModifiable true;
+
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/createPatchDict b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/createPatchDict
new file mode 100644
index 0000000..c2b99fc
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/createPatchDict
@@ -0,0 +1,96 @@
+/*--------------------------------*- 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      createPatchDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// This application/dictionary controls:
+// - optional: create new patches from boundary faces (either given as
+//   a set of patches or as a faceSet)
+// - always: order faces on coupled patches such that they are opposite. This
+//   is done for all coupled faces, not just for any patches created.
+// - optional: synchronise points on coupled patches.
+// - always: remove zero-sized (non-coupled) patches (that were not added)
+
+// 1. Create cyclic:
+// - specify where the faces should come from
+// - specify the type of cyclic. If a rotational specify the rotationAxis
+//   and centre to make matching easier
+// - always create both halves in one invocation with correct 'neighbourPatch'
+//   setting.
+// - optionally pointSync true to guarantee points to line up.
+
+// 2. Correct incorrect cyclic:
+// This will usually fail upon loading:
+//  "face 0 area does not match neighbour 2 by 0.0100005%"
+//  " -- possible face ordering problem."
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
+
+// Do a synchronisation of coupled points after creation of any patches.
+// Note: this does not work with points that are on multiple coupled patches
+//       with transformations (i.e. cyclics).
+pointSync true;
+
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
+// Patches to create.
+patches
+(
+    {
+        // Name of new patch
+        name cyc_half0;
+
+        // Dictionary to construct new patch from
+        patchInfo
+        {
+            type cyclic;
+            neighbourPatch cyc_half1;
+        }
+
+        // How to construct: either from 'patches' or 'set'
+        constructFrom patches;
+
+        // If constructFrom = patches : names of patches. Wildcards allowed.
+        patches (left);
+
+        // If constructFrom = set : name of faceSet
+        set f0;
+    }
+    {
+        // Name of new patch
+        name cyc_half1;
+
+        // Dictionary to construct new patch from
+        patchInfo
+        {
+            type cyclic;
+            neighbourPatch cyc_half0;
+        }
+
+        // How to construct: either from 'patches' or 'set'
+        constructFrom patches;
+
+        // If constructFrom = patches : names of patches. Wildcards allowed.
+        patches (right);
+
+        // If constructFrom = set : name of faceSet
+        set f0;
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSchemes b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSchemes
new file mode 100644
index 0000000..c7802ef
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSchemes
@@ -0,0 +1,54 @@
+/*--------------------------------*- 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      fvSchemes;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ddtSchemes
+{
+    default         backward;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+
+    div(phi,U)      Gauss linearUpwind grad(U);
+    div(phi,sigma)  Gauss vanAlbada;
+
+    div(sigma)                  Gauss linear;
+    div((nu*dev2(T(grad(U)))))  Gauss linear;
+    div((nuM*grad(U)))          Gauss linear;
+}
+
+laplacianSchemes
+{
+    default         Gauss linear uncorrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         uncorrected;
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSolution b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSolution
new file mode 100644
index 0000000..c82c0fb
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSolution
@@ -0,0 +1,67 @@
+/*--------------------------------*- 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      fvSolution;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+solvers
+{
+    p
+    {
+        solver          GAMG;
+        smoother        DIC;
+        tolerance       1e-6;
+        relTol          0.05;
+    }
+
+    "(U|sigma)"
+    {
+        solver          smoothSolver;
+        smoother        symGaussSeidel;
+        tolerance       1e-6;
+        relTol          0.1;
+    }
+
+    pFinal
+    {
+        $p;
+        relTol          0;
+    }
+
+    "(U|sigma)Final"
+    {
+        $U;
+        relTol          0;
+    }
+}
+
+PIMPLE
+{
+    momentumPredictor   off;
+    nOuterCorrectors    15;
+    nCorrectors         3;
+    nNonOrthogonalCorrectors 0;
+    pRefCell            0;
+    pRefValue           0;
+    turbOnFinalIterOnly no;
+}
+
+relaxationFactors
+{
+    equations
+    {
+        ".*"   1;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/system/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/cylinder/system/createPatchDict
index 7270ff3..79c71cb 100644
--- a/tutorials/lagrangian/reactingParcelFoam/cylinder/system/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patchInfo
 (
diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/createPatchDict
index cbfab2f..d1bf7cf 100644
--- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/wallFilmRegion/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/wallFilmRegion/createPatchDict
index c919a48..cda56e8 100644
--- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/wallFilmRegion/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/wallFilmRegion/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/createPatchDict
index cbfab2f..d1bf7cf 100644
--- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/wallFilmRegion/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/wallFilmRegion/createPatchDict
index c919a48..cda56e8 100644
--- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/wallFilmRegion/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/wallFilmRegion/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/createPatchDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/createPatchDict
index 5aafd9a..31f6b4b 100644
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/system/createPatchDict
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Do a synchronisation of coupled points after creation of any patches.
@@ -19,6 +20,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict
index d83f0bc..a34dafb 100644
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Do a synchronisation of coupled points after creation of any patches.
@@ -19,6 +20,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict
index fb68e22..5e7f869 100644
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Do a synchronisation of coupled points after creation of any patches.
@@ -19,6 +20,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Dump cyclic matches into .obj format
+dumpCyclicMatches  false;
+
 // Patches to create.
 patches
 (
proposition_v1.patch (32,586 bytes)   

wyldckat

2017-09-03 19:37

updater  

proposition_v1.tar.gz (10,864 bytes)

henry

2017-09-04 18:04

manager   ~0008690

> Attached is a proposition to at least add an obligatory option to 'createPatch' to not dump these files by default.

Why make the option obligatory? Wouldn't it be more convenient if it is not obligatory and defaults to false?

henry

2017-09-04 18:06

manager   ~0008691

One minor point: I think it would be more consistent with the rest of OpeFOAM if the option is named "writeCyclicMatch"; dump is not used often to specify the writing of files.

wyldckat

2017-09-04 18:10

updater   ~0008692

I was in doubt regarding making it optional or not.

I ended up making it obligatory for the users who do expect the obj files to be created and then report this as a bug when they don't find the reason as to why it stopped working as it used to.

If you prefer that this is made optional, I can revise the proposition later tonight.

wyldckat

2017-09-04 18:11

updater   ~0008693

> I think it would be more consistent with the rest of OpeFOAM if the option is named "writeCyclicMatch"

OK, I'll also change this. I had simply used the same name as the function that is in 'createPatch'.

henry

2017-09-04 20:53

manager   ~0008694

I think that given you are making the writing of the obj files optional it should default to false as they are indeed optional and not the principle purpose of the utility.

> I had simply used the same name as the function that is in 'createPatch'.

OK your decision makes sense but the use of the name "dump" for the write function and option is inconsistent with the rest of OpenFOAM and I think both should be changed.

wyldckat

2017-09-09 16:13

updater  

proposition_v2.patch (32,489 bytes)   
diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
index f240270..15107b5 100644
--- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C
+++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
@@ -532,6 +532,12 @@ int main(int argc, char *argv[])
     // Whether to synchronise points
     const Switch pointSync(dict.lookup("pointSync"));
 
+    // Whether to dump cyclic matches to .OBJ files
+    const Switch writeCyclicMatch
+    (
+        dict.lookupOrDefault("writeCyclicMatch", false)
+    );
+
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
@@ -539,7 +545,10 @@ int main(int argc, char *argv[])
     patches.checkParallelSync(true);
 
 
-    dumpCyclicMatch("initial_", mesh);
+    if(writeCyclicMatch)
+    {
+        dumpCyclicMatch("initial_", mesh);
+    }
 
     // Read patch construct info from dictionary
     PtrList<dictionary> patchSources(dict.lookup("patches"));
@@ -758,7 +767,10 @@ int main(int argc, char *argv[])
     autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, true);
     mesh.movePoints(map().preMotionPoints());
 
-    dumpCyclicMatch("coupled_", mesh);
+    if(writeCyclicMatch)
+    {
+        dumpCyclicMatch("coupled_", mesh);
+    }
 
     // Synchronise points.
     if (!pointSync)
@@ -869,7 +881,10 @@ int main(int argc, char *argv[])
     filterPatches(mesh, addedPatchNames);
 
 
-    dumpCyclicMatch("final_", mesh);
+    if(writeCyclicMatch)
+    {
+        dumpCyclicMatch("final_", mesh);
+    }
 
 
     // Set the precision of the points data to 10
diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatchDict b/applications/utilities/mesh/manipulation/createPatch/createPatchDict
index 62e6cf6..e60471d 100644
--- a/applications/utilities/mesh/manipulation/createPatch/createPatchDict
+++ b/applications/utilities/mesh/manipulation/createPatch/createPatchDict
@@ -44,6 +44,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/filmRegion/createPatchDict b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/filmRegion/createPatchDict
index 09a0c7f..8124147 100644
--- a/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/filmRegion/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/flameSpreadWaterSuppressionPanel/system/filmRegion/createPatchDict
@@ -12,9 +12,8 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
-matchTolerance 1E-3;
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 pointSync false;
 
diff --git a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/system/createPatchDict b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/system/createPatchDict
index deb7202..bba4dc2 100644
--- a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/system/createPatchDict b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/system/createPatchDict
index d8182f3..ac9a87a 100644
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/system/createPatchDict b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/system/createPatchDict
index d8182f3..ac9a87a 100644
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/system/createPatchDict
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict b/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict
index d83f0bc..c0a3886 100644
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Do a synchronisation of coupled points after creation of any patches.
@@ -19,6 +20,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
index 137b9a2..a8b9e06 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_simpleFoam/system/createPatchDict
@@ -14,6 +14,7 @@ FoamFile
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
 pointSync false;
 
 patches
diff --git a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/system/createPatchDict b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/system/createPatchDict
index 2a4e08a..7b83a63 100644
--- a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/system/createPatchDict
+++ b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 pointSync false;
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/U b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/U
new file mode 100644
index 0000000..d76d835
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/U
@@ -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       volVectorField;
+    object      U;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 1 -1 0 0 0 0];
+
+internalField   uniform (0 0 0);
+
+boundaryField
+{
+    movingWall
+    {
+        type            fixedValue;
+        value           uniform (1 0 0);
+    }
+
+    bottomWall
+    {
+        type            noSlip;
+    }
+
+    #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/p b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/p
new file mode 100644
index 0000000..604b78e
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/p
@@ -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       volScalarField;
+    object      p;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 2 -2 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    movingWall
+    {
+        type            zeroGradient;
+    }
+
+    bottomWall
+    {
+        type            zeroGradient;
+    }
+
+    #includeEtc "caseDicts/setConstraintTypes"
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/sigma b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/sigma
new file mode 100644
index 0000000..17f8635
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/0/sigma
@@ -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       volSymmTensorField;
+    object      R;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 2 -2 0 0 0 0];
+
+internalField   uniform (0 0 0 0 0 0);
+
+boundaryField
+{
+    movingWall
+    {
+        type            zeroGradient;
+    }
+
+    bottomWall
+    {
+        type            zeroGradient;
+    }
+
+    #includeEtc "caseDicts/setConstraintTypes"
+}
+
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean
new file mode 100755
index 0000000..bf98fa6
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allclean
@@ -0,0 +1,13 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial clean functions
+. $WM_PROJECT_DIR/bin/tools/CleanFunctions
+
+cleanCase
+
+# Delete OBJ files that are created by createPatch,
+# when 'dumpCyclicMatches' set to true.
+rm -f $objFiles > /dev/null 2>&1
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allrun b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allrun
new file mode 100755
index 0000000..916e0ba
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/Allrun
@@ -0,0 +1,13 @@
+#!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+runApplication blockMesh
+
+runApplication createPatch -overwrite
+
+runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/transportProperties b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/transportProperties
new file mode 100644
index 0000000..2a62bb7
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/transportProperties
@@ -0,0 +1,53 @@
+/*--------------------------------*- 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      transportProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+transportModel  Newtonian;
+
+nu              [0 2 -1 0 0 0 0] 1.5e-05;
+
+BirdCarreauCoeffs
+{
+    nu0             [0 2 -1 0 0 0 0] 1e-03;
+    nuInf           [0 2 -1 0 0 0 0] 1e-05;
+    k               [0 0  1 0 0 0 0] 1;
+    n               [0 0  0 0 0 0 0] 0.5;
+}
+
+CrossPowerLawCoeffs
+{
+    nu0             [0 2 -1 0 0 0 0] 1e-03;
+    nuInf           [0 2 -1 0 0 0 0] 1e-05;
+    m               [0 0  1 0 0 0 0] 1;
+    n               [0 0  0 0 0 0 0] 0.5;
+}
+
+powerLawCoeffs
+{
+    nuMax           [0 2 -1 0 0 0 0] 1e-03;
+    nuMin           [0 2 -1 0 0 0 0] 1e-05;
+    k               [0 2 -1 0 0 0 0] 1e-05;
+    n               [0 0  0 0 0 0 0] 1;
+}
+
+HerschelBulkleyCoeffs
+{
+    nu0             [0 2 -1 0 0 0 0] 1e-03;
+    tau0            [0 2 -2 0 0 0 0] 1;
+    k               [0 2 -1 0 0 0 0] 1e-05;
+    n               [0 0  0 0 0 0 0] 1;
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/turbulenceProperties
new file mode 100644
index 0000000..e7cf615
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/constant/turbulenceProperties
@@ -0,0 +1,32 @@
+/*--------------------------------*- 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      turbulenceProperties;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+simulationType laminar;
+
+laminar
+{
+    laminarModel        Maxwell;
+
+    MaxwellCoeffs
+    {
+        nuM             1;
+        lambda          5;
+    }
+
+    printCoeffs         on;
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/blockMeshDict b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/blockMeshDict
new file mode 100644
index 0000000..f96ec72
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/blockMeshDict
@@ -0,0 +1,89 @@
+/*--------------------------------*- 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 0.1;
+
+vertices
+(
+    (0 0 0)
+    (1 0 0)
+    (1 1 0)
+    (0 1 0)
+    (0 0 0.1)
+    (1 0 0.1)
+    (1 1 0.1)
+    (0 1 0.1)
+);
+
+blocks
+(
+    hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
+);
+
+edges
+(
+);
+
+boundary
+(
+    movingWall
+    {
+        type wall;
+        faces
+        (
+            (3 7 6 2)
+        );
+    }
+    bottomWall
+    {
+        type wall;
+        faces
+        (
+            (1 5 4 0)
+        );
+    }
+    left
+    {
+        type wall;
+        faces
+        (
+            (0 4 7 3)
+        );
+    }
+    right
+    {
+        type wall;
+        faces
+        (
+            (2 6 5 1)
+        );
+    }
+    frontAndBack
+    {
+        type empty;
+        faces
+        (
+            (0 3 2 1)
+            (4 5 6 7)
+        );
+    }
+);
+
+mergePatchPairs
+(
+);
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/controlDict b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/controlDict
new file mode 100644
index 0000000..7d6ef2a
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/controlDict
@@ -0,0 +1,49 @@
+/*--------------------------------*- 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     pimpleFoam;
+
+startFrom       startTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         25;
+
+deltaT          0.005;
+
+writeControl    runTime;
+
+writeInterval   0.5;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression off;
+
+timeFormat      general;
+
+timePrecision   6;
+
+runTimeModifiable true;
+
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/createPatchDict b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/createPatchDict
new file mode 100644
index 0000000..9082f3b
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/createPatchDict
@@ -0,0 +1,96 @@
+/*--------------------------------*- 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      createPatchDict;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// This application/dictionary controls:
+// - optional: create new patches from boundary faces (either given as
+//   a set of patches or as a faceSet)
+// - always: order faces on coupled patches such that they are opposite. This
+//   is done for all coupled faces, not just for any patches created.
+// - optional: synchronise points on coupled patches.
+// - always: remove zero-sized (non-coupled) patches (that were not added)
+
+// 1. Create cyclic:
+// - specify where the faces should come from
+// - specify the type of cyclic. If a rotational specify the rotationAxis
+//   and centre to make matching easier
+// - always create both halves in one invocation with correct 'neighbourPatch'
+//   setting.
+// - optionally pointSync true to guarantee points to line up.
+
+// 2. Correct incorrect cyclic:
+// This will usually fail upon loading:
+//  "face 0 area does not match neighbour 2 by 0.0100005%"
+//  " -- possible face ordering problem."
+// - in polyMesh/boundary file:
+//      - loosen matchTolerance of all cyclics to get case to load
+//      - or change patch type from 'cyclic' to 'patch'
+//        and regenerate cyclic as above
+
+// Do a synchronisation of coupled points after creation of any patches.
+// Note: this does not work with points that are on multiple coupled patches
+//       with transformations (i.e. cyclics).
+pointSync true;
+
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
+// Patches to create.
+patches
+(
+    {
+        // Name of new patch
+        name cyc_half0;
+
+        // Dictionary to construct new patch from
+        patchInfo
+        {
+            type cyclic;
+            neighbourPatch cyc_half1;
+        }
+
+        // How to construct: either from 'patches' or 'set'
+        constructFrom patches;
+
+        // If constructFrom = patches : names of patches. Wildcards allowed.
+        patches (left);
+
+        // If constructFrom = set : name of faceSet
+        set f0;
+    }
+    {
+        // Name of new patch
+        name cyc_half1;
+
+        // Dictionary to construct new patch from
+        patchInfo
+        {
+            type cyclic;
+            neighbourPatch cyc_half0;
+        }
+
+        // How to construct: either from 'patches' or 'set'
+        constructFrom patches;
+
+        // If constructFrom = patches : names of patches. Wildcards allowed.
+        patches (right);
+
+        // If constructFrom = set : name of faceSet
+        set f0;
+    }
+);
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSchemes b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSchemes
new file mode 100644
index 0000000..c7802ef
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSchemes
@@ -0,0 +1,54 @@
+/*--------------------------------*- 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      fvSchemes;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ddtSchemes
+{
+    default         backward;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+
+    div(phi,U)      Gauss linearUpwind grad(U);
+    div(phi,sigma)  Gauss vanAlbada;
+
+    div(sigma)                  Gauss linear;
+    div((nu*dev2(T(grad(U)))))  Gauss linear;
+    div((nuM*grad(U)))          Gauss linear;
+}
+
+laplacianSchemes
+{
+    default         Gauss linear uncorrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         uncorrected;
+}
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSolution b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSolution
new file mode 100644
index 0000000..c82c0fb
--- /dev/null
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarCouette/system/fvSolution
@@ -0,0 +1,67 @@
+/*--------------------------------*- 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      fvSolution;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+solvers
+{
+    p
+    {
+        solver          GAMG;
+        smoother        DIC;
+        tolerance       1e-6;
+        relTol          0.05;
+    }
+
+    "(U|sigma)"
+    {
+        solver          smoothSolver;
+        smoother        symGaussSeidel;
+        tolerance       1e-6;
+        relTol          0.1;
+    }
+
+    pFinal
+    {
+        $p;
+        relTol          0;
+    }
+
+    "(U|sigma)Final"
+    {
+        $U;
+        relTol          0;
+    }
+}
+
+PIMPLE
+{
+    momentumPredictor   off;
+    nOuterCorrectors    15;
+    nCorrectors         3;
+    nNonOrthogonalCorrectors 0;
+    pRefCell            0;
+    pRefValue           0;
+    turbOnFinalIterOnly no;
+}
+
+relaxationFactors
+{
+    equations
+    {
+        ".*"   1;
+    }
+}
+
+// ************************************************************************* //
diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/system/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/cylinder/system/createPatchDict
index 7270ff3..fd1f0a6 100644
--- a/tutorials/lagrangian/reactingParcelFoam/cylinder/system/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patchInfo
 (
diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/createPatchDict
index cbfab2f..5f540ab 100644
--- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/wallFilmRegion/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/wallFilmRegion/createPatchDict
index c919a48..29ec3b0 100644
--- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/wallFilmRegion/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/system/wallFilmRegion/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/createPatchDict
index cbfab2f..5f540ab 100644
--- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/wallFilmRegion/createPatchDict b/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/wallFilmRegion/createPatchDict
index c919a48..29ec3b0 100644
--- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/wallFilmRegion/createPatchDict
+++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/system/wallFilmRegion/createPatchDict
@@ -45,6 +45,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/createPatchDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/createPatchDict
index 5aafd9a..63a90c4 100644
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/system/createPatchDict
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Do a synchronisation of coupled points after creation of any patches.
@@ -19,6 +20,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict
index d83f0bc..c0a3886 100644
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Do a synchronisation of coupled points after creation of any patches.
@@ -19,6 +20,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict
index fb68e22..70b752d 100644
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict
@@ -12,6 +12,7 @@ FoamFile
     class       dictionary;
     object      createPatchDict;
 }
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 // Do a synchronisation of coupled points after creation of any patches.
@@ -19,6 +20,9 @@ FoamFile
 //       with transformations (i.e. cyclics).
 pointSync false;
 
+// Optional: Write cyclic matches into .obj format; defaults to false.
+// writeCyclicMatch  false;
+
 // Patches to create.
 patches
 (
proposition_v2.patch (32,489 bytes)   

wyldckat

2017-09-09 16:13

updater  

proposition_v2.tar.gz (10,852 bytes)

wyldckat

2017-09-09 16:16

updater   ~0008732

OK, the week didn't go as I had planned... but here is the revised patch+tarball.


Attached are the following files:

 - 'proposition_v2.patch' provides an easy was to inspect the changes online.

 - 'proposition_v2.tar.gz' provides the following modified/new files:

   - 'applications/utilities/mesh/manipulation/createPatch/createPatch.C' - has a new optional switch 'writeCyclicMatch' and it's used whenever the function 'dumpCyclicMatch' is called.

   - 'applications/utilities/mesh/manipulation/createPatch/createPatchDict' - was updated to have the new option 'writeCyclicMatch', it's set to false by default, it's commented out and has a comment indicating what it's for.

   - The majority of the 'createPatchDict' files have been updated with the new optional switch 'writeCyclicMatch' in the 'tutorials' folder, specifically only those files that have the original comments, now also have this new entry.

   - 'tutorials/incompressible/pimpleFoam/laminar/planarCouette' - a new tutorial case was added, based on the one from 'planarPoiseuille' on the same parent directory, but using a modified mesh from 'icoFoam/cavity/cavity'.

     - This tutorial case is based on the principle described at https://en.wikipedia.org/wiki/Couette_flow

     - The main objective of this tutorial was to test if the new option was working with 'createPatchDict', because all other tutorial cases have their cyclics created by the meshers or are created as cyclicAMI, which are not dumped to '.obj' by 'createPatchDict'.

     - It's configured to run only 25 seconds instead of 1000 (= 0.1*0.1/1e-5 = h^2/nu <- this is the expected time needed to reach steady-state), so that is left to the end-user to perform any validation and experimentation. In addition, several example settings were left in 'transportProperties' were left in it for the end-user to test, but perhaps those should be taken out due to maintenance?

     - I haven't created any validation for this tutorial, since I didn't know if this was necessary.

henry

2017-09-09 22:59

manager   ~0008740

Thanks for the updated patch

> it's set to false by default, it's commented out and has a comment indicating what it's for.

I think if the entry is present in the dictionary it is confusing if it is commented-out; it should either be set or left out. I have left the entry in the dictionary uncommented to aid backward compatibility for those who prefered the old default of the OBJ files being written.

I have renamed the dumpCyclicMatch function for consistency with the writeCyclicMatch and the rest of OpenFOAM. I will push the changes shortly.

henry

2017-09-09 23:03

manager   ~0008741

Thanks Bruno

Resolved by commit f53f52a691773914303d665525bc7ec5976a6fd4

Issue History

Date Modified Username Field Change
2017-09-03 19:37 wyldckat New Issue
2017-09-03 19:37 wyldckat Status new => assigned
2017-09-03 19:37 wyldckat Assigned To => henry
2017-09-03 19:37 wyldckat File Added: proposition_v1.patch
2017-09-03 19:37 wyldckat File Added: proposition_v1.tar.gz
2017-09-04 18:04 henry Note Added: 0008690
2017-09-04 18:06 henry Note Added: 0008691
2017-09-04 18:10 wyldckat Note Added: 0008692
2017-09-04 18:11 wyldckat Note Added: 0008693
2017-09-04 20:53 henry Note Added: 0008694
2017-09-09 16:13 wyldckat File Added: proposition_v2.patch
2017-09-09 16:13 wyldckat File Added: proposition_v2.tar.gz
2017-09-09 16:16 wyldckat Note Added: 0008732
2017-09-09 22:59 henry Note Added: 0008740
2017-09-09 23:03 henry Status assigned => resolved
2017-09-09 23:03 henry Resolution open => fixed
2017-09-09 23:03 henry Fixed in Version => dev
2017-09-09 23:03 henry Note Added: 0008741