added wall check for particle lambda calc
This commit is contained in:
parent
b82e21a815
commit
75b0c7d1f8
@ -25,6 +25,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "polyMesh.H"
|
||||
#include "wallPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -46,21 +47,25 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||
Sf /= mag(Sf);
|
||||
vector Cf = mesh.faceCentres()[facei];
|
||||
|
||||
// move reference point for wall
|
||||
// patch interaction
|
||||
if (!cloud_.internalFace(facei))
|
||||
{
|
||||
const vector& C = mesh.cellCentres()[celli_];
|
||||
scalar CCf = mag((C - Cf) & Sf);
|
||||
// check if distance between cell centre and face centre
|
||||
// is larger than wallImpactDistance
|
||||
if
|
||||
(
|
||||
CCf
|
||||
> static_cast<const ParticleType&>(*this).wallImpactDistance(Sf)
|
||||
)
|
||||
label patchi = patch(facei);
|
||||
const polyPatch& patch = mesh.boundaryMesh()[patchi];
|
||||
|
||||
// move reference point for wall
|
||||
if (isA<wallPolyPatch>(patch))
|
||||
{
|
||||
Cf -= static_cast<const ParticleType&>(*this)
|
||||
.wallImpactDistance(Sf)*Sf;
|
||||
const vector& C = mesh.cellCentres()[celli_];
|
||||
scalar CCf = mag((C - Cf) & Sf);
|
||||
// check if distance between cell centre and face centre
|
||||
// is larger than wallImpactDistance
|
||||
const ParticleType& p =
|
||||
static_cast<const ParticleType&>(*this);
|
||||
if (CCf > p.wallImpactDistance(Sf))
|
||||
{
|
||||
Cf -=p.wallImpactDistance(Sf)*Sf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,21 +195,24 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||
Sf /= mag(Sf);
|
||||
vector Cf = mesh.faceCentres()[facei];
|
||||
|
||||
// move reference point for wall
|
||||
// patch interaction
|
||||
if (!cloud_.internalFace(facei))
|
||||
{
|
||||
const vector& C = mesh.cellCentres()[celli_];
|
||||
scalar CCf = mag((C - Cf) & Sf);
|
||||
// check if distance between cell centre and face centre
|
||||
// is larger than wallImpactDistance
|
||||
if
|
||||
(
|
||||
CCf
|
||||
> static_cast<const ParticleType&>(*this).wallImpactDistance(Sf)
|
||||
)
|
||||
label patchi = patch(facei);
|
||||
const polyPatch& patch = mesh.boundaryMesh()[patchi];
|
||||
|
||||
// move reference point for wall
|
||||
if (isA<wallPolyPatch>(patch))
|
||||
{
|
||||
Cf -= static_cast<const ParticleType&>(*this)
|
||||
.wallImpactDistance(Sf)*Sf;
|
||||
const vector& C = mesh.cellCentres()[celli_];
|
||||
scalar CCf = mag((C - Cf) & Sf);
|
||||
// check if distance between cell centre and face centre
|
||||
// is larger than wallImpactDistance
|
||||
const ParticleType& p = static_cast<const ParticleType&>(*this);
|
||||
if (CCf > p.wallImpactDistance(Sf))
|
||||
{
|
||||
Cf -=p.wallImpactDistance(Sf)*Sf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user