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:
@ -130,10 +130,7 @@ bool Foam::findCellParticle::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
Cloud<findCellParticle>& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
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
|
||||
(
|
||||
const processorPolyPatch&,
|
||||
@ -204,19 +227,6 @@ void Foam::findCellParticle::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
Cloud<findCellParticle>& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices&
|
||||
)
|
||||
{
|
||||
// Remove particle
|
||||
td.keepParticle = false;
|
||||
}
|
||||
|
||||
|
||||
void Foam::findCellParticle::hitPatch
|
||||
(
|
||||
const polyPatch& wpp,
|
||||
Cloud<findCellParticle>& cloud,
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
|
||||
@ -229,10 +229,7 @@ public:
|
||||
(
|
||||
const polyPatch&,
|
||||
Cloud<findCellParticle>&,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a wedge
|
||||
@ -269,6 +266,24 @@ public:
|
||||
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
|
||||
//- processorPatch
|
||||
void hitProcessorPatch
|
||||
@ -283,15 +298,6 @@ public:
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
Cloud<findCellParticle>&,
|
||||
trackingData& td,
|
||||
const tetIndices&
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a polyPatch
|
||||
void hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
Cloud<findCellParticle>&,
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
|
||||
@ -274,10 +274,7 @@ bool Foam::streamLineParticle::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
streamLineParticleCloud& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
// 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
|
||||
(
|
||||
const processorPolyPatch&,
|
||||
@ -349,19 +372,6 @@ void Foam::streamLineParticle::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
streamLineParticleCloud& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices&
|
||||
)
|
||||
{
|
||||
// Remove particle
|
||||
td.keepParticle = false;
|
||||
}
|
||||
|
||||
|
||||
void Foam::streamLineParticle::hitPatch
|
||||
(
|
||||
const polyPatch& wpp,
|
||||
streamLineParticleCloud& cloud,
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
|
||||
@ -220,10 +220,7 @@ public:
|
||||
(
|
||||
const polyPatch&,
|
||||
streamLineParticleCloud& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a wedge
|
||||
@ -260,6 +257,26 @@ public:
|
||||
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
|
||||
//- processorPatch
|
||||
void hitProcessorPatch
|
||||
@ -274,15 +291,6 @@ public:
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
streamLineParticleCloud& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices&
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a polyPatch
|
||||
void hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
streamLineParticleCloud& cloud,
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
|
||||
@ -85,10 +85,7 @@ bool Foam::DSMCParcel<ParcelType>::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label,
|
||||
const scalar,
|
||||
const tetIndices&
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
return false;
|
||||
@ -114,8 +111,7 @@ void Foam::DSMCParcel<ParcelType>::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
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>
|
||||
void Foam::DSMCParcel<ParcelType>::transformProperties(const tensor& T)
|
||||
{
|
||||
|
||||
@ -266,10 +266,7 @@ public:
|
||||
(
|
||||
const polyPatch&,
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a
|
||||
@ -288,16 +285,6 @@ public:
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
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
|
||||
);
|
||||
|
||||
|
||||
@ -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 * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
@ -104,8 +78,6 @@ Foam::Cloud<ParticleType>::Cloud
|
||||
IDLList<ParticleType>(),
|
||||
polyMesh_(pMesh),
|
||||
labels_(),
|
||||
nTrackingRescues_(),
|
||||
cellWallFacesPtr_(),
|
||||
globalPositionsPtr_()
|
||||
{
|
||||
checkPatches();
|
||||
@ -124,19 +96,6 @@ Foam::Cloud<ParticleType>::Cloud
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::PackedBoolList& Foam::Cloud<ParticleType>::cellHasWallFaces()
|
||||
const
|
||||
{
|
||||
if (!cellWallFacesPtr_.valid())
|
||||
{
|
||||
calcCellWallFaces();
|
||||
}
|
||||
|
||||
return cellWallFacesPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::Cloud<ParticleType>::addParticle(ParticleType* pPtr)
|
||||
{
|
||||
@ -195,9 +154,6 @@ void Foam::Cloud<ParticleType>::move
|
||||
// Which patches are processor patches
|
||||
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
|
||||
// procPatches list on the neighbour
|
||||
const labelList& procPatchNeighbours = pData.processorPatchNeighbours();
|
||||
@ -219,10 +175,6 @@ void Foam::Cloud<ParticleType>::move
|
||||
pIter().stepFraction() = 0;
|
||||
}
|
||||
|
||||
// Reset nTrackingRescues
|
||||
nTrackingRescues_ = 0;
|
||||
|
||||
|
||||
// List of lists of particles to be transfered for all of the
|
||||
// neighbour processors
|
||||
List<IDLList<ParticleType>> particleTransferLists
|
||||
@ -271,7 +223,7 @@ void Foam::Cloud<ParticleType>::move
|
||||
(
|
||||
!Pstream::parRun()
|
||||
|| !p.onBoundaryFace()
|
||||
|| procPatchIndices[p.patch()] < 0
|
||||
|| procPatchNeighbours[p.patch()] < 0
|
||||
)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -80,10 +80,6 @@ class Cloud
|
||||
//- Temporary storage for addressing. Used in findTris.
|
||||
mutable DynamicList<label> labels_;
|
||||
|
||||
//- Count of how many tracking rescue corrections have been
|
||||
// applied
|
||||
mutable label nTrackingRescues_;
|
||||
|
||||
//- Does the cell have wall faces
|
||||
mutable autoPtr<PackedBoolList> cellWallFacesPtr_;
|
||||
|
||||
@ -160,45 +156,18 @@ public:
|
||||
return polyMesh_;
|
||||
}
|
||||
|
||||
//- Return the number of particles in the cloud
|
||||
label size() const
|
||||
{
|
||||
return IDLList<ParticleType>::size();
|
||||
};
|
||||
|
||||
//- Return temporary addressing
|
||||
DynamicList<label>& labels() const
|
||||
{
|
||||
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
|
||||
|
||||
|
||||
@ -150,7 +150,6 @@ Foam::Cloud<ParticleType>::Cloud
|
||||
cloud(pMesh, cloudName),
|
||||
polyMesh_(pMesh),
|
||||
labels_(),
|
||||
nTrackingRescues_(),
|
||||
cellWallFacesPtr_()
|
||||
{
|
||||
checkPatches();
|
||||
|
||||
@ -286,17 +286,12 @@ protected:
|
||||
|
||||
//- Overridable function to handle the particle hitting a
|
||||
// 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>
|
||||
bool hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a wedgePatch
|
||||
@ -374,17 +369,6 @@ protected:
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
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
|
||||
);
|
||||
|
||||
|
||||
@ -197,7 +197,7 @@ inline bool Foam::particle::onBoundaryFace() const
|
||||
|
||||
inline Foam::label Foam::particle::patch() const
|
||||
{
|
||||
return mesh_.boundaryMesh().whichPatch(facei_);
|
||||
return onFace() ? mesh_.boundaryMesh().whichPatch(facei_) : -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -122,22 +122,9 @@ void Foam::particle::hitFace
|
||||
}
|
||||
else if (onBoundaryFace())
|
||||
{
|
||||
const tetIndices faceHitTetIs(celli_, tetFacei_, tetPti_);
|
||||
|
||||
if
|
||||
(
|
||||
!p.hitPatch
|
||||
(
|
||||
mesh_.boundaryMesh()[patch()],
|
||||
cloud,
|
||||
ttd,
|
||||
patch(),
|
||||
stepFraction(),
|
||||
faceHitTetIs
|
||||
)
|
||||
)
|
||||
if(!p.hitPatch(mesh_.boundaryMesh()[p.patch()], cloud, ttd))
|
||||
{
|
||||
const polyPatch& patch = mesh_.boundaryMesh()[this->patch()];
|
||||
const polyPatch& patch = mesh_.boundaryMesh()[p.patch()];
|
||||
|
||||
if (isA<wedgePolyPatch>(patch))
|
||||
{
|
||||
@ -200,15 +187,12 @@ void Foam::particle::hitFace
|
||||
{
|
||||
p.hitWallPatch
|
||||
(
|
||||
static_cast<const wallPolyPatch&>(patch),
|
||||
cloud,
|
||||
ttd,
|
||||
faceHitTetIs
|
||||
static_cast<const wallPolyPatch&>(patch), cloud, ttd
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
p.hitPatch(patch, cloud, ttd);
|
||||
td.keepParticle = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -240,10 +224,7 @@ bool Foam::particle::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
TrackCloudType&,
|
||||
trackingData&,
|
||||
const label,
|
||||
const scalar,
|
||||
const tetIndices&
|
||||
trackingData&
|
||||
)
|
||||
{
|
||||
return false;
|
||||
@ -470,15 +451,9 @@ void Foam::particle::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
TrackCloudType&,
|
||||
trackingData&,
|
||||
const tetIndices&
|
||||
trackingData&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class TrackCloudType>
|
||||
void Foam::particle::hitPatch(const polyPatch&, TrackCloudType&, trackingData&)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -155,13 +155,6 @@ Foam::CollidingCloud<CloudType>::~CollidingCloud()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::CollidingCloud<CloudType>::hasWallImpactDistance() const
|
||||
{
|
||||
return !collision().controlsWallInteraction();
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CollidingCloud<CloudType>::storeState()
|
||||
{
|
||||
|
||||
@ -194,13 +194,6 @@ public:
|
||||
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
|
||||
|
||||
//- Return const access to the collision model
|
||||
|
||||
@ -551,13 +551,6 @@ Foam::KinematicCloud<CloudType>::~KinematicCloud()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::KinematicCloud<CloudType>::hasWallImpactDistance() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::KinematicCloud<CloudType>::setParcelThermoProperties
|
||||
(
|
||||
|
||||
@ -332,10 +332,6 @@ public:
|
||||
//- Return a reference to the cloud copy
|
||||
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
|
||||
|
||||
|
||||
@ -42,8 +42,7 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
tetIndices tetIs = this->currentTetIndices();
|
||||
@ -55,8 +54,8 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
|
||||
if (debug)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Limiting observed density in cell " << celli << " to "
|
||||
<< cloud.constProps().rhoMin() << nl << endl;
|
||||
<< "Limiting observed density in cell " << this->cell()
|
||||
<< " to " << cloud.constProps().rhoMin() << nl << endl;
|
||||
}
|
||||
|
||||
rhoc_ = cloud.constProps().rhoMin();
|
||||
@ -70,7 +69,7 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
|
||||
Uc_ = cloud.dispersion().update
|
||||
(
|
||||
dt,
|
||||
celli,
|
||||
this->cell(),
|
||||
U_,
|
||||
Uc_,
|
||||
UTurb_,
|
||||
@ -85,11 +84,10 @@ void Foam::KinematicParcel<ParcelType>::cellValueSourceCorrection
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
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,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
// Define local properties at beginning of time step
|
||||
@ -129,20 +126,7 @@ void Foam::KinematicParcel<ParcelType>::calc
|
||||
// ~~~~~~
|
||||
|
||||
// Calculate new particle velocity
|
||||
this->U_ =
|
||||
calcVelocity
|
||||
(
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Re,
|
||||
muc_,
|
||||
mass0,
|
||||
Su,
|
||||
dUTrans,
|
||||
Spu
|
||||
);
|
||||
this->U_ = calcVelocity(cloud, td, dt, Re, muc_, mass0, Su, dUTrans, Spu);
|
||||
|
||||
|
||||
// Accumulate carrier phase source terms
|
||||
@ -150,10 +134,10 @@ void Foam::KinematicParcel<ParcelType>::calc
|
||||
if (cloud.solution().coupled())
|
||||
{
|
||||
// Update momentum transfer
|
||||
cloud.UTrans()[celli] += np0*dUTrans;
|
||||
cloud.UTrans()[this->cell()] += np0*dUTrans;
|
||||
|
||||
// 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,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar mu,
|
||||
const scalar mass,
|
||||
@ -293,7 +276,6 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||
|
||||
// Cache the current position, cell and step-fraction
|
||||
const point start = p.position();
|
||||
const label celli = p.cell();
|
||||
const scalar sfrac = p.stepFraction();
|
||||
|
||||
// Total displacement over the time-step
|
||||
@ -329,16 +311,25 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||
if (dt > ROOTVSMALL)
|
||||
{
|
||||
// Update cell based properties
|
||||
p.setCellValues(cloud, ttd, dt, celli);
|
||||
p.setCellValues(cloud, ttd, dt);
|
||||
|
||||
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)
|
||||
{
|
||||
p.hitFace(s, cloud, ttd);
|
||||
@ -351,15 +342,6 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||
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;
|
||||
@ -372,24 +354,14 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
(
|
||||
const polyPatch& pp,
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
typename TrackCloudType::parcelType& p =
|
||||
static_cast<typename TrackCloudType::parcelType&>(*this);
|
||||
|
||||
// Invoke post-processing model
|
||||
cloud.functions().postPatch
|
||||
(
|
||||
p,
|
||||
pp,
|
||||
trackFraction,
|
||||
tetIs,
|
||||
td.keepParticle
|
||||
);
|
||||
cloud.functions().postPatch(p, pp, td.keepParticle);
|
||||
|
||||
// Invoke surface film model
|
||||
if (cloud.surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
||||
@ -405,14 +377,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
else
|
||||
{
|
||||
// Invoke patch interaction model
|
||||
return cloud.patchInteraction().correct
|
||||
(
|
||||
p,
|
||||
pp,
|
||||
td.keepParticle,
|
||||
trackFraction,
|
||||
tetIs
|
||||
);
|
||||
return cloud.patchInteraction().correct(p, pp, td.keepParticle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -436,24 +401,10 @@ void Foam::KinematicParcel<ParcelType>::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
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
|
||||
)
|
||||
{
|
||||
td.keepParticle = false;
|
||||
// Wall interactions handled by generic hitPatch function
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -285,7 +285,6 @@ protected:
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt, // timestep
|
||||
const label celli, // owner cell
|
||||
const scalar Re, // Reynolds number
|
||||
const scalar mu, // local carrier viscosity
|
||||
const scalar mass, // mass
|
||||
@ -547,8 +546,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct cell values using latest transfer information
|
||||
@ -557,8 +555,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Update parcel properties over the time interval
|
||||
@ -567,8 +564,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
|
||||
@ -593,10 +589,7 @@ public:
|
||||
(
|
||||
const polyPatch& p,
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a
|
||||
@ -615,16 +608,6 @@ public:
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
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
|
||||
);
|
||||
|
||||
|
||||
@ -138,11 +138,10 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
ParcelType::setCellValues(cloud, td, dt, celli);
|
||||
ParcelType::setCellValues(cloud, td, dt);
|
||||
}
|
||||
|
||||
|
||||
@ -152,12 +151,11 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
// 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,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
@ -195,7 +192,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
|
||||
// Calc surface values
|
||||
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);
|
||||
|
||||
|
||||
@ -245,7 +242,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Res,
|
||||
Prs,
|
||||
Ts,
|
||||
@ -309,7 +305,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
d0,
|
||||
T0,
|
||||
mass0,
|
||||
@ -362,12 +357,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
forAll(YGas_, 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)
|
||||
{
|
||||
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
|
||||
@ -375,13 +370,13 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
forAll(YSolid_, 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);
|
||||
|
||||
cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
|
||||
@ -391,18 +386,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
}
|
||||
|
||||
// Correct surface values due to emitted species
|
||||
this->correctSurfaceValues
|
||||
(
|
||||
cloud,
|
||||
td,
|
||||
celli,
|
||||
Ts,
|
||||
Cs,
|
||||
rhos,
|
||||
mus,
|
||||
Prs,
|
||||
kappas
|
||||
);
|
||||
this->correctSurfaceValues(cloud, td, Ts, Cs, rhos, mus, Prs, kappas);
|
||||
Res = this->Re(U0, this->d_, rhos, mus);
|
||||
|
||||
|
||||
@ -419,7 +403,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Res,
|
||||
Prs,
|
||||
kappas,
|
||||
@ -438,19 +421,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
|
||||
// Calculate new particle velocity
|
||||
this->U_ =
|
||||
this->calcVelocity
|
||||
(
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Res,
|
||||
mus,
|
||||
mass1,
|
||||
Su,
|
||||
dUTrans,
|
||||
Spu
|
||||
);
|
||||
this->calcVelocity(cloud, td, dt, Res, mus, mass1, Su, dUTrans, Spu);
|
||||
|
||||
|
||||
// 4. Accumulate carrier phase source terms
|
||||
@ -464,18 +435,18 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
scalar dm = np0*dMassGas[i];
|
||||
label gid = composition.localToCarrierId(GAS, i);
|
||||
scalar hs = composition.carrier().Hs(gid, pc, T0);
|
||||
cloud.rhoTrans(gid)[celli] += dm;
|
||||
cloud.UTrans()[celli] += dm*U0;
|
||||
cloud.hsTrans()[celli] += dm*hs;
|
||||
cloud.rhoTrans(gid)[this->cell()] += dm;
|
||||
cloud.UTrans()[this->cell()] += dm*U0;
|
||||
cloud.hsTrans()[this->cell()] += dm*hs;
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
scalar dm = np0*dMassLiquid[i];
|
||||
label gid = composition.localToCarrierId(LIQ, i);
|
||||
scalar hs = composition.carrier().Hs(gid, pc, T0);
|
||||
cloud.rhoTrans(gid)[celli] += dm;
|
||||
cloud.UTrans()[celli] += dm*U0;
|
||||
cloud.hsTrans()[celli] += dm*hs;
|
||||
cloud.rhoTrans(gid)[this->cell()] += dm;
|
||||
cloud.UTrans()[this->cell()] += dm*U0;
|
||||
cloud.hsTrans()[this->cell()] += dm*hs;
|
||||
}
|
||||
|
||||
// No mapping between solid components and carrier phase
|
||||
@ -485,9 +456,9 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
scalar dm = np0*dMassSolid[i];
|
||||
label gid = composition.localToCarrierId(SLD, i);
|
||||
scalar hs = composition.carrier().Hs(gid, pc, T0);
|
||||
cloud.rhoTrans(gid)[celli] += dm;
|
||||
cloud.UTrans()[celli] += dm*U0;
|
||||
cloud.hsTrans()[celli] += dm*hs;
|
||||
cloud.rhoTrans(gid)[this->cell()] += dm;
|
||||
cloud.UTrans()[this->cell()] += dm*U0;
|
||||
cloud.hsTrans()[this->cell()] += dm*hs;
|
||||
}
|
||||
*/
|
||||
|
||||
@ -495,27 +466,27 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
{
|
||||
scalar dm = np0*dMassSRCarrier[i];
|
||||
scalar hs = composition.carrier().Hs(i, pc, T0);
|
||||
cloud.rhoTrans(i)[celli] += dm;
|
||||
cloud.UTrans()[celli] += dm*U0;
|
||||
cloud.hsTrans()[celli] += dm*hs;
|
||||
cloud.rhoTrans(i)[this->cell()] += dm;
|
||||
cloud.UTrans()[this->cell()] += dm*U0;
|
||||
cloud.hsTrans()[this->cell()] += dm*hs;
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
cloud.UTrans()[celli] += np0*dUTrans;
|
||||
cloud.UCoeff()[celli] += np0*Spu;
|
||||
cloud.UTrans()[this->cell()] += np0*dUTrans;
|
||||
cloud.UCoeff()[this->cell()] += np0*Spu;
|
||||
|
||||
// Update sensible enthalpy transfer
|
||||
cloud.hsTrans()[celli] += np0*dhsTrans;
|
||||
cloud.hsCoeff()[celli] += np0*Sph;
|
||||
cloud.hsTrans()[this->cell()] += np0*dhsTrans;
|
||||
cloud.hsCoeff()[this->cell()] += np0*Sph;
|
||||
|
||||
// Update radiation fields
|
||||
if (cloud.radiation())
|
||||
{
|
||||
const scalar ap = this->areaP();
|
||||
const scalar T4 = pow4(T0);
|
||||
cloud.radAreaP()[celli] += dt*np0*ap;
|
||||
cloud.radT4()[celli] += dt*np0*T4;
|
||||
cloud.radAreaPT4()[celli] += dt*np0*ap*T4;
|
||||
cloud.radAreaP()[this->cell()] += dt*np0*ap;
|
||||
cloud.radT4()[this->cell()] += dt*np0*T4;
|
||||
cloud.radAreaPT4()[this->cell()] += dt*np0*ap*T4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -632,7 +603,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar d,
|
||||
const scalar T,
|
||||
const scalar mass,
|
||||
@ -671,7 +641,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions
|
||||
const scalar hReaction = cloud.surfaceReaction().calculate
|
||||
(
|
||||
dt,
|
||||
celli,
|
||||
this->cell(),
|
||||
d,
|
||||
T,
|
||||
this->Tc_,
|
||||
|
||||
@ -241,7 +241,6 @@ protected:
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt, // timestep
|
||||
const label celli, // owner cell
|
||||
const scalar d, // diameter
|
||||
const scalar T, // temperature
|
||||
const scalar mass, // mass
|
||||
@ -418,8 +417,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct cell values using latest transfer information
|
||||
@ -428,8 +426,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Update parcel properties over the time interval
|
||||
@ -438,8 +435,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -40,7 +40,6 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar Ts,
|
||||
@ -87,7 +86,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
phaseChange.calculate
|
||||
(
|
||||
dt,
|
||||
celli,
|
||||
this->cell(),
|
||||
Re,
|
||||
Pr,
|
||||
d,
|
||||
@ -207,11 +206,10 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
ParcelType::setCellValues(cloud, td, dt, celli);
|
||||
ParcelType::setCellValues(cloud, td, dt);
|
||||
|
||||
pc_ = td.pInterp().interpolate
|
||||
(
|
||||
@ -224,8 +222,8 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
|
||||
if (debug)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Limiting observed pressure in cell " << celli << " to "
|
||||
<< cloud.constProps().pMin() << nl << endl;
|
||||
<< "Limiting observed pressure in cell " << this->cell()
|
||||
<< " to " << cloud.constProps().pMin() << nl << endl;
|
||||
}
|
||||
|
||||
pc_ = cloud.constProps().pMin();
|
||||
@ -239,15 +237,14 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
scalar addedMass = 0.0;
|
||||
scalar maxMassI = 0.0;
|
||||
forAll(cloud.rhoTrans(), i)
|
||||
{
|
||||
scalar dm = cloud.rhoTrans(i)[celli];
|
||||
scalar dm = cloud.rhoTrans(i)[this->cell()];
|
||||
maxMassI = max(maxMassI, mag(dm));
|
||||
addedMass += dm;
|
||||
}
|
||||
@ -257,17 +254,17 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
||||
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;
|
||||
this->Uc_ = (this->Uc_*massCell + cloud.UTrans()[celli])/massCellNew;
|
||||
this->Uc_ = (this->Uc_*massCell + cloud.UTrans()[this->cell()])/massCellNew;
|
||||
|
||||
scalar CpEff = 0.0;
|
||||
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
|
||||
(
|
||||
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->Tc_ += cloud.hsTrans()[celli]/(this->Cpc_*massCellNew);
|
||||
this->Tc_ += cloud.hsTrans()[this->cell()]/(this->Cpc_*massCellNew);
|
||||
|
||||
if (this->Tc_ < cloud.constProps().TMin())
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Limiting observed temperature in cell " << celli << " to "
|
||||
<< cloud.constProps().TMin() << nl << endl;
|
||||
<< "Limiting observed temperature in cell " << this->cell()
|
||||
<< " to " << cloud.constProps().TMin() << nl << endl;
|
||||
}
|
||||
|
||||
this->Tc_ = cloud.constProps().TMin();
|
||||
@ -301,7 +298,6 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label celli,
|
||||
const scalar T,
|
||||
const scalarField& Cs,
|
||||
scalar& rhos,
|
||||
@ -323,7 +319,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
|
||||
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);
|
||||
|
||||
@ -394,8 +390,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
@ -415,7 +410,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
|
||||
// Calc surface values
|
||||
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);
|
||||
|
||||
|
||||
@ -465,7 +460,6 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Res,
|
||||
Prs,
|
||||
Ts,
|
||||
@ -518,10 +512,10 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
label gid = composition.localToCarrierId(0, i);
|
||||
scalar hs = composition.carrier().Hs(gid, pc_, T0);
|
||||
|
||||
cloud.rhoTrans(gid)[celli] += dmi;
|
||||
cloud.hsTrans()[celli] += dmi*hs;
|
||||
cloud.rhoTrans(gid)[this->cell()] += dmi;
|
||||
cloud.hsTrans()[this->cell()] += dmi*hs;
|
||||
}
|
||||
cloud.UTrans()[celli] += dm*U0;
|
||||
cloud.UTrans()[this->cell()] += dm*U0;
|
||||
|
||||
cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
|
||||
}
|
||||
@ -530,7 +524,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
|
||||
@ -547,7 +541,6 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Res,
|
||||
Prs,
|
||||
kappas,
|
||||
@ -565,19 +558,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
|
||||
// Calculate new particle velocity
|
||||
this->U_ =
|
||||
this->calcVelocity
|
||||
(
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Res,
|
||||
mus,
|
||||
mass1,
|
||||
Su,
|
||||
dUTrans,
|
||||
Spu
|
||||
);
|
||||
this->calcVelocity(cloud, td, dt, Res, mus, mass1, Su, dUTrans, Spu);
|
||||
|
||||
|
||||
// 4. Accumulate carrier phase source terms
|
||||
@ -592,27 +573,27 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
label gid = composition.localToCarrierId(0, i);
|
||||
scalar hs = composition.carrier().Hs(gid, pc_, T0);
|
||||
|
||||
cloud.rhoTrans(gid)[celli] += dm;
|
||||
cloud.UTrans()[celli] += dm*U0;
|
||||
cloud.hsTrans()[celli] += dm*hs;
|
||||
cloud.rhoTrans(gid)[this->cell()] += dm;
|
||||
cloud.UTrans()[this->cell()] += dm*U0;
|
||||
cloud.hsTrans()[this->cell()] += dm*hs;
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
cloud.UTrans()[celli] += np0*dUTrans;
|
||||
cloud.UCoeff()[celli] += np0*Spu;
|
||||
cloud.UTrans()[this->cell()] += np0*dUTrans;
|
||||
cloud.UCoeff()[this->cell()] += np0*Spu;
|
||||
|
||||
// Update sensible enthalpy transfer
|
||||
cloud.hsTrans()[celli] += np0*dhsTrans;
|
||||
cloud.hsCoeff()[celli] += np0*Sph;
|
||||
cloud.hsTrans()[this->cell()] += np0*dhsTrans;
|
||||
cloud.hsCoeff()[this->cell()] += np0*Sph;
|
||||
|
||||
// Update radiation fields
|
||||
if (cloud.radiation())
|
||||
{
|
||||
const scalar ap = this->areaP();
|
||||
const scalar T4 = pow4(T0);
|
||||
cloud.radAreaP()[celli] += dt*np0*ap;
|
||||
cloud.radT4()[celli] += dt*np0*T4;
|
||||
cloud.radAreaPT4()[celli] += dt*np0*ap*T4;
|
||||
cloud.radAreaP()[this->cell()] += dt*np0*ap;
|
||||
cloud.radT4()[this->cell()] += dt*np0*T4;
|
||||
cloud.radAreaPT4()[this->cell()] += dt*np0*ap*T4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,7 +178,6 @@ protected:
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt, // timestep
|
||||
const label celli, // owner cell
|
||||
const scalar Re, // Reynolds number
|
||||
const scalar Pr, // Prandtl number
|
||||
const scalar Ts, // Surface temperature
|
||||
@ -353,8 +352,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct cell values using latest transfer information
|
||||
@ -363,8 +361,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct surface values due to emitted species
|
||||
@ -373,7 +370,6 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label celli,
|
||||
const scalar T,
|
||||
const scalarField& Cs,
|
||||
scalar& rhos,
|
||||
@ -388,8 +384,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -36,11 +36,10 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
ParcelType::setCellValues(cloud, td, dt, celli);
|
||||
ParcelType::setCellValues(cloud, td, dt);
|
||||
|
||||
tetIndices tetIs = this->currentTetIndices();
|
||||
|
||||
@ -53,8 +52,8 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
|
||||
if (debug)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Limiting observed temperature in cell " << celli << " to "
|
||||
<< cloud.constProps().TMin() << nl << endl;
|
||||
<< "Limiting observed temperature in cell " << this->cell()
|
||||
<< " to " << cloud.constProps().TMin() << nl << endl;
|
||||
}
|
||||
|
||||
Tc_ = cloud.constProps().TMin();
|
||||
@ -68,22 +67,21 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
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];
|
||||
Tc_ += cloud.hsTrans()[celli]/(CpMean*this->massCell(celli));
|
||||
const scalar CpMean = td.CpInterp().psi()[this->cell()];
|
||||
Tc_ += cloud.hsTrans()[this->cell()]/(CpMean*this->massCell(this->cell()));
|
||||
|
||||
if (Tc_ < cloud.constProps().TMin())
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Limiting observed temperature in cell " << celli << " to "
|
||||
<< cloud.constProps().TMin() << nl << endl;
|
||||
<< "Limiting observed temperature in cell " << this->cell()
|
||||
<< " to " << cloud.constProps().TMin() << nl << endl;
|
||||
}
|
||||
|
||||
Tc_ = cloud.constProps().TMin();
|
||||
@ -97,7 +95,6 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label celli,
|
||||
const scalar T,
|
||||
scalar& Ts,
|
||||
scalar& rhos,
|
||||
@ -141,8 +138,7 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
// Define local properties at beginning of time step
|
||||
@ -157,7 +153,7 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
// Calc surface values
|
||||
// ~~~~~~~~~~~~~~~~~~~
|
||||
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
|
||||
scalar Re = this->Re(this->U_, this->d_, rhos, mus);
|
||||
@ -198,7 +194,6 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Re,
|
||||
Pr,
|
||||
kappas,
|
||||
@ -214,19 +209,7 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
|
||||
// Calculate new particle velocity
|
||||
this->U_ =
|
||||
this->calcVelocity
|
||||
(
|
||||
cloud,
|
||||
td,
|
||||
dt,
|
||||
celli,
|
||||
Re,
|
||||
mus,
|
||||
mass0,
|
||||
Su,
|
||||
dUTrans,
|
||||
Spu
|
||||
);
|
||||
this->calcVelocity(cloud, td, dt, Re, mus, mass0, Su, dUTrans, Spu);
|
||||
|
||||
|
||||
// Accumulate carrier phase source terms
|
||||
@ -234,25 +217,25 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
if (cloud.solution().coupled())
|
||||
{
|
||||
// Update momentum transfer
|
||||
cloud.UTrans()[celli] += np0*dUTrans;
|
||||
cloud.UTrans()[this->cell()] += np0*dUTrans;
|
||||
|
||||
// Update momentum transfer coefficient
|
||||
cloud.UCoeff()[celli] += np0*Spu;
|
||||
cloud.UCoeff()[this->cell()] += np0*Spu;
|
||||
|
||||
// Update sensible enthalpy transfer
|
||||
cloud.hsTrans()[celli] += np0*dhsTrans;
|
||||
cloud.hsTrans()[this->cell()] += np0*dhsTrans;
|
||||
|
||||
// Update sensible enthalpy coefficient
|
||||
cloud.hsCoeff()[celli] += np0*Sph;
|
||||
cloud.hsCoeff()[this->cell()] += np0*Sph;
|
||||
|
||||
// Update radiation fields
|
||||
if (cloud.radiation())
|
||||
{
|
||||
const scalar ap = this->areaP();
|
||||
const scalar T4 = pow4(T0);
|
||||
cloud.radAreaP()[celli] += dt*np0*ap;
|
||||
cloud.radT4()[celli] += dt*np0*T4;
|
||||
cloud.radAreaPT4()[celli] += dt*np0*ap*T4;
|
||||
cloud.radAreaP()[this->cell()] += dt*np0*ap;
|
||||
cloud.radT4()[this->cell()] += dt*np0*T4;
|
||||
cloud.radAreaPT4()[this->cell()] += dt*np0*ap*T4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -265,7 +248,6 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli,
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar kappa,
|
||||
|
||||
@ -250,7 +250,6 @@ protected:
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt, // timestep
|
||||
const label celli, // owner cell
|
||||
const scalar Re, // Reynolds number
|
||||
const scalar Pr, // Prandtl number - surface
|
||||
const scalar kappa, // Thermal conductivity - surface
|
||||
@ -404,8 +403,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct cell values using latest transfer information
|
||||
@ -414,8 +412,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Calculate surface thermo properties
|
||||
@ -424,7 +421,6 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label celli,
|
||||
const scalar T,
|
||||
scalar& Ts,
|
||||
scalar& rhos,
|
||||
@ -439,8 +435,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -113,7 +113,6 @@ template<class CloudType>
|
||||
void Foam::CloudFunctionObject<CloudType>::postMove
|
||||
(
|
||||
typename CloudType::parcelType&,
|
||||
const label,
|
||||
const scalar,
|
||||
const point&,
|
||||
bool&
|
||||
@ -126,8 +125,6 @@ void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType&,
|
||||
const polyPatch&,
|
||||
const scalar,
|
||||
const tetIndices&,
|
||||
bool&
|
||||
)
|
||||
{}
|
||||
@ -137,7 +134,6 @@ template<class CloudType>
|
||||
void Foam::CloudFunctionObject<CloudType>::postFace
|
||||
(
|
||||
const typename CloudType::parcelType&,
|
||||
const label,
|
||||
bool&
|
||||
)
|
||||
{}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -148,7 +148,6 @@ public:
|
||||
virtual void postMove
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const label celli,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
@ -159,8 +158,6 @@ public:
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& testIs,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
@ -168,7 +165,6 @@ public:
|
||||
virtual void postFace
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -137,7 +137,6 @@ template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postMove
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const label celli,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
@ -145,12 +144,12 @@ void Foam::CloudFunctionObjectList<CloudType>::postMove
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postMove(p, celli, dt, position0, keepParticle);
|
||||
|
||||
if (!keepParticle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this->operator[](i).postMove(p, dt, position0, keepParticle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,26 +159,17 @@ void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postPatch
|
||||
(
|
||||
p,
|
||||
pp,
|
||||
trackFraction,
|
||||
tetIs,
|
||||
keepParticle
|
||||
);
|
||||
|
||||
if (!keepParticle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this->operator[](i).postPatch(p, pp, keepParticle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,18 +178,17 @@ template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postFace
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postFace(p, facei, keepParticle);
|
||||
|
||||
if (!keepParticle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this->operator[](i).postFace(p, keepParticle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -113,7 +113,6 @@ public:
|
||||
virtual void postMove
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const label celli,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
@ -124,8 +123,6 @@ public:
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
@ -133,7 +130,6 @@ public:
|
||||
virtual void postFace
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
);
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -362,12 +362,7 @@ Foam::FacePostProcessing<CloudType>::~FacePostProcessing()
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::FacePostProcessing<CloudType>::postFace
|
||||
(
|
||||
const parcelType& p,
|
||||
const label facei,
|
||||
bool&
|
||||
)
|
||||
void Foam::FacePostProcessing<CloudType>::postFace(const parcelType& p, bool&)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -384,7 +379,7 @@ void Foam::FacePostProcessing<CloudType>::postFace
|
||||
label faceId = -1;
|
||||
forAll(fz, j)
|
||||
{
|
||||
if (fz[j] == facei)
|
||||
if (fz[j] == p.face())
|
||||
{
|
||||
faceId = j;
|
||||
break;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -159,12 +159,7 @@ public:
|
||||
// Evaluation
|
||||
|
||||
//- Post-face hook
|
||||
virtual void postFace
|
||||
(
|
||||
const parcelType& p,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
);
|
||||
virtual void postFace(const parcelType& p, bool& keepParticle);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -647,7 +647,6 @@ template<class CloudType>
|
||||
void Foam::ParticleCollector<CloudType>::postMove
|
||||
(
|
||||
parcelType& p,
|
||||
const label celli,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -287,7 +287,6 @@ public:
|
||||
virtual void postMove
|
||||
(
|
||||
parcelType& p,
|
||||
const label celli,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
|
||||
@ -162,8 +162,6 @@ void Foam::ParticleErosion<CloudType>::postPatch
|
||||
(
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs,
|
||||
bool&
|
||||
)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -132,8 +132,6 @@ public:
|
||||
(
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs,
|
||||
bool& keepParticle
|
||||
);
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -109,12 +109,7 @@ void Foam::ParticleTracks<CloudType>::preEvolve()
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ParticleTracks<CloudType>::postFace
|
||||
(
|
||||
const parcelType& p,
|
||||
const label,
|
||||
bool&
|
||||
)
|
||||
void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p, bool&)
|
||||
{
|
||||
if
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -145,12 +145,7 @@ public:
|
||||
virtual void preEvolve();
|
||||
|
||||
//- Post-face hook
|
||||
virtual void postFace
|
||||
(
|
||||
const parcelType& p,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
);
|
||||
virtual void postFace(const parcelType& p, bool& keepParticle);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,15 +104,14 @@ template<class CloudType>
|
||||
void Foam::ParticleTrap<CloudType>::postMove
|
||||
(
|
||||
parcelType& p,
|
||||
const label celli,
|
||||
const scalar,
|
||||
const point&,
|
||||
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);
|
||||
scalar nHatU = nHat & p.U();
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -131,7 +131,6 @@ public:
|
||||
virtual void postMove
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const label celli,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -197,8 +197,6 @@ void Foam::PatchPostProcessing<CloudType>::postPatch
|
||||
(
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const scalar,
|
||||
const tetIndices& tetIs,
|
||||
bool&
|
||||
)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -133,8 +133,6 @@ public:
|
||||
(
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs,
|
||||
bool& keepParticle
|
||||
);
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -125,7 +125,6 @@ template<class CloudType>
|
||||
void Foam::VoidFraction<CloudType>::postMove
|
||||
(
|
||||
parcelType& p,
|
||||
const label celli,
|
||||
const scalar dt,
|
||||
const point&,
|
||||
bool&
|
||||
@ -133,7 +132,7 @@ void Foam::VoidFraction<CloudType>::postMove
|
||||
{
|
||||
volScalarField& theta = thetaPtr_();
|
||||
|
||||
theta[celli] += dt*p.nParticle()*p.volume();
|
||||
theta[p.cell()] += dt*p.nParticle()*p.volume();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -119,7 +119,6 @@ public:
|
||||
virtual void postMove
|
||||
(
|
||||
parcelType& p,
|
||||
const label celli,
|
||||
const scalar dt,
|
||||
const point& position0,
|
||||
bool& keepParticle
|
||||
|
||||
@ -260,7 +260,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
U.boundaryField()[patchi][patchFacei]
|
||||
);
|
||||
|
||||
bool particleHit = false;
|
||||
if (normalAlignment > cosPhiMinFlatWall)
|
||||
{
|
||||
// Guard against a flat interaction being
|
||||
@ -285,8 +284,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
);
|
||||
|
||||
flatSiteData.append(wSD);
|
||||
|
||||
particleHit = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -296,22 +293,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
otherSiteDistances.append(nearest.distance());
|
||||
|
||||
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]
|
||||
);
|
||||
|
||||
bool particleHit = false;
|
||||
if (normalAlignment > cosPhiMinFlatWall)
|
||||
{
|
||||
// Guard against a flat interaction being
|
||||
@ -377,8 +357,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
);
|
||||
|
||||
flatSiteData.append(wSD);
|
||||
|
||||
particleHit = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -388,14 +366,6 @@ void Foam::PairCollision<CloudType>::wallInteraction()
|
||||
otherSiteDistances.append(nearest.distance());
|
||||
|
||||
otherSiteData.append(wSD);
|
||||
|
||||
particleHit = false;
|
||||
}
|
||||
|
||||
if (particleHit)
|
||||
{
|
||||
// TODO: call cloud function objects for referred
|
||||
// wall particle interactions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,9 +171,7 @@ bool Foam::LocalInteraction<CloudType>::correct
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
label patchi = patchData_.applyToPatch(pp.index());
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -122,9 +122,7 @@ public:
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -136,9 +136,7 @@ bool Foam::MultiInteraction<CloudType>::correct
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
label origFacei = p.face();
|
||||
@ -152,9 +150,7 @@ bool Foam::MultiInteraction<CloudType>::correct
|
||||
(
|
||||
p,
|
||||
this->owner().pMesh().boundaryMesh()[patchi],
|
||||
keepParticle,
|
||||
trackFraction,
|
||||
tetIs
|
||||
keepParticle
|
||||
);
|
||||
|
||||
if (myInteracted && oneInteractionOnly_)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -141,9 +141,7 @@ public:
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,9 +69,7 @@ bool Foam::NoInteraction<CloudType>::correct
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch&,
|
||||
bool&,
|
||||
const scalar,
|
||||
const tetIndices&
|
||||
bool&
|
||||
)
|
||||
{
|
||||
return false;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -87,9 +87,7 @@ public:
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -154,9 +154,7 @@ public:
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
) = 0;
|
||||
|
||||
|
||||
|
||||
@ -61,9 +61,7 @@ bool Foam::Rebound<CloudType>::correct
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
vector& U = p.U();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -89,9 +89,7 @@ public:
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -103,9 +103,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
vector& U = p.U();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -128,9 +128,7 @@ public:
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -239,10 +239,7 @@ bool Foam::molecule::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
moleculeCloud&,
|
||||
trackingData&,
|
||||
const label,
|
||||
const scalar,
|
||||
const tetIndices&
|
||||
trackingData&
|
||||
)
|
||||
{
|
||||
return false;
|
||||
@ -264,12 +261,9 @@ void Foam::molecule::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
moleculeCloud& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
// Use of the normal from tetIs is not required as
|
||||
// hasWallImpactDistance for a moleculeCloud is false.
|
||||
vector nw = normal();
|
||||
nw /= mag(nw);
|
||||
|
||||
@ -283,15 +277,4 @@ void Foam::molecule::hitWallPatch
|
||||
}
|
||||
|
||||
|
||||
void Foam::molecule::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
moleculeCloud&,
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
td.keepParticle = false;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -368,10 +368,7 @@ public:
|
||||
(
|
||||
const polyPatch&,
|
||||
moleculeCloud& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a processorPatch
|
||||
@ -387,15 +384,6 @@ public:
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
moleculeCloud& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices&
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a polyPatch
|
||||
void hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
moleculeCloud& cloud,
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
|
||||
@ -100,10 +100,7 @@ bool Foam::solidParticle::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
solidParticleCloud& cloud,
|
||||
trackingData&,
|
||||
const label,
|
||||
const scalar,
|
||||
const tetIndices&
|
||||
trackingData&
|
||||
)
|
||||
{
|
||||
return false;
|
||||
@ -125,11 +122,10 @@ void Foam::solidParticle::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
solidParticleCloud& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
vector nw = tetIs.faceTri(mesh()).normal();
|
||||
vector nw = normal();
|
||||
nw /= mag(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)
|
||||
{
|
||||
particle::transformProperties(T);
|
||||
|
||||
@ -200,10 +200,7 @@ public:
|
||||
(
|
||||
const polyPatch&,
|
||||
solidParticleCloud& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a
|
||||
@ -220,15 +217,6 @@ public:
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
solidParticleCloud& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices&
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a polyPatch
|
||||
void hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
solidParticleCloud& cloud,
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
|
||||
@ -63,12 +63,6 @@ Foam::solidParticleCloud::solidParticleCloud
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::solidParticleCloud::hasWallImpactDistance() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidParticleCloud::move(const dimensionedVector& g)
|
||||
{
|
||||
const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,8 +94,6 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
bool hasWallImpactDistance() const;
|
||||
|
||||
inline const fvMesh& mesh() const;
|
||||
|
||||
inline scalar rhop() const;
|
||||
|
||||
@ -35,11 +35,10 @@ void Foam::SprayParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
ParcelType::setCellValues(cloud, td, dt, celli);
|
||||
ParcelType::setCellValues(cloud, td, dt);
|
||||
}
|
||||
|
||||
|
||||
@ -49,11 +48,10 @@ void Foam::SprayParcel<ParcelType>::cellValueSourceCorrection
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
ParcelType::cellValueSourceCorrection(cloud, td, dt, celli);
|
||||
ParcelType::cellValueSourceCorrection(cloud, td, dt);
|
||||
}
|
||||
|
||||
|
||||
@ -63,8 +61,7 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
@ -102,7 +99,7 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
const scalar mass0 = this->mass();
|
||||
mu_ = composition.liquids().mu(pc0, T0, X0);
|
||||
|
||||
ParcelType::calc(cloud,td, dt, celli);
|
||||
ParcelType::calc(cloud,td, dt);
|
||||
|
||||
if (td.keepParticle)
|
||||
{
|
||||
@ -129,7 +126,7 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
|
||||
if (liquidCore() > 0.5)
|
||||
{
|
||||
calcAtomization(cloud, td, dt, celli);
|
||||
calcAtomization(cloud, td, dt);
|
||||
|
||||
// Preserve the total mass/volume by increasing the number of
|
||||
// particles in parcels due to breakup
|
||||
@ -138,7 +135,7 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
}
|
||||
else
|
||||
{
|
||||
calcBreakup(cloud, td, dt, celli);
|
||||
calcBreakup(cloud, td, dt);
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,8 +150,7 @@ void Foam::SprayParcel<ParcelType>::calcAtomization
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::reactingCloudType reactingCloudType;
|
||||
@ -221,8 +217,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
typedef typename TrackCloudType::parcelType parcelType;
|
||||
@ -311,7 +306,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
||||
child->injector() = this->injector();
|
||||
child->tMom() = massChild/(Fcp.Sp() + Fncp.Sp());
|
||||
child->user() = 0.0;
|
||||
child->setCellValues(cloud, td, dt, celli);
|
||||
child->setCellValues(cloud, td, dt);
|
||||
|
||||
cloud.addParticle(child);
|
||||
}
|
||||
|
||||
@ -387,8 +387,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct parcel properties according to atomization model
|
||||
@ -397,8 +396,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct parcel properties according to breakup model
|
||||
@ -407,8 +405,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct cell values using latest transfer information
|
||||
@ -417,8 +414,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Correct surface values due to emitted species
|
||||
@ -427,7 +423,6 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const label celli,
|
||||
const scalar T,
|
||||
const scalarField& Cs,
|
||||
scalar& rhos,
|
||||
@ -442,8 +437,7 @@ public:
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt,
|
||||
const label celli
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Calculate the chi-factor for flash-boiling for the
|
||||
|
||||
@ -158,10 +158,7 @@ bool Foam::trackedParticle::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
Cloud<trackedParticle>& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
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
|
||||
(
|
||||
const processorPolyPatch&,
|
||||
@ -245,19 +255,6 @@ void Foam::trackedParticle::hitWallPatch
|
||||
(
|
||||
const wallPolyPatch& wpp,
|
||||
Cloud<trackedParticle>& cloud,
|
||||
trackingData& td,
|
||||
const tetIndices&
|
||||
)
|
||||
{
|
||||
// Remove particle
|
||||
td.keepParticle = false;
|
||||
}
|
||||
|
||||
|
||||
void Foam::trackedParticle::hitPatch
|
||||
(
|
||||
const polyPatch& wpp,
|
||||
Cloud<trackedParticle>& cloud,
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
|
||||
@ -249,10 +249,7 @@ public:
|
||||
(
|
||||
const polyPatch&,
|
||||
Cloud<trackedParticle>& cloud,
|
||||
trackingData& td,
|
||||
const label patchi,
|
||||
const scalar trackFraction,
|
||||
const tetIndices& tetIs
|
||||
trackingData& td
|
||||
);
|
||||
|
||||
//- Overridable function to handle the particle hitting a wedge
|
||||
@ -298,6 +295,15 @@ public:
|
||||
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
|
||||
//- processorPatch
|
||||
void hitProcessorPatch
|
||||
@ -312,15 +318,6 @@ public:
|
||||
(
|
||||
const wallPolyPatch&,
|
||||
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
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user