/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices #codeStream { codeInclude #{ #include "pointField.H" #}; code #{ pointField points(19); points[0] = point(-35, 0, 0); points[1] = point(9, 0, 0); points[2] = point(10, 0, 0); points[3] = point(12, 0, 0); points[4] = point(13, 0, 0); points[5] = point(115, 0, 0); points[6] = point(-35, 1.4142136, 0); points[7] = point(9.5857864, 1.4142136, 0); points[8] = point(11, 2, 0); points[9] = point(12.4142136, 1.4142136, 0); points[10] = point(115, 1.4142136, 0); points[11] = point(-35, 50, 0); points[12] = point(9.5857864, 50, 0); points[13] = point(11, 50, 0); points[14] = point(12.4142136, 50, 0); points[15] = point(115, 50, 0); points[16] = point(10.292893, 0.707107, 0); points[17] = point(11, 1, 0); points[18] = point(11.707107, 0.707107, 0); // Duplicate z points label sz = points.size(); points.setSize(2*sz); for (label i = 0; i < sz; i++) { const point& pt = points[i]; points[i+sz] = point(pt.x(), pt.y(), pt.z()+2); } //Mirror above geometry in the -y direction label my = points.size(); points.setSize(2*my); for (label i = 6; i < my; i++) { if (i < 19) { const point& pt = points[i]; points[i+(my-6)] = point(pt.x(), -pt.y(), pt.z()); } if (i > 24 && i < 38) { const point& pt = points[i]; points[i+26] = point(pt.x(), -pt.y(), pt.z()); } } //Print points for ( label k = 0; k < 2*my-12; k++) { Info << "This is point:" << k << points[k] << endl; } os << points; #}; }; blocks ( //Normal cell numbering of (x y z): hex (0 1 7 6 19 20 26 25) (10 25 1) simpleGrading (1 1 1)//1 hex (1 2 16 7 20 21 35 26) (10 25 1) simpleGrading (1 1 1)//2 hex (7 16 17 8 26 35 36 27) (10 25 1) simpleGrading (1 1 1)//3 hex (8 17 18 9 27 36 37 28) (10 25 1) simpleGrading (1 1 1)//4 hex (3 4 9 18 22 23 28 37) (10 25 1) simpleGrading (1 1 1)//5 hex (4 5 10 9 23 24 29 28) (10 25 1) simpleGrading (1 1 1)//6 hex (6 7 12 11 25 26 31 30) (10 10 1) simpleGrading (1 1 1)//7 hex (7 8 13 12 26 27 32 31) (25 10 1) simpleGrading (1 1 1)//8 hex (8 9 14 13 27 28 33 32) (25 10 1) simpleGrading (1 1 1)//9 hex (9 10 15 14 28 29 34 33) (10 10 1) simpleGrading (1 1 1)//10 //Abnormal cell numbering of (y x z) : hex (0 38 39 1 19 51 52 20) (25 10 1) simpleGrading (1 1 1)//11 hex (1 39 48 2 20 52 61 21) (25 10 1) simpleGrading (1 1 1)//12 hex (39 40 49 48 52 53 62 61) (25 10 1) simpleGrading (1 1 1)//13 hex (40 41 50 49 53 54 63 62) (25 10 1) simpleGrading (1 1 1)//14 hex (3 50 41 4 22 63 54 23) (25 10 1) simpleGrading (1 1 1)//15 hex (4 41 42 5 23 54 55 24) (25 10 1) simpleGrading (1 1 1)//16 hex (38 43 44 39 51 56 57 52) (10 10 1) simpleGrading (1 1 1)//17 hex (39 44 45 40 52 57 58 53) (10 25 1) simpleGrading (1 1 1)//18 hex (40 45 46 41 53 58 59 54) (10 25 1) simpleGrading (1 1 1)//19 hex (41 46 47 42 54 59 60 55) (10 10 1) simpleGrading (1 1 1)//20 ); edges ( arc 1 7 (9.1522409 0.76536686 0)//1 arc 7 8 (10.234633 1.8477591 0)//2 arc 8 9 (11.765367 1.8477591 0)//3 arc 9 4 (12.847759 0.76536686 0)//4 arc 2 16 (10.076120 0.38268343 0)//5 arc 16 17 (10.617317 0.92387953 0)//6 arc 17 18 (11.382683 0.92387953 0)//7 arc 18 3 (11.923880 0.38268343 0)//8 arc 20 26 (9.1522409 0.76536686 2)//9 arc 26 27 (10.234633 1.8477591 2)//10 arc 27 28 (11.765367 1.8477591 2)//11 arc 28 23 (12.847759 0.76536686 2)//12 arc 21 35 (10.076120 0.38268343 2)//13 arc 35 36 (10.617317 0.92387953 2)//14 arc 36 37 (11.382683 0.92387953 2)//15 arc 37 22 (11.923880 0.38268343 2)//16 //bottom geometry arc 1 39 (9.1522409 -0.76536686 0)//17 arc 39 40 (10.234633 -1.8477591 0)//18 arc 40 41 (11.765367 -1.8477591 0)//19 arc 41 4 (12.847759 -0.76536686 0)//20 arc 2 48 (10.076120 -0.38268343 0)//21 arc 48 49 (10.617317 -0.92387953 0)//22 arc 49 50 (11.382683 -0.92387953 0)//23 arc 50 3 (11.923880 -0.38268343 0)//24 arc 20 52 (9.1522409 -0.76536686 2)//25 arc 52 53 (10.234633 -1.8477591 2)//26 arc 53 54 (11.765367 -1.8477591 2)//27 arc 54 23 (12.847759 -0.76536686 2)//28 arc 21 61 (10.076120 -0.38268343 2)//29 arc 61 62 (10.617317 -0.92387953 2)//30 arc 62 63 (11.382683 -0.92387953 2)//31 arc 63 22 (11.923880 -0.38268343 2)//32 ); boundary ( bottomWall { type symmetry; faces ( (43 44 57 56) (44 45 58 57) (45 46 59 58) (46 47 60 59) ); } outlet { type patch; faces ( (10 15 34 29) (5 10 29 24) (5 24 55 42) (42 55 60 47) ); } topWall { type symmetry; faces ( (11 30 31 12) (12 31 32 13) (13 32 33 14) (14 33 34 15) ); } inlet { type patch; faces ( (6 25 30 11) (0 19 25 6) (0 38 51 19) (38 43 56 51) ); } cylinder { type wall; faces ( (2 16 35 21) (16 17 36 35) (17 18 37 36) (3 22 37 18) (2 21 61 48) (48 61 62 49) (49 62 63 50) (3 50 63 22) ); } frontandBack { type empty; faces ( //back (0 6 7 1) (1 7 16 2) (7 8 17 16) (8 9 18 17) (3 18 9 4) (4 9 10 5) (6 11 12 7) (7 12 13 8) (8 13 14 9) (9 14 15 10) //(1 2 48 39) //front (19 20 26 25) (20 21 35 26) (26 35 36 27) (27 36 37 28) (22 23 28 37) (23 24 29 28) (25 26 31 30) (26 27 32 31) (27 28 33 32) (28 29 34 33) ); } ); mergePatchPairs ( ); // ************************************************************************* //