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;
virtual void preEvolve()
Pre-evolve hook.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
ParticleTrap(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e...
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
GeometricField< vector, fvPatchField, volMesh > volVectorField
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Calculate the gradient of the given field.
A class for handling words, derived from string.
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.
Mesh data needed to do the Finite Volume discretisation.
dimensioned< scalar > mag(const dimensioned< Type > &)
Templated base class for dsmc cloud.
Traps particles within a given phase fraction for multi-phase cases.
Templated cloud function object base class.