diff --git a/src/overset/oversetMesh/oversetFringe/overlapFringe/adaptiveOverlapFringe/adaptiveOverlapFringe.C b/src/overset/oversetMesh/oversetFringe/overlapFringe/adaptiveOverlapFringe/adaptiveOverlapFringe.C index 52dc09e6b..7398213fc 100644 --- a/src/overset/oversetMesh/oversetFringe/overlapFringe/adaptiveOverlapFringe/adaptiveOverlapFringe.C +++ b/src/overset/oversetMesh/oversetFringe/overlapFringe/adaptiveOverlapFringe/adaptiveOverlapFringe.C @@ -864,6 +864,15 @@ bool Foam::adaptiveOverlapFringe::updateIteration } } + if (newAcceptors.empty()) + { + FatalErrorIn("adaptiveOverlapFringe::updateIteration()") + << "Did not find any new candidate acceptors." + << nl + << "Please review your overlap fringe assembly settings." + << abort(FatalError); + } + // Transfer back cumulative fringe holes into the fringeHolesPtr_ fringeHolesPtr_->transfer(cumFringeHoles); diff --git a/src/overset/oversetMesh/oversetFringe/overlapFringe/donorSuitability/donorSuitability/donorSuitability.H b/src/overset/oversetMesh/oversetFringe/overlapFringe/donorSuitability/donorSuitability/donorSuitability.H index 4c5b2f75d..c60210047 100644 --- a/src/overset/oversetMesh/oversetFringe/overlapFringe/donorSuitability/donorSuitability/donorSuitability.H +++ b/src/overset/oversetMesh/oversetFringe/overlapFringe/donorSuitability/donorSuitability/donorSuitability.H @@ -211,8 +211,23 @@ public: const donorAcceptor& daPair ) const { - // Note: do not check whether a donor is valid (has been found) - // for this acceptor. + // Check whether the donor is valid for this pair + if (!daPair.donorFound()) + { + FatalErrorIn + ( + "scalar donorSuitability::suitabilityFraction" + "\n(" + "\n const donorAcceptor& daPair" + "\n) const" + ) << "Acceptor: " << daPair.acceptorCell() + << " on processor: " << daPair.acceptorProcNo() + << " did not find donor candidate." + << nl + << "Please review your fringe assembly settings" + << " (or try using adaptiveOverlap fringe algorithm)." + << abort(FatalError); + } // Get donor suitability function in acceptor/donor pair const scalar& dsfAcceptor = diff --git a/src/overset/oversetMesh/oversetFringe/overlapFringe/donorSuitability/noSuitability/noSuitability.C b/src/overset/oversetMesh/oversetFringe/overlapFringe/donorSuitability/noSuitability/noSuitability.C index b15a458fc..d1f57fe9d 100644 --- a/src/overset/oversetMesh/oversetFringe/overlapFringe/donorSuitability/noSuitability/noSuitability.C +++ b/src/overset/oversetMesh/oversetFringe/overlapFringe/donorSuitability/noSuitability/noSuitability.C @@ -55,8 +55,8 @@ Foam::donorSuitability::noSuitability::noSuitability const scalarField localDsf(oversetFringeAlgorithm.mesh().nCells(), 0); this->combineDonorSuitabilityFunction(localDsf); - // Set threshold to dummy large value - this->threshold() = GREAT; + // Set threshold to SMALL such that all the pairs become suitable + this->threshold() = SMALL; } diff --git a/src/overset/oversetMesh/oversetFringe/overlapFringe/overlapFringe/overlapFringe.C b/src/overset/oversetMesh/oversetFringe/overlapFringe/overlapFringe/overlapFringe.C index 1013a688a..18d947139 100644 --- a/src/overset/oversetMesh/oversetFringe/overlapFringe/overlapFringe/overlapFringe.C +++ b/src/overset/oversetMesh/oversetFringe/overlapFringe/overlapFringe/overlapFringe.C @@ -846,6 +846,15 @@ bool Foam::overlapFringe::updateIteration } } + if (newAcceptors.empty()) + { + FatalErrorIn("overlapFringe::updateIteration()") + << "Did not find any new candidate acceptors." + << nl + << "Please review your overlap fringe assembly settings." + << abort(FatalError); + } + // Transfer back cumulative fringe holes into the fringeHolesPtr_ fringeHolesPtr_->transfer(cumFringeHoles); diff --git a/tutorials/overset/movingMeshTests/movingCylinderInChannelicoDyMOversetFoam/constant/oversetMeshDict b/tutorials/overset/movingMeshTests/movingCylinderInChannelicoDyMOversetFoam/constant/oversetMeshDict index fced532fb..133b27e79 100644 --- a/tutorials/overset/movingMeshTests/movingCylinderInChannelicoDyMOversetFoam/constant/oversetMeshDict +++ b/tutorials/overset/movingMeshTests/movingCylinderInChannelicoDyMOversetFoam/constant/oversetMeshDict @@ -40,7 +40,7 @@ regions donorSuitability { type cellVolumes; - threshold 0.99; + threshold 0.2; } } } diff --git a/tutorials/overset/movingMeshTests/movingCylinderInChannelpimpleDyMOversetFoam/constant/oversetMeshDict b/tutorials/overset/movingMeshTests/movingCylinderInChannelpimpleDyMOversetFoam/constant/oversetMeshDict index fced532fb..133b27e79 100644 --- a/tutorials/overset/movingMeshTests/movingCylinderInChannelpimpleDyMOversetFoam/constant/oversetMeshDict +++ b/tutorials/overset/movingMeshTests/movingCylinderInChannelpimpleDyMOversetFoam/constant/oversetMeshDict @@ -40,7 +40,7 @@ regions donorSuitability { type cellVolumes; - threshold 0.99; + threshold 0.2; } } } diff --git a/tutorials/overset/parallelTests/NACA4412-ThreeLayerOverlapFringeAssemby-100Processors/constant/oversetMeshDict b/tutorials/overset/parallelTests/NACA4412-ThreeLayerOverlapFringeAssemby-100Processors/constant/oversetMeshDict index 123521b11..4747c3e65 100644 --- a/tutorials/overset/parallelTests/NACA4412-ThreeLayerOverlapFringeAssemby-100Processors/constant/oversetMeshDict +++ b/tutorials/overset/parallelTests/NACA4412-ThreeLayerOverlapFringeAssemby-100Processors/constant/oversetMeshDict @@ -49,10 +49,10 @@ regions donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 60% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 40% within each other type cellVolumes; - threshold 0.6; + threshold 0.4; } } } @@ -79,10 +79,10 @@ regions donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 60% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 50% within each other type cellVolumes; - threshold 0.6; + threshold 0.5; } } } @@ -109,8 +109,8 @@ regions donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 40% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 40% within each other type cellVolumes; threshold 0.4; } diff --git a/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/explicitOverset/constant/oversetMeshDict b/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/explicitOverset/constant/oversetMeshDict index fcaf6fd44..b463bcc53 100644 --- a/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/explicitOverset/constant/oversetMeshDict +++ b/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/explicitOverset/constant/oversetMeshDict @@ -35,25 +35,26 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.8; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 12; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { // Donor/acceptor pair must have cell volumes that differ not - // more than 60% of the larger cell + // more than 20% of the larger cell type cellVolumes; - threshold 0.6; + threshold 0.2; } } } @@ -65,23 +66,24 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (OversetMiddle); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.9; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 5; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 60% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 60% within each other type cellVolumes; threshold 0.6; } @@ -95,23 +97,24 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (OversetFront); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.8; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 5; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 40% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 40% within each other type cellVolumes; threshold 0.4; } diff --git a/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitConservativeOverset/constant/oversetMeshDict b/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitConservativeOverset/constant/oversetMeshDict index fcaf6fd44..b463bcc53 100644 --- a/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitConservativeOverset/constant/oversetMeshDict +++ b/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitConservativeOverset/constant/oversetMeshDict @@ -35,25 +35,26 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.8; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 12; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { // Donor/acceptor pair must have cell volumes that differ not - // more than 60% of the larger cell + // more than 20% of the larger cell type cellVolumes; - threshold 0.6; + threshold 0.2; } } } @@ -65,23 +66,24 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (OversetMiddle); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.9; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 5; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 60% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 60% within each other type cellVolumes; threshold 0.6; } @@ -95,23 +97,24 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (OversetFront); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.8; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 5; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 40% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 40% within each other type cellVolumes; threshold 0.4; } diff --git a/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitNonConservativeOverset/constant/oversetMeshDict b/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitNonConservativeOverset/constant/oversetMeshDict index fcaf6fd44..b463bcc53 100644 --- a/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitNonConservativeOverset/constant/oversetMeshDict +++ b/validationAndVerificationSuite/validation/overset/NACA4412-airfoil/implicitNonConservativeOverset/constant/oversetMeshDict @@ -35,25 +35,26 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.8; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 12; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { // Donor/acceptor pair must have cell volumes that differ not - // more than 60% of the larger cell + // more than 20% of the larger cell type cellVolumes; - threshold 0.6; + threshold 0.2; } } } @@ -65,23 +66,24 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (OversetMiddle); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.9; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 5; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 60% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 60% within each other type cellVolumes; threshold 0.6; } @@ -95,23 +97,24 @@ regions fringe { - type overlap; + type adaptiveOverlap; // Optional list of patches to start the fringe minimisation from initPatchNames (OversetFront); - // Fraction of minimum allowable suitable pairs respecting the - // chosen donor suitability criteria - suitablePairFraction 0.8; + // Number of iterations for adaptive overlap search + specifiedIterationsNumber 5; // 5 by default - // Whether to start fringe assembly from the previous set of - // acceptors (for moving mesh cases) - cacheFringe no; + // Whether to try additional iterations + additionalIterations yes; // yes by default + + // Orphan suitability + orphanSuitability 0; // 1 by default donorSuitability { - // Donor/acceptor pair must have cell volumes that differ not - // more than 40% of the larger cell + // Donor/acceptor pair must have cell volumes that are at least + // 40% within each other type cellVolumes; threshold 0.4; }