Go to the documentation of this file.
74 const scalar trackTime
87 v_ += 0.5*trackTime*a_;
89 pi_ += 0.5*trackTime*tau_;
91 else if (td.
part() == 1)
97 const scalar
f = 1 - stepFraction();
98 trackToAndHitFace(
f*trackTime*v_,
f,
cloud, td);
101 else if (td.
part() == 2)
107 if (!constProps.pointMolecule())
113 if (!constProps.linearMolecule())
132 if (!constProps.linearMolecule())
140 setSitePositions(constProps);
142 else if (td.
part() == 3)
147 scalar m = constProps.mass();
159 tau_ += (constProps.siteReferencePositions()[
s] ^ (Q_.T() &
f));
162 v_ += 0.5*trackTime*a_;
164 pi_ += 0.5*trackTime*tau_;
166 if (constProps.pointMolecule())
173 if (constProps.linearMolecule())
183 << td.
part() <<
" is an invalid part of the integration method."
207 sitePositions_ = position() + (
T & (sitePositions_ - position()));
209 siteForces_ =
T & siteForces_;
217 if (special_ == SPECIAL_TETHERED)
219 specialPosition_ += separation;
222 sitePositions_ = sitePositions_ + separation;
234 sitePositions_.setSize(size);
236 siteForces_.setSize(size);
254 const vector nw = normal();
256 const scalar vn = v_ & nw;
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))
static constexpr const zero Zero
Global zero (0)
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
#define forAll(list, i)
Loop across all elements in list.
void hitWallPatch(moleculeCloud &cloud, trackingData &td)
Overridable function to handle the particle hitting a wallPatch.
void setSitePositions(const constantProperties &constProps)
#define R(A, B, C, D, E, F, K, M)
const Field< vector > & siteReferencePositions() const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Class used to pass tracking data to the trackToFace function.
bool keepParticle
Flag to indicate whether to keep particle (false = delete)
bool switchProcessor
Flag to switch processor.
void setSiteSizes(label size)
void hitProcessorPatch(moleculeCloud &cloud, trackingData &td)
Overridable function to handle the particle hitting a processorPatch.
errorManip< error > abort(error &err)
bool move(moleculeCloud &, trackingData &, const scalar trackTime)
A cloud is a registry collection of lagrangian particles.
Calculates the inertia tensor and principal axes and moments of a polyhedra/cells/triSurfaces....
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void transformProperties(const tensor &T)
Transform the physical properties of the particle.
Class to hold molecule constant properties.
bool hitPatch(moleculeCloud &cloud, trackingData &td)
Overridable function to handle the particle hitting a patch.
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
virtual void transformProperties(const tensor &T)
Transform the physical properties of the particle.
dimensionedScalar cos(const dimensionedScalar &ds)