diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C index d48d7e30caa155e175ce6991c8fac798e2cb2a23..324203cf26bb37c4095df9d8583536abf448ba32 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C @@ -330,6 +330,25 @@ Foam::tmp<Foam::vectorField> Foam::polyPatch::faceCellCentres() const } +Foam::tmp<Foam::scalarField> Foam::polyPatch::areaFraction() const +{ + tmp<scalarField> 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 a43c9e9844bee0405ed4e270a114ef8fa61e2cf5..0a185878d4988146afbd4d2cc9e177d919a1247b 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H @@ -372,6 +372,10 @@ public: //- Return face cell centres tmp<vectorField> faceCellCentres() const; + //- Return the area fraction as the ratio of the stored face area + //- and the area given by the face points + tmp<scalarField> areaFraction() const; + // Addressing into mesh diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.C b/src/lagrangian/basic/InteractionLists/InteractionLists.C index 922ee09185867b97a0af10dc605842b991bbbcae..360f2a3cbc403aaf1d3601ebd2959f7b0607cf3c 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.C +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.C @@ -324,10 +324,15 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() if (isA<wallPolyPatch>(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<ParticleType>::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 bc0943db35524d81873dbaac757595353403db9d..e745051d376c2312c32ea73f7800c9948bf92f16 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 63fc38dadb45745dbd9d3cff19c66f39232e247f..5c7829c0272b857bd3eec5cb329f62c773575168 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 00a1844db8e35a67ca7e35ef3ece7bbd9d1e644b..2e05aa24b31d217543fefb4483a8901506406532 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