/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  13                                    |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale   1;

// Centered square obstacle: x∈[5,6], y∈[1.5,2.5], H=4D, L=31D, β=0.25
// 16 vertices in z=0 plane + 16 in z=0.1 plane = 32 total

vertices
(
    // z = 0 plane (vertices 0-15)
    ( 0.0  0.0   0.0 )   // 0
    ( 5.0  0.0   0.0 )   // 1
    ( 5.0  1.5   0.0 )   // 2
    ( 6.0  0.0   0.0 )   // 3
    ( 6.0  1.5   0.0 )   // 4
    (31.0  0.0   0.0 )   // 5
    (31.0  1.5   0.0 )   // 6
    (31.0  2.5   0.0 )   // 7
    (31.0  4.0   0.0 )   // 8
    ( 6.0  2.5   0.0 )   // 9
    ( 6.0  4.0   0.0 )   // 10
    ( 5.0  2.5   0.0 )   // 11
    ( 5.0  4.0   0.0 )   // 12
    ( 0.0  1.5   0.0 )   // 13
    ( 0.0  2.5   0.0 )   // 14
    ( 0.0  4.0   0.0 )   // 15

    // z = 0.1 plane (vertices 16-31)
    ( 0.0  0.0   0.1 )   // 16
    ( 5.0  0.0   0.1 )   // 17
    ( 5.0  1.5   0.1 )   // 18
    ( 6.0  0.0   0.1 )   // 19
    ( 6.0  1.5   0.1 )   // 20
    (31.0  0.0   0.1 )   // 21
    (31.0  1.5   0.1 )   // 22
    (31.0  2.5   0.1 )   // 23
    (31.0  4.0   0.1 )   // 24
    ( 6.0  2.5   0.1 )   // 25
    ( 6.0  4.0   0.1 )   // 26
    ( 5.0  2.5   0.1 )   // 27
    ( 5.0  4.0   0.1 )   // 28
    ( 0.0  1.5   0.1 )   // 29
    ( 0.0  2.5   0.1 )   // 30
    ( 0.0  4.0   0.1 )   // 31
);

blocks
(
    // Block 0: inletLower     x=0..5,   y=0..1.5    35×20×1 = 700
    hex ( 0  1  2 13  16 17 18 29 ) (35 20 1)
    simpleGrading (1 1 1)

    // Block 1: inletMid        x=0..5,   y=1.5..2.5  35×16×1 = 560
    hex (13  2 11 14  29 18 27 30 ) (35 16 1)
    simpleGrading (1 1 1)

    // Block 2: inletUpper      x=0..5,   y=2.5..4    35×20×1 = 700
    hex (14 11 12 15  30 27 28 31 ) (35 20 1)
    simpleGrading (1 1 1)

    // Block 3: belowObstacle   x=5..6,   y=0..1.5    12×20×1 = 240
    hex ( 1  3  4  2  17 19 20 18 ) (12 20 1)
    simpleGrading (1 1 1)

    // Block 4: aboveObstacle   x=5..6,   y=2.5..4    12×20×1 = 240
    hex (11  9 10 12  27 25 26 28 ) (12 20 1)
    simpleGrading (1 1 1)

    // Block 5: outletLower     x=6..31,  y=0..1.5   120×20×1 = 2400
    hex ( 3  5  6  4  19 21 22 20 ) (120 20 1)
    simpleGrading (1 1 1)

    // Block 6: outletMid       x=6..31,  y=1.5..2.5 120×18×1 = 2160 (WAKE)
    hex ( 4  6  7  9  20 22 23 25 ) (120 18 1)
    simpleGrading (1 1 1)

    // Block 7: outletUpper     x=6..31,  y=2.5..4   120×20×1 = 2400
    hex ( 9  7  8 10  25 23 24 26 ) (120 20 1)
    simpleGrading (1 1 1)
);

// Total: 700+700+700+240+240+2400+2640+2400 = 10,020 cells

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 0)  // inletLower -x
            (1 0)  // inletMid -x
            (2 0)  // inletUpper -x
        );
    }

    outlet
    {
        type patch;
        faces
        (
            (5 1)  // outletLower +x
            (6 1)  // outletMid +x
            (7 1)  // outletUpper +x
        );
    }

    bottomWall
    {
        type wall;
        faces
        (
            (0 2)  // inletLower -y
            (3 2)  // belowObs -y
            (5 2)  // outletLower -y
        );
    }

    topWall
    {
        type wall;
        faces
        (
            (2 3)  // inletUpper +y
            (4 3)  // aboveObs +y
            (7 3)  // outletUpper +y
        );
    }

    obstacle
    {
        type wall;
        faces
        (
            (1 1)  // front: inletMid +x (x=5, y=1.5..2.5)
            (6 0)  // back:  outletMid -x (x=6, y=1.5..2.5)
            (3 3)  // bottom: belowObs +y (y=1.5, x=5..6)
            (4 2)  // top: aboveObs -y (y=2.5, x=5..6)
        );
    }

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

mergePatchPairs
(
);

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