diff --git a/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C b/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C index e5688c9345..c56b3b7093 100644 --- a/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C +++ b/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C @@ -357,7 +357,10 @@ int main(int argc, char *argv[]) fields = dict.lookupOrDefault("fields", false); - forAllConstIter(dictionary, dict, iter) + const dictionary& couplesDict = + dict.optionalSubDict("nonConformalCouples"); + + forAllConstIter(dictionary, couplesDict, iter) { if (!iter().isDict()) continue; diff --git a/etc/caseDicts/annotated/createNonConformalCouplesDict b/etc/caseDicts/annotated/createNonConformalCouplesDict index e989214fd5..adc3704b08 100644 --- a/etc/caseDicts/annotated/createNonConformalCouplesDict +++ b/etc/caseDicts/annotated/createNonConformalCouplesDict @@ -14,56 +14,59 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Each couple has its own entry in this file. Entries take the following form: +// Whether or not to add boundary conditions for the added patch to the fields +fields no; -/* -// Unique name used to generate the name of the coupled patches - +// The list of non-conformal couples to be created. Each entry in this section +// creates a single non-conformal coupling. +nonConformalCouples { - // Name of the two patches between which to create the coupling - patches ( ); + /* + // Unique name used to generate the name of the coupled patches + + { + // Name of the two patches between which to create the coupling + patches ( ); - // Type of the transformation; "none", "rotational", or "translational" - transform ; + // Type of the transformation; "none", "rotational", or "translational" + transform ; - // Additional transformation settings (if any) - ... + // Additional transformation settings (if any) + ... + } + */ + + // Example: Create a non-conformal couple with no transformation + nonConformalCouple_none + { + patches (nonCouple1 nonCouple2); + transform none; + } + + // Example: Create a non-conformal couple with a 30 degree rotational + // transformation + nonConformalCouple_30deg + { + patches (nonCoupleBehind nonCoupleAhead); + transform rotational; + rotationAxis (-1 0 0); + rotationCentre (0 0 0); + rotationAngle 30; + } + + // Example: Create a non-conformal couple with a 2 metre translational + // transformation + nonConformalCouple_2m + { + patches (nonCoupleBack nonCoupleFront); + transform translational; + separation (0 2 0); + } } -*/ - - -// Examples: - -// Create a non-conformal couple with no transformation -nonConformalCouple_none -{ - patches (nonCouple1 nonCouple2); - transform none; -} - -// Create a non-conformal couple with a 30 degree rotational transformation -nonConformalCouple_30deg -{ - patches (nonCoupleBehind nonCoupleAhead); - transform rotational; - rotationAxis (-1 0 0); - rotationCentre (0 0 0); - rotationAngle 30; -} - -// Create a non-conformal couple with a 2 metre translational transformation -nonConformalCouple_2m -{ - patches (nonCoupleBack nonCoupleFront); - transform translational; - separation (0 2 0); -} - // Note that in rare cases it may be appropriate to create multiple couplings // between the same two patches. That can be achieved with multiple entries // with the same patches specified. See the // incompressible/pimpleFoam/RAS/impeller tutorial for an example of this. - // ************************************************************************* // diff --git a/etc/templates/closedVolumeRotating/system/createNonConformalCouplesDict b/etc/templates/closedVolumeRotating/system/createNonConformalCouplesDict index b7740938b3..99223491f5 100644 --- a/etc/templates/closedVolumeRotating/system/createNonConformalCouplesDict +++ b/etc/templates/closedVolumeRotating/system/createNonConformalCouplesDict @@ -16,10 +16,13 @@ FoamFile fields true; -NCC +nonConformalCouples { - patches (nonCouple1 nonCouple2); - transform none; + NCC + { + patches (nonCouple1 nonCouple2); + transform none; + } } // ************************************************************************* // diff --git a/etc/templates/inflowOutflowRotating/system/createNonConformalCouplesDict b/etc/templates/inflowOutflowRotating/system/createNonConformalCouplesDict index b7740938b3..99223491f5 100644 --- a/etc/templates/inflowOutflowRotating/system/createNonConformalCouplesDict +++ b/etc/templates/inflowOutflowRotating/system/createNonConformalCouplesDict @@ -16,10 +16,13 @@ FoamFile fields true; -NCC +nonConformalCouples { - patches (nonCouple1 nonCouple2); - transform none; + NCC + { + patches (nonCouple1 nonCouple2); + transform none; + } } // ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/impeller/system/createNonConformalCouplesDict b/tutorials/modules/incompressibleFluid/impeller/system/createNonConformalCouplesDict index 5859c6113e..0b2be616ee 100644 --- a/tutorials/modules/incompressibleFluid/impeller/system/createNonConformalCouplesDict +++ b/tutorials/modules/incompressibleFluid/impeller/system/createNonConformalCouplesDict @@ -14,56 +14,59 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -nonConformalCoupleIn0 +nonConformalCouples { - patches (nonCoupleIn1 nonCoupleIn2); - transform none; + nonConformalCoupleIn0 + { + patches (nonCoupleIn1 nonCoupleIn2); + transform none; + } + + nonConformalCoupleIn30 + { + $nonConformalCoupleIn0; + transform rotational; + rotationAxis (-1 0 0); + rotationCentre (0 0 0); + rotationAngle 30; + } + + nonConformalCoupleIn60 { $nonConformalCoupleIn30; rotationAngle 60; } + nonConformalCoupleIn90 { $nonConformalCoupleIn30; rotationAngle 90; } + nonConformalCoupleIn120 { $nonConformalCoupleIn30; rotationAngle 120; } + nonConformalCoupleIn150 { $nonConformalCoupleIn30; rotationAngle 150; } + nonConformalCoupleIn180 { $nonConformalCoupleIn30; rotationAngle 180; } + nonConformalCoupleIn210 { $nonConformalCoupleIn30; rotationAngle 210; } + nonConformalCoupleIn240 { $nonConformalCoupleIn30; rotationAngle 240; } + nonConformalCoupleIn270 { $nonConformalCoupleIn30; rotationAngle 270; } + nonConformalCoupleIn300 { $nonConformalCoupleIn30; rotationAngle 300; } + nonConformalCoupleIn330 { $nonConformalCoupleIn30; rotationAngle 330; } + + nonConformalCoupleOut0 + { + patches (nonCoupleOut1 nonCoupleOut2); + transform none; + } + + nonConformalCoupleOut30 + { + patches (nonCoupleOut1 nonCoupleOut2); + transform rotational; + rotationAxis (-1 0 0); + rotationCentre (0 0 0); + rotationAngle -30; + } + + nonConformalCoupleOut60 { $nonConformalCoupleOut30; rotationAngle -60; } + nonConformalCoupleOut90 { $nonConformalCoupleOut30; rotationAngle -90; } + nonConformalCoupleOut120 { $nonConformalCoupleOut30; rotationAngle -120; } + nonConformalCoupleOut150 { $nonConformalCoupleOut30; rotationAngle -150; } + nonConformalCoupleOut180 { $nonConformalCoupleOut30; rotationAngle -180; } + nonConformalCoupleOut210 { $nonConformalCoupleOut30; rotationAngle -210; } + nonConformalCoupleOut240 { $nonConformalCoupleOut30; rotationAngle -240; } + nonConformalCoupleOut270 { $nonConformalCoupleOut30; rotationAngle -270; } + nonConformalCoupleOut300 { $nonConformalCoupleOut30; rotationAngle -300; } + nonConformalCoupleOut330 { $nonConformalCoupleOut30; rotationAngle -330; } } -nonConformalCoupleIn30 -{ - $nonConformalCoupleIn0; - transform rotational; - rotationAxis (-1 0 0); - rotationCentre (0 0 0); - rotationAngle 30; -} - -nonConformalCoupleIn60 { $nonConformalCoupleIn30; rotationAngle 60; } -nonConformalCoupleIn90 { $nonConformalCoupleIn30; rotationAngle 90; } -nonConformalCoupleIn120 { $nonConformalCoupleIn30; rotationAngle 120; } -nonConformalCoupleIn150 { $nonConformalCoupleIn30; rotationAngle 150; } -nonConformalCoupleIn180 { $nonConformalCoupleIn30; rotationAngle 180; } -nonConformalCoupleIn210 { $nonConformalCoupleIn30; rotationAngle 210; } -nonConformalCoupleIn240 { $nonConformalCoupleIn30; rotationAngle 240; } -nonConformalCoupleIn270 { $nonConformalCoupleIn30; rotationAngle 270; } -nonConformalCoupleIn300 { $nonConformalCoupleIn30; rotationAngle 300; } -nonConformalCoupleIn330 { $nonConformalCoupleIn30; rotationAngle 330; } - -nonConformalCoupleOut0 -{ - patches (nonCoupleOut1 nonCoupleOut2); - transform none; -} - -nonConformalCoupleOut30 -{ - patches (nonCoupleOut1 nonCoupleOut2); - transform rotational; - rotationAxis (-1 0 0); - rotationCentre (0 0 0); - rotationAngle -30; -} - -nonConformalCoupleOut60 { $nonConformalCoupleOut30; rotationAngle -60; } -nonConformalCoupleOut90 { $nonConformalCoupleOut30; rotationAngle -90; } -nonConformalCoupleOut120 { $nonConformalCoupleOut30; rotationAngle -120; } -nonConformalCoupleOut150 { $nonConformalCoupleOut30; rotationAngle -150; } -nonConformalCoupleOut180 { $nonConformalCoupleOut30; rotationAngle -180; } -nonConformalCoupleOut210 { $nonConformalCoupleOut30; rotationAngle -210; } -nonConformalCoupleOut240 { $nonConformalCoupleOut30; rotationAngle -240; } -nonConformalCoupleOut270 { $nonConformalCoupleOut30; rotationAngle -270; } -nonConformalCoupleOut300 { $nonConformalCoupleOut30; rotationAngle -300; } -nonConformalCoupleOut330 { $nonConformalCoupleOut30; rotationAngle -330; } - // ************************************************************************* //