31 inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorX
45 inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorY
59 inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorZ
74 Foam::sixDoFRigidBodyMotion::rotate
81 Tuple2<tensor, vector> Qpi(Q0, pi0);
85 tensor R = rotationTensorX(0.5*deltaT*
pi.x()/momentOfInertia_.xx());
89 R = rotationTensorY(0.5*deltaT*
pi.y()/momentOfInertia_.yy());
93 R = rotationTensorZ(deltaT*
pi.z()/momentOfInertia_.zz());
97 R = rotationTensorY(0.5*deltaT*
pi.y()/momentOfInertia_.yy());
101 R = rotationTensorX(0.5*deltaT*
pi.x()/momentOfInertia_.xx());
110 Foam::sixDoFRigidBodyMotion::restraints()
const 117 Foam::sixDoFRigidBodyMotion::constraints()
const 124 Foam::sixDoFRigidBodyMotion::initialCentreOfRotation()
const 126 return initialCentreOfRotation_;
131 Foam::sixDoFRigidBodyMotion::initialQ()
const 137 inline const Foam::tensor& Foam::sixDoFRigidBodyMotion::Q()
const 139 return motionState_.Q();
145 return motionState_.v();
149 inline const Foam::vector& Foam::sixDoFRigidBodyMotion::a()
const 151 return motionState_.a();
155 inline const Foam::vector& Foam::sixDoFRigidBodyMotion::pi()
const 157 return motionState_.pi();
161 inline const Foam::vector& Foam::sixDoFRigidBodyMotion::tau()
const 163 return motionState_.tau();
167 inline Foam::point& Foam::sixDoFRigidBodyMotion::initialCentreOfRotation()
169 return initialCentreOfRotation_;
173 inline Foam::tensor& Foam::sixDoFRigidBodyMotion::initialQ()
181 return motionState_.Q();
187 return motionState_.v();
193 return motionState_.a();
199 return motionState_.pi();
205 return motionState_.tau();
220 return momentOfInertia_;
233 return motionState_.centreOfRotation();
240 return initialCentreOfMass_;
252 return centreOfMass() - motionState_.centreOfRotation();
265 return Q() & (
inv(momentOfInertia_) &
pi());
278 inline bool Foam::sixDoFRigidBodyMotion::updateConstraints()
const 280 return updateConstraints_;
286 motionState0_ = motionState_;
292 return motionState_.centreOfRotation();
301 return (omega() ^ (pt - centreOfRotation())) + v();
307 const point& initialPoint
313 + (Q() & initialQ_.T() & (initialPoint - initialCentreOfRotation_))
bool report() const
Return the report Switch.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
point centreOfMass() const
Return the current centre of mass.
const point & centreOfRotation() const
Return the current centre of rotation.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
point transform(const point &initialPoints) const
Transform the given initial state point by the current motion.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const sixDoFRigidBodyMotionState & state() const
Return the motion state.
vector momentArm() const
Return the current momentArm.
dimensionedScalar cos(const dimensionedScalar &ds)
const diagTensor & momentOfInertia() const
Return the inertia tensor.
vector omega() const
Return the angular velocity in the global frame.
Holds the motion state of sixDoF object. Wrapped up together to allow rapid scatter to other processo...
const tensor & orientation() const
Return the orientation tensor, Q.
constexpr scalar pi(M_PI)
dimensionedScalar sin(const dimensionedScalar &ds)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void newTime()
Store the motion state at the beginning of the time-step.
point velocity(const point &pt) const
Return the velocity of a position.
const Time & time() const
Return time.
#define R(A, B, C, D, E, F, K, M)
scalar mass() const
Return the mass.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Tensor of scalars, i.e. Tensor<scalar>.
const point & initialCentreOfMass() const
Return the initial centre of mass.
const vector & v() const
Return the current velocity.