diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/Allrun b/tutorials/lagrangian/reactingParcelFoam/filter/Allrun index b82b7aad36e49837f94c5ca03b670d24c6fed3e4..7db81c26764f11073eff2d532bd2f1c1ba524b88 100755 --- a/tutorials/lagrangian/reactingParcelFoam/filter/Allrun +++ b/tutorials/lagrangian/reactingParcelFoam/filter/Allrun @@ -10,23 +10,10 @@ application=`getApplication` runApplication blockMesh # create sets -#setSet -batch system/sets.setSet > log.setSet1 2>&1 runApplication topoSet -# create the first cyclic - lhs of porous zone -# Note that we don't know what value to give these patches-out-of-nothing so -# - use binary writing to avoid 'nan' -# - use setFields to set values -unset FOAM_SIGFPE -runApplication createBaffles cycLeft '(cycLeft_half0 cycLeft_half1)' -overwrite -mv log.createBaffles log.createBaffles1 - -# create the second cyclic - rhs of porous zone -runApplication createBaffles cycRight '(cycRight_half0 cycRight_half1)' -overwrite -mv log.createBaffles log.createBaffles2 - -# Initialise newly created patchFields to 0 -runApplication changeDictionary +# create baffles and fields +createBaffles -overwrite runApplication $application diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/constant/polyMesh/blockMeshDict b/tutorials/lagrangian/reactingParcelFoam/filter/constant/polyMesh/blockMeshDict index 04b1edd6ab2023f613d1b9b34c400b4e0390a666..ae16964f9352790d20bc408641b3027323f09503 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/constant/polyMesh/blockMeshDict +++ b/tutorials/lagrangian/reactingParcelFoam/filter/constant/polyMesh/blockMeshDict @@ -100,32 +100,6 @@ boundary ); } - cycLeft_half0 - { - type cyclic; - faces (); - neighbourPatch cycLeft_half1; - } - cycLeft_half1 - { - type cyclic; - faces (); - neighbourPatch cycLeft_half0; - } - - cycRight_half0 - { - type cyclic; - faces (); - neighbourPatch cycRight_half1; - } - cycRight_half1 - { - type cyclic; - faces (); - neighbourPatch cycRight_half0; - } - frontAndBack { type empty; diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/constant/polyMesh/boundary b/tutorials/lagrangian/reactingParcelFoam/filter/constant/polyMesh/boundary deleted file mode 100644 index 3a75efa15be726e00276bc3ee9a6d2fdbb2220f0..0000000000000000000000000000000000000000 --- a/tutorials/lagrangian/reactingParcelFoam/filter/constant/polyMesh/boundary +++ /dev/null @@ -1,83 +0,0 @@ -/*--------------------------------*- 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 binary; - class polyBoundaryMesh; - location "constant/polyMesh"; - object boundary; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -8 -( - walls - { - type wall; - nFaces 172; - startFace 3294; - } - inlet - { - type patch; - nFaces 20; - startFace 3466; - } - outlet - { - type patch; - nFaces 20; - startFace 3486; - } - cycLeft_half0 - { - type cyclic; - inGroups 1(cyclic); - nFaces 20; - startFace 3506; - matchTolerance 0.0001; - neighbourPatch cycLeft_half1; - } - cycLeft_half1 - { - type cyclic; - inGroups 1(cyclic); - nFaces 20; - startFace 3526; - matchTolerance 0.0001; - neighbourPatch cycLeft_half0; - } - cycRight_half0 - { - type cyclic; - inGroups 1(cyclic); - nFaces 20; - startFace 3546; - matchTolerance 0.0001; - neighbourPatch cycRight_half1; - } - cycRight_half1 - { - type cyclic; - inGroups 1(cyclic); - nFaces 20; - startFace 3566; - matchTolerance 0.0001; - neighbourPatch cycRight_half0; - } - frontAndBack - { - type empty; - inGroups 1(empty); - nFaces 3440; - startFace 3586; - } -) - -// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/system/createBafflesDict b/tutorials/lagrangian/reactingParcelFoam/filter/system/createBafflesDict new file mode 100644 index 0000000000000000000000000000000000000000..1caf47dc89d7e6df43b99af09865fe4827778ce3 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/filter/system/createBafflesDict @@ -0,0 +1,81 @@ +/*--------------------------------*- 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 +{ + cycLeft + { + //- Use predefined faceZone to select faces and orientation. + type faceZone; + zoneName cycLeft; + + patches + { + master + { + //- Master side patch + + name cycLeft_half0; + type cyclic; + neighbourPatch cycLeft_half1; + } + slave + { + //- Slave side patch + + name cycLeft_half1; + type cyclic; + neighbourPatch cycLeft_half0; + } + } + } + + cycRight + { + //- Use predefined faceZone to select faces and orientation. + type faceZone; + zoneName cycRight; + + patches + { + master + { + //- Master side patch + + name cycRight_half0; + type cyclic; + neighbourPatch cycRight_half1; + } + slave + { + //- Slave side patch + + name cycRight_half1; + type cyclic; + neighbourPatch cycRight_half0; + } + } + } +} + + +// ************************************************************************* //