diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index 24bc155db0..f1cb956a57 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -336,6 +336,25 @@ Foam::tmp Foam::polyPatch::faceCellCentres() const } +Foam::tmp Foam::polyPatch::areaFraction() const +{ + tmp tfraction(new scalarField(size())); + scalarField& fraction = tfraction.ref(); + + const vectorField::subField faceAreas = this->faceAreas(); + const pointField& points = this->points(); + + forAll(*this, facei) + { + const face& curFace = this->operator[](facei); + fraction[facei] = + mag(faceAreas[facei])/(curFace.mag(points) + ROOTVSMALL); + } + + return tfraction; +} + + const Foam::labelUList& Foam::polyPatch::faceCells() const { if (!faceCellsPtr_) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H index 9de2d07b6a..d661304d52 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H @@ -373,6 +373,10 @@ public: //- Return face cell centres tmp faceCellCentres() const; + //- Return the area fraction as the ratio of the stored face area + //- and the area given by the face points + tmp areaFraction() const; + // Addressing into mesh diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.C b/src/lagrangian/basic/InteractionLists/InteractionLists.C index 922ee09185..360f2a3cbc 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.C +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.C @@ -324,10 +324,15 @@ void Foam::InteractionLists::buildInteractionLists() if (isA(patch)) { - localWallFaces.append - ( - identity(patch.size(), patch.start()) - ); + const scalarField areaFraction(patch.areaFraction()); + + forAll(areaFraction, facei) + { + if (areaFraction[facei] > 0.5) + { + localWallFaces.append(facei + patch.start()); + } + } } } @@ -335,10 +340,12 @@ void Foam::InteractionLists::buildInteractionLists() forAll(wallFaceBbs, i) { - wallFaceBbs[i] = treeBoundBox - ( - mesh_.faces()[localWallFaces[i]].points(mesh_.points()) - ); + wallFaceBbs[i] = + treeBoundBox + ( + mesh_.points(), + mesh_.faces()[localWallFaces[i]] + ); } // IAndT: index and transform diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/0/epsilon b/tutorials/incompressible/SRFPimpleFoam/rotor2D/0/epsilon index bc0943db35..e745051d37 100644 --- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/0/epsilon +++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/0/epsilon @@ -24,7 +24,6 @@ boundaryField rotor { type epsilonWallFunction; - U Urel; value uniform 3.75e-4; } diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/0/epsilon b/tutorials/incompressible/SRFSimpleFoam/mixer/0/epsilon index 63fc38dadb..5c7829c027 100644 --- a/tutorials/incompressible/SRFSimpleFoam/mixer/0/epsilon +++ b/tutorials/incompressible/SRFSimpleFoam/mixer/0/epsilon @@ -34,13 +34,11 @@ boundaryField innerWall { type epsilonWallFunction; - U Urel; value uniform 14.855; } outerWall { type epsilonWallFunction; - U Urel; value uniform 14.855; } cyclic_half0 diff --git a/tutorials/incompressible/SRFSimpleFoam/mixer/0/nut b/tutorials/incompressible/SRFSimpleFoam/mixer/0/nut index 00a1844db8..2e05aa24b3 100644 --- a/tutorials/incompressible/SRFSimpleFoam/mixer/0/nut +++ b/tutorials/incompressible/SRFSimpleFoam/mixer/0/nut @@ -34,13 +34,11 @@ boundaryField innerWall { type nutkWallFunction; - U Urel; value uniform 0; } outerWall { type nutkWallFunction; - U Urel; value uniform 0; } cyclic_half0