snappyHexMeshConfig: improve surface projections with '-cylindricalBackground' option

This commit is contained in:
Chris Greenshields
2024-07-27 16:57:55 +01:00
parent 6ebeb96563
commit c6d0d1af39

View File

@ -264,8 +264,13 @@ void Foam::blockMeshCylindricalConfiguration::writeGeometry()
List<word> geometries {"rotatingZone", "outer"};
List<word> dims {"radIn", "radOut"};
const scalar zMin = roundDown(bb_.min().z(), 10);
const scalar zMax = roundUp(bb_.max().z(), 10);
scalar zMin = roundDown(bb_.min().z(), 10);
scalar zMax = roundUp(bb_.max().z(), 10);
// Extend the bounds to avoid bad projections
const scalar span = zMax - zMin;
zMax += span;
zMin -= span;
forAll(geometries, i)
{