The templates include a stategy to simplify meshing with snappyHexMesh, particularly to help generate an initial mesh quickly that can subsequently be improved. The templates are setup to enable rapid initial simulations, typically with simpleFoam. The initial templates cover simple inflow-outflow and closed domains, including rotating geometry, and an example axisymmetric flow. For more details, consult the README file accompanying each template case. The cases are located in $FOAM_ETC/templates
109 lines
2.4 KiB
C++
109 lines
2.4 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
| ========= | |
|
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
| \\ / O peration | Version: 2.3.x |
|
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
| \\/ M anipulation | |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class dictionary;
|
|
object blockMeshDict;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
backgroundMesh
|
|
{
|
|
length 25;
|
|
rA 0.5; // radius of inlet patch
|
|
rB 4; // outer radius
|
|
lengthCells 250;
|
|
rAcells 10;
|
|
rBcells 50;
|
|
}
|
|
|
|
convertToMeters 1;
|
|
|
|
vertices
|
|
(
|
|
( 0 0 -1)
|
|
($:backgroundMesh.length 0 -1)
|
|
( 0 $:backgroundMesh.rA -1)
|
|
($:backgroundMesh.length $:backgroundMesh.rA -1)
|
|
( 0 $:backgroundMesh.rB -1)
|
|
($:backgroundMesh.length $:backgroundMesh.rB -1)
|
|
|
|
( 0 0 0)
|
|
($:backgroundMesh.length 0 0)
|
|
( 0 $:backgroundMesh.rA 0)
|
|
($:backgroundMesh.length $:backgroundMesh.rA 0)
|
|
( 0 $:backgroundMesh.rB 0)
|
|
($:backgroundMesh.length $:backgroundMesh.rB 0)
|
|
);
|
|
|
|
blocks
|
|
(
|
|
hex (0 1 3 2 6 7 9 8)
|
|
($:backgroundMesh.lengthCells $:backgroundMesh.rAcells 1)
|
|
simpleGrading (1 1 1)
|
|
|
|
hex (2 3 5 4 8 9 11 10)
|
|
($:backgroundMesh.lengthCells $:backgroundMesh.rBcells 1)
|
|
simpleGrading (1 1 1)
|
|
);
|
|
|
|
edges
|
|
(
|
|
);
|
|
|
|
boundary
|
|
(
|
|
inlet
|
|
{
|
|
type patch;
|
|
faces
|
|
(
|
|
(0 6 8 2)
|
|
);
|
|
}
|
|
|
|
front
|
|
{
|
|
type symmetry;
|
|
faces
|
|
(
|
|
(6 7 9 8)
|
|
(8 9 11 10)
|
|
);
|
|
}
|
|
|
|
back
|
|
{
|
|
type symmetry;
|
|
faces
|
|
(
|
|
(0 1 3 2)
|
|
(2 3 5 4)
|
|
);
|
|
}
|
|
|
|
atmosphere
|
|
{
|
|
type patch;
|
|
faces
|
|
(
|
|
(2 8 10 4)
|
|
(4 5 11 10)
|
|
(5 3 9 11)
|
|
(3 1 7 9)
|
|
);
|
|
}
|
|
);
|
|
|
|
mergePatchPairs
|
|
(
|
|
);
|
|
|
|
// ************************************************************************* //
|