/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     4.1                                |
|   \\  /    A nd           | Web:         http://www.foam-extend.org         |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale 1;

vertices
(
    // Background mesh
    (-20 -20 -0.5)
    ( 30 -20 -0.5)
    ( 30  20 -0.5)
    (-20  20 -0.5)
    (-20 -20 0.5)
    ( 30 -20 0.5)
    ( 30  20 0.5)
    (-20  20 0.5)

    // Cylinder, back
    ( 0 -1 -0.5)
    ( 1 0 -0.5)
    ( 0 1 -0.5)
    (-1 0 -0.5)

    ( 0 -6 -0.5)
    ( 6 0 -0.5)
    ( 0 6 -0.5)
    (-6 0 -0.5)

    // Cylinder, front
    ( 0 -1 0.5)
    ( 1 0 0.5)
    ( 0 1 0.5)
    (-1 0 0.5)

    ( 0 -6 0.5)
    ( 6 0 0.5)
    ( 0 6 0.5)
    (-6 0 0.5)

    // Refine box
    (-10 -10 -0.5)
    ( 29 -10 -0.5)
    ( 29  10 -0.5)
    (-10  10 -0.5)
    (-10 -10 0.5)
    ( 29 -10 0.5)
    ( 29  10 0.5)
    (-10  10 0.5)

);

blocks
(
    // Background
    hex (0 1 2 3 4 5 6 7) background (100 80 1) simpleGrading (1 1 1)

    // Refine box
    hex (24 25 26 27 28 29 30 31) refine (100 60 1) simpleGrading (1 1 1)

    // Front
    hex (8 12 13 9 16 20 21 17) front   (33 22 1) simpleGrading (4 1 1)
    hex (9 13 14 10 17 21 22 18) front  (33 22 1) simpleGrading (4 1 1)
    hex (10 14 15 11 18 22 23 19) front (33 22 1) simpleGrading (4 1 1)
    hex (11 15 12 8 19 23 20 16) front  (33 22 1) simpleGrading (4 1 1)

);

edges
(
    // Inner arc, back 0.707107
    arc  8  9 ( 0.707107 -0.707107 -0.5)
    arc  9 10 ( 0.707107  0.707107 -0.5)
    arc 10 11 (-0.707107  0.707107 -0.5)
    arc 11  8 (-0.707107 -0.707107 -0.5)

    // Inner arc, front
    arc 16 17 ( 0.707107 -0.707107 0.5)
    arc 17 18 ( 0.707107  0.707107 0.5)
    arc 18 19 (-0.707107  0.707107 0.5)
    arc 19 16 (-0.707107 -0.707107 0.5)

    // Outer arc, back 4.242641
    arc 12 13 ( 4.242641 -4.242641 -0.5)
    arc 13 14 ( 4.242641  4.242641 -0.5)
    arc 14 15 (-4.242641  4.242641 -0.5)
    arc 15 12 (-4.242641 -4.242641 -0.5)

    // Outer arc, front
    arc 20 21 ( 4.242641 -4.242641 0.5)
    arc 21 22 ( 4.242641  4.242641 0.5)
    arc 22 23 (-4.242641  4.242641 0.5)
    arc 23 20 (-4.242641 -4.242641 0.5)
);

boundary
(
    outerCylinder
    {
        type        overset;
        faces
        (
            (12 13 21 20)
            (13 14 22 21)
            (14 15 23 22)
            (15 12 20 23)
        );
    }

    refine
    {
        type        overset;
        faces
        (
            (24 28 31 27)
            (26 30 29 25)
            (27 31 30 26)
            (25 29 28 24)
        );
    }

    in
    {
        type        patch;
        faces
        (
            (0 4 7 3)
        );
    }

    out
    {
        type        patch;
        faces
        (
            (2 6 5 1)
        );
    }

    top
    {
        type        symmetryPlane;
        faces
        (
            (3 7 6 2)
        );
    }

    bottom
    {
        type        symmetryPlane;
        faces
        (
            (1 5 4 0)
        );
    }

    cylinder
    {
        type        wall;
        faces
        (
            (8 16 17 9)
            (9 17 18 10)
            (10 18 19 11)
            (11 19 16 8)
        );
    }

    frontAndBack
    {
        type        empty;
        faces
        (
            (0 3 2 1)
            (4 5 6 7)

            (8 9 13 12)
            (9 10 14 13)
            (10 11 15 14)
            (11 8 12 15)

            (16 20 21 17)
            (17 21 22 18)
            (18 22 23 19)
            (19 23 20 16)

            (24 27 26 25)
            (28 29 30 31)
        );
    }
);


// ************************************************************************* //
