From 31325d51f7632ca6e1b2fa2f61ec600cf70da631 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Tue, 4 Dec 2012 12:36:52 +0000 Subject: [PATCH] ENH: damBreakPorousBaffle: convert to createBafflesDict --- .../ras/damBreakPorousBaffle/0/alpha1 | 8 -- .../interFoam/ras/damBreakPorousBaffle/Allrun | 10 +-- .../constant/polyMesh/blockMeshDict | 14 ---- .../constant/polyMesh/boundary | 68 ---------------- .../damBreakPorousBaffle/system/controlDict | 2 + .../system/createBafflesDict | 78 +++++++++++++++++++ 6 files changed, 81 insertions(+), 99 deletions(-) delete mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary create mode 100644 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/createBafflesDict diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 index 6e0ae20fd8f..c1fa13b5144 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 @@ -39,14 +39,6 @@ boundaryField inletValue uniform 0; value uniform 0; } - porous_half0 - { - type cyclic; - } - porous_half1 - { - type cyclic; - } defaultFaces { type empty; diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun index 32c7e6f9481..2b6ce02153b 100755 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun @@ -10,15 +10,7 @@ application=`getApplication` runApplication blockMesh runApplication setFields -unset FOAM_SIGFPE -unset FOAM_SETNAN - -# Create faceZones for porous baffles -runApplication topoSet - -runApplication createBaffles cyclicZoneFaces '(porous_half0 porous_half1)' -overwrite - -runApplication changeDictionary +runApplication createBaffles -overwrite runApplication $application diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict index a60b3257e3c..11344be6ac8 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/blockMeshDict @@ -99,20 +99,6 @@ boundary (10 22 23 11) ); } - - porous_half0 - { - type cyclic; - faces (); - neighbourPatch porous_half1; - } - - porous_half1 - { - type cyclic; - faces (); - neighbourPatch porous_half0; - } ); mergePatchPairs diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary deleted file mode 100644 index de4cd852002..00000000000 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/constant/polyMesh/boundary +++ /dev/null @@ -1,68 +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 ascii; - class polyBoundaryMesh; - location "constant/polyMesh"; - object boundary; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -7 -( - leftWall - { - type wall; - nFaces 50; - startFace 4419; - } - rightWall - { - type wall; - nFaces 50; - startFace 4469; - } - lowerWall - { - type wall; - nFaces 62; - startFace 4519; - } - atmosphere - { - type patch; - nFaces 46; - startFace 4581; - } - porous_half0 - { - type cyclic; - nFaces 13; - startFace 4627; - matchTolerance 0.0001; - neighbourPatch porous_half1; - } - porous_half1 - { - type cyclic; - nFaces 13; - startFace 4640; - matchTolerance 0.0001; - neighbourPatch porous_half0; - } - defaultFaces - { - type empty; - nFaces 4536; - startFace 4653; - } -) - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict index e433c1ed674..bf6c452b469 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/controlDict @@ -55,6 +55,8 @@ maxDeltaT 1; libs ( "libturbulenceDerivedFvPatchFields.so" + "libincompressibleTurbulenceModel.so" + "libincompressibleRASModels.so" ); // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/createBafflesDict b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/createBafflesDict new file mode 100644 index 00000000000..46e0c66bf81 --- /dev/null +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/system/createBafflesDict @@ -0,0 +1,78 @@ +/*--------------------------------*- 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 +{ + cyclicFaces + { + //- Select faces and orientation through a searchableSurface + type searchableSurface; + surface searchablePlate; + origin (0.3042 0.0493 -100); + span (0 0.1584 200); + + patches + { + master + { + //- Master side patch + + name porous_half0; + type cyclic; + neighbourPatch porous_half1; + + //- Optional override of added patchfields. If not specified + // any added patchfields are of type calculated. + patchFields + { + p_rgh + { + type porousBafflePressure; + patchType cyclic; + D 700; + I 500; + length 1.05; + jump uniform 0; + value uniform 0; + } + } + } + slave + { + //- Slave side patch + + name porous_half1; + type cyclic; + neighbourPatch porous_half0; + + patchFields + { + ${...master.patchFields} + } + } + } + } +} + + +// ************************************************************************* // -- GitLab