mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: wallBoundedStreamLineParticle: use wallBoundedParticle class
This commit is contained in:
@ -33,6 +33,7 @@ wallBoundedStreamLine/wallBoundedStreamLine.C
|
|||||||
wallBoundedStreamLine/wallBoundedStreamLineFunctionObject.C
|
wallBoundedStreamLine/wallBoundedStreamLineFunctionObject.C
|
||||||
wallBoundedStreamLine/wallBoundedStreamLineParticle.C
|
wallBoundedStreamLine/wallBoundedStreamLineParticle.C
|
||||||
wallBoundedStreamLine/wallBoundedStreamLineParticleCloud.C
|
wallBoundedStreamLine/wallBoundedStreamLineParticleCloud.C
|
||||||
|
wallBoundedStreamLine/wallBoundedParticle.C
|
||||||
|
|
||||||
surfaceInterpolateFields/surfaceInterpolateFields.C
|
surfaceInterpolateFields/surfaceInterpolateFields.C
|
||||||
surfaceInterpolateFields/surfaceInterpolateFieldsFunctionObject.C
|
surfaceInterpolateFields/surfaceInterpolateFieldsFunctionObject.C
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@ SourceFiles
|
|||||||
#ifndef wallBoundedStreamLineParticle_H
|
#ifndef wallBoundedStreamLineParticle_H
|
||||||
#define wallBoundedStreamLineParticle_H
|
#define wallBoundedStreamLineParticle_H
|
||||||
|
|
||||||
#include "particle.H"
|
#include "wallBoundedParticle.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "interpolation.H"
|
#include "interpolation.H"
|
||||||
#include "vectorList.H"
|
#include "vectorList.H"
|
||||||
@ -55,15 +55,18 @@ class wallBoundedStreamLineParticleCloud;
|
|||||||
|
|
||||||
class wallBoundedStreamLineParticle
|
class wallBoundedStreamLineParticle
|
||||||
:
|
:
|
||||||
public particle
|
public wallBoundedParticle
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Class used to pass tracking data to the trackToFace function
|
//- Class used to pass tracking data to the trackToEdge function
|
||||||
class trackingData
|
class trackingData
|
||||||
:
|
:
|
||||||
public particle::TrackingData<Cloud<wallBoundedStreamLineParticle> >
|
public wallBoundedParticle::TrackingData
|
||||||
|
<
|
||||||
|
Cloud<wallBoundedStreamLineParticle>
|
||||||
|
>
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -75,8 +78,6 @@ public:
|
|||||||
const bool trackForward_;
|
const bool trackForward_;
|
||||||
const scalar trackLength_;
|
const scalar trackLength_;
|
||||||
|
|
||||||
const PackedBoolList& isWallPatch_;
|
|
||||||
|
|
||||||
DynamicList<vectorList>& allPositions_;
|
DynamicList<vectorList>& allPositions_;
|
||||||
List<DynamicList<scalarList> >& allScalars_;
|
List<DynamicList<scalarList> >& allScalars_;
|
||||||
List<DynamicList<vectorList> >& allVectors_;
|
List<DynamicList<vectorList> >& allVectors_;
|
||||||
@ -99,16 +100,19 @@ public:
|
|||||||
List<DynamicList<vectorList> >& allVectors
|
List<DynamicList<vectorList> >& allVectors
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
particle::TrackingData<Cloud<wallBoundedStreamLineParticle> >
|
wallBoundedParticle::TrackingData
|
||||||
|
<
|
||||||
|
Cloud<wallBoundedStreamLineParticle>
|
||||||
|
>
|
||||||
(
|
(
|
||||||
cloud
|
cloud,
|
||||||
|
isWallPatch
|
||||||
),
|
),
|
||||||
vsInterp_(vsInterp),
|
vsInterp_(vsInterp),
|
||||||
vvInterp_(vvInterp),
|
vvInterp_(vvInterp),
|
||||||
UIndex_(UIndex),
|
UIndex_(UIndex),
|
||||||
trackForward_(trackForward),
|
trackForward_(trackForward),
|
||||||
trackLength_(trackLength),
|
trackLength_(trackLength),
|
||||||
isWallPatch_(isWallPatch),
|
|
||||||
|
|
||||||
allPositions_(allPositions),
|
allPositions_(allPositions),
|
||||||
allScalars_(allScalars),
|
allScalars_(allScalars),
|
||||||
@ -121,21 +125,6 @@ private:
|
|||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Particle is on mesh edge:
|
|
||||||
// const face& f = mesh.faces()[tetFace()]
|
|
||||||
// const edge e(f[meshEdgeStart_], f.nextLabel(meshEdgeStart_));
|
|
||||||
// Note that this real edge
|
|
||||||
// is also one of the edges of the face-triangle (from
|
|
||||||
// tetFace()+tetPt()).
|
|
||||||
label meshEdgeStart_;
|
|
||||||
|
|
||||||
//- Particle is on diagonal edge:
|
|
||||||
// const face& f = mesh.faces()[tetFace()]
|
|
||||||
// label faceBasePtI = mesh.tetBasePtIs()[faceI];
|
|
||||||
// label diagPtI = (faceBasePtI+diagEdge_)%f.size();
|
|
||||||
// const edge e(f[faceBasePtI], f[diagPtI]);
|
|
||||||
label diagEdge_;
|
|
||||||
|
|
||||||
//- Lifetime of particle. Particle dies when reaches 0.
|
//- Lifetime of particle. Particle dies when reaches 0.
|
||||||
label lifeTime_;
|
label lifeTime_;
|
||||||
|
|
||||||
@ -151,52 +140,17 @@ private:
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Construct current edge
|
|
||||||
edge currentEdge() const;
|
|
||||||
|
|
||||||
//- Check if inside current tet
|
|
||||||
//void checkInside() const;
|
|
||||||
|
|
||||||
//- Check if on current edge
|
|
||||||
//void checkOnEdge() const;
|
|
||||||
|
|
||||||
//- Check if point on triangle
|
|
||||||
//void checkOnTriangle(const point&) const;
|
|
||||||
|
|
||||||
//- Cross mesh edge into different face on same cell
|
|
||||||
void crossEdgeConnectedFace(const edge& meshEdge);
|
|
||||||
|
|
||||||
//- Cross diagonal edge into different triangle on same face,cell
|
|
||||||
void crossDiagonalEdge();
|
|
||||||
|
|
||||||
//- Track through single triangle
|
|
||||||
scalar trackFaceTri(const vector& endPosition, label& minEdgeI);
|
|
||||||
|
|
||||||
//- Do all patch interaction
|
|
||||||
void patchInteraction(trackingData& td, const scalar trackFraction);
|
|
||||||
|
|
||||||
//- Is current triangle in the track direction
|
|
||||||
bool isTriAlongTrack(const point& endPosition) const;
|
|
||||||
|
|
||||||
//- Equivalent of trackToFace
|
|
||||||
scalar trackToEdge
|
|
||||||
(
|
|
||||||
trackingData& td,
|
|
||||||
const vector& endPosition
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Interpolate all quantities; return interpolated velocity.
|
|
||||||
vector interpolateFields
|
vector interpolateFields
|
||||||
(
|
(
|
||||||
const trackingData&,
|
const trackingData& td,
|
||||||
const point&,
|
const point& position,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label faceI
|
const label faceI
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Interpolate all quantities, return updated velocity.
|
|
||||||
vector sample(trackingData& td);
|
vector sample(trackingData& td);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
@ -265,73 +219,6 @@ public:
|
|||||||
bool move(trackingData&, const scalar trackTime);
|
bool move(trackingData&, const scalar trackTime);
|
||||||
|
|
||||||
|
|
||||||
//- Overridable function to handle the particle hitting a patch
|
|
||||||
// Executed before other patch-hitting functions
|
|
||||||
bool hitPatch
|
|
||||||
(
|
|
||||||
const polyPatch&,
|
|
||||||
trackingData& td,
|
|
||||||
const label patchI,
|
|
||||||
const scalar trackFraction,
|
|
||||||
const tetIndices& tetIs
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Overridable function to handle the particle hitting a wedge
|
|
||||||
void hitWedgePatch
|
|
||||||
(
|
|
||||||
const wedgePolyPatch&,
|
|
||||||
trackingData& td
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Overridable function to handle the particle hitting a
|
|
||||||
// symmetryPlane
|
|
||||||
void hitSymmetryPatch
|
|
||||||
(
|
|
||||||
const symmetryPolyPatch&,
|
|
||||||
trackingData& td
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Overridable function to handle the particle hitting a cyclic
|
|
||||||
void hitCyclicPatch
|
|
||||||
(
|
|
||||||
const cyclicPolyPatch&,
|
|
||||||
trackingData& td
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Overridable function to handle the particle hitting a
|
|
||||||
//- processorPatch
|
|
||||||
void hitProcessorPatch
|
|
||||||
(
|
|
||||||
const processorPolyPatch&,
|
|
||||||
trackingData& td
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Overridable function to handle the particle hitting a wallPatch
|
|
||||||
void hitWallPatch
|
|
||||||
(
|
|
||||||
const wallPolyPatch&,
|
|
||||||
trackingData& td,
|
|
||||||
const tetIndices&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Overridable function to handle the particle hitting a polyPatch
|
|
||||||
void hitPatch
|
|
||||||
(
|
|
||||||
const polyPatch&,
|
|
||||||
trackingData& td
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Info
|
|
||||||
|
|
||||||
//- Return info proxy.
|
|
||||||
// Used to print particle information to a stream
|
|
||||||
InfoProxy<wallBoundedStreamLineParticle> info() const
|
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
@ -351,12 +238,6 @@ public:
|
|||||||
Ostream&,
|
Ostream&,
|
||||||
const wallBoundedStreamLineParticle&
|
const wallBoundedStreamLineParticle&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend Ostream& operator<<
|
|
||||||
(
|
|
||||||
Ostream&,
|
|
||||||
const InfoProxy<wallBoundedStreamLineParticle>&
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user