mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus
This commit is contained in:
@ -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:
|
|||||||
//- 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()
|
|||||||
|
|
||||||
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,9 +340,11 @@ 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]]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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
|
|||||||
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
|
|||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user