lagrangian: Removed duplicate data from method arguments

A lot of methods were taking argument data which could be referenced or
generated from the parcel class at little or no additional cost. This
was confusing and generated the possibility of inconsistent data states.
This commit is contained in:
Will Bainbridge
2017-08-23 15:14:32 +01:00
parent c3512e4a56
commit dc10cfd686
64 changed files with 328 additions and 819 deletions

View File

@ -130,10 +130,7 @@ bool Foam::findCellParticle::hitPatch
( (
const polyPatch&, const polyPatch&,
Cloud<findCellParticle>& cloud, Cloud<findCellParticle>& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
) )
{ {
return false; return false;
@ -188,6 +185,32 @@ void Foam::findCellParticle::hitCyclicPatch
} }
void Foam::findCellParticle::hitCyclicAMIPatch
(
const cyclicAMIPolyPatch&,
Cloud<findCellParticle>& cloud,
trackingData& td,
const vector&
)
{
// Remove particle
td.keepParticle = false;
}
void Foam::findCellParticle::hitCyclicACMIPatch
(
const cyclicACMIPolyPatch&,
Cloud<findCellParticle>& cloud,
trackingData& td,
const vector&
)
{
// Remove particle
td.keepParticle = false;
}
void Foam::findCellParticle::hitProcessorPatch void Foam::findCellParticle::hitProcessorPatch
( (
const processorPolyPatch&, const processorPolyPatch&,
@ -204,19 +227,6 @@ void Foam::findCellParticle::hitWallPatch
( (
const wallPolyPatch& wpp, const wallPolyPatch& wpp,
Cloud<findCellParticle>& cloud, Cloud<findCellParticle>& cloud,
trackingData& td,
const tetIndices&
)
{
// Remove particle
td.keepParticle = false;
}
void Foam::findCellParticle::hitPatch
(
const polyPatch& wpp,
Cloud<findCellParticle>& cloud,
trackingData& td trackingData& td
) )
{ {

View File

@ -229,10 +229,7 @@ public:
( (
const polyPatch&, const polyPatch&,
Cloud<findCellParticle>&, Cloud<findCellParticle>&,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
); );
//- Overridable function to handle the particle hitting a wedge //- Overridable function to handle the particle hitting a wedge
@ -269,6 +266,24 @@ public:
trackingData& td trackingData& td
); );
//- Overridable function to handle the particle hitting a cyclicAMI
void hitCyclicAMIPatch
(
const cyclicAMIPolyPatch&,
Cloud<findCellParticle>& cloud,
trackingData& td,
const vector&
);
//- Overridable function to handle the particle hitting a cyclicACMI
void hitCyclicACMIPatch
(
const cyclicACMIPolyPatch&,
Cloud<findCellParticle>& cloud,
trackingData& td,
const vector&
);
//- Overridable function to handle the particle hitting a //- Overridable function to handle the particle hitting a
//- processorPatch //- processorPatch
void hitProcessorPatch void hitProcessorPatch
@ -283,15 +298,6 @@ public:
( (
const wallPolyPatch&, const wallPolyPatch&,
Cloud<findCellParticle>&, Cloud<findCellParticle>&,
trackingData& td,
const tetIndices&
);
//- Overridable function to handle the particle hitting a polyPatch
void hitPatch
(
const polyPatch&,
Cloud<findCellParticle>&,
trackingData& td trackingData& td
); );

View File

@ -274,10 +274,7 @@ bool Foam::streamLineParticle::hitPatch
( (
const polyPatch&, const polyPatch&,
streamLineParticleCloud& cloud, streamLineParticleCloud& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
) )
{ {
// Disable generic patch interaction // Disable generic patch interaction
@ -333,6 +330,32 @@ void Foam::streamLineParticle::hitCyclicPatch
} }
void Foam::streamLineParticle::hitCyclicAMIPatch
(
const cyclicAMIPolyPatch&,
streamLineParticleCloud& cloud,
trackingData& td,
const vector&
)
{
// Remove particle
td.keepParticle = false;
}
void Foam::streamLineParticle::hitCyclicACMIPatch
(
const cyclicACMIPolyPatch&,
streamLineParticleCloud& cloud,
trackingData& td,
const vector&
)
{
// Remove particle
td.keepParticle = false;
}
void Foam::streamLineParticle::hitProcessorPatch void Foam::streamLineParticle::hitProcessorPatch
( (
const processorPolyPatch&, const processorPolyPatch&,
@ -349,19 +372,6 @@ void Foam::streamLineParticle::hitWallPatch
( (
const wallPolyPatch& wpp, const wallPolyPatch& wpp,
streamLineParticleCloud& cloud, streamLineParticleCloud& cloud,
trackingData& td,
const tetIndices&
)
{
// Remove particle
td.keepParticle = false;
}
void Foam::streamLineParticle::hitPatch
(
const polyPatch& wpp,
streamLineParticleCloud& cloud,
trackingData& td trackingData& td
) )
{ {

View File

@ -220,10 +220,7 @@ public:
( (
const polyPatch&, const polyPatch&,
streamLineParticleCloud& cloud, streamLineParticleCloud& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
); );
//- Overridable function to handle the particle hitting a wedge //- Overridable function to handle the particle hitting a wedge
@ -260,6 +257,26 @@ public:
trackingData& td trackingData& td
); );
//- Overridable function to handle the particle hitting a
// cyclicAMIPatch
void hitCyclicAMIPatch
(
const cyclicAMIPolyPatch&,
streamLineParticleCloud& cloud,
trackingData& td,
const vector& direction
);
//- Overridable function to handle the particle hitting a
// cyclicACMIPatch
void hitCyclicACMIPatch
(
const cyclicACMIPolyPatch&,
streamLineParticleCloud& cloud,
trackingData& td,
const vector& direction
);
//- Overridable function to handle the particle hitting a //- Overridable function to handle the particle hitting a
//- processorPatch //- processorPatch
void hitProcessorPatch void hitProcessorPatch
@ -274,15 +291,6 @@ public:
( (
const wallPolyPatch&, const wallPolyPatch&,
streamLineParticleCloud& cloud, streamLineParticleCloud& cloud,
trackingData& td,
const tetIndices&
);
//- Overridable function to handle the particle hitting a polyPatch
void hitPatch
(
const polyPatch&,
streamLineParticleCloud& cloud,
trackingData& td trackingData& td
); );

View File

@ -85,10 +85,7 @@ bool Foam::DSMCParcel<ParcelType>::hitPatch
( (
const polyPatch&, const polyPatch&,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td
const label,
const scalar,
const tetIndices&
) )
{ {
return false; return false;
@ -114,8 +111,7 @@ void Foam::DSMCParcel<ParcelType>::hitWallPatch
( (
const wallPolyPatch& wpp, const wallPolyPatch& wpp,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td
const tetIndices& tetIs
) )
{ {
label wppIndex = wpp.index(); label wppIndex = wpp.index();
@ -202,19 +198,6 @@ void Foam::DSMCParcel<ParcelType>::hitWallPatch
} }
template<class ParcelType>
template<class TrackCloudType>
void Foam::DSMCParcel<ParcelType>::hitPatch
(
const polyPatch&,
TrackCloudType& cloud,
trackingData& td
)
{
td.keepParticle = false;
}
template<class ParcelType> template<class ParcelType>
void Foam::DSMCParcel<ParcelType>::transformProperties(const tensor& T) void Foam::DSMCParcel<ParcelType>::transformProperties(const tensor& T)
{ {

View File

@ -266,10 +266,7 @@ public:
( (
const polyPatch&, const polyPatch&,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
); );
//- Overridable function to handle the particle hitting a //- Overridable function to handle the particle hitting a
@ -288,16 +285,6 @@ public:
( (
const wallPolyPatch&, const wallPolyPatch&,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td,
const tetIndices&
);
//- Overridable function to handle the particle hitting a polyPatch
template<class TrackCloudType>
void hitPatch
(
const polyPatch&,
TrackCloudType& cloud,
trackingData& td trackingData& td
); );

View File

@ -64,32 +64,6 @@ void Foam::Cloud<ParticleType>::checkPatches() const
} }
template<class ParticleType>
void Foam::Cloud<ParticleType>::calcCellWallFaces() const
{
cellWallFacesPtr_.reset(new PackedBoolList(pMesh().nCells(), false));
PackedBoolList& cellWallFaces = cellWallFacesPtr_();
const polyBoundaryMesh& patches = polyMesh_.boundaryMesh();
forAll(patches, patchi)
{
if (isA<wallPolyPatch>(patches[patchi]))
{
const polyPatch& patch = patches[patchi];
const labelList& pFaceCells = patch.faceCells();
forAll(pFaceCells, pFCI)
{
cellWallFaces[pFaceCells[pFCI]] = true;
}
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ParticleType> template<class ParticleType>
@ -104,8 +78,6 @@ Foam::Cloud<ParticleType>::Cloud
IDLList<ParticleType>(), IDLList<ParticleType>(),
polyMesh_(pMesh), polyMesh_(pMesh),
labels_(), labels_(),
nTrackingRescues_(),
cellWallFacesPtr_(),
globalPositionsPtr_() globalPositionsPtr_()
{ {
checkPatches(); checkPatches();
@ -124,19 +96,6 @@ Foam::Cloud<ParticleType>::Cloud
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ParticleType>
const Foam::PackedBoolList& Foam::Cloud<ParticleType>::cellHasWallFaces()
const
{
if (!cellWallFacesPtr_.valid())
{
calcCellWallFaces();
}
return cellWallFacesPtr_();
}
template<class ParticleType> template<class ParticleType>
void Foam::Cloud<ParticleType>::addParticle(ParticleType* pPtr) void Foam::Cloud<ParticleType>::addParticle(ParticleType* pPtr)
{ {
@ -195,9 +154,6 @@ void Foam::Cloud<ParticleType>::move
// Which patches are processor patches // Which patches are processor patches
const labelList& procPatches = pData.processorPatches(); const labelList& procPatches = pData.processorPatches();
// Indexing of patches into the procPatches list
const labelList& procPatchIndices = pData.processorPatchIndices();
// Indexing of equivalent patch on neighbour processor into the // Indexing of equivalent patch on neighbour processor into the
// procPatches list on the neighbour // procPatches list on the neighbour
const labelList& procPatchNeighbours = pData.processorPatchNeighbours(); const labelList& procPatchNeighbours = pData.processorPatchNeighbours();
@ -219,10 +175,6 @@ void Foam::Cloud<ParticleType>::move
pIter().stepFraction() = 0; pIter().stepFraction() = 0;
} }
// Reset nTrackingRescues
nTrackingRescues_ = 0;
// List of lists of particles to be transfered for all of the // List of lists of particles to be transfered for all of the
// neighbour processors // neighbour processors
List<IDLList<ParticleType>> particleTransferLists List<IDLList<ParticleType>> particleTransferLists
@ -271,7 +223,7 @@ void Foam::Cloud<ParticleType>::move
( (
!Pstream::parRun() !Pstream::parRun()
|| !p.onBoundaryFace() || !p.onBoundaryFace()
|| procPatchIndices[p.patch()] < 0 || procPatchNeighbours[p.patch()] < 0
) )
{ {
FatalErrorInFunction FatalErrorInFunction
@ -390,16 +342,6 @@ void Foam::Cloud<ParticleType>::move
} }
} }
} }
if (cloud::debug)
{
reduce(nTrackingRescues_, sumOp<label>());
if (nTrackingRescues_ > 0)
{
Info<< nTrackingRescues_ << " tracking rescue corrections" << endl;
}
}
} }

View File

@ -80,10 +80,6 @@ class Cloud
//- Temporary storage for addressing. Used in findTris. //- Temporary storage for addressing. Used in findTris.
mutable DynamicList<label> labels_; mutable DynamicList<label> labels_;
//- Count of how many tracking rescue corrections have been
// applied
mutable label nTrackingRescues_;
//- Does the cell have wall faces //- Does the cell have wall faces
mutable autoPtr<PackedBoolList> cellWallFacesPtr_; mutable autoPtr<PackedBoolList> cellWallFacesPtr_;
@ -160,45 +156,18 @@ public:
return polyMesh_; return polyMesh_;
} }
//- Return the number of particles in the cloud
label size() const label size() const
{ {
return IDLList<ParticleType>::size(); return IDLList<ParticleType>::size();
}; };
//- Return temporary addressing
DynamicList<label>& labels() const DynamicList<label>& labels() const
{ {
return labels_; return labels_;
} }
//- Return nTrackingRescues
label nTrackingRescues() const
{
return nTrackingRescues_;
}
//- Increment the nTrackingRescues counter
void trackingRescue() const
{
nTrackingRescues_++;
if (cloud::debug && size() && (nTrackingRescues_ % size() == 0))
{
Pout<< " " << nTrackingRescues_
<< " tracking rescues " << endl;
}
}
//- Whether each cell has any wall faces (demand driven data)
const PackedBoolList& cellHasWallFaces() const;
//- Switch to specify if particles of the cloud can return
// non-zero wall distance values. By default, assume
// that they can't (default for wallImpactDistance in
// particle is 0.0).
bool hasWallImpactDistance() const
{
return false;
}
// Iterators // Iterators

View File

@ -150,7 +150,6 @@ Foam::Cloud<ParticleType>::Cloud
cloud(pMesh, cloudName), cloud(pMesh, cloudName),
polyMesh_(pMesh), polyMesh_(pMesh),
labels_(), labels_(),
nTrackingRescues_(),
cellWallFacesPtr_() cellWallFacesPtr_()
{ {
checkPatches(); checkPatches();

View File

@ -286,17 +286,12 @@ protected:
//- Overridable function to handle the particle hitting a //- Overridable function to handle the particle hitting a
// patch. Executed before other patch-hitting functions. // patch. Executed before other patch-hitting functions.
// trackFraction is passed in to allow mesh motion to
// interpolate in time to the correct face state.
template<class TrackCloudType> template<class TrackCloudType>
bool hitPatch bool hitPatch
( (
const polyPatch&, const polyPatch&,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
); );
//- Overridable function to handle the particle hitting a wedgePatch //- Overridable function to handle the particle hitting a wedgePatch
@ -374,17 +369,6 @@ protected:
( (
const wallPolyPatch&, const wallPolyPatch&,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td,
const tetIndices& tetIs
);
//- Overridable function to handle the particle hitting a
// general patch
template<class TrackCloudType>
void hitPatch
(
const polyPatch&,
TrackCloudType& cloud,
trackingData& td trackingData& td
); );

View File

@ -197,7 +197,7 @@ inline bool Foam::particle::onBoundaryFace() const
inline Foam::label Foam::particle::patch() const inline Foam::label Foam::particle::patch() const
{ {
return mesh_.boundaryMesh().whichPatch(facei_); return onFace() ? mesh_.boundaryMesh().whichPatch(facei_) : -1;
} }

View File

@ -122,22 +122,9 @@ void Foam::particle::hitFace
} }
else if (onBoundaryFace()) else if (onBoundaryFace())
{ {
const tetIndices faceHitTetIs(celli_, tetFacei_, tetPti_); if(!p.hitPatch(mesh_.boundaryMesh()[p.patch()], cloud, ttd))
if
(
!p.hitPatch
(
mesh_.boundaryMesh()[patch()],
cloud,
ttd,
patch(),
stepFraction(),
faceHitTetIs
)
)
{ {
const polyPatch& patch = mesh_.boundaryMesh()[this->patch()]; const polyPatch& patch = mesh_.boundaryMesh()[p.patch()];
if (isA<wedgePolyPatch>(patch)) if (isA<wedgePolyPatch>(patch))
{ {
@ -200,15 +187,12 @@ void Foam::particle::hitFace
{ {
p.hitWallPatch p.hitWallPatch
( (
static_cast<const wallPolyPatch&>(patch), static_cast<const wallPolyPatch&>(patch), cloud, ttd
cloud,
ttd,
faceHitTetIs
); );
} }
else else
{ {
p.hitPatch(patch, cloud, ttd); td.keepParticle = false;
} }
} }
} }
@ -240,10 +224,7 @@ bool Foam::particle::hitPatch
( (
const polyPatch&, const polyPatch&,
TrackCloudType&, TrackCloudType&,
trackingData&, trackingData&
const label,
const scalar,
const tetIndices&
) )
{ {
return false; return false;
@ -470,15 +451,9 @@ void Foam::particle::hitWallPatch
( (
const wallPolyPatch&, const wallPolyPatch&,
TrackCloudType&, TrackCloudType&,
trackingData&, trackingData&
const tetIndices&
) )
{} {}
template<class TrackCloudType>
void Foam::particle::hitPatch(const polyPatch&, TrackCloudType&, trackingData&)
{}
// ************************************************************************* // // ************************************************************************* //

View File

@ -155,13 +155,6 @@ Foam::CollidingCloud<CloudType>::~CollidingCloud()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
bool Foam::CollidingCloud<CloudType>::hasWallImpactDistance() const
{
return !collision().controlsWallInteraction();
}
template<class CloudType> template<class CloudType>
void Foam::CollidingCloud<CloudType>::storeState() void Foam::CollidingCloud<CloudType>::storeState()
{ {

View File

@ -194,13 +194,6 @@ public:
constProps() const; constProps() const;
//- If the collision model controls the wall interaction,
// then the wall impact distance should be zero.
// Otherwise, it should be allowed to be the value from
// the Parcel.
bool hasWallImpactDistance() const;
// Sub-models // Sub-models
//- Return const access to the collision model //- Return const access to the collision model

View File

@ -551,13 +551,6 @@ Foam::KinematicCloud<CloudType>::~KinematicCloud()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
bool Foam::KinematicCloud<CloudType>::hasWallImpactDistance() const
{
return true;
}
template<class CloudType> template<class CloudType>
void Foam::KinematicCloud<CloudType>::setParcelThermoProperties void Foam::KinematicCloud<CloudType>::setParcelThermoProperties
( (

View File

@ -332,10 +332,6 @@ public:
//- Return a reference to the cloud copy //- Return a reference to the cloud copy
inline const KinematicCloud& cloudCopy() const; inline const KinematicCloud& cloudCopy() const;
//- Switch to specify if particles of the cloud can return
// non-zero wall distance values - true for kinematic parcels
bool hasWallImpactDistance() const;
// References to the mesh and databases // References to the mesh and databases

View File

@ -42,8 +42,7 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
tetIndices tetIs = this->currentTetIndices(); tetIndices tetIs = this->currentTetIndices();
@ -55,8 +54,8 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
if (debug) if (debug)
{ {
WarningInFunction WarningInFunction
<< "Limiting observed density in cell " << celli << " to " << "Limiting observed density in cell " << this->cell()
<< cloud.constProps().rhoMin() << nl << endl; << " to " << cloud.constProps().rhoMin() << nl << endl;
} }
rhoc_ = cloud.constProps().rhoMin(); rhoc_ = cloud.constProps().rhoMin();
@ -70,7 +69,7 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
Uc_ = cloud.dispersion().update Uc_ = cloud.dispersion().update
( (
dt, dt,
celli, this->cell(),
U_, U_,
Uc_, Uc_,
UTurb_, UTurb_,
@ -85,11 +84,10 @@ void Foam::KinematicParcel<ParcelType>::cellValueSourceCorrection
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
Uc_ += cloud.UTrans()[celli]/massCell(celli); Uc_ += cloud.UTrans()[this->cell()]/massCell(this->cell());
} }
@ -99,8 +97,7 @@ void Foam::KinematicParcel<ParcelType>::calc
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
// Define local properties at beginning of time step // Define local properties at beginning of time step
@ -129,20 +126,7 @@ void Foam::KinematicParcel<ParcelType>::calc
// ~~~~~~ // ~~~~~~
// Calculate new particle velocity // Calculate new particle velocity
this->U_ = this->U_ = calcVelocity(cloud, td, dt, Re, muc_, mass0, Su, dUTrans, Spu);
calcVelocity
(
cloud,
td,
dt,
celli,
Re,
muc_,
mass0,
Su,
dUTrans,
Spu
);
// Accumulate carrier phase source terms // Accumulate carrier phase source terms
@ -150,10 +134,10 @@ void Foam::KinematicParcel<ParcelType>::calc
if (cloud.solution().coupled()) if (cloud.solution().coupled())
{ {
// Update momentum transfer // Update momentum transfer
cloud.UTrans()[celli] += np0*dUTrans; cloud.UTrans()[this->cell()] += np0*dUTrans;
// Update momentum transfer coefficient // Update momentum transfer coefficient
cloud.UCoeff()[celli] += np0*Spu; cloud.UCoeff()[this->cell()] += np0*Spu;
} }
} }
@ -165,7 +149,6 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt,
const label celli,
const scalar Re, const scalar Re,
const scalar mu, const scalar mu,
const scalar mass, const scalar mass,
@ -293,7 +276,6 @@ bool Foam::KinematicParcel<ParcelType>::move
// Cache the current position, cell and step-fraction // Cache the current position, cell and step-fraction
const point start = p.position(); const point start = p.position();
const label celli = p.cell();
const scalar sfrac = p.stepFraction(); const scalar sfrac = p.stepFraction();
// Total displacement over the time-step // Total displacement over the time-step
@ -329,16 +311,25 @@ bool Foam::KinematicParcel<ParcelType>::move
if (dt > ROOTVSMALL) if (dt > ROOTVSMALL)
{ {
// Update cell based properties // Update cell based properties
p.setCellValues(cloud, ttd, dt, celli); p.setCellValues(cloud, ttd, dt);
if (cloud.solution().cellValueSourceCorrection()) if (cloud.solution().cellValueSourceCorrection())
{ {
p.cellValueSourceCorrection(cloud, ttd, dt, celli); p.cellValueSourceCorrection(cloud, ttd, dt);
} }
p.calc(cloud, ttd, dt, celli); p.calc(cloud, ttd, dt);
} }
p.age() += dt;
if (p.onFace())
{
cloud.functions().postFace(p, ttd.keepParticle);
}
cloud.functions().postMove(p, dt, start, ttd.keepParticle);
if (p.onFace() && ttd.keepParticle) if (p.onFace() && ttd.keepParticle)
{ {
p.hitFace(s, cloud, ttd); p.hitFace(s, cloud, ttd);
@ -351,15 +342,6 @@ bool Foam::KinematicParcel<ParcelType>::move
ttd.switchProcessor = true; ttd.switchProcessor = true;
} }
} }
p.age() += dt;
if (p.onFace())
{
cloud.functions().postFace(p, p.face(), ttd.keepParticle);
}
cloud.functions().postMove(p, celli, dt, start, ttd.keepParticle);
} }
return ttd.keepParticle; return ttd.keepParticle;
@ -372,24 +354,14 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
( (
const polyPatch& pp, const polyPatch& pp,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
) )
{ {
typename TrackCloudType::parcelType& p = typename TrackCloudType::parcelType& p =
static_cast<typename TrackCloudType::parcelType&>(*this); static_cast<typename TrackCloudType::parcelType&>(*this);
// Invoke post-processing model // Invoke post-processing model
cloud.functions().postPatch cloud.functions().postPatch(p, pp, td.keepParticle);
(
p,
pp,
trackFraction,
tetIs,
td.keepParticle
);
// Invoke surface film model // Invoke surface film model
if (cloud.surfaceFilm().transferParcel(p, pp, td.keepParticle)) if (cloud.surfaceFilm().transferParcel(p, pp, td.keepParticle))
@ -405,14 +377,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
else else
{ {
// Invoke patch interaction model // Invoke patch interaction model
return cloud.patchInteraction().correct return cloud.patchInteraction().correct(p, pp, td.keepParticle);
(
p,
pp,
td.keepParticle,
trackFraction,
tetIs
);
} }
} }
@ -436,24 +401,10 @@ void Foam::KinematicParcel<ParcelType>::hitWallPatch
( (
const wallPolyPatch& wpp, const wallPolyPatch& wpp,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td,
const tetIndices&
)
{
// Wall interactions handled by generic hitPatch function
}
template<class ParcelType>
template<class TrackCloudType>
void Foam::KinematicParcel<ParcelType>::hitPatch
(
const polyPatch&,
TrackCloudType& cloud,
trackingData& td trackingData& td
) )
{ {
td.keepParticle = false; // Wall interactions handled by generic hitPatch function
} }

View File

@ -285,7 +285,6 @@ protected:
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, // timestep const scalar dt, // timestep
const label celli, // owner cell
const scalar Re, // Reynolds number const scalar Re, // Reynolds number
const scalar mu, // local carrier viscosity const scalar mu, // local carrier viscosity
const scalar mass, // mass const scalar mass, // mass
@ -547,8 +546,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct cell values using latest transfer information //- Correct cell values using latest transfer information
@ -557,8 +555,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Update parcel properties over the time interval //- Update parcel properties over the time interval
@ -567,8 +564,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
@ -593,10 +589,7 @@ public:
( (
const polyPatch& p, const polyPatch& p,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
); );
//- Overridable function to handle the particle hitting a //- Overridable function to handle the particle hitting a
@ -615,16 +608,6 @@ public:
( (
const wallPolyPatch&, const wallPolyPatch&,
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td,
const tetIndices&
);
//- Overridable function to handle the particle hitting a polyPatch
template<class TrackCloudType>
void hitPatch
(
const polyPatch&,
TrackCloudType& cloud,
trackingData& td trackingData& td
); );

View File

@ -138,11 +138,10 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::setCellValues
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
ParcelType::setCellValues(cloud, td, dt, celli); ParcelType::setCellValues(cloud, td, dt);
} }
@ -152,12 +151,11 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
// Re-use correction from reacting parcel // Re-use correction from reacting parcel
ParcelType::cellValueSourceCorrection(cloud, td, dt, celli); ParcelType::cellValueSourceCorrection(cloud, td, dt);
} }
@ -167,8 +165,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
typedef typename TrackCloudType::reactingCloudType reactingCloudType; typedef typename TrackCloudType::reactingCloudType reactingCloudType;
@ -195,7 +192,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
// Calc surface values // Calc surface values
scalar Ts, rhos, mus, Prs, kappas; scalar Ts, rhos, mus, Prs, kappas;
this->calcSurfaceValues(cloud, td, celli, T0, Ts, rhos, mus, Prs, kappas); this->calcSurfaceValues(cloud, td, T0, Ts, rhos, mus, Prs, kappas);
scalar Res = this->Re(U0, d0, rhos, mus); scalar Res = this->Re(U0, d0, rhos, mus);
@ -245,7 +242,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
cloud, cloud,
td, td,
dt, dt,
celli,
Res, Res,
Prs, Prs,
Ts, Ts,
@ -309,7 +305,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
cloud, cloud,
td, td,
dt, dt,
celli,
d0, d0,
T0, T0,
mass0, mass0,
@ -362,12 +357,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
forAll(YGas_, i) forAll(YGas_, i)
{ {
label gid = composition.localToCarrierId(GAS, i); label gid = composition.localToCarrierId(GAS, i);
cloud.rhoTrans(gid)[celli] += dm*YMix[GAS]*YGas_[i]; cloud.rhoTrans(gid)[this->cell()] += dm*YMix[GAS]*YGas_[i];
} }
forAll(YLiquid_, i) forAll(YLiquid_, i)
{ {
label gid = composition.localToCarrierId(LIQ, i); label gid = composition.localToCarrierId(LIQ, i);
cloud.rhoTrans(gid)[celli] += dm*YMix[LIQ]*YLiquid_[i]; cloud.rhoTrans(gid)[this->cell()] += dm*YMix[LIQ]*YLiquid_[i];
} }
// No mapping between solid components and carrier phase // No mapping between solid components and carrier phase
@ -375,13 +370,13 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
forAll(YSolid_, i) forAll(YSolid_, i)
{ {
label gid = composition.localToCarrierId(SLD, i); label gid = composition.localToCarrierId(SLD, i);
cloud.rhoTrans(gid)[celli] += dm*YMix[SLD]*YSolid_[i]; cloud.rhoTrans(gid)[this->cell()] += dm*YMix[SLD]*YSolid_[i];
} }
*/ */
cloud.UTrans()[celli] += dm*U0; cloud.UTrans()[this->cell()] += dm*U0;
cloud.hsTrans()[celli] += cloud.hsTrans()[this->cell()] +=
dm*HsEff(cloud, td, pc, T0, idG, idL, idS); dm*HsEff(cloud, td, pc, T0, idG, idL, idS);
cloud.phaseChange().addToPhaseChangeMass(np0*mass1); cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
@ -391,18 +386,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
} }
// Correct surface values due to emitted species // Correct surface values due to emitted species
this->correctSurfaceValues this->correctSurfaceValues(cloud, td, Ts, Cs, rhos, mus, Prs, kappas);
(
cloud,
td,
celli,
Ts,
Cs,
rhos,
mus,
Prs,
kappas
);
Res = this->Re(U0, this->d_, rhos, mus); Res = this->Re(U0, this->d_, rhos, mus);
@ -419,7 +403,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
cloud, cloud,
td, td,
dt, dt,
celli,
Res, Res,
Prs, Prs,
kappas, kappas,
@ -438,19 +421,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
// Calculate new particle velocity // Calculate new particle velocity
this->U_ = this->U_ =
this->calcVelocity this->calcVelocity(cloud, td, dt, Res, mus, mass1, Su, dUTrans, Spu);
(
cloud,
td,
dt,
celli,
Res,
mus,
mass1,
Su,
dUTrans,
Spu
);
// 4. Accumulate carrier phase source terms // 4. Accumulate carrier phase source terms
@ -464,18 +435,18 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
scalar dm = np0*dMassGas[i]; scalar dm = np0*dMassGas[i];
label gid = composition.localToCarrierId(GAS, i); label gid = composition.localToCarrierId(GAS, i);
scalar hs = composition.carrier().Hs(gid, pc, T0); scalar hs = composition.carrier().Hs(gid, pc, T0);
cloud.rhoTrans(gid)[celli] += dm; cloud.rhoTrans(gid)[this->cell()] += dm;
cloud.UTrans()[celli] += dm*U0; cloud.UTrans()[this->cell()] += dm*U0;
cloud.hsTrans()[celli] += dm*hs; cloud.hsTrans()[this->cell()] += dm*hs;
} }
forAll(YLiquid_, i) forAll(YLiquid_, i)
{ {
scalar dm = np0*dMassLiquid[i]; scalar dm = np0*dMassLiquid[i];
label gid = composition.localToCarrierId(LIQ, i); label gid = composition.localToCarrierId(LIQ, i);
scalar hs = composition.carrier().Hs(gid, pc, T0); scalar hs = composition.carrier().Hs(gid, pc, T0);
cloud.rhoTrans(gid)[celli] += dm; cloud.rhoTrans(gid)[this->cell()] += dm;
cloud.UTrans()[celli] += dm*U0; cloud.UTrans()[this->cell()] += dm*U0;
cloud.hsTrans()[celli] += dm*hs; cloud.hsTrans()[this->cell()] += dm*hs;
} }
// No mapping between solid components and carrier phase // No mapping between solid components and carrier phase
@ -485,9 +456,9 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
scalar dm = np0*dMassSolid[i]; scalar dm = np0*dMassSolid[i];
label gid = composition.localToCarrierId(SLD, i); label gid = composition.localToCarrierId(SLD, i);
scalar hs = composition.carrier().Hs(gid, pc, T0); scalar hs = composition.carrier().Hs(gid, pc, T0);
cloud.rhoTrans(gid)[celli] += dm; cloud.rhoTrans(gid)[this->cell()] += dm;
cloud.UTrans()[celli] += dm*U0; cloud.UTrans()[this->cell()] += dm*U0;
cloud.hsTrans()[celli] += dm*hs; cloud.hsTrans()[this->cell()] += dm*hs;
} }
*/ */
@ -495,27 +466,27 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
{ {
scalar dm = np0*dMassSRCarrier[i]; scalar dm = np0*dMassSRCarrier[i];
scalar hs = composition.carrier().Hs(i, pc, T0); scalar hs = composition.carrier().Hs(i, pc, T0);
cloud.rhoTrans(i)[celli] += dm; cloud.rhoTrans(i)[this->cell()] += dm;
cloud.UTrans()[celli] += dm*U0; cloud.UTrans()[this->cell()] += dm*U0;
cloud.hsTrans()[celli] += dm*hs; cloud.hsTrans()[this->cell()] += dm*hs;
} }
// Update momentum transfer // Update momentum transfer
cloud.UTrans()[celli] += np0*dUTrans; cloud.UTrans()[this->cell()] += np0*dUTrans;
cloud.UCoeff()[celli] += np0*Spu; cloud.UCoeff()[this->cell()] += np0*Spu;
// Update sensible enthalpy transfer // Update sensible enthalpy transfer
cloud.hsTrans()[celli] += np0*dhsTrans; cloud.hsTrans()[this->cell()] += np0*dhsTrans;
cloud.hsCoeff()[celli] += np0*Sph; cloud.hsCoeff()[this->cell()] += np0*Sph;
// Update radiation fields // Update radiation fields
if (cloud.radiation()) if (cloud.radiation())
{ {
const scalar ap = this->areaP(); const scalar ap = this->areaP();
const scalar T4 = pow4(T0); const scalar T4 = pow4(T0);
cloud.radAreaP()[celli] += dt*np0*ap; cloud.radAreaP()[this->cell()] += dt*np0*ap;
cloud.radT4()[celli] += dt*np0*T4; cloud.radT4()[this->cell()] += dt*np0*T4;
cloud.radAreaPT4()[celli] += dt*np0*ap*T4; cloud.radAreaPT4()[this->cell()] += dt*np0*ap*T4;
} }
} }
} }
@ -632,7 +603,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt,
const label celli,
const scalar d, const scalar d,
const scalar T, const scalar T,
const scalar mass, const scalar mass,
@ -671,7 +641,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions
const scalar hReaction = cloud.surfaceReaction().calculate const scalar hReaction = cloud.surfaceReaction().calculate
( (
dt, dt,
celli, this->cell(),
d, d,
T, T,
this->Tc_, this->Tc_,

View File

@ -241,7 +241,6 @@ protected:
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, // timestep const scalar dt, // timestep
const label celli, // owner cell
const scalar d, // diameter const scalar d, // diameter
const scalar T, // temperature const scalar T, // temperature
const scalar mass, // mass const scalar mass, // mass
@ -418,8 +417,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct cell values using latest transfer information //- Correct cell values using latest transfer information
@ -428,8 +426,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Update parcel properties over the time interval //- Update parcel properties over the time interval
@ -438,8 +435,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );

View File

@ -40,7 +40,6 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt,
const label celli,
const scalar Re, const scalar Re,
const scalar Pr, const scalar Pr,
const scalar Ts, const scalar Ts,
@ -87,7 +86,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
phaseChange.calculate phaseChange.calculate
( (
dt, dt,
celli, this->cell(),
Re, Re,
Pr, Pr,
d, d,
@ -207,11 +206,10 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
ParcelType::setCellValues(cloud, td, dt, celli); ParcelType::setCellValues(cloud, td, dt);
pc_ = td.pInterp().interpolate pc_ = td.pInterp().interpolate
( (
@ -224,8 +222,8 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
if (debug) if (debug)
{ {
WarningInFunction WarningInFunction
<< "Limiting observed pressure in cell " << celli << " to " << "Limiting observed pressure in cell " << this->cell()
<< cloud.constProps().pMin() << nl << endl; << " to " << cloud.constProps().pMin() << nl << endl;
} }
pc_ = cloud.constProps().pMin(); pc_ = cloud.constProps().pMin();
@ -239,15 +237,14 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
scalar addedMass = 0.0; scalar addedMass = 0.0;
scalar maxMassI = 0.0; scalar maxMassI = 0.0;
forAll(cloud.rhoTrans(), i) forAll(cloud.rhoTrans(), i)
{ {
scalar dm = cloud.rhoTrans(i)[celli]; scalar dm = cloud.rhoTrans(i)[this->cell()];
maxMassI = max(maxMassI, mag(dm)); maxMassI = max(maxMassI, mag(dm));
addedMass += dm; addedMass += dm;
} }
@ -257,17 +254,17 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
return; return;
} }
const scalar massCell = this->massCell(celli); const scalar massCell = this->massCell(this->cell());
this->rhoc_ += addedMass/cloud.pMesh().cellVolumes()[celli]; this->rhoc_ += addedMass/cloud.pMesh().cellVolumes()[this->cell()];
const scalar massCellNew = massCell + addedMass; const scalar massCellNew = massCell + addedMass;
this->Uc_ = (this->Uc_*massCell + cloud.UTrans()[celli])/massCellNew; this->Uc_ = (this->Uc_*massCell + cloud.UTrans()[this->cell()])/massCellNew;
scalar CpEff = 0.0; scalar CpEff = 0.0;
forAll(cloud.rhoTrans(), i) forAll(cloud.rhoTrans(), i)
{ {
scalar Y = cloud.rhoTrans(i)[celli]/addedMass; scalar Y = cloud.rhoTrans(i)[this->cell()]/addedMass;
CpEff += Y*cloud.composition().carrier().Cp CpEff += Y*cloud.composition().carrier().Cp
( (
i, i,
@ -276,18 +273,18 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
); );
} }
const scalar Cpc = td.CpInterp().psi()[celli]; const scalar Cpc = td.CpInterp().psi()[this->cell()];
this->Cpc_ = (massCell*Cpc + addedMass*CpEff)/massCellNew; this->Cpc_ = (massCell*Cpc + addedMass*CpEff)/massCellNew;
this->Tc_ += cloud.hsTrans()[celli]/(this->Cpc_*massCellNew); this->Tc_ += cloud.hsTrans()[this->cell()]/(this->Cpc_*massCellNew);
if (this->Tc_ < cloud.constProps().TMin()) if (this->Tc_ < cloud.constProps().TMin())
{ {
if (debug) if (debug)
{ {
WarningInFunction WarningInFunction
<< "Limiting observed temperature in cell " << celli << " to " << "Limiting observed temperature in cell " << this->cell()
<< cloud.constProps().TMin() << nl << endl; << " to " << cloud.constProps().TMin() << nl << endl;
} }
this->Tc_ = cloud.constProps().TMin(); this->Tc_ = cloud.constProps().TMin();
@ -301,7 +298,6 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const label celli,
const scalar T, const scalar T,
const scalarField& Cs, const scalarField& Cs,
scalar& rhos, scalar& rhos,
@ -323,7 +319,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
forAll(Xinf, i) forAll(Xinf, i)
{ {
Xinf[i] = thermo.carrier().Y(i)[celli]/thermo.carrier().W(i); Xinf[i] = thermo.carrier().Y(i)[this->cell()]/thermo.carrier().W(i);
} }
Xinf /= sum(Xinf); Xinf /= sum(Xinf);
@ -394,8 +390,7 @@ void Foam::ReactingParcel<ParcelType>::calc
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
typedef typename TrackCloudType::reactingCloudType reactingCloudType; typedef typename TrackCloudType::reactingCloudType reactingCloudType;
@ -415,7 +410,7 @@ void Foam::ReactingParcel<ParcelType>::calc
// Calc surface values // Calc surface values
scalar Ts, rhos, mus, Prs, kappas; scalar Ts, rhos, mus, Prs, kappas;
this->calcSurfaceValues(cloud, td, celli, T0, Ts, rhos, mus, Prs, kappas); this->calcSurfaceValues(cloud, td, T0, Ts, rhos, mus, Prs, kappas);
scalar Res = this->Re(U0, d0, rhos, mus); scalar Res = this->Re(U0, d0, rhos, mus);
@ -465,7 +460,6 @@ void Foam::ReactingParcel<ParcelType>::calc
cloud, cloud,
td, td,
dt, dt,
celli,
Res, Res,
Prs, Prs,
Ts, Ts,
@ -518,10 +512,10 @@ void Foam::ReactingParcel<ParcelType>::calc
label gid = composition.localToCarrierId(0, i); label gid = composition.localToCarrierId(0, i);
scalar hs = composition.carrier().Hs(gid, pc_, T0); scalar hs = composition.carrier().Hs(gid, pc_, T0);
cloud.rhoTrans(gid)[celli] += dmi; cloud.rhoTrans(gid)[this->cell()] += dmi;
cloud.hsTrans()[celli] += dmi*hs; cloud.hsTrans()[this->cell()] += dmi*hs;
} }
cloud.UTrans()[celli] += dm*U0; cloud.UTrans()[this->cell()] += dm*U0;
cloud.phaseChange().addToPhaseChangeMass(np0*mass1); cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
} }
@ -530,7 +524,7 @@ void Foam::ReactingParcel<ParcelType>::calc
} }
// Correct surface values due to emitted species // Correct surface values due to emitted species
correctSurfaceValues(cloud, td, celli, Ts, Cs, rhos, mus, Prs, kappas); correctSurfaceValues(cloud, td, Ts, Cs, rhos, mus, Prs, kappas);
Res = this->Re(U0, this->d_, rhos, mus); Res = this->Re(U0, this->d_, rhos, mus);
@ -547,7 +541,6 @@ void Foam::ReactingParcel<ParcelType>::calc
cloud, cloud,
td, td,
dt, dt,
celli,
Res, Res,
Prs, Prs,
kappas, kappas,
@ -565,19 +558,7 @@ void Foam::ReactingParcel<ParcelType>::calc
// Calculate new particle velocity // Calculate new particle velocity
this->U_ = this->U_ =
this->calcVelocity this->calcVelocity(cloud, td, dt, Res, mus, mass1, Su, dUTrans, Spu);
(
cloud,
td,
dt,
celli,
Res,
mus,
mass1,
Su,
dUTrans,
Spu
);
// 4. Accumulate carrier phase source terms // 4. Accumulate carrier phase source terms
@ -592,27 +573,27 @@ void Foam::ReactingParcel<ParcelType>::calc
label gid = composition.localToCarrierId(0, i); label gid = composition.localToCarrierId(0, i);
scalar hs = composition.carrier().Hs(gid, pc_, T0); scalar hs = composition.carrier().Hs(gid, pc_, T0);
cloud.rhoTrans(gid)[celli] += dm; cloud.rhoTrans(gid)[this->cell()] += dm;
cloud.UTrans()[celli] += dm*U0; cloud.UTrans()[this->cell()] += dm*U0;
cloud.hsTrans()[celli] += dm*hs; cloud.hsTrans()[this->cell()] += dm*hs;
} }
// Update momentum transfer // Update momentum transfer
cloud.UTrans()[celli] += np0*dUTrans; cloud.UTrans()[this->cell()] += np0*dUTrans;
cloud.UCoeff()[celli] += np0*Spu; cloud.UCoeff()[this->cell()] += np0*Spu;
// Update sensible enthalpy transfer // Update sensible enthalpy transfer
cloud.hsTrans()[celli] += np0*dhsTrans; cloud.hsTrans()[this->cell()] += np0*dhsTrans;
cloud.hsCoeff()[celli] += np0*Sph; cloud.hsCoeff()[this->cell()] += np0*Sph;
// Update radiation fields // Update radiation fields
if (cloud.radiation()) if (cloud.radiation())
{ {
const scalar ap = this->areaP(); const scalar ap = this->areaP();
const scalar T4 = pow4(T0); const scalar T4 = pow4(T0);
cloud.radAreaP()[celli] += dt*np0*ap; cloud.radAreaP()[this->cell()] += dt*np0*ap;
cloud.radT4()[celli] += dt*np0*T4; cloud.radT4()[this->cell()] += dt*np0*T4;
cloud.radAreaPT4()[celli] += dt*np0*ap*T4; cloud.radAreaPT4()[this->cell()] += dt*np0*ap*T4;
} }
} }
} }

