33template<
class CloudType>
42 GName_(this->
coeffDict().getWord(
"GName"))
46template<
class CloudType>
59template<
class CloudType>
62 const typename parcelType::trackingData&
td
65 auto& c = this->owner();
67 auto* resultPtr = c.template getObjectPtr<IOField<scalar>>(
"D");
88 D.resize(c.size(), Zero);
90 const fvMesh&
mesh = this->owner().mesh();
92 const auto& G =
mesh.lookupObject<volScalarField>(GName_);
95 for (
const parcelType&
p : c)
97 D[parceli] += G[
p.cell()]*
mesh.time().deltaTValue();
101 const bool haveParticles =
c.size();
104 D.write(haveParticles);
Templated cloud function object base class.
CloudFunctionObject(CloudType &owner)
Construct null from owner.
const CloudType & owner() const
Return const access to the owner cloud.
particle::trackingData trackingData
A primitive field of type <T> with automated input and output.
@ REGISTER
Request registration (bool: true).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Calculate the doses absorbed by a particle as the time integral of the particle track along the radia...
ParticleDose(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
const word & modelName() const
Return const access to the name of the sub-model.
A class for handling words, derived from Foam::string.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
const dimensionedScalar c
Speed of light in a vacuum.
bool returnReduceOr(const bool value, const int communicator=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
DSMCCloud< dsmcParcel > CloudType
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
static constexpr const zero Zero
Global zero (0).
const dimensionedScalar & D