/*--------------------------------*- 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 0.001;
// Divisions in x/y/z directions. Can be unequal.
nx 15;
ny 15;
nz 100;
// radius
r 10;
pi 3.1415926;
theta0 0.0;
theta45 45.0;
theta90 90.0;
theta135 135.0;
theta180 180.0;
theta225 225.0;
theta270 270.0;
theta315 315.0;
ratio 2.5;
ratioMid 0.75;
Xin1 #calc "$r/$ratio * cos($theta45 * $pi /180)";
Yin1 #calc "$r/$ratio * sin($theta45 * $pi /180)";
Xin2 #calc "$r/$ratio * cos($theta135 * $pi /180)";
Yin2 #calc "$r/$ratio * sin($theta135 * $pi /180)";
Xin3 #calc "$r/$ratio * cos($theta225 * $pi /180)";
Yin3 #calc "$r/$ratio * sin($theta225 * $pi /180)";
Xin4 #calc "$r/$ratio * cos($theta315 * $pi /180)";
Yin4 #calc "$r/$ratio * sin($theta315 * $pi /180)";
Xout1 #calc "$r * cos($theta45 * $pi /180)";
Yout1 #calc "$r * sin($theta45 * $pi /180)";
Xout2 #calc "$r * cos($theta135 * $pi /180)";
Yout2 #calc "$r * sin($theta135 * $pi /180)";
Xout3 #calc "$r * cos($theta225 * $pi /180)";
Yout3 #calc "$r * sin($theta225 * $pi /180)";
Xout4 #calc "$r * cos($theta315 * $pi /180)";
Yout4 #calc "$r * sin($theta315 * $pi /180)";
InYmin #calc "$r/$ratio*$ratioMid * sin($theta270 * $pi /180)";
InXmax #calc "$r/$ratio*$ratioMid * cos($theta0 * $pi /180)";
InYmax #calc "$r/$ratio*$ratioMid * sin($theta90 * $pi /180)";
InXmin #calc "$r/$ratio*$ratioMid * cos($theta180 * $pi /180)";
OutYmin #calc "$r * sin($theta270 * $pi /180)";
OutXmax #calc "$r * cos($theta0 * $pi /180)";
OutYmax #calc "$r * sin($theta90 * $pi /180)";
OutXmin #calc "$r * cos($theta180 * $pi /180)";
Zmin 0.0;
Zmax 1200;
geometry
{
}
vertices
(
//circle radius in
($Xin3 $Yin3 $Zmin) //0
($Xin4 $Yin4 $Zmin) //1
($Xin1 $Yin1 $Zmin) //2
($Xin2 $Yin2 $Zmin) //3
//circle radius out
($Xout3 $Yout3 $Zmin) //4
($Xout4 $Yout4 $Zmin) //5
($Xout1 $Yout1 $Zmin) //6
($Xout2 $Yout2 $Zmin) //7
//circle radius in
($Xin3 $Yin3 $Zmax) //8
($Xin4 $Yin4 $Zmax) //9
($Xin1 $Yin1 $Zmax) //10
($Xin2 $Yin2 $Zmax) //11
//circle radius out
($Xout3 $Yout3 $Zmax) //12
($Xout4 $Yout4 $Zmax) //13
($Xout1 $Yout1 $Zmax) //14
($Xout2 $Yout2 $Zmax) //15
);
blocks
(
hex (0 1 2 3 8 9 10 11) ($nx $ny $nz) grading (1 1 1) //center(block0)
hex (1 0 4 5 9 8 12 13) ($nx $ny $nz) grading (1 1 1) //Ymin(block1)
hex (2 1 5 6 10 9 13 14) ($nx $ny $nz) grading (1 1 1) //Xmax(block2)
hex (3 2 6 7 11 10 14 15) ($nx $ny $nz) grading (1 1 1) //Ymax(block3)
hex (0 3 7 4 8 11 15 12) ($nx $ny $nz) grading (1 1 1) // Xmin(block4)
);
edges
(
//circle radius out
arc 4 5 (0 $OutYmin $Zmin)
arc 5 6 ($OutXmax 0 $Zmin)
arc 6 7 (0 $OutYmax $Zmin)
arc 7 4 ($OutXmin 0 $Zmin)
arc 12 13 (0 $OutYmin $Zmax)
arc 13 14 ($OutXmax 0 $Zmax)
arc 14 15 (0 $OutYmax $Zmax)
arc 15 12 ($OutXmin 0 $Zmax)
//circle radius in
arc 0 1 (0 $InYmin $Zmin)
arc 1 2 ($InXmax 0 $Zmin)
arc 2 3 (0 $InYmax $Zmin)
arc 3 0 ($InXmin 0 $Zmin)
arc 8 9 (0 $InYmin $Zmax)
arc 9 10 ($InXmax 0 $Zmax)
arc 10 11 (0 $InYmax $Zmax)
arc 11 8 ($InXmin 0 $Zmax)
);
faces
(
);
boundary
(
walls
{
type wall;
faces
(
(5 13 14 6)
(6 14 15 7)
(7 15 12 4)
(4 12 13 5)
);
}
inlet
{
type patch;
faces
(
(0 1 2 3)
(0 4 5 1)
(1 5 6 2)
(2 6 7 3)
(7 4 0 3)
);
}
outlet
{
type patch;
faces
(
(8 9 10 11)
(8 12 13 9)
(9 13 14 10)
(10 14 15 11)
(11 15 12 8)
);
}
);
// ************************************************************************* //