mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: use new 'arc' specification in several tutorials
- in most cases this eliminates manually calculation of circumferential points. TUT: improve parameterization of sphere blockMeshDict - allow separate parameterization of radius, ratio of inner to outer, and the number of divisions in x/y/z and radial directions
This commit is contained in:
@ -17,57 +17,60 @@ FoamFile
|
||||
|
||||
scale 0.1;
|
||||
|
||||
zmin 0;
|
||||
zmax 2;
|
||||
|
||||
vertices
|
||||
(
|
||||
( 0.500 0.000 0.000)
|
||||
( 0.369 0.338 0.000)
|
||||
( 0.338 0.369 0.000)
|
||||
( 0.000 0.500 0.000)
|
||||
( 0.737 0.676 0.000)
|
||||
( 0.074 0.068 0.000)
|
||||
( 0.676 0.737 0.000)
|
||||
( 0.068 0.074 0.000)
|
||||
( 0.000 1.000 0.000)
|
||||
( 1.000 0.000 0.000)
|
||||
( 0.100 0.000 0.000)
|
||||
( 0.000 0.100 0.000)
|
||||
( 0.500 0.000 2.000)
|
||||
( 0.369 0.338 2.000)
|
||||
( 0.338 0.369 2.000)
|
||||
( 0.000 0.500 2.000)
|
||||
( 0.737 0.676 2.000)
|
||||
( 0.074 0.068 2.000)
|
||||
( 0.676 0.737 2.000)
|
||||
( 0.068 0.074 2.000)
|
||||
( 0.000 1.000 2.000)
|
||||
( 1.000 0.000 2.000)
|
||||
( 0.100 0.000 2.000)
|
||||
( 0.000 0.100 2.000)
|
||||
(0.500 0.000 $zmin)
|
||||
(0.369 0.338 $zmin)
|
||||
(0.338 0.369 $zmin)
|
||||
(0.000 0.500 $zmin)
|
||||
(0.737 0.676 $zmin)
|
||||
(0.074 0.068 $zmin)
|
||||
(0.676 0.737 $zmin)
|
||||
(0.068 0.074 $zmin)
|
||||
(0.000 1.000 $zmin)
|
||||
(1.000 0.000 $zmin)
|
||||
(0.100 0.000 $zmin)
|
||||
(0.000 0.100 $zmin)
|
||||
(0.500 0.000 $zmax)
|
||||
(0.369 0.338 $zmax)
|
||||
(0.338 0.369 $zmax)
|
||||
(0.000 0.500 $zmax)
|
||||
(0.737 0.676 $zmax)
|
||||
(0.074 0.068 $zmax)
|
||||
(0.676 0.737 $zmax)
|
||||
(0.068 0.074 $zmax)
|
||||
(0.000 1.000 $zmax)
|
||||
(1.000 0.000 $zmax)
|
||||
(0.100 0.000 $zmax)
|
||||
(0.000 0.100 $zmax)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (1 0 9 4 13 12 21 16) (10 20 40) simpleGrading (1 1 1)
|
||||
hex (2 1 4 6 14 13 16 18) (2 20 40) simpleGrading (1 1 1)
|
||||
hex (3 2 6 8 15 14 18 20) (10 20 40) simpleGrading (1 1 1)
|
||||
hex (5 10 0 1 17 22 12 13) (10 20 40) simpleGrading (1 1 1)
|
||||
hex (11 7 2 3 23 19 14 15) (10 20 40) simpleGrading (1 1 1)
|
||||
hex (1 0 9 4 13 12 21 16) (10 20 40) simpleGrading (1 1 1)
|
||||
hex (2 1 4 6 14 13 16 18) (2 20 40) simpleGrading (1 1 1)
|
||||
hex (3 2 6 8 15 14 18 20) (10 20 40) simpleGrading (1 1 1)
|
||||
hex (5 10 0 1 17 22 12 13) (10 20 40) simpleGrading (1 1 1)
|
||||
hex (11 7 2 3 23 19 14 15) (10 20 40) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 0 1 ( 0.470 0.171 0.000 )
|
||||
arc 12 13 ( 0.470 0.171 2.000 )
|
||||
arc 2 3 ( 0.171 0.470 0.000 )
|
||||
arc 14 15 ( 0.171 0.470 2.000 )
|
||||
arc 9 4 ( 0.940 0.342 0.000 )
|
||||
arc 21 16 ( 0.940 0.342 2.000 )
|
||||
arc 5 10 ( 0.094 0.034 0.000 )
|
||||
arc 17 22 ( 0.094 0.034 2.000 )
|
||||
arc 6 8 ( 0.342 0.940 0.000 )
|
||||
arc 18 20 ( 0.342 0.940 2.000 )
|
||||
arc 11 7 ( 0.034 0.094 0.000 )
|
||||
arc 23 19 ( 0.034 0.094 2.000 )
|
||||
arc 0 1 origin (0 0 $zmin)
|
||||
arc 12 13 origin (0 0 $zmax)
|
||||
arc 2 3 origin (0 0 $zmin)
|
||||
arc 14 15 origin (0 0 $zmax)
|
||||
arc 9 4 origin (0 0 $zmin)
|
||||
arc 21 16 origin (0 0 $zmax)
|
||||
arc 5 10 origin (0 0 $zmin)
|
||||
arc 17 22 origin (0 0 $zmax)
|
||||
arc 6 8 origin (0 0 $zmin)
|
||||
arc 18 20 origin (0 0 $zmax)
|
||||
arc 11 7 origin (0 0 $zmin)
|
||||
arc 23 19 origin (0 0 $zmax)
|
||||
);
|
||||
|
||||
boundary
|
||||
|
||||
@ -16,72 +16,75 @@ FoamFile
|
||||
|
||||
scale 1;
|
||||
|
||||
zmin -1;
|
||||
zmax 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(1 0 -1)
|
||||
(1.4 0 -1)
|
||||
(5 0 -1)
|
||||
(5 0.989949 -1)
|
||||
(0.989949 0.989949 -1)
|
||||
(0.707107 0.707107 -1)
|
||||
(5 2.5 -1)
|
||||
(0.989949 2.5 -1)
|
||||
(0 2.5 -1)
|
||||
(0 1.4 -1)
|
||||
(0 1 -1)
|
||||
(-1 0 -1)
|
||||
(-1.4 0 -1)
|
||||
(-5 0 -1)
|
||||
(-5 0.989949 -1)
|
||||
(-0.989949 0.989949 -1)
|
||||
(-0.707107 0.707107 -1)
|
||||
(-5 2.5 -1)
|
||||
(-0.989949 2.5 -1)
|
||||
(5 -0.989949 -1)
|
||||
(0.989949 -0.989949 -1)
|
||||
(0.707107 -0.707107 -1)
|
||||
(5 -1.5 -1)
|
||||
(0.989949 -1.5 -1)
|
||||
(0 -1.5 -1)
|
||||
(0 -1.4 -1)
|
||||
(0 -1 -1)
|
||||
(-5 -0.989949 -1)
|
||||
(-0.989949 -0.989949 -1)
|
||||
(-0.707107 -0.707107 -1)
|
||||
(-5 -1.5 -1)
|
||||
(-0.989949 -1.5 -1)
|
||||
(1 0 1)
|
||||
(1.4 0 1)
|
||||
(5 0 1)
|
||||
(5 0.989949 1)
|
||||
(0.989949 0.989949 1)
|
||||
(0.707107 0.707107 1)
|
||||
(5 2.5 1)
|
||||
(0.989949 2.5 1)
|
||||
(0 2.5 1)
|
||||
(0 1.4 1)
|
||||
(0 1 1)
|
||||
(-1 0 1)
|
||||
(-1.4 0 1)
|
||||
(-5 0 1)
|
||||
(-5 0.989949 1)
|
||||
(-0.989949 0.989949 1)
|
||||
(-0.707107 0.707107 1)
|
||||
(-5 2.5 1)
|
||||
(-0.989949 2.5 1)
|
||||
(5 -0.989949 1)
|
||||
(0.989949 -0.989949 1)
|
||||
(0.707107 -0.707107 1)
|
||||
(5 -1.5 1)
|
||||
(0.989949 -1.5 1)
|
||||
(0 -1.5 1)
|
||||
(0 -1.4 1)
|
||||
(0 -1 1)
|
||||
(-5 -0.989949 1)
|
||||
(-0.989949 -0.989949 1)
|
||||
(-0.707107 -0.707107 1)
|
||||
(-5 -1.5 1)
|
||||
(-0.989949 -1.5 1)
|
||||
(1 0 $zmin)
|
||||
(1.4 0 $zmin)
|
||||
(5 0 $zmin)
|
||||
(5 0.989949 $zmin)
|
||||
(0.989949 0.989949 $zmin)
|
||||
(0.707107 0.707107 $zmin)
|
||||
(5 2.5 $zmin)
|
||||
(0.989949 2.5 $zmin)
|
||||
(0 2.5 $zmin)
|
||||
(0 1.4 $zmin)
|
||||
(0 1 $zmin)
|
||||
(-1 0 $zmin)
|
||||
(-1.4 0 $zmin)
|
||||
(-5 0 $zmin)
|
||||
(-5 0.989949 $zmin)
|
||||
(-0.989949 0.989949 $zmin)
|
||||
(-0.707107 0.707107 $zmin)
|
||||
(-5 2.5 $zmin)
|
||||
(-0.989949 2.5 $zmin)
|
||||
(5 -0.989949 $zmin)
|
||||
(0.989949 -0.989949 $zmin)
|
||||
(0.707107 -0.707107 $zmin)
|
||||
(5 -1.5 $zmin)
|
||||
(0.989949 -1.5 $zmin)
|
||||
(0 -1.5 $zmin)
|
||||
(0 -1.4 $zmin)
|
||||
(0 -1 $zmin)
|
||||
(-5 -0.989949 $zmin)
|
||||
(-0.989949 -0.989949 $zmin)
|
||||
(-0.707107 -0.707107 $zmin)
|
||||
(-5 -1.5 $zmin)
|
||||
(-0.989949 -1.5 $zmin)
|
||||
(1 0 $zmax)
|
||||
(1.4 0 $zmax)
|
||||
(5 0 $zmax)
|
||||
(5 0.989949 $zmax)
|
||||
(0.989949 0.989949 $zmax)
|
||||
(0.707107 0.707107 $zmax)
|
||||
(5 2.5 $zmax)
|
||||
(0.989949 2.5 $zmax)
|
||||
(0 2.5 $zmax)
|
||||
(0 1.4 $zmax)
|
||||
(0 1 $zmax)
|
||||
(-1 0 $zmax)
|
||||
(-1.4 0 $zmax)
|
||||
(-5 0 $zmax)
|
||||
(-5 0.989949 $zmax)
|
||||
(-0.989949 0.989949 $zmax)
|
||||
(-0.707107 0.707107 $zmax)
|
||||
(-5 2.5 $zmax)
|
||||
(-0.989949 2.5 $zmax)
|
||||
(5 -0.989949 $zmax)
|
||||
(0.989949 -0.989949 $zmax)
|
||||
(0.707107 -0.707107 $zmax)
|
||||
(5 -1.5 $zmax)
|
||||
(0.989949 -1.5 $zmax)
|
||||
(0 -1.5 $zmax)
|
||||
(0 -1.4 $zmax)
|
||||
(0 -1 $zmax)
|
||||
(-5 -0.989949 $zmax)
|
||||
(-0.989949 -0.989949 $zmax)
|
||||
(-0.707107 -0.707107 $zmax)
|
||||
(-5 -1.5 $zmax)
|
||||
(-0.989949 -1.5 $zmax)
|
||||
);
|
||||
|
||||
blocks
|
||||
@ -110,38 +113,38 @@ blocks
|
||||
|
||||
edges
|
||||
(
|
||||
arc 5 0 (0.92388 0.382683 -1)
|
||||
arc 5 10 (0.382683 0.923879 -1)
|
||||
arc 1 4 (1.29343 0.535757 -1)
|
||||
arc 4 9 (0.535757 1.29343 -1)
|
||||
arc 32 37 (0.92388 0.382683 1)
|
||||
arc 37 42 (0.382683 0.923879 1)
|
||||
arc 33 36 (1.29343 0.535757 1)
|
||||
arc 36 41 (0.535757 1.29343 1)
|
||||
arc 11 16 (-0.923879 0.382683 -1)
|
||||
arc 16 10 (-0.382683 0.923879 -1)
|
||||
arc 12 15 (-1.29343 0.535757 -1)
|
||||
arc 15 9 (-0.535757 1.29343 -1)
|
||||
arc 43 48 (-0.923879 0.382683 1)
|
||||
arc 48 42 (-0.382683 0.923879 1)
|
||||
arc 44 47 (-1.29343 0.535757 1)
|
||||
arc 47 41 (-0.535757 1.29343 1)
|
||||
arc 0 21 (0.923879 -0.382683 -1)
|
||||
arc 21 26 (0.382683 -0.923879 -1)
|
||||
arc 1 20 (1.29343 -0.535757 -1)
|
||||
arc 20 25 (0.535757 -1.29343 -1)
|
||||
arc 32 53 (0.923879 -0.382683 1)
|
||||
arc 53 58 (0.382683 -0.923879 1)
|
||||
arc 33 52 (1.29343 -0.535757 1)
|
||||
arc 52 57 (0.535757 -1.29343 1)
|
||||
arc 11 29 (-0.923879 -0.382683 -1)
|
||||
arc 29 26 (-0.382683 -0.923879 -1)
|
||||
arc 12 28 (-1.29343 -0.535757 -1)
|
||||
arc 28 25 (-0.535757 -1.29343 -1)
|
||||
arc 43 61 (-0.923879 -0.382683 1)
|
||||
arc 61 58 (-0.382683 -0.923879 1)
|
||||
arc 44 60 (-1.29343 -0.535757 1)
|
||||
arc 60 57 (-0.535757 -1.29343 1)
|
||||
arc 5 0 origin (0 0 $zmin)
|
||||
arc 5 10 origin (0 0 $zmin)
|
||||
arc 1 4 origin (0 0 $zmin)
|
||||
arc 4 9 origin (0 0 $zmin)
|
||||
arc 32 37 origin (0 0 $zmax)
|
||||
arc 37 42 origin (0 0 $zmax)
|
||||
arc 33 36 origin (0 0 $zmax)
|
||||
arc 36 41 origin (0 0 $zmax)
|
||||
arc 11 16 origin (0 0 $zmin)
|
||||
arc 16 10 origin (0 0 $zmin)
|
||||
arc 12 15 origin (0 0 $zmin)
|
||||
arc 15 9 origin (0 0 $zmin)
|
||||
arc 43 48 origin (0 0 $zmax)
|
||||
arc 48 42 origin (0 0 $zmax)
|
||||
arc 44 47 origin (0 0 $zmax)
|
||||
arc 47 41 origin (0 0 $zmax)
|
||||
arc 0 21 origin (0 0 $zmin)
|
||||
arc 21 26 origin (0 0 $zmin)
|
||||
arc 1 20 origin (0 0 $zmin)
|
||||
arc 20 25 origin (0 0 $zmin)
|
||||
arc 32 53 origin (0 0 $zmax)
|
||||
arc 53 58 origin (0 0 $zmax)
|
||||
arc 33 52 origin (0 0 $zmax)
|
||||
arc 52 57 origin (0 0 $zmax)
|
||||
arc 11 29 origin (0 0 $zmin)
|
||||
arc 29 26 origin (0 0 $zmin)
|
||||
arc 12 28 origin (0 0 $zmin)
|
||||
arc 28 25 origin (0 0 $zmin)
|
||||
arc 43 61 origin (0 0 $zmax)
|
||||
arc 61 58 origin (0 0 $zmax)
|
||||
arc 44 60 origin (0 0 $zmax)
|
||||
arc 60 57 origin (0 0 $zmax)
|
||||
);
|
||||
|
||||
boundary
|
||||
|
||||
@ -23,18 +23,6 @@ x3 #eval{ 10.0*$R };
|
||||
xOutlet #eval{ 18.6667*$R };
|
||||
xInlet #eval{ -10.125*$R };
|
||||
|
||||
RsinPi8 #eval{ $R*sin(0.125*pi()) };
|
||||
RsinPi8n #eval{ -$RsinPi8 };
|
||||
RcosPi8 #eval{ $R*cos(0.125*pi()) };
|
||||
RcosPi8n #eval{ -$RcosPi8 };
|
||||
RsinPi4 #eval{ $R*sin(0.25*pi()) };
|
||||
|
||||
x2sinPi8 #eval{ $x2*sin(0.125*pi()) };
|
||||
x2sinPi8n #eval{ -$x2sinPi8 };
|
||||
x2cosPi8 #eval{ $x2*cos(0.125*pi()) };
|
||||
x2cosPi8n #eval{ -$x2cosPi8 };
|
||||
x2sinPi4 #eval{ $x2*sin(0.25*pi()) };
|
||||
|
||||
z0 -0.0075;
|
||||
z1 0.0075;
|
||||
nz 1;
|
||||
@ -49,15 +37,18 @@ vertices #codeStream
|
||||
|
||||
code
|
||||
#{
|
||||
// sin(45), cos(45)
|
||||
const scalar sqrt05 = sqrt(0.5);
|
||||
|
||||
pointField points(19);
|
||||
points[0] = point($R, 0, $z0);
|
||||
points[1] = point($x2, 0, $z0);
|
||||
points[2] = point($x3, 0, $z0);
|
||||
points[3] = point($x3, $x2sinPi4, $z0);
|
||||
points[4] = point($x2sinPi4, $x2sinPi4, $z0);
|
||||
points[5] = point($RsinPi4, $RsinPi4, $z0);
|
||||
points[3] = point($x3, $x2*sqrt05, $z0);
|
||||
points[4] = point($x2*sqrt05, $x2*sqrt05, $z0);
|
||||
points[5] = point($R*sqrt05, $R*sqrt05, $z0);
|
||||
points[6] = point($x3, $x3, $z0);
|
||||
points[7] = point($x2sinPi4, $x3, $z0);
|
||||
points[7] = point($x2*sqrt05, $x3, $z0);
|
||||
|
||||
// Mirror +x points to -x side
|
||||
points[11] = point(-points[0].x(), points[0].y(), points[0].z());
|
||||
@ -76,7 +67,7 @@ vertices #codeStream
|
||||
|
||||
// Mirror -z points to +z side
|
||||
label sz = points.size();
|
||||
points.setSize(2*sz);
|
||||
points.resize(2*sz);
|
||||
for (label i = 0; i < sz; ++i)
|
||||
{
|
||||
const point& pt = points[i];
|
||||
@ -86,7 +77,7 @@ vertices #codeStream
|
||||
// Add an inner cylinder
|
||||
sz = points.size();
|
||||
label nAdd = 6;
|
||||
points.setSize(sz + nAdd);
|
||||
points.resize(sz + nAdd);
|
||||
|
||||
// Points within the inner cylinder
|
||||
points[sz] = point(0, 0, $z0);
|
||||
@ -102,7 +93,7 @@ vertices #codeStream
|
||||
|
||||
// Mirror -z points to +z side
|
||||
sz = points.size();
|
||||
points.setSize(sz + nAdd);
|
||||
points.resize(sz + nAdd);
|
||||
for (label i = 0; i < nAdd; ++i)
|
||||
{
|
||||
const point& pt = points[i+sz-nAdd];
|
||||
@ -112,21 +103,21 @@ vertices #codeStream
|
||||
// Add downstream and upstream blocks
|
||||
sz = points.size();
|
||||
nAdd = 6;
|
||||
points.setSize(sz + nAdd);
|
||||
points.resize(sz + nAdd);
|
||||
|
||||
// Points on outlet
|
||||
points[sz] = point($xOutlet, 0, $z0);
|
||||
points[sz + 1] = point($xOutlet, $x3, $z0);
|
||||
points[sz + 4] = point($xOutlet, $x2sinPi4, $z0);
|
||||
points[sz + 4] = point($xOutlet, $x2*sqrt05, $z0);
|
||||
|
||||
// Points on inlet
|
||||
points[sz + 2] = point($xInlet, 0, $z0);
|
||||
points[sz + 3] = point($xInlet, $x3, $z0);
|
||||
points[sz + 5] = point($xInlet, $x2sinPi4, $z0);
|
||||
points[sz + 5] = point($xInlet, $x2*sqrt05, $z0);
|
||||
|
||||
// Mirror -z points to +z side
|
||||
sz = points.size();
|
||||
points.setSize(sz + nAdd);
|
||||
points.resize(sz + nAdd);
|
||||
for (label i = 0; i < nAdd; ++i)
|
||||
{
|
||||
const point& pt = points[i + sz - nAdd];
|
||||
@ -158,22 +149,22 @@ blocks
|
||||
|
||||
edges
|
||||
(
|
||||
arc 0 5 ($RcosPi8 $RsinPi8 $z0)
|
||||
arc 5 10 ($RsinPi8 $RcosPi8 $z0)
|
||||
arc 1 4 ($x2cosPi8 $x2sinPi8 $z0)
|
||||
arc 4 9 ($x2sinPi8 $x2cosPi8 $z0)
|
||||
arc 19 24 ($RcosPi8 $RsinPi8 $z1)
|
||||
arc 24 29 ($RsinPi8 $RcosPi8 $z1)
|
||||
arc 20 23 ($x2cosPi8 $x2sinPi8 $z1)
|
||||
arc 23 28 ($x2sinPi8 $x2cosPi8 $z1)
|
||||
arc 11 16 ($RcosPi8n $RsinPi8 $z0)
|
||||
arc 16 10 ($RsinPi8n $RcosPi8 $z0)
|
||||
arc 12 15 ($x2cosPi8n $x2sinPi8 $z0)
|
||||
arc 15 9 ($x2sinPi8n $x2cosPi8 $z0)
|
||||
arc 30 35 ($RcosPi8n $RsinPi8 $z1)
|
||||
arc 35 29 ($RsinPi8n $RcosPi8 $z1)
|
||||
arc 31 34 ($x2cosPi8n $x2sinPi8 $z1)
|
||||
arc 34 28 ($x2sinPi8n $x2cosPi8 $z1)
|
||||
arc 0 5 origin (0 0 $z0)
|
||||
arc 5 10 origin (0 0 $z0)
|
||||
arc 1 4 origin (0 0 $z0)
|
||||
arc 4 9 origin (0 0 $z0)
|
||||
arc 19 24 origin (0 0 $z1)
|
||||
arc 24 29 origin (0 0 $z1)
|
||||
arc 20 23 origin (0 0 $z1)
|
||||
arc 23 28 origin (0 0 $z1)
|
||||
arc 11 16 origin (0 0 $z0)
|
||||
arc 16 10 origin (0 0 $z0)
|
||||
arc 12 15 origin (0 0 $z0)
|
||||
arc 15 9 origin (0 0 $z0)
|
||||
arc 30 35 origin (0 0 $z1)
|
||||
arc 35 29 origin (0 0 $z1)
|
||||
arc 31 34 origin (0 0 $z1)
|
||||
arc 34 28 origin (0 0 $z1)
|
||||
);
|
||||
|
||||
boundary
|
||||
|
||||
@ -74,14 +74,14 @@ edges #codeStream
|
||||
|
||||
code
|
||||
#{
|
||||
const scalar xMin = 0.3;
|
||||
const scalar xMax = 1.2;
|
||||
const label nPoints = 100;
|
||||
const scalar dx = (xMax - xMin)/scalar(nPoints - 1);
|
||||
constexpr scalar xMin = 0.3;
|
||||
constexpr scalar xMax = 1.2;
|
||||
constexpr label nPoints = 100;
|
||||
constexpr scalar dx = (xMax - xMin)/scalar(nPoints - 1);
|
||||
constexpr scalar pi = constant::mathematical::pi;
|
||||
|
||||
os << "(" << nl << "spline 2 3" << nl;
|
||||
pointField profile(nPoints);
|
||||
const scalar pi = constant::mathematical::pi;
|
||||
|
||||
for (label i = 0; i < nPoints; ++i)
|
||||
{
|
||||
|
||||
@ -25,34 +25,33 @@ halfAngle 45.0;
|
||||
radius 0.5;
|
||||
|
||||
y #eval{ $radius*sin(degToRad($halfAngle)) };
|
||||
minY #eval{ -1*$y };
|
||||
z #eval{ $radius*cos(degToRad($halfAngle)) };
|
||||
minY #eval{ -1*$y };
|
||||
minZ #eval{ -1*$z };
|
||||
|
||||
vertices
|
||||
(
|
||||
(0.0 0.0 0) //0
|
||||
(10 0.0 0)
|
||||
(10 0.0 0) //2
|
||||
(0.0 0.0 0)
|
||||
(0 0 0) //0
|
||||
(10 0 0) //1
|
||||
(10 0 0) //2
|
||||
(0 0 0) //3
|
||||
|
||||
(0.0 $minY $z) //4
|
||||
(10 $minY $z)
|
||||
(10 $y $z) //6
|
||||
(0.0 $y $z)
|
||||
(0 $minY $z) //4
|
||||
(10 $minY $z) //5
|
||||
(10 $y $z) //6
|
||||
(0 $y $z) //7
|
||||
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// inlet block
|
||||
hex (0 1 2 3 4 5 6 7) (50 5 5) simpleGrading (1 1 1)
|
||||
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)
|
||||
arc 4 7 origin (0 0 0)
|
||||
arc 5 6 origin (10 0 0)
|
||||
);
|
||||
|
||||
boundary
|
||||
|
||||
@ -16,36 +16,39 @@ FoamFile
|
||||
|
||||
scale 0.001;
|
||||
|
||||
zmin -25;
|
||||
zmax 25;
|
||||
|
||||
vertices
|
||||
(
|
||||
// front-plane: z = +25mm
|
||||
// front-plane:
|
||||
// inlet region
|
||||
( -50 25 25) // pt 0
|
||||
( 0 25 25) // pt 1
|
||||
( -50 75 25) // pt 2
|
||||
( 0 75 25) // pt 3
|
||||
( -50 25 $zmax) // pt 0
|
||||
( 0 25 $zmax) // pt 1
|
||||
( -50 75 $zmax) // pt 2
|
||||
( 0 75 $zmax) // pt 3
|
||||
// outlet region
|
||||
( -500 -75 25) // pt 4
|
||||
( 0 -75 25) // pt 5
|
||||
( -500 -25 25) // pt 6
|
||||
( 0 -25 25) // pt 7
|
||||
( -500 -75 $zmax) // pt 4
|
||||
( 0 -75 $zmax) // pt 5
|
||||
( -500 -25 $zmax) // pt 6
|
||||
( 0 -25 $zmax) // pt 7
|
||||
// bend mid-points
|
||||
( 25 0 25) // pt 8
|
||||
( 75 0 25) // pt 9
|
||||
// back-plane: z = -25mm
|
||||
( 25 0 $zmax) // pt 8
|
||||
( 75 0 $zmax) // pt 9
|
||||
// back-plane:
|
||||
// inlet region
|
||||
( -50 25 -25) // pt 0 + 10
|
||||
( 0 25 -25) // pt 1 + 10
|
||||
( -50 75 -25) // pt 2 + 10
|
||||
( 0 75 -25) // pt 3 + 10
|
||||
( -50 25 $zmin) // pt 0 + 10
|
||||
( 0 25 $zmin) // pt 1 + 10
|
||||
( -50 75 $zmin) // pt 2 + 10
|
||||
( 0 75 $zmin) // pt 3 + 10
|
||||
// outlet region
|
||||
( -500 -75 -25) // pt 4 + 10
|
||||
( 0 -75 -25) // pt 5 + 10
|
||||
( -500 -25 -25) // pt 7 + 10
|
||||
( 0 -25 -25) // pt 8 + 10
|
||||
( -500 -75 $zmin) // pt 4 + 10
|
||||
( 0 -75 $zmin) // pt 5 + 10
|
||||
( -500 -25 $zmin) // pt 7 + 10
|
||||
( 0 -25 $zmin) // pt 8 + 10
|
||||
// bend mid-points
|
||||
( 25 0 -25) // pt 8 + 10
|
||||
( 75 0 -25) // pt 9 + 10
|
||||
( 25 0 $zmin) // pt 8 + 10
|
||||
( 75 0 $zmin) // pt 9 + 10
|
||||
);
|
||||
|
||||
blocks
|
||||
@ -60,15 +63,15 @@ blocks
|
||||
edges
|
||||
(
|
||||
// block 2
|
||||
arc 1 8 (17.678 17.678 25)
|
||||
arc 11 18 (17.678 17.678 -25)
|
||||
arc 3 9 (53.033 53.033 25)
|
||||
arc 13 19 (53.033 53.033 -25)
|
||||
arc 1 8 origin (0 0 $zmax)
|
||||
arc 3 9 origin (0 0 $zmax)
|
||||
arc 11 18 origin (0 0 $zmin)
|
||||
arc 13 19 origin (0 0 $zmin)
|
||||
// block 3
|
||||
arc 7 8 (17.678 -17.678 25)
|
||||
arc 17 18 (17.678 -17.678 -25)
|
||||
arc 5 9 (53.033 -53.033 25)
|
||||
arc 15 19 (53.033 -53.033 -25)
|
||||
arc 7 8 origin (0 0 $zmax)
|
||||
arc 5 9 origin (0 0 $zmax)
|
||||
arc 17 18 origin (0 0 $zmin)
|
||||
arc 15 19 origin (0 0 $zmin)
|
||||
);
|
||||
|
||||
boundary
|
||||
|
||||
Reference in New Issue
Block a user