mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@ -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,9 +340,11 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists()
|
||||
|
||||
forAll(wallFaceBbs, i)
|
||||
{
|
||||
wallFaceBbs[i] = treeBoundBox
|
||||
wallFaceBbs[i] =
|
||||
treeBoundBox
|
||||
(
|
||||
mesh_.faces()[localWallFaces[i]].points(mesh_.points())
|
||||
mesh_.points(),
|
||||
mesh_.faces()[localWallFaces[i]]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user