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

scale   1;

//n1   15;
//n2   10;

//n1   30;
//n2   20;

//n1   45;
//n2   30;

n1   60;
n2   40;

nz   1;

r    1;
c    ${{ $r/(2*sqrt(2)) }};

r2   ${{ $r/sqrt(2) }};

zmin 0.0;
zmax 0.1;

geometry
{
}

vertices
(
  (-$c  -$c  $zmin) //0
  ( $c  -$c  $zmin) //1
  ( $c   $c  $zmin) //2
  (-$c   $c  $zmin) //3
  (-$r2 -$r2 $zmin) //4
  ( $r2 -$r2 $zmin) //5
  ( $r2  $r2 $zmin) //6
  (-$r2  $r2 $zmin) //7

  (-$c  -$c  $zmax) //8
  ( $c  -$c  $zmax) //9
  ( $c   $c  $zmax) //10
  (-$c   $c  $zmax) //11
  (-$r2 -$r2 $zmax) //12
  ( $r2 -$r2 $zmax) //13
  ( $r2  $r2 $zmax) //14
  (-$r2  $r2 $zmax) //15

);

blocks
(
    hex (0 1 2 3 8 9 10 11) ($n1 $n1 $nz) grading (1 1 1)
    hex (1 0 4 5 9 8 12 13) ($n1 $n2 $nz) grading (1 1 1)
    hex (2 1 5 6 10 9 13 14) ($n1 $n2 $nz) grading (1 1 1)
    hex (3 2 6 7 11 10 14 15) ($n1 $n2 $nz) grading (1 1 1)
    hex (0 3 7 4 8 11 15 12) ($n1 $n2 $nz) grading (1 1 1)
);

edges
(
    //circle radius out 
    arc 4 5  origin  (0 0 $zmin)
    arc 5 6  origin  (0 0 $zmin)
    arc 6 7  origin  (0 0 $zmin)
    arc 7 4  origin  (0 0 $zmin)

    arc 12 13  origin  (0 0 $zmax)
    arc 13 14  origin  (0 0 $zmax)
    arc 14 15  origin  (0 0 $zmax)
    arc 15 12  origin  (0 0 $zmax)

    //circle radius in
    arc 0 1  origin  ( 0   $c  $zmin)
    arc 1 2  origin  (-$c  0   $zmin)
    arc 2 3  origin  ( 0  -$c  $zmin)
    arc 3 0  origin  ( $c  0   $zmin)

    arc 8 9    origin  ( 0   $c  $zmax)
    arc 9 10   origin  (-$c  0   $zmax)
    arc 10 11  origin  ( 0  -$c  $zmax)
    arc 11 8   origin  ( $c  0   $zmax)
);

faces
(
);

boundary
(
    walls
    {
        type wall;
        faces
        (
            (5 13 14 6)
            (6 14 15 7)
            (7 15 12 4)
            (4 12 13 5)
        );
    }
    bot
    {
        type empty;
        faces
        (
            (0 1 2 3)
            (0 4 5 1)
            (1 5 6 2)
            (2 6 7 3)
            (7 4 0 3)
        );
    }
    top
    {
        type empty;
        faces
        (
            (8 9 10 11)
            (8 12 13 9)
            (9 13 14 10)
            (10 14 15 11)
            (11 15 12 8)
        );
    }
);

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

