Skip to content
Snippets Groups Projects
Commit ac886d05 authored by sergio's avatar sergio
Browse files

Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus

parents 4c2af2bb 1135f157
No related branches found
No related tags found
No related merge requests found
...@@ -330,6 +330,25 @@ Foam::tmp<Foam::vectorField> Foam::polyPatch::faceCellCentres() const ...@@ -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 const Foam::labelUList& Foam::polyPatch::faceCells() const
{ {
if (!faceCellsPtr_) if (!faceCellsPtr_)
......
...@@ -372,6 +372,10 @@ public: ...@@ -372,6 +372,10 @@ public:
//- Return face cell centres //- Return face cell centres
tmp<vectorField> faceCellCentres() const; 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 // Addressing into mesh
......
...@@ -324,10 +324,15 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() ...@@ -324,10 +324,15 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
if (isA<wallPolyPatch>(patch)) if (isA<wallPolyPatch>(patch))
{ {
localWallFaces.append const scalarField areaFraction(patch.areaFraction());
(
identity(patch.size(), patch.start()) forAll(areaFraction, facei)
); {
if (areaFraction[facei] > 0.5)
{
localWallFaces.append(facei + patch.start());
}
}
} }
} }
...@@ -335,10 +340,12 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() ...@@ -335,10 +340,12 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
forAll(wallFaceBbs, i) forAll(wallFaceBbs, i)
{ {
wallFaceBbs[i] = treeBoundBox wallFaceBbs[i] =
( treeBoundBox
mesh_.faces()[localWallFaces[i]].points(mesh_.points()) (
); mesh_.points(),
mesh_.faces()[localWallFaces[i]]
);
} }
// IAndT: index and transform // IAndT: index and transform
......
...@@ -24,7 +24,6 @@ boundaryField ...@@ -24,7 +24,6 @@ boundaryField
rotor rotor
{ {
type epsilonWallFunction; type epsilonWallFunction;
U Urel;
value uniform 3.75e-4; value uniform 3.75e-4;
} }
......
...@@ -34,13 +34,11 @@ boundaryField ...@@ -34,13 +34,11 @@ boundaryField
innerWall innerWall
{ {
type epsilonWallFunction; type epsilonWallFunction;
U Urel;
value uniform 14.855; value uniform 14.855;
} }
outerWall outerWall
{ {
type epsilonWallFunction; type epsilonWallFunction;
U Urel;
value uniform 14.855; value uniform 14.855;
} }
cyclic_half0 cyclic_half0
......
...@@ -34,13 +34,11 @@ boundaryField ...@@ -34,13 +34,11 @@ boundaryField
innerWall innerWall
{ {
type nutkWallFunction; type nutkWallFunction;
U Urel;
value uniform 0; value uniform 0;
} }
outerWall outerWall
{ {
type nutkWallFunction; type nutkWallFunction;
U Urel;
value uniform 0; value uniform 0;
} }
cyclic_half0 cyclic_half0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment