diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 8a58b394ac..66bc3bcb11 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -83,6 +83,7 @@ label addPatch pp.inGroups().append(groupName); } + // Add patch, create calculated everywhere fvMeshTools::addPatch ( @@ -636,18 +637,17 @@ int main(int argc, char *argv[]) // Note: This is added for the particular case where we want // master and slave in different groupNames // (ie 3D thermal baffles) - bool groupBase = false; - if (patchSource.found("groupBase")) - { - groupBase = readBool(patchSource.lookup("groupBase")); - if (groupBase) - { - groupNameMaster = groupName + "Group_master"; - groupNameSlave = groupName + "Group_slave"; - patchDictMaster.set("coupleGroup", groupNameMaster); - patchDictSlave.set("coupleGroup", groupNameSlave); - } + Switch sameGroup + ( + patchSource.lookupOrDefault("sameGroup", true) + ); + if (!sameGroup) + { + groupNameMaster = groupName + "Group_master"; + groupNameSlave = groupName + "Group_slave"; + patchDictMaster.set("coupleGroup", groupNameMaster); + patchDictSlave.set("coupleGroup", groupNameSlave); } addPatch(mesh, masterName, groupNameMaster, patchDictMaster); @@ -818,11 +818,11 @@ int main(int argc, char *argv[]) else { const dictionary& patchSource = dict.subDict("patchPairs"); - bool groupBase = false; - if (patchSource.found("groupBase")) - { - groupBase = readBool(patchSource.lookup("groupBase")); - } + + Switch sameGroup + ( + patchSource.lookupOrDefault("sameGroup", true) + ); const word& groupName = selectors[selectorI].name(); @@ -833,7 +833,7 @@ int main(int argc, char *argv[]) "patchFields" ); - if (!groupBase) + if (sameGroup) { // Add coupleGroup to all entries forAllIter(dictionary, patchFieldsDict, iter) diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict index 2aed1e32a6..2bc58e0d70 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict @@ -52,8 +52,9 @@ baffles { type mappedWall; sampleMode nearestPatchFace; - //Group master and slave in different groups. (default off) - groupBase on; + // Put master and slave patch in same group (default on) + // Otherwise makeup group names xxx_master and xxx_slave + sameGroup off; patchFields { #include "./0/include/wallBafflePatches"