mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
committed by
Andrew Heather
parent
22bd391903
commit
b78d844cf4
@ -125,10 +125,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;
|
||||||
@ -183,6 +180,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&,
|
||||||
@ -199,19 +222,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
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -269,10 +269,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
|
||||||
@ -328,6 +325,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&,
|
||||||
@ -344,19 +367,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
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -264,10 +264,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
|
||||||
@ -286,16 +283,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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
@ -284,17 +284,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
|
||||||
@ -372,17 +367,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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -203,7 +203,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -140,22 +140,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))
|
||||||
{
|
{
|
||||||
@ -218,15 +205,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -258,10 +242,7 @@ bool Foam::particle::hitPatch
|
|||||||
(
|
(
|
||||||
const polyPatch&,
|
const polyPatch&,
|
||||||
TrackCloudType&,
|
TrackCloudType&,
|
||||||
trackingData&,
|
trackingData&
|
||||||
const label,
|
|
||||||
const scalar,
|
|
||||||
const tetIndices&
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -488,15 +469,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&)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -197,13 +197,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
|
||||||
|
|||||||
@ -548,13 +548,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
|
||||||
(
|
(
|
||||||
|
|||||||
@ -335,10 +335,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
|
||||||
|
|
||||||
|
|||||||
@ -43,8 +43,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();
|
||||||
@ -56,8 +55,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();
|
||||||
@ -71,7 +70,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_,
|
||||||
@ -86,11 +85,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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -100,8 +98,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
|
||||||
@ -130,20 +127,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
|
||||||
@ -151,10 +135,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +150,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,
|
||||||
@ -295,7 +278,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
|
||||||
@ -331,16 +313,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 (solution.cellValueSourceCorrection())
|
if (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);
|
||||||
@ -353,15 +344,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;
|
||||||
@ -374,24 +356,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
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isA<processorPolyPatch>(pp))
|
if (isA<processorPolyPatch>(pp))
|
||||||
{
|
{
|
||||||
@ -407,14 +379,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
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,26 +403,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
|
||||||
|
|
||||||
cloud.patchInteraction().addToEscapedParcels(nParticle_*mass());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -289,7 +289,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
|
||||||
@ -567,8 +566,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
|
||||||
@ -577,8 +575,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
|
||||||
@ -587,8 +584,7 @@ public:
|
|||||||
(
|
(
|
||||||
TrackCloudType& cloud,
|
TrackCloudType& cloud,
|
||||||
trackingData& td,
|
trackingData& td,
|
||||||
const scalar dt,
|
const scalar dt
|
||||||
const label celli
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -613,10 +609,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
|
||||||
@ -635,16 +628,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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -144,11 +144,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -158,12 +157,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -173,8 +171,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;
|
||||||
@ -200,7 +197,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);
|
||||||
|
|
||||||
|
|
||||||
@ -250,7 +247,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
cloud,
|
cloud,
|
||||||
td,
|
td,
|
||||||
dt,
|
dt,
|
||||||
celli,
|
|
||||||
Res,
|
Res,
|
||||||
Prs,
|
Prs,
|
||||||
Ts,
|
Ts,
|
||||||
@ -313,7 +309,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
cloud,
|
cloud,
|
||||||
td,
|
td,
|
||||||
dt,
|
dt,
|
||||||
celli,
|
|
||||||
d0,
|
d0,
|
||||||
T0,
|
T0,
|
||||||
mass0,
|
mass0,
|
||||||
@ -353,12 +348,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
|
||||||
@ -366,13 +361,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);
|
||||||
@ -394,18 +389,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);
|
||||||
|
|
||||||
|
|
||||||
@ -422,7 +406,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
|||||||
cloud,
|
cloud,
|
||||||
td,
|
td,
|
||||||
dt,
|
dt,
|
||||||
celli,
|
|
||||||
Res,
|
Res,
|
||||||
Prs,
|
Prs,
|
||||||
kappas,
|
kappas,
|
||||||
@ -441,19 +424,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
|
||||||
@ -467,18 +438,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
|
||||||
@ -488,9 +459,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;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -498,27 +469,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -635,7 +606,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,
|
||||||
@ -674,7 +644,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_,
|
||||||
|
|||||||
@ -242,7 +242,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
|
||||||
@ -426,8 +425,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
|
||||||
@ -436,8 +434,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
|
||||||
@ -446,8 +443,7 @@ public:
|
|||||||
(
|
(
|
||||||
TrackCloudType& cloud,
|
TrackCloudType& cloud,
|
||||||
trackingData& td,
|
trackingData& td,
|
||||||
const scalar dt,
|
const scalar dt
|
||||||
const label celli
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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,
|
||||||
@ -83,7 +82,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
|||||||
phaseChange.calculate
|
phaseChange.calculate
|
||||||
(
|
(
|
||||||
dt,
|
dt,
|
||||||
celli,
|
this->cell(),
|
||||||
Re,
|
Re,
|
||||||
Pr,
|
Pr,
|
||||||
d,
|
d,
|
||||||
@ -203,11 +202,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
|
||||||
(
|
(
|
||||||
@ -220,8 +218,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();
|
||||||
@ -235,15 +233,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;
|
||||||
}
|
}
|
||||||
@ -253,17 +250,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,
|
||||||
@ -272,18 +269,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();
|
||||||
@ -297,7 +294,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,
|
||||||
@ -319,7 +315,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);
|
||||||
|
|
||||||
@ -390,8 +386,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
(
|
(
|
||||||
TrackCloudType& cloud,
|
TrackCloudType& cloud,
|
||||||
trackingData& td,
|
trackingData& td,
|
||||||
const scalar dt,
|
const scalar dt
|
||||||
const label celli
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const auto& composition = cloud.composition();
|
const auto& composition = cloud.composition();
|
||||||
@ -409,7 +404,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);
|
||||||
|
|
||||||
|
|
||||||
@ -459,7 +454,6 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
cloud,
|
cloud,
|
||||||
td,
|
td,
|
||||||
dt,
|
dt,
|
||||||
celli,
|
|
||||||
Res,
|
Res,
|
||||||
Prs,
|
Prs,
|
||||||
Ts,
|
Ts,
|
||||||
@ -512,10 +506,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);
|
||||||
}
|
}
|
||||||
@ -524,7 +518,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);
|
||||||
|
|
||||||
|
|
||||||
@ -541,7 +535,6 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
cloud,
|
cloud,
|
||||||
td,
|
td,
|
||||||
dt,
|
dt,
|
||||||
celli,
|
|
||||||
Res,
|
Res,
|
||||||
Prs,
|
Prs,
|
||||||
kappas,
|
kappas,
|
||||||
@ -559,19 +552,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
|
||||||
@ -586,27 +567,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,7 +179,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
|
||||||
@ -361,8 +360,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
|
||||||
@ -371,8 +369,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
|
||||||
@ -381,7 +378,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,
|
||||||
@ -396,8 +392,7 @@ public:
|
|||||||
(
|
(
|
||||||
TrackCloudType& cloud,
|
TrackCloudType& cloud,
|
||||||
trackingData& td,
|
trackingData& td,
|
||||||
const scalar dt,
|
const scalar dt
|
||||||
const label celli
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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,25 +67,27 @@ 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);
|
const label celli = this->cell();
|
||||||
|
const scalar massCell = this->massCell(celli);
|
||||||
|
|
||||||
|
this->Uc_ += cloud.UTrans()[celli]/massCell;
|
||||||
|
|
||||||
// tetIndices tetIs = this->currentTetIndices();
|
// tetIndices tetIs = this->currentTetIndices();
|
||||||
// Tc_ = td.TInterp().interpolate(this->coordinates(), tetIs);
|
// Tc_ = td.TInterp().interpolate(this->coordinates(), tetIs);
|
||||||
|
|
||||||
const scalar CpMean = td.CpInterp().psi()[celli];
|
const scalar CpMean = td.CpInterp().psi()[celli];
|
||||||
Tc_ += cloud.hsTrans()[celli]/(CpMean*this->massCell(celli));
|
Tc_ += cloud.hsTrans()[celli]/(CpMean*massCell);
|
||||||
|
|
||||||
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 " << celli
|
||||||
<< cloud.constProps().TMin() << nl << endl;
|
<< " to " << cloud.constProps().TMin() << nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tc_ = cloud.constProps().TMin();
|
Tc_ = cloud.constProps().TMin();
|
||||||
@ -100,7 +101,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,
|
||||||
@ -144,8 +144,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
|
||||||
@ -160,7 +159,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);
|
||||||
@ -201,7 +200,6 @@ void Foam::ThermoParcel<ParcelType>::calc
|
|||||||
cloud,
|
cloud,
|
||||||
td,
|
td,
|
||||||
dt,
|
dt,
|
||||||
celli,
|
|
||||||
Re,
|
Re,
|
||||||
Pr,
|
Pr,
|
||||||
kappas,
|
kappas,
|
||||||
@ -217,19 +215,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
|
||||||
@ -237,25 +223,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,7 +254,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,
|
||||||
|
|||||||
@ -251,7 +251,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
|
||||||
@ -412,8 +411,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
|
||||||
@ -422,8 +420,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
|
||||||
@ -432,7 +429,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,
|
||||||
@ -447,8 +443,7 @@ public:
|
|||||||
(
|
(
|
||||||
TrackCloudType& cloud,
|
TrackCloudType& cloud,
|
||||||
trackingData& td,
|
trackingData& td,
|
||||||
const scalar dt,
|
const scalar dt
|
||||||
const label celli
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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&
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -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
|
||||||
@ -151,7 +151,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
|
||||||
@ -162,8 +161,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
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -171,7 +168,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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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 | Copyright (C) 2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -360,12 +360,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
|
||||||
(
|
(
|
||||||
@ -382,7 +377,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;
|
||||||
|
|||||||
@ -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
|
||||||
@ -162,12 +162,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
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -653,7 +653,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
|
||||||
|
|||||||
@ -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
|
||||||
@ -290,7 +290,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
|
||||||
|
|||||||
@ -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&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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
|
||||||
@ -135,8 +135,6 @@ public:
|
|||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const scalar trackFraction,
|
|
||||||
const tetIndices& tetIs,
|
|
||||||
bool& keepParticle
|
bool& keepParticle
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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
|
||||||
(
|
(
|
||||||
|
|||||||
@ -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
|
||||||
@ -146,12 +146,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
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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();
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
@ -134,7 +134,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
|
||||||
|
|||||||
@ -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&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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
|
||||||
@ -136,8 +136,6 @@ public:
|
|||||||
(
|
(
|
||||||
const parcelType& p,
|
const parcelType& p,
|
||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const scalar trackFraction,
|
|
||||||
const tetIndices& tetIs,
|
|
||||||
bool& keepParticle
|
bool& keepParticle
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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,7 +122,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
|
||||||
|
|||||||
@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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());
|
||||||
|
|||||||
@ -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,9 +125,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
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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_)
|
||||||
|
|||||||
@ -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
|
||||||
@ -144,9 +144,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
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
@ -90,9 +90,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
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -167,9 +167,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;
|
||||||
|
|
||||||
//- Add to escaped parcels
|
//- Add to escaped parcels
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
@ -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
|
||||||
@ -92,9 +92,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
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
@ -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
|
||||||
@ -131,9 +131,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
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -367,10 +367,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
|
||||||
@ -386,15 +383,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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -203,10 +203,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
|
||||||
@ -223,15 +220,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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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");
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -36,11 +36,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -50,11 +49,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -64,8 +62,7 @@ void Foam::SprayParcel<ParcelType>::calc
|
|||||||
(
|
(
|
||||||
TrackCloudType& cloud,
|
TrackCloudType& cloud,
|
||||||
trackingData& td,
|
trackingData& td,
|
||||||
const scalar dt,
|
const scalar dt
|
||||||
const label celli
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const auto& composition = cloud.composition();
|
const auto& composition = cloud.composition();
|
||||||
@ -102,7 +99,7 @@ void Foam::SprayParcel<ParcelType>::calc
|
|||||||
const scalar mass0 = this->mass();
|
const scalar mass0 = this->mass();
|
||||||
mu_ = liquids.mu(pc0, T0, X0);
|
mu_ = 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
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const auto& atomization = cloud.atomization();
|
const auto& atomization = cloud.atomization();
|
||||||
@ -223,8 +219,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
|||||||
(
|
(
|
||||||
TrackCloudType& cloud,
|
TrackCloudType& cloud,
|
||||||
trackingData& td,
|
trackingData& td,
|
||||||
const scalar dt,
|
const scalar dt
|
||||||
const label celli
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
auto& breakup = cloud.breakup();
|
auto& breakup = cloud.breakup();
|
||||||
@ -320,7 +315,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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -422,8 +422,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
|
||||||
@ -432,8 +431,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
|
||||||
@ -442,8 +440,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
|
||||||
@ -452,8 +449,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
|
||||||
@ -462,7 +458,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,
|
||||||
@ -477,8 +472,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
|
||||||
|
|||||||
@ -153,10 +153,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;
|
||||||
@ -224,6 +221,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&,
|
||||||
@ -240,19 +250,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
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user