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

// Creating a 2D axi mesh for a cylinder

convertToMeters 0.001; // convert millimeters in meters

// Cylinder properties
radius 9.35; //  radius 9.5 mm
h 4; // height 40 mm
alphaDeg 2.5; // half angle of the wedge in degrees

alpha    	#calc "degToRad($alphaDeg)";
s               #calc "$radius*sin($alpha)";
s_neg		#calc "-1.0*$s";
c               #calc "$radius*cos($alpha)";


vertices
(
    (0 0 0) // 0
    ($c 0 $s_neg) // 1
    ($c $h $s_neg) // 2
    (0 $h 0) // 3

    (0 0 0) // 4
    ($c 0 $s) // 5
    ($c  $h $s) // 6
    (0 $h 0) // 7
);

blocks
(
    // hex (0 1 2 3 4 5 6 7) porousMat (100 100 1) simpleGrading (1 0.2 1) // 0
    hex (0 1 2 3 0 5 6 3) porousMat (80 1 1) simpleGrading (1 1 1) // 0, collapsed 7->3, 4-> 0
);

edges
(
);

patches
(
    wall top
    (
////        (3 7 6 2)
//        (3 3 6 2)
        (1 2 6 5)
//	(0 0 5 1)
    )

    empty sides
    (
//        (3 7 6 2)
        (3 3 6 2)
//	(1 2 6 5)
        (0 0 5 1)
    )
    wedge wedge_pos
    (
        (0 1 2 3)
    )

    wedge wedge_neg
    (
//	(4 5 6 3)
        (0 5 6 3)
    )

    empty center
    (
//	(0 4 7 3)
        (0 0 3 3)
    )

);

mergePatchPairs
(
);

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