Skip to content
Snippets Groups Projects
Commit d92d77cc authored by Mark OLESEN's avatar Mark OLESEN
Browse files

Merge remote-tracking branch 'origin/master' into develop

parents 4a61042f 1135f157
No related merge requests found
......@@ -336,6 +336,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_)
......
......@@ -373,6 +373,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
......
......@@ -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
......
......@@ -24,7 +24,6 @@ boundaryField
rotor
{
type epsilonWallFunction;
U Urel;
value uniform 3.75e-4;
}
......
......@@ -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
......
......@@ -34,13 +34,11 @@ boundaryField
innerWall
{
type nutkWallFunction;
U Urel;
value uniform 0;
}
outerWall
{
type nutkWallFunction;
U Urel;
value uniform 0;
}
cyclic_half0
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment