diff --git a/tutorials/basic/laplacianFoam/Case1.1_mixingPlane_sector_AB_60deg/constant/polyMesh/blockMeshDict.m4 b/tutorials/basic/laplacianFoam/Case1.1_mixingPlane_sector_AB_60deg/constant/polyMesh/blockMeshDict.m4 index 07cf35989..fd5a28434 100644 --- a/tutorials/basic/laplacianFoam/Case1.1_mixingPlane_sector_AB_60deg/constant/polyMesh/blockMeshDict.m4 +++ b/tutorials/basic/laplacianFoam/Case1.1_mixingPlane_sector_AB_60deg/constant/polyMesh/blockMeshDict.m4 @@ -12,6 +12,90 @@ FoamFile class dictionary; object blockMeshDict; } + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Parametrized test case for the ERCOFTAC diffuser. + +// Created by Omar Bounous + +// Modified by Martin Beaudoin (11/2009) + +//Run using: +//m4 -P blockMeshDict.m4 > blockMeshDict + +//m4 definitions: +m4_changecom(//)m4_changequote([,]) +m4_define(calc, [m4_esyscmd(perl -e 'use Math::Trig; printf ($1)')]) + +m4_define(pi, 3.14159265358979323844) +m4_define(rad, [calc($1*pi/180.0)]) +m4_define(VCOUNT, 0) +m4_define(vlabel, [[// ]Vertex $1 = VCOUNT m4_define($1, VCOUNT)m4_define([VCOUNT], m4_incr(VCOUNT))]) + +//Mathematical constants: +m4_define(sqr,0.707106781186548) + +// Make sure we are properly aligned for sampling inside the mesh volume +m4_define(startAngleOffset, rad(60.0)) + +// Angle span for section A_BB +m4_define(startAngleSectionA_BB, rad(startAngleOffset + 0.0)) +m4_define(stopAngleSectionA_BB, rad(startAngleOffset + 60.0)) +m4_define(angleSpanSectionA_BB, calc(stopAngleSectionA_BB - startAngleSectionA_BB)) + + + +//Geometry +m4_define(openingAngle, 10.0) +m4_define(diffuserLength, 0.51) +m4_define(extensionLength, 0.59) +m4_define(rIn,0.13) +m4_define(rOut, calc(rIn+diffuserLength*tan(openingAngle*pi/180.0))) + +//Grid points (integers!): +// For a better mesh resolution in the radial and tangential direction, +// play with rNumberOfCells and tNumberOfCells +m4_define(rNumberOfCells, 25) +m4_define(tNumberOfCells, 20) +//m4_define(rNumberOfCells, 3) +//m4_define(tNumberOfCells, 4) +// +m4_define(zABnumberOfCells, 10) +m4_define(zBCnumberOfCells, 4) +m4_define(zCDnumberOfCells, 6) +m4_define(zDEnumberOfCells, 30) +m4_define(zEFnumberOfCells, 10) +m4_define(rGrading, 0.2) + +//Plane A: +m4_define(zA, -0.50) +m4_define(rA, rIn) + +//Plane B: +m4_define(zB, -0.10) +m4_define(rB, rIn) + +//Plane BB: // This is where we put the mixingPlane interface +m4_define(zBB, -0.10) +m4_define(rBB, rIn) + +//Plane C: +m4_define(zC, -0.025) +m4_define(rC, rIn) + +//Plane D: +m4_define(zD, 0) +m4_define(rD, rIn) + +//Plane E: +m4_define(zE, diffuserLength) +m4_define(rE, rOut) + +//Plane F: +m4_define(zF, calc(diffuserLength+extensionLength)) +m4_define(rF, rOut) + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; diff --git a/tutorials/incompressible/simpleFoam/mixingPlaneAxial/constant/polyMesh/blockMeshDict.m4 b/tutorials/incompressible/simpleFoam/mixingPlaneAxial/constant/polyMesh/blockMeshDict.m4 index 180cb833f..a9bfa628b 100644 --- a/tutorials/incompressible/simpleFoam/mixingPlaneAxial/constant/polyMesh/blockMeshDict.m4 +++ b/tutorials/incompressible/simpleFoam/mixingPlaneAxial/constant/polyMesh/blockMeshDict.m4 @@ -12,6 +12,43 @@ FoamFile class dictionary; object blockMeshDict; } + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//process this file using: m4 -P blockMeshDict.m4 > blockMeshDict + +//m4 definitions ----------------------------- +m4_changecom(//)m4_changequote([,]) +m4_define(calc, [m4_esyscmd(perl -e 'printf ($1)')]) +m4_define(pi, 3.14159265358979323844) +m4_define(rad, [calc($1*pi/180.0)]) +m4_define(VCOUNT, 0) +m4_define(vlabel, [[// ]Vertex $1 = VCOUNT m4_define($1, VCOUNT)m4_define([VCOUNT], m4_incr(VCOUNT))]) + +//Geometry ----------------------------------- +// 2 planes levels +m4_define(zA, 0.0) +m4_define(zB, 0.1) + +// Angle span for inner block +m4_define(angleB, rad( 60.0)) +m4_define(angleD, rad( 150.0)) + +// Angle span for outer block +m4_define(angleA, rad( 5.0)) +m4_define(angleC, rad(41.0)) + +// Radial dimensions +m4_define(r1, 1.0) +m4_define(r2, 2.0) +m4_define(r3, 3.0) + +// Mesh parameters +m4_define(nCells, 5) +m4_define(BLOCKSIZE_UPSTREAM, 25 17 1) +m4_define(BLOCKSIZE_DOWNSTREAM, 25 27 1) +m4_define(grading, 1.0) + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1;