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

convertToMeters 1;

//- Half angle of wedge in degrees
halfAngle 45.0;

//- Radius of pipe [m]
radius 0.5;


radHalfAngle    #calc "degToRad($halfAngle)";
y               #calc "$radius*sin($radHalfAngle)";
minY            #calc "-1.0*$y";
z               #calc "$radius*cos($radHalfAngle)";
minZ            #calc "-1.0*$z";

vertices
(
    (0.0    0.0 0)      //0
    (10     0.0 0)
    (10     0.0 0)      //2
    (0.0    0.0 0)

    (0.0    $minY $z)   //4
    (10     $minY $z)
    (10     $y $z)      //6
    (0.0    $y $z)

);

blocks
(
    // inlet block
    hex (0 1 2 3  4 5 6 7) (50 5 5) simpleGrading (1 1 1)
);

edges
(
    arc 4 7 (0 0 $radius)
    arc 5 6 (10 0 $radius)
);

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

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

    side1
    {
        type cyclicAMI;
        neighbourPatch side2;
        faces
        (
            (0 1 5 4)
        );

        transform rotational;
        rotationAxis (1 0 0);
        rotationCentre (0 0 0);
    }

    side2
    {
        type cyclicAMI;
        neighbourPatch side1;
        faces
        (
            (7 6 2 3)
        );

        transform rotational;
        rotationAxis (1 0 0);
        rotationCentre (0 0 0);
    }

    walls
    {
        type wall;
        faces
        (
            (4 5 6 7)
            (3 2 1 0)
        );
    }
);


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