From 1c37be480a79d8711528072aa561625fad332b98 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 4 Dec 2012 15:02:35 +0000 Subject: [PATCH] ENH: propeller: convert to createBafflesDict --- .../pimpleDyMFoam/propeller/0.org/U | 12 ---- .../pimpleDyMFoam/propeller/0.org/epsilon | 12 ---- .../pimpleDyMFoam/propeller/0.org/k | 12 ---- .../pimpleDyMFoam/propeller/0.org/nut | 12 ---- .../pimpleDyMFoam/propeller/0.org/p | 12 ---- .../pimpleDyMFoam/propeller/Allrun.pre | 18 +++--- .../propeller/system/createBafflesDict | 58 +++++++++++++++++++ .../propeller/system/createPatchDict | 31 ---------- 8 files changed, 67 insertions(+), 100 deletions(-) create mode 100644 tutorials/incompressible/pimpleDyMFoam/propeller/system/createBafflesDict diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/U b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/U index d1bbe70951..c78eec59c1 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/U +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/U @@ -45,18 +45,6 @@ boundaryField type movingWallVelocity; value uniform (0 0 0); } - - AMI1 - { - type cyclicAMI; - value uniform (0 0 0); - } - - AMI2 - { - type cyclicAMI; - value uniform (0 0 0); - } } diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/epsilon b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/epsilon index 4512a15707..c8a9ab3e88 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/epsilon +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/epsilon @@ -45,18 +45,6 @@ boundaryField type epsilonWallFunction; value $internalField; } - - AMI1 - { - type cyclicAMI; - value $internalField; - } - - AMI2 - { - type cyclicAMI; - value $internalField; - } } diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/k b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/k index 4539cc1591..fa184b506d 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/k +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/k @@ -45,18 +45,6 @@ boundaryField type kqRWallFunction; value $internalField; } - - AMI1 - { - type cyclicAMI; - value $internalField; - } - - AMI2 - { - type cyclicAMI; - value $internalField; - } } diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/nut b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/nut index 3b34b2cbbf..0c69619423 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/nut +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/nut @@ -44,18 +44,6 @@ boundaryField type nutkWallFunction; value uniform 0; } - - AMI1 - { - type cyclicAMI; - value uniform 0; - } - - AMI2 - { - type cyclicAMI; - value uniform 0; - } } diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/p b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/p index 3196c16c90..98504cb29b 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/p +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/0.org/p @@ -41,18 +41,6 @@ boundaryField { type zeroGradient; } - - AMI1 - { - type cyclicAMI; - value uniform 0; - } - - AMI2 - { - type cyclicAMI; - value uniform 0; - } } diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre index 472c03a6f7..2abd5b41e1 100755 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun.pre @@ -17,6 +17,7 @@ runApplication surfaceFeatureExtract runApplication snappyHexMesh -overwrite # force removal of fields generated by snappy \rm -rf 0 +cp -rf 0.org 0 # - generate face/cell sets and zones @@ -37,19 +38,18 @@ runApplication topoSet -dict system/createAMIFaces.topoSetDict mv log.topoSet log.createAMIFaces.topoSet -# - create the inlet/outlet patches and AMI patches +# - create the inlet/outlet patches runApplication createPatch -overwrite -# - create the AMI faces by creating baffles, and then splitting the mesh - -createBaffles -internalFacesOnly -overwrite innerCylinderSmall '(AMI1 AMI2)' \ - > log.createBaffles 2>&1 - -runApplication mergeOrSplitBaffles -split -overwrite - - # - apply the initial fields cp -rf 0.org 0 + + +# - create the AMI faces by creating baffles, and then splitting the mesh + +runApplication createBaffles -overwrite + +runApplication mergeOrSplitBaffles -split -overwrite diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/createBafflesDict b/tutorials/incompressible/pimpleDyMFoam/propeller/system/createBafflesDict new file mode 100644 index 0000000000..f3a7eadc97 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/createBafflesDict @@ -0,0 +1,58 @@ +/*--------------------------------*- 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 createBafflesDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Whether to convert internal faces only (so leave boundary faces intact). +// This is only relevant if your face selection type can pick up boundary +// faces. +internalFacesOnly true; + + +// Baffles to create. +baffles +{ + baffleFaces + { + //- Use predefined faceZone to select faces and orientation. + type faceZone; + zoneName innerCylinderSmall; + + + patches + { + master + { + //- Master side patch + name AMI1; + type cyclicAMI; + matchTolerance 0.0001; + neighbourPatch AMI2; + transform noOrdering; + } + slave + { + //- Slave side patch + name AMI2; + type cyclicAMI; + matchTolerance 0.0001; + neighbourPatch AMI1; + transform noOrdering; + } + } + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict b/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict index 2400a43509..1559be08dd 100644 --- a/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict +++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/createPatchDict @@ -46,37 +46,6 @@ patches set outletFaces; } - - - // Construct empty patches - { - name AMI1; - patchInfo - { - type cyclicAMI; - neighbourPatch AMI2; - transform noOrdering; - surface - {} - } - constructFrom set; - set dummyFaces; - } - { - name AMI2; - - patchInfo - { - type cyclicAMI; - neighbourPatch AMI1; - transform noOrdering; - surface - {} - } - constructFrom set; - set dummyFaces; - } - ); // ************************************************************************* //