32 template<
class CloudType>
37 Info<<
"Patch interaction model " << typeName <<
nl 38 <<
"Executing in turn " <<
endl;
41 for (
const entry& dEntry :
dict)
51 models_.resize(
count);
54 for (
const entry& dEntry :
dict)
70 dict.readEntry(
"oneInteractionOnly", oneInteractionOnly_);
71 if (oneInteractionOnly_)
73 Info<<
"Stopping upon first model that interacts with particle." 78 Info<<
"Allowing multiple models to interact." 88 template<
class CloudType>
97 read(this->coeffDict());
101 template<
class CloudType>
108 oneInteractionOnly_(pim.oneInteractionOnly_),
115 template<
class CloudType>
120 if (models_[i].active())
129 template<
class CloudType>
132 typename CloudType::parcelType&
p,
137 label origFacei =
p.face();
138 label patchi =
pp.index();
140 bool interacted =
false;
144 bool myInteracted = models_[i].correct
147 this->owner().pMesh().boundaryMesh()[patchi],
151 if (myInteracted && oneInteractionOnly_)
156 interacted = (interacted || myInteracted);
162 if (
p.face() != origFacei)
164 origFacei =
p.face();
179 template<
class CloudType>
182 for (
auto& m : models_)
189 template<
class CloudType>
192 PatchInteractionModel<CloudType>::info();
194 for (
auto& m : models_)
196 Log_<<
"Patch interaction model " << m.type() <<
':' <<
endl;
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual bool correct(typename CloudType::parcelType &p, const polyPatch &pp, bool &keepParticle)
Apply velocity correction.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
InfoProxy< IOstream > info() const noexcept
Return info proxy, used to print IOstream information to a stream.
virtual void info()
Write patch interaction.
Runs multiple patch interaction models in turn. Takes dictionary where all the subdictionaries are th...
Templated patch interaction model class.
#define forAll(list, i)
Loop across all elements in list.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
#define Log_
Report write to Foam::Info if the class log switch is true.
A cloud is a registry collection of lagrangian particles.
virtual void postEvolve()
Post-evolve hook.
MultiInteraction(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
virtual bool active() const
Flag to indicate whether model activates patch interaction model.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Templated base class for dsmc cloud.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())