From e4f05428e7728185164d2b83af4be3a179590d6d Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Thu, 18 Sep 2014 11:27:14 +0100 Subject: [PATCH] New MRFZone algorithm ignores all non-wall patches --- .../cfdTools/general/MRF/MRFZone.C | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C index 21bbde3ff..c5eb017e7 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C @@ -75,6 +75,7 @@ void Foam::MRFZone::setMRFFaces() { if (zoneCell[own[faceI]] || zoneCell[nei[faceI]]) { + // By default, set type "other" for faces in MRF zone faceType[faceI] = 1; nZoneFaces++; } @@ -87,20 +88,7 @@ void Foam::MRFZone::setMRFFaces() { const polyPatch& pp = patches[patchI]; - if (pp.coupled() || excludedPatches.found(patchI)) - { - forAll(pp, i) - { - label faceI = pp.start()+i; - - if (zoneCell[own[faceI]]) - { - faceType[faceI] = 2; - nZoneFaces++; - } - } - } - else if (!isA(pp)) + if (pp.isWall() && !excludedPatches.found(patchI)) { forAll(pp, i) { @@ -113,11 +101,24 @@ void Foam::MRFZone::setMRFFaces() } } } + else if (!isA(pp)) + { + forAll(pp, i) + { + label faceI = pp.start()+i; + + if (zoneCell[own[faceI]]) + { + faceType[faceI] = 2; + nZoneFaces++; + } + } + } } // Now we have for faceType: // 0 : face not in cellZone - // 1 : internal face or normal patch face + // 1 : internal face or wall patch or empty patch // 2 : coupled patch face or excluded patch face // Sort into lists per patch.