View File

@ -178,7 +178,6 @@ protected:
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, // timestep const scalar dt, // timestep
const label celli, // owner cell
const scalar Re, // Reynolds number const scalar Re, // Reynolds number
const scalar Pr, // Prandtl number const scalar Pr, // Prandtl number
const scalar Ts, // Surface temperature const scalar Ts, // Surface temperature
@ -353,8 +352,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct cell values using latest transfer information //- Correct cell values using latest transfer information
@ -363,8 +361,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct surface values due to emitted species //- Correct surface values due to emitted species
@ -373,7 +370,6 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const label celli,
const scalar T, const scalar T,
const scalarField& Cs, const scalarField& Cs,
scalar& rhos, scalar& rhos,
@ -388,8 +384,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );

View File

@ -36,11 +36,10 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
ParcelType::setCellValues(cloud, td, dt, celli); ParcelType::setCellValues(cloud, td, dt);
tetIndices tetIs = this->currentTetIndices(); tetIndices tetIs = this->currentTetIndices();
@ -53,8 +52,8 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
if (debug) if (debug)
{ {
WarningInFunction WarningInFunction
<< "Limiting observed temperature in cell " << celli << " to " << "Limiting observed temperature in cell " << this->cell()
<< cloud.constProps().TMin() << nl << endl; << " to " << cloud.constProps().TMin() << nl << endl;
} }
Tc_ = cloud.constProps().TMin(); Tc_ = cloud.constProps().TMin();
@ -68,22 +67,21 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
this->Uc_ += cloud.UTrans()[celli]/this->massCell(celli); this->Uc_ += cloud.UTrans()[this->cell()]/this->massCell(this->cell());
const scalar CpMean = td.CpInterp().psi()[celli]; const scalar CpMean = td.CpInterp().psi()[this->cell()];
Tc_ += cloud.hsTrans()[celli]/(CpMean*this->massCell(celli)); Tc_ += cloud.hsTrans()[this->cell()]/(CpMean*this->massCell(this->cell()));
if (Tc_ < cloud.constProps().TMin()) if (Tc_ < cloud.constProps().TMin())
{ {
if (debug) if (debug)
{ {
WarningInFunction WarningInFunction
<< "Limiting observed temperature in cell " << celli << " to " << "Limiting observed temperature in cell " << this->cell()
<< cloud.constProps().TMin() << nl << endl; << " to " << cloud.constProps().TMin() << nl << endl;
} }
Tc_ = cloud.constProps().TMin(); Tc_ = cloud.constProps().TMin();
@ -97,7 +95,6 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const label celli,
const scalar T, const scalar T,
scalar& Ts, scalar& Ts,
scalar& rhos, scalar& rhos,
@ -141,8 +138,7 @@ void Foam::ThermoParcel<ParcelType>::calc
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
// Define local properties at beginning of time step // Define local properties at beginning of time step
@ -157,7 +153,7 @@ void Foam::ThermoParcel<ParcelType>::calc
// Calc surface values // Calc surface values
// ~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~
scalar Ts, rhos, mus, Pr, kappas; scalar Ts, rhos, mus, Pr, kappas;
calcSurfaceValues(cloud, td, celli, this->T_, Ts, rhos, mus, Pr, kappas); calcSurfaceValues(cloud, td, this->T_, Ts, rhos, mus, Pr, kappas);
// Reynolds number // Reynolds number
scalar Re = this->Re(this->U_, this->d_, rhos, mus); scalar Re = this->Re(this->U_, this->d_, rhos, mus);
@ -198,7 +194,6 @@ void Foam::ThermoParcel<ParcelType>::calc
cloud, cloud,
td, td,
dt, dt,
celli,
Re, Re,
Pr, Pr,
kappas, kappas,
@ -214,19 +209,7 @@ void Foam::ThermoParcel<ParcelType>::calc
// Calculate new particle velocity // Calculate new particle velocity
this->U_ = this->U_ =
this->calcVelocity this->calcVelocity(cloud, td, dt, Re, mus, mass0, Su, dUTrans, Spu);
(
cloud,
td,
dt,
celli,
Re,
mus,
mass0,
Su,
dUTrans,
Spu
);
// Accumulate carrier phase source terms // Accumulate carrier phase source terms
@ -234,25 +217,25 @@ void Foam::ThermoParcel<ParcelType>::calc
if (cloud.solution().coupled()) if (cloud.solution().coupled())
{ {
// Update momentum transfer // Update momentum transfer
cloud.UTrans()[celli] += np0*dUTrans; cloud.UTrans()[this->cell()] += np0*dUTrans;
// Update momentum transfer coefficient // Update momentum transfer coefficient
cloud.UCoeff()[celli] += np0*Spu; cloud.UCoeff()[this->cell()] += np0*Spu;
// Update sensible enthalpy transfer // Update sensible enthalpy transfer
cloud.hsTrans()[celli] += np0*dhsTrans; cloud.hsTrans()[this->cell()] += np0*dhsTrans;
// Update sensible enthalpy coefficient // Update sensible enthalpy coefficient
cloud.hsCoeff()[celli] += np0*Sph; cloud.hsCoeff()[this->cell()] += np0*Sph;
// Update radiation fields // Update radiation fields
if (cloud.radiation()) if (cloud.radiation())
{ {
const scalar ap = this->areaP(); const scalar ap = this->areaP();
const scalar T4 = pow4(T0); const scalar T4 = pow4(T0);
cloud.radAreaP()[celli] += dt*np0*ap; cloud.radAreaP()[this->cell()] += dt*np0*ap;
cloud.radT4()[celli] += dt*np0*T4; cloud.radT4()[this->cell()] += dt*np0*T4;
cloud.radAreaPT4()[celli] += dt*np0*ap*T4; cloud.radAreaPT4()[this->cell()] += dt*np0*ap*T4;
} }
} }
} }
@ -265,7 +248,6 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt,
const label celli,
const scalar Re, const scalar Re,
const scalar Pr, const scalar Pr,
const scalar kappa, const scalar kappa,

