snappyHexMeshConfig: allow a cylindrical background mesh without a rotating zone

This commit is contained in:
Chris Greenshields
2023-08-18 16:46:06 +01:00
parent 66d3b49eb5
commit af9afec754

View File

@ -136,7 +136,7 @@ void Foam::blockMeshCylindricalConfiguration::writeDefaultPatch()
} }
else else
{ {
defaultPatch = {"sides", "patch"}; defaultPatch = {"background", "internal"};
} }
beginDict(os_, "defaultPatch"); beginDict(os_, "defaultPatch");
@ -421,10 +421,17 @@ Foam::blockMeshCylindricalConfiguration::blockMeshCylindricalConfiguration
if (rzbb_.volume() == 0) if (rzbb_.volume() == 0)
{ {
FatalErrorInFunction WarningInFunction
<< "Attempting to create a cylindrical background mesh" << "Creating a cylindrical background mesh without a "
<< nl << "but the rotatingZone surface has zero volume." << "rotatingZone specified by the '-rotatingZones' option."
<< exit(FatalError); << nl <<endl;
// Create the intermediate interface at 40% of domain size if no
// rotating zone is specified
scalar factor = 0.4;
rzbb_.min() = factor*bb_.min();
rzbb_.max() = factor*bb_.max();
} }
calcBlockMeshDict(); calcBlockMeshDict();