44 Foam::tensor Foam::molecule::rotationTensorY(scalar phi)
const
55 Foam::tensor Foam::molecule::rotationTensorZ(scalar phi)
const
99 pi_ += 0.5*deltaT*tau_;
101 else if (td.
part() == 1)
105 scalar tEnd = (1.0 - stepFraction())*deltaT;
111 scalar dt =
min(dtMax, tEnd);
113 dt *= trackToFace(position() + dt*v_, td);
116 stepFraction() = 1.0 - tEnd/deltaT;
119 else if (td.
part() == 2)
125 if (!constProps.pointMolecule())
127 const diagTensor& momentOfInertia(constProps.momentOfInertia());
131 if (!constProps.linearMolecule())
133 R = rotationTensorX(0.5*deltaT*pi_.x()/momentOfInertia.xx());
138 R = rotationTensorY(0.5*deltaT*pi_.y()/momentOfInertia.yy());
142 R = rotationTensorZ(deltaT*pi_.z()/momentOfInertia.zz());
146 R = rotationTensorY(0.5*deltaT*pi_.y()/momentOfInertia.yy());
150 if (!constProps.linearMolecule())
152 R = rotationTensorX(0.5*deltaT*pi_.x()/momentOfInertia.xx());
158 setSitePositions(constProps);
160 else if (td.
part() == 3)
165 scalar m = constProps.mass();
173 const vector&
f = siteForces_[s];
177 tau_ += (constProps.siteReferencePositions()[s] ^ (Q_.T() &
f));
182 pi_ += 0.5*deltaT*tau_;
184 if (constProps.pointMolecule())
191 if (constProps.linearMolecule())
202 <<
" is an invalid part of the integration method."
214 sitePositions_ = position_ + (T & (sitePositions_ - position_));
216 siteForces_ = T & siteForces_;
222 if (special_ == SPECIAL_TETHERED)
224 specialPosition_ += separation;
237 sitePositions_.setSize(size);
239 siteForces_.setSize(size);