snappyHexMesh produces a far better quality AMI interface using a cylindrical background mesh, leading to much more robust performance, even on a relatively coarse mesh. The min/max AMI weights remain close to 1 as the mesh moves, giving better conservation. The rotating geometry template cases are configured with a blockMeshDict file for a cylindrical background mesh aligned along the z-axis. The details of use are found in the README and blockMeshDict files.
69 lines
1.8 KiB
C++
69 lines
1.8 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
| ========= | |
|
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
| \\ / O peration | Version: dev |
|
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
| \\/ M anipulation | |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class dictionary;
|
|
object blockMeshDict;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
backgroundMesh
|
|
{
|
|
xMin -1;
|
|
xMax 1;
|
|
yMin -1;
|
|
yMax 1;
|
|
zMin -1;
|
|
zMax 1;
|
|
xCells 20;
|
|
yCells 20;
|
|
zCells 20;
|
|
}
|
|
|
|
convertToMeters 1;
|
|
|
|
vertices
|
|
(
|
|
($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMin)
|
|
($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMin)
|
|
($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMin)
|
|
($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMin)
|
|
|
|
($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMax)
|
|
($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMax)
|
|
($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMax)
|
|
($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMax)
|
|
);
|
|
|
|
blocks
|
|
(
|
|
hex (0 1 2 3 4 5 6 7)
|
|
(
|
|
$:backgroundMesh.xCells
|
|
$:backgroundMesh.yCells
|
|
$:backgroundMesh.zCells
|
|
)
|
|
simpleGrading (1 1 1)
|
|
);
|
|
|
|
edges
|
|
(
|
|
);
|
|
|
|
boundary
|
|
(
|
|
);
|
|
|
|
mergePatchPairs
|
|
(
|
|
);
|
|
|
|
// ************************************************************************* //
|