View File

@ -250,7 +250,6 @@ protected:
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, // timestep const scalar dt, // timestep
const label celli, // owner cell
const scalar Re, // Reynolds number const scalar Re, // Reynolds number
const scalar Pr, // Prandtl number - surface const scalar Pr, // Prandtl number - surface
const scalar kappa, // Thermal conductivity - surface const scalar kappa, // Thermal conductivity - surface
@ -404,8 +403,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct cell values using latest transfer information //- Correct cell values using latest transfer information
@ -414,8 +412,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Calculate surface thermo properties //- Calculate surface thermo properties
@ -424,7 +421,6 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const label celli,
const scalar T, const scalar T,
scalar& Ts, scalar& Ts,
scalar& rhos, scalar& rhos,
@ -439,8 +435,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );

View File

@ -113,7 +113,6 @@ template<class CloudType>
void Foam::CloudFunctionObject<CloudType>::postMove void Foam::CloudFunctionObject<CloudType>::postMove
( (
typename CloudType::parcelType&, typename CloudType::parcelType&,
const label,
const scalar, const scalar,
const point&, const point&,
bool& bool&
@ -126,8 +125,6 @@ void Foam::CloudFunctionObject<CloudType>::postPatch
( (
const typename CloudType::parcelType&, const typename CloudType::parcelType&,
const polyPatch&, const polyPatch&,
const scalar,
const tetIndices&,
bool& bool&
) )
{} {}
@ -137,7 +134,6 @@ template<class CloudType>
void Foam::CloudFunctionObject<CloudType>::postFace void Foam::CloudFunctionObject<CloudType>::postFace
( (
const typename CloudType::parcelType&, const typename CloudType::parcelType&,
const label,
bool& bool&
) )
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -148,7 +148,6 @@ public:
virtual void postMove virtual void postMove
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const label celli,
const scalar dt, const scalar dt,
const point& position0, const point& position0,
bool& keepParticle bool& keepParticle
@ -159,8 +158,6 @@ public:
( (
const typename CloudType::parcelType& p, const typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
const scalar trackFraction,
const tetIndices& testIs,
bool& keepParticle bool& keepParticle
); );
@ -168,7 +165,6 @@ public:
virtual void postFace virtual void postFace
( (
const typename CloudType::parcelType& p, const typename CloudType::parcelType& p,
const label facei,
bool& keepParticle bool& keepParticle
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -137,7 +137,6 @@ template<class CloudType>
void Foam::CloudFunctionObjectList<CloudType>::postMove void Foam::CloudFunctionObjectList<CloudType>::postMove
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const label celli,
const scalar dt, const scalar dt,
const point& position0, const point& position0,
bool& keepParticle bool& keepParticle
@ -145,12 +144,12 @@ void Foam::CloudFunctionObjectList<CloudType>::postMove
{ {
forAll(*this, i) forAll(*this, i)
{ {
this->operator[](i).postMove(p, celli, dt, position0, keepParticle);
if (!keepParticle) if (!keepParticle)
{ {
return; return;
} }
this->operator[](i).postMove(p, dt, position0, keepParticle);
} }
} }
@ -160,26 +159,17 @@ void Foam::CloudFunctionObjectList<CloudType>::postPatch
( (
const typename CloudType::parcelType& p, const typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
const scalar trackFraction,
const tetIndices& tetIs,
bool& keepParticle bool& keepParticle
) )
{ {
forAll(*this, i) forAll(*this, i)
{ {
this->operator[](i).postPatch
(
p,
pp,
trackFraction,
tetIs,
keepParticle
);
if (!keepParticle) if (!keepParticle)
{ {
return; return;
} }
this->operator[](i).postPatch(p, pp, keepParticle);
} }
} }
@ -188,18 +178,17 @@ template<class CloudType>
void Foam::CloudFunctionObjectList<CloudType>::postFace void Foam::CloudFunctionObjectList<CloudType>::postFace
( (
const typename CloudType::parcelType& p, const typename CloudType::parcelType& p,
const label facei,
bool& keepParticle bool& keepParticle
) )
{ {
forAll(*this, i) forAll(*this, i)
{ {
this->operator[](i).postFace(p, facei, keepParticle);
if (!keepParticle) if (!keepParticle)
{ {
return; return;
} }
this->operator[](i).postFace(p, keepParticle);
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -113,7 +113,6 @@ public:
virtual void postMove virtual void postMove
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const label celli,
const scalar dt, const scalar dt,
const point& position0, const point& position0,
bool& keepParticle bool& keepParticle
@ -124,8 +123,6 @@ public:
( (
const typename CloudType::parcelType& p, const typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
const scalar trackFraction,
const tetIndices& tetIs,
bool& keepParticle bool& keepParticle
); );
@ -133,7 +130,6 @@ public:
virtual void postFace virtual void postFace
( (
const typename CloudType::parcelType& p, const typename CloudType::parcelType& p,
const label facei,
bool& keepParticle bool& keepParticle
); );
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -362,12 +362,7 @@ Foam::FacePostProcessing<CloudType>::~FacePostProcessing()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType> template<class CloudType>
void Foam::FacePostProcessing<CloudType>::postFace void Foam::FacePostProcessing<CloudType>::postFace(const parcelType& p, bool&)
(
const parcelType& p,
const label facei,
bool&
)
{ {
if if
( (
@ -384,7 +379,7 @@ void Foam::FacePostProcessing<CloudType>::postFace
label faceId = -1; label faceId = -1;
forAll(fz, j) forAll(fz, j)
{ {
if (fz[j] == facei) if (fz[j] == p.face())
{ {
faceId = j; faceId = j;
break; break;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -159,12 +159,7 @@ public:
// Evaluation // Evaluation
//- Post-face hook //- Post-face hook
virtual void postFace virtual void postFace(const parcelType& p, bool& keepParticle);
(
const parcelType& p,
const label facei,
bool& keepParticle
);
}; };

View File

@ -647,7 +647,6 @@ template<class CloudType>
void Foam::ParticleCollector<CloudType>::postMove void Foam::ParticleCollector<CloudType>::postMove
( (
parcelType& p, parcelType& p,
const label celli,
const scalar dt, const scalar dt,
const point& position0, const point& position0,
bool& keepParticle bool& keepParticle

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -287,7 +287,6 @@ public:
virtual void postMove virtual void postMove
( (
parcelType& p, parcelType& p,
const label celli,
const scalar dt, const scalar dt,
const point& position0, const point& position0,
bool& keepParticle bool& keepParticle

View File

@ -162,8 +162,6 @@ void Foam::ParticleErosion<CloudType>::postPatch
( (
const parcelType& p, const parcelType& p,
const polyPatch& pp, const polyPatch& pp,
const scalar trackFraction,
const tetIndices& tetIs,
bool& bool&
) )
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -132,8 +132,6 @@ public:
( (
const parcelType& p, const parcelType& p,
const polyPatch& pp, const polyPatch& pp,
const scalar trackFraction,
const tetIndices& tetIs,
bool& keepParticle bool& keepParticle
); );
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -109,12 +109,7 @@ void Foam::ParticleTracks<CloudType>::preEvolve()
template<class CloudType> template<class CloudType>
void Foam::ParticleTracks<CloudType>::postFace void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p, bool&)
(
const parcelType& p,
const label,
bool&
)
{ {
if if
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -145,12 +145,7 @@ public:
virtual void preEvolve(); virtual void preEvolve();
//- Post-face hook //- Post-face hook
virtual void postFace virtual void postFace(const parcelType& p, bool& keepParticle);
(
const parcelType& p,
const label facei,
bool& keepParticle
);
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -104,15 +104,14 @@ template<class CloudType>
void Foam::ParticleTrap<CloudType>::postMove void Foam::ParticleTrap<CloudType>::postMove
( (
parcelType& p, parcelType& p,
const label celli,
const scalar, const scalar,
const point&, const point&,
bool& bool&
) )
{ {
if (alphaPtr_->primitiveField()[celli] < threshold_) if (alphaPtr_->primitiveField()[p.cell()] < threshold_)
{ {
const vector& gradAlpha = gradAlphaPtr_()[celli]; const vector& gradAlpha = gradAlphaPtr_()[p.cell()];
vector nHat = gradAlpha/mag(gradAlpha); vector nHat = gradAlpha/mag(gradAlpha);
scalar nHatU = nHat & p.U(); scalar nHatU = nHat & p.U();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -131,7 +131,6 @@ public:
virtual void postMove virtual void postMove
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const label celli,
const scalar dt, const scalar dt,
const point& position0, const point& position0,
bool& keepParticle bool& keepParticle

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -197,8 +197,6 @@ void Foam::PatchPostProcessing<CloudType>::postPatch
( (
const parcelType& p, const parcelType& p,
const polyPatch& pp, const polyPatch& pp,
const scalar,
const tetIndices& tetIs,
bool& bool&
) )
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -133,8 +133,6 @@ public:
( (
const parcelType& p, const parcelType& p,
const polyPatch& pp, const polyPatch& pp,
const scalar trackFraction,
const tetIndices& tetIs,
bool& keepParticle bool& keepParticle
); );
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -125,7 +125,6 @@ template<class CloudType>
void Foam::VoidFraction<CloudType>::postMove void Foam::VoidFraction<CloudType>::postMove
( (
parcelType& p, parcelType& p,
const label celli,
const scalar dt, const scalar dt,
const point&, const point&,
bool& bool&
@ -133,7 +132,7 @@ void Foam::VoidFraction<CloudType>::postMove
{ {
volScalarField& theta = thetaPtr_(); volScalarField& theta = thetaPtr_();
theta[celli] += dt*p.nParticle()*p.volume(); theta[p.cell()] += dt*p.nParticle()*p.volume();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -119,7 +119,6 @@ public:
virtual void postMove virtual void postMove
( (
parcelType& p, parcelType& p,
const label celli,
const scalar dt, const scalar dt,
const point& position0, const point& position0,
bool& keepParticle bool& keepParticle

View File

@ -260,7 +260,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
U.boundaryField()[patchi][patchFacei] U.boundaryField()[patchi][patchFacei]
); );
bool particleHit = false;
if (normalAlignment > cosPhiMinFlatWall) if (normalAlignment > cosPhiMinFlatWall)
{ {
// Guard against a flat interaction being // Guard against a flat interaction being
@ -285,8 +284,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
); );
flatSiteData.append(wSD); flatSiteData.append(wSD);
particleHit = true;
} }
} }
else else
@ -296,22 +293,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
otherSiteDistances.append(nearest.distance()); otherSiteDistances.append(nearest.distance());
otherSiteData.append(wSD); otherSiteData.append(wSD);
particleHit = true;
}
if (particleHit)
{
bool keep = true;
this->owner().functions().postFace(p, realFacei, keep);
this->owner().functions().postPatch
(
p,
mesh.boundaryMesh()[patchi],
1.0,
p.currentTetIndices(),
keep
);
} }
} }
} }
@ -352,7 +333,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
il_.referredWallData()[refWallFacei] il_.referredWallData()[refWallFacei]
); );
bool particleHit = false;
if (normalAlignment > cosPhiMinFlatWall) if (normalAlignment > cosPhiMinFlatWall)
{ {
// Guard against a flat interaction being // Guard against a flat interaction being
@ -377,8 +357,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
); );
flatSiteData.append(wSD); flatSiteData.append(wSD);
particleHit = false;
} }
} }
else else
@ -388,14 +366,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
otherSiteDistances.append(nearest.distance()); otherSiteDistances.append(nearest.distance());
otherSiteData.append(wSD); otherSiteData.append(wSD);
particleHit = false;
}
if (particleHit)
{
// TODO: call cloud function objects for referred
// wall particle interactions
} }
} }
} }

View File

@ -171,9 +171,7 @@ bool Foam::LocalInteraction<CloudType>::correct
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
) )
{ {
label patchi = patchData_.applyToPatch(pp.index()); label patchi = patchData_.applyToPatch(pp.index());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -122,9 +122,7 @@ public:
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
); );

View File

@ -136,9 +136,7 @@ bool Foam::MultiInteraction<CloudType>::correct
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
) )
{ {
label origFacei = p.face(); label origFacei = p.face();
@ -152,9 +150,7 @@ bool Foam::MultiInteraction<CloudType>::correct
( (
p, p,
this->owner().pMesh().boundaryMesh()[patchi], this->owner().pMesh().boundaryMesh()[patchi],
keepParticle, keepParticle
trackFraction,
tetIs
); );
if (myInteracted && oneInteractionOnly_) if (myInteracted && oneInteractionOnly_)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -141,9 +141,7 @@ public:
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
); );
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -69,9 +69,7 @@ bool Foam::NoInteraction<CloudType>::correct
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch&, const polyPatch&,
bool&, bool&
const scalar,
const tetIndices&
) )
{ {
return false; return false;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -87,9 +87,7 @@ public:
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
); );
}; };

