1 /*--------------------------------*- C++ -*----------------------------------*\
3 | \\ / F ield | foam-extend: Open Source CFD |
4 | \\ / O peration | Version: 3.0 |
5 | \\ / A nd | Web: http://www.extend-project.de |
6 | \\/ M anipulation | |
7 \*---------------------------------------------------------------------------*/
15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17 //process this file using: m4 -P blockMeshDict.m4 > blockMeshDict
19 //m4 definitions -----------------------------
20 m4_changecom(//)m4_changequote([,])
21 m4_define(calc, [m4_esyscmd(perl -e 'printf ($1)')])
22 m4_define(pi, 3.14159265358979323844)
23 m4_define(rad, [calc($1*pi/180.0)])
25 m4_define(vlabel, [[// ]Vertex $1 = VCOUNT m4_define($1, VCOUNT)m4_define([VCOUNT], m4_incr(VCOUNT))])
27 //Geometry -----------------------------------
32 // Angle span for inner block
33 m4_define(angleB, rad( 60.0))
34 m4_define(angleD, rad( 150.0))
36 // Angle span for outer block
37 m4_define(angleA, rad( 5.0))
38 m4_define(angleC, rad(41.0))
47 m4_define(BLOCKSIZE_UPSTREAM, 25 17 1)
48 m4_define(BLOCKSIZE_DOWNSTREAM, 25 27 1)
49 m4_define(grading, 1.0)
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 //Bottom of curved block
59 (calc(r1*cos(angleB)) calc(r1*sin(angleB)) zA) vlabel(A0)
60 (calc(r2*cos(angleB)) calc(r2*sin(angleB)) zA) vlabel(A1)
61 (calc(r1*cos(angleD)) calc(r1*sin(angleD)) zA) vlabel(A2)
62 (calc(r2*cos(angleD)) calc(r2*sin(angleD)) zA) vlabel(A3)
66 (calc(r1*cos(angleB)) calc(r1*sin(angleB)) zB) vlabel(B0)
67 (calc(r2*cos(angleB)) calc(r2*sin(angleB)) zB) vlabel(B1)
68 (calc(r1*cos(angleD)) calc(r1*sin(angleD)) zB) vlabel(B2)
69 (calc(r2*cos(angleD)) calc(r2*sin(angleD)) zB) vlabel(B3)
71 //Plane A: Bottom of straight block
72 (calc(r2*cos(angleA)) calc(r2*sin(angleA)) zA) vlabel(B4)
73 (calc(r3*cos(angleA)) calc(r3*sin(angleA)) zA) vlabel(B5)
74 (calc(r2*cos(angleC)) calc(r2*sin(angleC)) zA) vlabel(B6)
75 (calc(r3*cos(angleC)) calc(r3*sin(angleC)) zA) vlabel(B7)
77 //Plane B: Top of straight block
78 (calc(r2*cos(angleA)) calc(r2*sin(angleA)) zB) vlabel(C0)
79 (calc(r3*cos(angleA)) calc(r3*sin(angleA)) zB) vlabel(C1)
80 (calc(r2*cos(angleC)) calc(r2*sin(angleC)) zB) vlabel(C2)
81 (calc(r3*cos(angleC)) calc(r3*sin(angleC)) zB) vlabel(C3)
87 hex ( A0 A1 A3 A2 B0 B1 B3 B2 ) (BLOCKSIZE_UPSTREAM) simpleGrading (1 1 grading)
88 hex ( B4 B5 B7 B6 C0 C1 C3 C2 ) (BLOCKSIZE_DOWNSTREAM) simpleGrading (1 1 grading)
93 // --- PLANE A: Bottom of curved block
94 arc A0 A2 (calc(r1*cos((angleB+angleD)/2)) calc(r1*sin((angleB+angleD)/2)) zA)
95 arc A1 A3 (calc(r2*cos((angleB+angleD)/2)) calc(r2*sin((angleB+angleD)/2)) zA)
97 // --- PLANE B: Top of curved block
98 arc B0 B2 (calc(r1*cos((angleB+angleD)/2)) calc(r1*sin((angleB+angleD)/2)) zB)
99 arc B1 B3 (calc(r2*cos((angleB+angleD)/2)) calc(r2*sin((angleB+angleD)/2)) zB)
101 // --- PLANE A: Bottom of straight block
102 arc B4 B6 (calc(r2*cos((angleA+angleC)/2)) calc(r2*sin((angleA+angleC)/2)) zA)
103 arc B5 B7 (calc(r3*cos((angleA+angleC)/2)) calc(r3*sin((angleA+angleC)/2)) zA)
105 // --- PLANE B: Top of straight block
106 arc C0 C2 (calc(r2*cos((angleA+angleC)/2)) calc(r2*sin((angleA+angleC)/2)) zB)
107 arc C1 C3 (calc(r3*cos((angleA+angleC)/2)) calc(r3*sin((angleA+angleC)/2)) zB)
121 cyclicGgi upstreamPerio1
126 cyclicGgi upstreamPerio2
131 mixingPlane upstreamMixingPlanePatch
136 mixingPlane downstreamMixingPlanePatch
141 symmetryPlane downstreamWall
147 symmetryPlane upstreamWall
153 cyclicGgi downstreamPerio1
158 cyclicGgi downstreamPerio2