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:
Mark Olesen
2020-10-05 12:48:54 +02:00
parent 1d08ed9be2
commit 121c69ef2e
21 changed files with 786 additions and 715 deletions

View File

@ -14,49 +14,54 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Almost identical to basic/potentialFoam/cylinder
scale 0.016;
// Front/back locations
zmin 0;
zmax 0.5;
vertices
(
(0.5 0 0)
(1 0 0)
(2 0 0)
(2 0.707107 0)
(0.707107 0.707107 0)
(0.353553 0.353553 0)
(2 2 0)
(0.707107 2 0)
(0 2 0)
(0 1 0)
(0 0.5 0)
(-0.5 0 0)
(-1 0 0)
(-2 0 0)
(-2 0.707107 0)
(-0.707107 0.707107 0)
(-0.353553 0.353553 0)
(-2 2 0)
(-0.707107 2 0)
(0.5 0 0.5)
(1 0 0.5)
(2 0 0.5)
(2 0.707107 0.5)
(0.707107 0.707107 0.5)
(0.353553 0.353553 0.5)
(2 2 0.5)
(0.707107 2 0.5)
(0 2 0.5)
(0 1 0.5)
(0 0.5 0.5)
(-0.5 0 0.5)
(-1 0 0.5)
(-2 0 0.5)
(-2 0.707107 0.5)
(-0.707107 0.707107 0.5)
(-0.353553 0.353553 0.5)
(-2 2 0.5)
(-0.707107 2 0.5)
(0.5 0 $zmin)
(1 0 $zmin)
(2 0 $zmin)
(2 0.707107 $zmin)
(0.707107 0.707107 $zmin)
(0.353553 0.353553 $zmin)
(2 2 $zmin)
(0.707107 2 $zmin)
(0 2 $zmin)
(0 1 $zmin)
(0 0.5 $zmin)
(-0.5 0 $zmin)
(-1 0 $zmin)
(-2 0 $zmin)
(-2 0.707107 $zmin)
(-0.707107 0.707107 $zmin)
(-0.353553 0.353553 $zmin)
(-2 2 $zmin)
(-0.707107 2 $zmin)
(0.5 0 $zmax)
(1 0 $zmax)
(2 0 $zmax)
(2 0.707107 $zmax)
(0.707107 0.707107 $zmax)
(0.353553 0.353553 $zmax)
(2 2 $zmax)
(0.707107 2 $zmax)
(0 2 $zmax)
(0 1 $zmax)
(0 0.5 $zmax)
(-0.5 0 $zmax)
(-1 0 $zmax)
(-2 0 $zmax)
(-2 0.707107 $zmax)
(-0.707107 0.707107 $zmax)
(-0.353553 0.353553 $zmax)
(-2 2 $zmax)
(-0.707107 2 $zmax)
);
blocks
@ -75,22 +80,24 @@ blocks
edges
(
arc 0 5 (0.469846 0.17101 0)
arc 5 10 (0.17101 0.469846 0)
arc 1 4 (0.939693 0.34202 0)
arc 4 9 (0.34202 0.939693 0)
arc 19 24 (0.469846 0.17101 0.5)
arc 24 29 (0.17101 0.469846 0.5)
arc 20 23 (0.939693 0.34202 0.5)
arc 23 28 (0.34202 0.939693 0.5)
arc 11 16 (-0.469846 0.17101 0)
arc 16 10 (-0.17101 0.469846 0)
arc 12 15 (-0.939693 0.34202 0)
arc 15 9 (-0.34202 0.939693 0)
arc 30 35 (-0.469846 0.17101 0.5)
arc 35 29 (-0.17101 0.469846 0.5)
arc 31 34 (-0.939693 0.34202 0.5)
arc 34 28 (-0.34202 0.939693 0.5)
// Inner cylinder
arc 0 5 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 19 24 origin (0 0 $zmax)
arc 24 29 origin (0 0 $zmax)
arc 20 23 origin (0 0 $zmax)
arc 23 28 origin (0 0 $zmax)
// Intermediate cylinder
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 30 35 origin (0 0 $zmax)
arc 35 29 origin (0 0 $zmax)
arc 31 34 origin (0 0 $zmax)
arc 34 28 origin (0 0 $zmax)
);
patches