View File

@ -154,9 +154,7 @@ public:
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
) = 0; ) = 0;

View File

@ -61,9 +61,7 @@ bool Foam::Rebound<CloudType>::correct
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
) )
{ {
vector& U = p.U(); vector& U = p.U();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -89,9 +89,7 @@ public:
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
); );
}; };

View File

@ -103,9 +103,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
) )
{ {
vector& U = p.U(); vector& U = p.U();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -128,9 +128,7 @@ public:
( (
typename CloudType::parcelType& p, typename CloudType::parcelType& p,
const polyPatch& pp, const polyPatch& pp,
bool& keepParticle, bool& keepParticle
const scalar trackFraction,
const tetIndices& tetIs
); );

View File

@ -239,10 +239,7 @@ bool Foam::molecule::hitPatch
( (
const polyPatch&, const polyPatch&,
moleculeCloud&, moleculeCloud&,
trackingData&, trackingData&
const label,
const scalar,
const tetIndices&
) )
{ {
return false; return false;
@ -264,12 +261,9 @@ void Foam::molecule::hitWallPatch
( (
const wallPolyPatch& wpp, const wallPolyPatch& wpp,
moleculeCloud& cloud, moleculeCloud& cloud,
trackingData& td, trackingData& td
const tetIndices& tetIs
) )
{ {
// Use of the normal from tetIs is not required as
// hasWallImpactDistance for a moleculeCloud is false.
vector nw = normal(); vector nw = normal();
nw /= mag(nw); nw /= mag(nw);
@ -283,15 +277,4 @@ void Foam::molecule::hitWallPatch
} }
void Foam::molecule::hitPatch
(
const polyPatch&,
moleculeCloud&,
trackingData& td
)
{
td.keepParticle = false;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -368,10 +368,7 @@ public:
( (
const polyPatch&, const polyPatch&,
moleculeCloud& cloud, moleculeCloud& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
); );
//- Overridable function to handle the particle hitting a processorPatch //- Overridable function to handle the particle hitting a processorPatch
@ -387,15 +384,6 @@ public:
( (
const wallPolyPatch&, const wallPolyPatch&,
moleculeCloud& cloud, moleculeCloud& cloud,
trackingData& td,
const tetIndices&
);
//- Overridable function to handle the particle hitting a polyPatch
void hitPatch
(
const polyPatch&,
moleculeCloud& cloud,
trackingData& td trackingData& td
); );

View File

@ -100,10 +100,7 @@ bool Foam::solidParticle::hitPatch
( (
const polyPatch&, const polyPatch&,
solidParticleCloud& cloud, solidParticleCloud& cloud,
trackingData&, trackingData&
const label,
const scalar,
const tetIndices&
) )
{ {
return false; return false;
@ -125,11 +122,10 @@ void Foam::solidParticle::hitWallPatch
( (
const wallPolyPatch& wpp, const wallPolyPatch& wpp,
solidParticleCloud& cloud, solidParticleCloud& cloud,
trackingData& td, trackingData& td
const tetIndices& tetIs
) )
{ {
vector nw = tetIs.faceTri(mesh()).normal(); vector nw = normal();
nw /= mag(nw); nw /= mag(nw);
scalar Un = U_ & nw; scalar Un = U_ & nw;
@ -144,17 +140,6 @@ void Foam::solidParticle::hitWallPatch
} }
void Foam::solidParticle::hitPatch
(
const polyPatch&,
solidParticleCloud& cloud,
trackingData& td
)
{
td.keepParticle = false;
}
void Foam::solidParticle::transformProperties (const tensor& T) void Foam::solidParticle::transformProperties (const tensor& T)
{ {
particle::transformProperties(T); particle::transformProperties(T);

View File

@ -200,10 +200,7 @@ public:
( (
const polyPatch&, const polyPatch&,
solidParticleCloud& cloud, solidParticleCloud& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
); );
//- Overridable function to handle the particle hitting a //- Overridable function to handle the particle hitting a
@ -220,15 +217,6 @@ public:
( (
const wallPolyPatch&, const wallPolyPatch&,
solidParticleCloud& cloud, solidParticleCloud& cloud,
trackingData& td,
const tetIndices&
);
//- Overridable function to handle the particle hitting a polyPatch
void hitPatch
(
const polyPatch&,
solidParticleCloud& cloud,
trackingData& td trackingData& td
); );

View File

@ -63,12 +63,6 @@ Foam::solidParticleCloud::solidParticleCloud
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::solidParticleCloud::hasWallImpactDistance() const
{
return true;
}
void Foam::solidParticleCloud::move(const dimensionedVector& g) void Foam::solidParticleCloud::move(const dimensionedVector& g)
{ {
const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho"); const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,8 +94,6 @@ public:
// Access // Access
bool hasWallImpactDistance() const;
inline const fvMesh& mesh() const; inline const fvMesh& mesh() const;
inline scalar rhop() const; inline scalar rhop() const;

View File

@ -35,11 +35,10 @@ void Foam::SprayParcel<ParcelType>::setCellValues
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
ParcelType::setCellValues(cloud, td, dt, celli); ParcelType::setCellValues(cloud, td, dt);
} }
@ -49,11 +48,10 @@ void Foam::SprayParcel<ParcelType>::cellValueSourceCorrection
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
ParcelType::cellValueSourceCorrection(cloud, td, dt, celli); ParcelType::cellValueSourceCorrection(cloud, td, dt);
} }
@ -63,8 +61,7 @@ void Foam::SprayParcel<ParcelType>::calc
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
typedef typename TrackCloudType::reactingCloudType reactingCloudType; typedef typename TrackCloudType::reactingCloudType reactingCloudType;
@ -102,7 +99,7 @@ void Foam::SprayParcel<ParcelType>::calc
const scalar mass0 = this->mass(); const scalar mass0 = this->mass();
mu_ = composition.liquids().mu(pc0, T0, X0); mu_ = composition.liquids().mu(pc0, T0, X0);
ParcelType::calc(cloud,td, dt, celli); ParcelType::calc(cloud,td, dt);
if (td.keepParticle) if (td.keepParticle)
{ {
@ -129,7 +126,7 @@ void Foam::SprayParcel<ParcelType>::calc
if (liquidCore() > 0.5) if (liquidCore() > 0.5)
{ {
calcAtomization(cloud, td, dt, celli); calcAtomization(cloud, td, dt);
// Preserve the total mass/volume by increasing the number of // Preserve the total mass/volume by increasing the number of
// particles in parcels due to breakup // particles in parcels due to breakup
@ -138,7 +135,7 @@ void Foam::SprayParcel<ParcelType>::calc
} }
else else
{ {
calcBreakup(cloud, td, dt, celli); calcBreakup(cloud, td, dt);
} }
} }
@ -153,8 +150,7 @@ void Foam::SprayParcel<ParcelType>::calcAtomization
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
typedef typename TrackCloudType::reactingCloudType reactingCloudType; typedef typename TrackCloudType::reactingCloudType reactingCloudType;
@ -221,8 +217,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
) )
{ {
typedef typename TrackCloudType::parcelType parcelType; typedef typename TrackCloudType::parcelType parcelType;
@ -311,7 +306,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
child->injector() = this->injector(); child->injector() = this->injector();
child->tMom() = massChild/(Fcp.Sp() + Fncp.Sp()); child->tMom() = massChild/(Fcp.Sp() + Fncp.Sp());
child->user() = 0.0; child->user() = 0.0;
child->setCellValues(cloud, td, dt, celli); child->setCellValues(cloud, td, dt);
cloud.addParticle(child); cloud.addParticle(child);
} }

View File

@ -387,8 +387,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct parcel properties according to atomization model //- Correct parcel properties according to atomization model
@ -397,8 +396,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct parcel properties according to breakup model //- Correct parcel properties according to breakup model
@ -407,8 +405,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct cell values using latest transfer information //- Correct cell values using latest transfer information
@ -417,8 +414,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Correct surface values due to emitted species //- Correct surface values due to emitted species
@ -427,7 +423,6 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const label celli,
const scalar T, const scalar T,
const scalarField& Cs, const scalarField& Cs,
scalar& rhos, scalar& rhos,
@ -442,8 +437,7 @@ public:
( (
TrackCloudType& cloud, TrackCloudType& cloud,
trackingData& td, trackingData& td,
const scalar dt, const scalar dt
const label celli
); );
//- Calculate the chi-factor for flash-boiling for the //- Calculate the chi-factor for flash-boiling for the

View File

@ -158,10 +158,7 @@ bool Foam::trackedParticle::hitPatch
( (
const polyPatch&, const polyPatch&,
Cloud<trackedParticle>& cloud, Cloud<trackedParticle>& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
) )
{ {
return false; return false;
@ -229,6 +226,19 @@ void Foam::trackedParticle::hitCyclicAMIPatch
} }
void Foam::trackedParticle::hitCyclicACMIPatch
(
const cyclicACMIPolyPatch&,
Cloud<trackedParticle>& cloud,
trackingData& td,
const vector&
)
{
// Remove particle
td.keepParticle = false;
}
void Foam::trackedParticle::hitProcessorPatch void Foam::trackedParticle::hitProcessorPatch
( (
const processorPolyPatch&, const processorPolyPatch&,
@ -245,19 +255,6 @@ void Foam::trackedParticle::hitWallPatch
( (
const wallPolyPatch& wpp, const wallPolyPatch& wpp,
Cloud<trackedParticle>& cloud, Cloud<trackedParticle>& cloud,
trackingData& td,
const tetIndices&
)
{
// Remove particle
td.keepParticle = false;
}
void Foam::trackedParticle::hitPatch
(
const polyPatch& wpp,
Cloud<trackedParticle>& cloud,
trackingData& td trackingData& td
) )
{ {

View File

@ -249,10 +249,7 @@ public:
( (
const polyPatch&, const polyPatch&,
Cloud<trackedParticle>& cloud, Cloud<trackedParticle>& cloud,
trackingData& td, trackingData& td
const label patchi,
const scalar trackFraction,
const tetIndices& tetIs
); );
//- Overridable function to handle the particle hitting a wedge //- Overridable function to handle the particle hitting a wedge
@ -298,6 +295,15 @@ public:
const vector& const vector&
); );
//- Overridable function to handle the particle hitting a cyclicACMI
void hitCyclicACMIPatch
(
const cyclicACMIPolyPatch&,
Cloud<trackedParticle>& cloud,
trackingData& td,
const vector&
);
//- Overridable function to handle the particle hitting a //- Overridable function to handle the particle hitting a
//- processorPatch //- processorPatch
void hitProcessorPatch void hitProcessorPatch
@ -312,15 +318,6 @@ public:
( (
const wallPolyPatch&, const wallPolyPatch&,
Cloud<trackedParticle>& cloud, Cloud<trackedParticle>& cloud,
trackingData& td,
const tetIndices&
);
//- Overridable function to handle the particle hitting a polyPatch
void hitPatch
(
const polyPatch&,
Cloud<trackedParticle>& cloud,
trackingData& td trackingData& td
); );