31 template<
class CloudType>
42 this->coeffDict().template lookupOrDefault<
word>(
"alpha",
"alpha")
45 gradAlphaPtr_(nullptr),
46 threshold_(this->coeffDict().template lookup<scalar>(
"threshold"))
50 template<
class CloudType>
57 alphaName_(pt.alphaName_),
58 alphaPtr_(pt.alphaPtr_),
59 gradAlphaPtr_(nullptr),
60 threshold_(pt.threshold_)
66 template<
class CloudType>
73 template<
class CloudType>
76 if (alphaPtr_ ==
nullptr)
85 if (gradAlphaPtr_.valid())
96 template<
class CloudType>
99 gradAlphaPtr_.clear();
103 template<
class CloudType>
112 if (alphaPtr_->primitiveField()[
p.cell()] < threshold_)
114 const vector& gradAlpha = gradAlphaPtr_()[
p.cell()];
116 scalar nHatU = nHat &
p.U();
120 p.U() -= 2*nHat*nHatU;
Templated cloud function object base class.
Templated base class for dsmc cloud.
Generic GeometricField class.
Traps particles within a given phase fraction for multi-phase cases.
virtual void postEvolve()
Post-evolve hook.
virtual ~ParticleTrap()
Destructor.
virtual void postMove(typename CloudType::parcelType &p, const scalar dt, const point &position0, bool &keepParticle)
Post-move hook.
ParticleTrap(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual void preEvolve()
Pre-evolve hook.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
const polyMesh & mesh() const
Return reference to polyMesh.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
A class for handling words, derived from string.
Calculate the gradient of the given field.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
VolField< vector > volVectorField
dimensioned< scalar > mag(const dimensioned< Type > &)