TUT: generalize (parameterize) blockMeshDict for half-cylinder geometries

- profit from some of the recent modifications to parser expansion

TUT: adjust some #eval statements for less clutter
This commit is contained in:
Mark Olesen
2021-05-17 14:41:39 +02:00
parent 2dbabb242b
commit ec81436cce
19 changed files with 384 additions and 283 deletions

View File

@ -46,7 +46,7 @@ timePrecision 6;
runTimeModifiable true;
// Allow 10% run-up before calculating mean
timeStart #eval #{ 0.1 * ${/endTime} #};
timeStart #eval{ 0.1 * ${/endTime} };
functions

View File

@ -40,22 +40,20 @@ nz #eval{ round($nz / 5) };
#endif
zmin #eval{ -$zmax };
mrad0 #eval{ -$rad0 };
mrad1 #eval{ -$rad1 };
vertices
(
// back-plane:
// inlet region
( $xin $rad0 $zmin) // pt 0
( 0 $rad0 $zmin) // pt 1
( 0 $rad1 $zmin) // pt 2
( $xin $rad1 $zmin) // pt 3
( $xin $rad0 $zmin) // pt 0
( 0 $rad0 $zmin) // pt 1
( 0 $rad1 $zmin) // pt 2
( $xin $rad1 $zmin) // pt 3
// outlet region
( $xout $mrad1 $zmin) // pt 4
( 0 $mrad1 $zmin) // pt 5
( 0 $mrad0 $zmin) // pt 6
( $xout $mrad0 $zmin) // pt 7
( $xout -$rad1 $zmin) // pt 4
( 0 -$rad1 $zmin) // pt 5
( 0 -$rad0 $zmin) // pt 6
( $xout -$rad0 $zmin) // pt 7
// bend mid-points
( $rad0 0 $zmin) // pt 8
( $rad1 0 $zmin) // pt 9
@ -66,13 +64,13 @@ vertices
( 0 $rad1 $zmax) // pt 2 + 10
( $xin $rad1 $zmax) // pt 3 + 10
// outlet region
( $xout $mrad1 $zmax) // pt 4 + 10
( 0 $mrad1 $zmax) // pt 5 + 10
( 0 $mrad0 $zmax) // pt 6 + 10
( $xout $mrad0 $zmax) // pt 7 + 10
( $xout -$rad1 $zmax) // pt 4 + 10
( 0 -$rad1 $zmax) // pt 5 + 10
( 0 -$rad0 $zmax) // pt 6 + 10
( $xout -$rad0 $zmax) // pt 7 + 10
// bend mid-points
( $rad0 0 $zmax) // pt 8 + 10
( $rad1 0 $zmax) // pt 9 + 10
( $rad0 0 $zmax) // pt 8 + 10
( $rad1 0 $zmax) // pt 9 + 10
);
blocks