40 const vector& targetPosition,
44 const label transmissiveId
53 transmissiveId_(transmissiveId)
65 const vector& targetPosition,
68 const label transmissiveId
77 transmissiveId_(transmissiveId)
89 transmissiveId_(
p.transmissiveId_)
98 const scalar trackTime
101 td.switchProcessor =
false;
102 td.keepParticle =
true;
108 const label cell1 =
cell();
116 scalar ds =
mag(dsv);
135 const scalar
sigma = physicoChemical::sigma.
value();
137 label reflectedZoneId = td.relfectedCells()[cell1];
141 (reflectedZoneId > -1)
143 (transmissiveId_ == -1)
144 || (transmissiveId_ != reflectedZoneId)
152 if (I_ > 0.01*I0_ && ds > 0)
157 vector nHat = td.nHatInterp().interpolate(cpw);
159 nHat /= (
mag(nHat) + ROOTSMALL);
160 scalar cosTheta(-pDir & nHat);
163 if (cosTheta > SMALL)
168 td.relfectedCells()[cell1]
179 td.relfectedCells()[cell1]
187 scalar delaM =
cbrt(
mesh().cellVolumes()[cell1]);
198 insertP + newDir*
mesh().bounds().
mag(),
212 transmissiveId_ = reflectedZoneId;
214 scalar a = td.aInterp().interpolate(
pos0, cell1);
215 scalar
e = td.eInterp().interpolate(
pos0, cell1);
216 scalar E = td.EInterp().interpolate(
pos0, cell1);
217 scalar
T = td.TInterp().interpolate(
pos0, cell1);
221 const scalar Itran = I_*(1.0 -
rho);
228 td.Q(cell1) += (Itran -
max(I1, 0.0))*dA_;
240 scalar a = td.aInterp().interpolate(
pos0, cell1);
241 scalar
e = td.eInterp().interpolate(
pos0, cell1);
242 scalar E = td.EInterp().interpolate(
pos0, cell1);
243 scalar
T = td.TInterp().interpolate(
pos0, cell1);
251 td.Q(cell1) += (I_ -
max(I1, 0.0))*dA_;
255 if ((I_ <= 0.01*I0_))
262 }
while (td.keepParticle && !td.switchProcessor &&
stepFraction() < 1);
264 return td.keepParticle;
274 td.switchProcessor =
true;
284 td.keepParticle =
false;
Base cloud calls templated on particle type.
void addParticle(ParticleType *pPtr)
Transfer particle to cloud.
Discrete Transfer Radiation Model (DTRM) particle.
const point & p0() const
Return const access to the initial position.
const point & p1() const
Return const access to the target position.
void hitProcessorPatch(Cloud< DTRMParticle > &, trackingData &td)
Overridable function to handle the particle hitting a processorPatch.
bool hitPatch(Cloud< DTRMParticle > &, trackingData &td)
void hitWallPatch(Cloud< DTRMParticle > &, trackingData &td)
Overridable function to handle the particle hitting a wallPatch.
const Type & value() const
Return const reference to value.
vector deviationFromMeshCentre() const
Get the displacement from the mesh centre. Used to correct the.
vector position() const
Return current particle position.
label face() const noexcept
Return current face particle is on otherwise -1.
const polyMesh & mesh() const noexcept
Return the mesh database.
scalar stepFraction() const noexcept
Return the fraction of time-step completed.
void trackToAndHitFace(const vector &direction, const scalar fraction, TrackCloudType &cloud, trackingData &td)
Convenience function. Combines trackToFace and hitFace.
label cell() const noexcept
Return current cell particle is in.
Mesh consisting of general polyhedral cells.
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
PtrList< coordinateSystem > coordinates(solidRegions.size())
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))
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Different types of constants.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionedScalar pow4(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)