Go to the documentation of this file.
40 const vector& targetPosition,
44 const label transmissiveId
47 particle(
mesh, position, cellI),
53 transmissiveId_(transmissiveId)
65 const vector& targetPosition,
68 const label transmissiveId
77 transmissiveId_(transmissiveId)
89 transmissiveId_(
p.transmissiveId_)
96 Cloud<DTRMParticle>& spc,
98 const scalar trackTime
101 td.switchProcessor =
false;
102 td.keepParticle =
true;
108 const label cell1 =
cell();
117 scalar ds =
mag(dsv);
138 label reflectedZoneId = td.relfectedCells()[cell1];
142 (reflectedZoneId > -1)
144 (transmissiveId_ == -1)
145 || (transmissiveId_ != reflectedZoneId)
153 if (I_ > 0.01*I0_ && ds > 0)
158 vector nHat = td.nHatInterp().interpolate(cpw);
160 nHat /= (
mag(nHat) + ROOTSMALL);
161 scalar cosTheta(-pDir & nHat);
164 if (cosTheta > SMALL)
169 td.relfectedCells()[cell1]
180 td.relfectedCells()[cell1]
188 scalar delaM =
cbrt(
mesh().cellVolumes()[cell1]);
199 insertP + newDir*
mesh().bounds().
mag(),
207 spc.addParticle(pPtr);
213 transmissiveId_ = reflectedZoneId;
215 scalar a = td.aInterp().interpolate(
pos0, cell1);
216 scalar
e = td.eInterp().interpolate(
pos0, cell1);
217 scalar E = td.EInterp().interpolate(
pos0, cell1);
218 scalar
T = td.TInterp().interpolate(
pos0, cell1);
222 const scalar Itran = I_*(1.0 -
rho);
229 td.Q(cell1) += (Itran -
max(I1, 0.0))*dA_;
241 scalar a = td.aInterp().interpolate(
pos0, cell1);
242 scalar
e = td.eInterp().interpolate(
pos0, cell1);
243 scalar E = td.EInterp().interpolate(
pos0, cell1);
244 scalar
T = td.TInterp().interpolate(
pos0, cell1);
252 td.Q(cell1) += (I_ -
max(I1, 0.0))*dA_;
256 if ((I_ <= 0.01*I0_))
263 }
while (td.keepParticle && !td.switchProcessor &&
stepFraction() < 1);
265 return td.keepParticle;
271 Cloud<DTRMParticle>&,
275 td.switchProcessor =
true;
281 Cloud<DTRMParticle>&,
285 td.keepParticle =
false;
291 Cloud<DTRMParticle>&,
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void hitWallPatch(Cloud< DTRMParticle > &, trackingData &td)
Different types of constants.
void hitProcessorPatch(Cloud< DTRMParticle > &, trackingData &td)
DTRMParticle(const polyMesh &mesh, const vector &position, const vector &targetPosition, const scalar I, const label cellI, const scalar dA, const label transmissiveId)
tetIndices currentTetIndices() const
dimensionedScalar pos0(const dimensionedScalar &ds)
bool move(Cloud< DTRMParticle > &, trackingData &, const scalar)
label min(const labelHashSet &set, label minValue=labelMax)
dimensionedScalar pow4(const dimensionedScalar &ds)
void trackToAndHitFace(const vector &direction, const scalar fraction, TrackCloudType &cloud, trackingData &td)
PtrList< coordinateSystem > coordinates(solidRegions.size())
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
bool hitPatch(Cloud< DTRMParticle > &, trackingData &td)
const polyMesh & mesh() const
vector deviationFromMeshCentre() const
label max(const labelHashSet &set, label maxValue=labelMin)
Vector< scalar > vector
A scalar version of the templated Vector.
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
constexpr scalar pi(M_PI)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Barycentric< scalar > barycentric
A scalar version of the templated Barycentric.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
vector point
Point is a vector.
dimensionedScalar cbrt(const dimensionedScalar &ds)
scalar stepFraction() const
static const Identity< scalar > I