TUT: improve parameterization of squareBend geometry

- orient blocks in global x/y/z.
  Provisioning for coarser/smaller geometries.
This commit is contained in:
Mark Olesen 2021-03-08 16:31:57 +01:00
parent 496792f328
commit ce45a12918
16 changed files with 528 additions and 172 deletions

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh
runApplication topoSet
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -16,62 +16,85 @@ FoamFile
scale 0.001; scale 0.001;
zmin -25; xin -50;
zmax 25; xout -500;
rad0 25;
rad1 75;
zmax 25;
nxin 20;
nxout 200;
nxbend 30;
ny 20;
nz 20;
// Coarser and smaller
#if 0
xin #eval{ $xin / 5 };
xout #eval{ $xout / 5 };
zmax #eval{ $zmax / 5 };
nxin #eval{ round($nxin / 5) };
nxout #eval{ round($nxout / 5) };
nz #eval{ round($nz / 5) };
#endif
zmin #eval{ -$zmax };
mrad0 #eval{ -$rad0 };
mrad1 #eval{ -$rad1 };
vertices vertices
( (
// front-plane:
// inlet region
( -50 25 $zmax) // pt 0
( 0 25 $zmax) // pt 1
( -50 75 $zmax) // pt 2
( 0 75 $zmax) // pt 3
// outlet region
( -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 $zmax) // pt 8
( 75 0 $zmax) // pt 9
// back-plane: // back-plane:
// inlet region // inlet region
( -50 25 $zmin) // pt 0 + 10 ( $xin $rad0 $zmin) // pt 0
( 0 25 $zmin) // pt 1 + 10 ( 0 $rad0 $zmin) // pt 1
( -50 75 $zmin) // pt 2 + 10 ( 0 $rad1 $zmin) // pt 2
( 0 75 $zmin) // pt 3 + 10 ( $xin $rad1 $zmin) // pt 3
// outlet region // outlet region
( -500 -75 $zmin) // pt 4 + 10 ( $xout $mrad1 $zmin) // pt 4
( 0 -75 $zmin) // pt 5 + 10 ( 0 $mrad1 $zmin) // pt 5
( -500 -25 $zmin) // pt 7 + 10 ( 0 $mrad0 $zmin) // pt 6
( 0 -25 $zmin) // pt 8 + 10 ( $xout $mrad0 $zmin) // pt 7
// bend mid-points // bend mid-points
( 25 0 $zmin) // pt 8 + 10 ( $rad0 0 $zmin) // pt 8
( 75 0 $zmin) // pt 9 + 10 ( $rad1 0 $zmin) // pt 9
// front-plane:
// inlet region
( $xin $rad0 $zmax) // pt 0 + 10
( 0 $rad0 $zmax) // pt 1 + 10
( 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
// bend mid-points
( $rad0 0 $zmax) // pt 8 + 10
( $rad1 0 $zmax) // pt 9 + 10
); );
blocks blocks
( (
hex (0 1 11 10 2 3 13 12) inlet ( 20 20 20) simpleGrading (1 1 1) hex (0 1 2 3 10 11 12 13) inlet ( $nxin $ny $nz) simpleGrading (1 1 1)
hex (4 5 15 14 6 7 17 16) outlet (200 20 20) simpleGrading (1 1 1) hex (4 5 6 7 14 15 16 17) outlet ( $nxout $ny $nz) simpleGrading (1 1 1)
hex (1 8 9 2 11 18 19 12) bend1 ( $nxbend $ny $nz) simpleGrading (1 1 1)
hex (1 8 18 11 3 9 19 13) bend1 ( 30 20 20) simpleGrading (1 1 1) hex (5 9 8 6 15 19 18 16) bend2 ( $nxbend $ny $nz) simpleGrading (1 1 1)
hex (5 9 19 15 7 8 18 17) bend2 ( 30 20 20) simpleGrading (1 1 1)
); );
edges edges
( (
// block 2 // block 2
arc 1 8 origin (0 0 $zmax) arc 1 8 origin (0 0 $zmin)
arc 3 9 origin (0 0 $zmax) arc 2 9 origin (0 0 $zmin)
arc 11 18 origin (0 0 $zmin) arc 11 18 origin (0 0 $zmax)
arc 13 19 origin (0 0 $zmin) arc 12 19 origin (0 0 $zmax)
// block 3 // block 3
arc 7 8 origin (0 0 $zmax) arc 6 8 origin (0 0 $zmin)
arc 5 9 origin (0 0 $zmax) arc 5 9 origin (0 0 $zmin)
arc 17 18 origin (0 0 $zmin) arc 16 18 origin (0 0 $zmax)
arc 15 19 origin (0 0 $zmin) arc 15 19 origin (0 0 $zmax)
); );
boundary boundary
@ -81,7 +104,7 @@ boundary
type patch; type patch;
faces faces
( (
(0 2 12 10) (0 10 13 3)
); );
} }
@ -90,7 +113,7 @@ boundary
type patch; type patch;
faces faces
( (
(4 6 16 14) (4 14 17 7)
); );
} }
); );
@ -99,7 +122,6 @@ mergePatchPairs
( (
); );
// The defaultFaces == outside "walls" // The defaultFaces == outside "walls"
defaultPatch defaultPatch
{ {

View File

@ -32,7 +32,7 @@ writeInterval 10;
purgeWrite 0; purgeWrite 0;
writeFormat ascii; writeFormat binary;
writePrecision 6; writePrecision 6;

View File

@ -0,0 +1,57 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name mid-plane;
type faceZoneSet;
action new;
source planeToFaceZone;
point (0 0 0);
normal (0 0 1);
}
{
name mid-plane;
type faceSet;
action new;
source zoneToFace;
zone mid-plane;
}
{
name mid-plane;
type faceSet;
action subset;
source boxToFace;
min (0 -1000 -1000);
max (1000 1000 1000);
}
{
name mid-plane;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet mid-plane;
}
{
name mid-plane;
type faceSet;
action remove;
}
);
// ************************************************************************* //

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh
runApplication topoSet
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -16,62 +16,85 @@ FoamFile
scale 0.001; scale 0.001;
zmin -25; xin -50;
zmax 25; xout -500;
rad0 25;
rad1 75;
zmax 25;
nxin 20;
nxout 200;
nxbend 30;
ny 20;
nz 20;
// Coarser and smaller
#if 0
xin #eval{ $xin / 5 };
xout #eval{ $xout / 5 };
zmax #eval{ $zmax / 5 };
nxin #eval{ round($nxin / 5) };
nxout #eval{ round($nxout / 5) };
nz #eval{ round($nz / 5) };
#endif
zmin #eval{ -$zmax };
mrad0 #eval{ -$rad0 };
mrad1 #eval{ -$rad1 };
vertices vertices
( (
// front-plane:
// inlet region
( -50 25 $zmax) // pt 0
( 0 25 $zmax) // pt 1
( -50 75 $zmax) // pt 2
( 0 75 $zmax) // pt 3
// outlet region
( -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 $zmax) // pt 8
( 75 0 $zmax) // pt 9
// back-plane: // back-plane:
// inlet region // inlet region
( -50 25 $zmin) // pt 0 + 10 ( $xin $rad0 $zmin) // pt 0
( 0 25 $zmin) // pt 1 + 10 ( 0 $rad0 $zmin) // pt 1
( -50 75 $zmin) // pt 2 + 10 ( 0 $rad1 $zmin) // pt 2
( 0 75 $zmin) // pt 3 + 10 ( $xin $rad1 $zmin) // pt 3
// outlet region // outlet region
( -500 -75 $zmin) // pt 4 + 10 ( $xout $mrad1 $zmin) // pt 4
( 0 -75 $zmin) // pt 5 + 10 ( 0 $mrad1 $zmin) // pt 5
( -500 -25 $zmin) // pt 7 + 10 ( 0 $mrad0 $zmin) // pt 6
( 0 -25 $zmin) // pt 8 + 10 ( $xout $mrad0 $zmin) // pt 7
// bend mid-points // bend mid-points
( 25 0 $zmin) // pt 8 + 10 ( $rad0 0 $zmin) // pt 8
( 75 0 $zmin) // pt 9 + 10 ( $rad1 0 $zmin) // pt 9
// front-plane:
// inlet region
( $xin $rad0 $zmax) // pt 0 + 10
( 0 $rad0 $zmax) // pt 1 + 10
( 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
// bend mid-points
( $rad0 0 $zmax) // pt 8 + 10
( $rad1 0 $zmax) // pt 9 + 10
); );
blocks blocks
( (
hex (0 1 11 10 2 3 13 12) inlet ( 20 20 20) simpleGrading (1 1 1) hex (0 1 2 3 10 11 12 13) inlet ( $nxin $ny $nz) simpleGrading (1 1 1)
hex (4 5 15 14 6 7 17 16) outlet (200 20 20) simpleGrading (1 1 1) hex (4 5 6 7 14 15 16 17) outlet ( $nxout $ny $nz) simpleGrading (1 1 1)
hex (1 8 9 2 11 18 19 12) bend1 ( $nxbend $ny $nz) simpleGrading (1 1 1)
hex (1 8 18 11 3 9 19 13) bend1 ( 30 20 20) simpleGrading (1 1 1) hex (5 9 8 6 15 19 18 16) bend2 ( $nxbend $ny $nz) simpleGrading (1 1 1)
hex (5 9 19 15 7 8 18 17) bend2 ( 30 20 20) simpleGrading (1 1 1)
); );
edges edges
( (
// block 2 // block 2
arc 1 8 origin (0 0 $zmax) arc 1 8 origin (0 0 $zmin)
arc 3 9 origin (0 0 $zmax) arc 2 9 origin (0 0 $zmin)
arc 11 18 origin (0 0 $zmin) arc 11 18 origin (0 0 $zmax)
arc 13 19 origin (0 0 $zmin) arc 12 19 origin (0 0 $zmax)
// block 3 // block 3
arc 7 8 origin (0 0 $zmax) arc 6 8 origin (0 0 $zmin)
arc 5 9 origin (0 0 $zmax) arc 5 9 origin (0 0 $zmin)
arc 17 18 origin (0 0 $zmin) arc 16 18 origin (0 0 $zmax)
arc 15 19 origin (0 0 $zmin) arc 15 19 origin (0 0 $zmax)
); );
boundary boundary
@ -81,7 +104,7 @@ boundary
type patch; type patch;
faces faces
( (
(0 2 12 10) (0 10 13 3)
); );
} }
@ -90,7 +113,7 @@ boundary
type patch; type patch;
faces faces
( (
(4 6 16 14) (4 14 17 7)
); );
} }
); );
@ -99,7 +122,6 @@ mergePatchPairs
( (
); );
// The defaultFaces == outside "walls" // The defaultFaces == outside "walls"
defaultPatch defaultPatch
{ {

View File

@ -33,7 +33,7 @@ writeInterval 100;
purgeWrite 0; purgeWrite 0;
writeFormat ascii; writeFormat binary;
writePrecision 6; writePrecision 6;

View File

@ -0,0 +1,57 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name mid-plane;
type faceZoneSet;
action new;
source planeToFaceZone;
point (0 0 0);
normal (0 0 1);
}
{
name mid-plane;
type faceSet;
action new;
source zoneToFace;
zone mid-plane;
}
{
name mid-plane;
type faceSet;
action subset;
source boxToFace;
min (0 -1000 -1000);
max (1000 1000 1000);
}
{
name mid-plane;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet mid-plane;
}
{
name mid-plane;
type faceSet;
action remove;
}
);
// ************************************************************************* //

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh
runApplication topoSet
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -16,62 +16,85 @@ FoamFile
scale 0.001; scale 0.001;
zmin -25; xin -50;
zmax 25; xout -500;
rad0 25;
rad1 75;
zmax 25;
nxin 20;
nxout 200;
nxbend 30;
ny 20;
nz 20;
// Coarser and smaller
#if 0
xin #eval{ $xin / 5 };
xout #eval{ $xout / 5 };
zmax #eval{ $zmax / 5 };
nxin #eval{ round($nxin / 5) };
nxout #eval{ round($nxout / 5) };
nz #eval{ round($nz / 5) };
#endif
zmin #eval{ -$zmax };
mrad0 #eval{ -$rad0 };
mrad1 #eval{ -$rad1 };
vertices vertices
( (
// front-plane:
// inlet region
( -50 25 $zmax) // pt 0
( 0 25 $zmax) // pt 1
( -50 75 $zmax) // pt 2
( 0 75 $zmax) // pt 3
// outlet region
( -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 $zmax) // pt 8
( 75 0 $zmax) // pt 9
// back-plane: // back-plane:
// inlet region // inlet region
( -50 25 $zmin) // pt 0 + 10 ( $xin $rad0 $zmin) // pt 0
( 0 25 $zmin) // pt 1 + 10 ( 0 $rad0 $zmin) // pt 1
( -50 75 $zmin) // pt 2 + 10 ( 0 $rad1 $zmin) // pt 2
( 0 75 $zmin) // pt 3 + 10 ( $xin $rad1 $zmin) // pt 3
// outlet region // outlet region
( -500 -75 $zmin) // pt 4 + 10 ( $xout $mrad1 $zmin) // pt 4
( 0 -75 $zmin) // pt 5 + 10 ( 0 $mrad1 $zmin) // pt 5
( -500 -25 $zmin) // pt 7 + 10 ( 0 $mrad0 $zmin) // pt 6
( 0 -25 $zmin) // pt 8 + 10 ( $xout $mrad0 $zmin) // pt 7
// bend mid-points // bend mid-points
( 25 0 $zmin) // pt 8 + 10 ( $rad0 0 $zmin) // pt 8
( 75 0 $zmin) // pt 9 + 10 ( $rad1 0 $zmin) // pt 9
// front-plane:
// inlet region
( $xin $rad0 $zmax) // pt 0 + 10
( 0 $rad0 $zmax) // pt 1 + 10
( 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
// bend mid-points
( $rad0 0 $zmax) // pt 8 + 10
( $rad1 0 $zmax) // pt 9 + 10
); );
blocks blocks
( (
hex (0 1 11 10 2 3 13 12) inlet ( 20 20 20) simpleGrading (1 1 1) hex (0 1 2 3 10 11 12 13) inlet ( $nxin $ny $nz) simpleGrading (1 1 1)
hex (4 5 15 14 6 7 17 16) outlet (200 20 20) simpleGrading (1 1 1) hex (4 5 6 7 14 15 16 17) outlet ( $nxout $ny $nz) simpleGrading (1 1 1)
hex (1 8 9 2 11 18 19 12) bend1 ( $nxbend $ny $nz) simpleGrading (1 1 1)
hex (1 8 18 11 3 9 19 13) bend1 ( 30 20 20) simpleGrading (1 1 1) hex (5 9 8 6 15 19 18 16) bend2 ( $nxbend $ny $nz) simpleGrading (1 1 1)
hex (5 9 19 15 7 8 18 17) bend2 ( 30 20 20) simpleGrading (1 1 1)
); );
edges edges
( (
// block 2 // block 2
arc 1 8 origin (0 0 $zmax) arc 1 8 origin (0 0 $zmin)
arc 3 9 origin (0 0 $zmax) arc 2 9 origin (0 0 $zmin)
arc 11 18 origin (0 0 $zmin) arc 11 18 origin (0 0 $zmax)
arc 13 19 origin (0 0 $zmin) arc 12 19 origin (0 0 $zmax)
// block 3 // block 3
arc 7 8 origin (0 0 $zmax) arc 6 8 origin (0 0 $zmin)
arc 5 9 origin (0 0 $zmax) arc 5 9 origin (0 0 $zmin)
arc 17 18 origin (0 0 $zmin) arc 16 18 origin (0 0 $zmax)
arc 15 19 origin (0 0 $zmin) arc 15 19 origin (0 0 $zmax)
); );
boundary boundary
@ -81,7 +104,7 @@ boundary
type patch; type patch;
faces faces
( (
(0 2 12 10) (0 10 13 3)
); );
} }
@ -90,7 +113,7 @@ boundary
type patch; type patch;
faces faces
( (
(4 6 16 14) (4 14 17 7)
); );
} }
); );
@ -99,7 +122,6 @@ mergePatchPairs
( (
); );
// The defaultFaces == outside "walls" // The defaultFaces == outside "walls"
defaultPatch defaultPatch
{ {

View File

@ -33,7 +33,7 @@ writeInterval 100;
purgeWrite 0; purgeWrite 0;
writeFormat ascii; writeFormat binary;
writePrecision 6; writePrecision 6;

View File

@ -0,0 +1,57 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name mid-plane;
type faceZoneSet;
action new;
source planeToFaceZone;
point (0 0 0);
normal (0 0 1);
}
{
name mid-plane;
type faceSet;
action new;
source zoneToFace;
zone mid-plane;
}
{
name mid-plane;
type faceSet;
action subset;
source boxToFace;
min (0 -1000 -1000);
max (1000 1000 1000);
}
{
name mid-plane;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet mid-plane;
}
{
name mid-plane;
type faceSet;
action remove;
}
);
// ************************************************************************* //

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh
runApplication topoSet
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -16,62 +16,85 @@ FoamFile
scale 0.001; scale 0.001;
zmin -25; xin -50;
zmax 25; xout -500;
rad0 25;
rad1 75;
zmax 25;
nxin 20;
nxout 200;
nxbend 30;
ny 20;
nz 20;
// Coarser and smaller
#if 0
xin #eval{ $xin / 5 };
xout #eval{ $xout / 5 };
zmax #eval{ $zmax / 5 };
nxin #eval{ round($nxin / 5) };
nxout #eval{ round($nxout / 5) };
nz #eval{ round($nz / 5) };
#endif
zmin #eval{ -$zmax };
mrad0 #eval{ -$rad0 };
mrad1 #eval{ -$rad1 };
vertices vertices
( (
// front-plane:
// inlet region
( -50 25 $zmax) // pt 0
( 0 25 $zmax) // pt 1
( -50 75 $zmax) // pt 2
( 0 75 $zmax) // pt 3
// outlet region
( -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 $zmax) // pt 8
( 75 0 $zmax) // pt 9
// back-plane: // back-plane:
// inlet region // inlet region
( -50 25 $zmin) // pt 0 + 10 ( $xin $rad0 $zmin) // pt 0
( 0 25 $zmin) // pt 1 + 10 ( 0 $rad0 $zmin) // pt 1
( -50 75 $zmin) // pt 2 + 10 ( 0 $rad1 $zmin) // pt 2
( 0 75 $zmin) // pt 3 + 10 ( $xin $rad1 $zmin) // pt 3
// outlet region // outlet region
( -500 -75 $zmin) // pt 4 + 10 ( $xout $mrad1 $zmin) // pt 4
( 0 -75 $zmin) // pt 5 + 10 ( 0 $mrad1 $zmin) // pt 5
( -500 -25 $zmin) // pt 7 + 10 ( 0 $mrad0 $zmin) // pt 6
( 0 -25 $zmin) // pt 8 + 10 ( $xout $mrad0 $zmin) // pt 7
// bend mid-points // bend mid-points
( 25 0 $zmin) // pt 8 + 10 ( $rad0 0 $zmin) // pt 8
( 75 0 $zmin) // pt 9 + 10 ( $rad1 0 $zmin) // pt 9
// front-plane:
// inlet region
( $xin $rad0 $zmax) // pt 0 + 10
( 0 $rad0 $zmax) // pt 1 + 10
( 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
// bend mid-points
( $rad0 0 $zmax) // pt 8 + 10
( $rad1 0 $zmax) // pt 9 + 10
); );
blocks blocks
( (
hex (0 1 11 10 2 3 13 12) inlet ( 20 20 20) simpleGrading (1 1 1) hex (0 1 2 3 10 11 12 13) inlet ( $nxin $ny $nz) simpleGrading (1 1 1)
hex (4 5 15 14 6 7 17 16) outlet (200 20 20) simpleGrading (1 1 1) hex (4 5 6 7 14 15 16 17) outlet ( $nxout $ny $nz) simpleGrading (1 1 1)
hex (1 8 9 2 11 18 19 12) bend1 ( $nxbend $ny $nz) simpleGrading (1 1 1)
hex (1 8 18 11 3 9 19 13) bend1 ( 30 20 20) simpleGrading (1 1 1) hex (5 9 8 6 15 19 18 16) bend2 ( $nxbend $ny $nz) simpleGrading (1 1 1)
hex (5 9 19 15 7 8 18 17) bend2 ( 30 20 20) simpleGrading (1 1 1)
); );
edges edges
( (
// block 2 // block 2
arc 1 8 origin (0 0 $zmax) arc 1 8 origin (0 0 $zmin)
arc 3 9 origin (0 0 $zmax) arc 2 9 origin (0 0 $zmin)
arc 11 18 origin (0 0 $zmin) arc 11 18 origin (0 0 $zmax)
arc 13 19 origin (0 0 $zmin) arc 12 19 origin (0 0 $zmax)
// block 3 // block 3
arc 7 8 origin (0 0 $zmax) arc 6 8 origin (0 0 $zmin)
arc 5 9 origin (0 0 $zmax) arc 5 9 origin (0 0 $zmin)
arc 17 18 origin (0 0 $zmin) arc 16 18 origin (0 0 $zmax)
arc 15 19 origin (0 0 $zmin) arc 15 19 origin (0 0 $zmax)
); );
boundary boundary
@ -81,7 +104,7 @@ boundary
type patch; type patch;
faces faces
( (
(0 2 12 10) (0 10 13 3)
); );
} }
@ -90,7 +113,7 @@ boundary
type patch; type patch;
faces faces
( (
(4 6 16 14) (4 14 17 7)
); );
} }
); );
@ -99,7 +122,6 @@ mergePatchPairs
( (
); );
// The defaultFaces == outside "walls" // The defaultFaces == outside "walls"
defaultPatch defaultPatch
{ {

View File

@ -33,7 +33,7 @@ writeInterval 50;
purgeWrite 0; purgeWrite 0;
writeFormat ascii; writeFormat binary;
writePrecision 6; writePrecision 6;

View File

@ -0,0 +1,57 @@
/*--------------------------------*- 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 topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name mid-plane;
type faceZoneSet;
action new;
source planeToFaceZone;
point (0 0 0);
normal (0 0 1);
}
{
name mid-plane;
type faceSet;
action new;
source zoneToFace;
zone mid-plane;
}
{
name mid-plane;
type faceSet;
action subset;
source boxToFace;
min (0 -1000 -1000);
max (1000 1000 1000);
}
{
name mid-plane;
type faceZoneSet;
action new;
source setToFaceZone;
faceSet mid-plane;
}
{
name mid-plane;
type faceSet;
action remove;
}
);
// ************************************************************************* //