31inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorX
45inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorY
59inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorZ
74Foam::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());
110Foam::sixDoFRigidBodyMotion::restraints()
const
117Foam::sixDoFRigidBodyMotion::constraints()
const
124Foam::sixDoFRigidBodyMotion::initialCentreOfRotation()
const
126 return initialCentreOfRotation_;
131Foam::sixDoFRigidBodyMotion::initialQ()
const
139 return motionState_.
Q();
145 return motionState_.v();
149inline const Foam::vector& Foam::sixDoFRigidBodyMotion::a()
const
151 return motionState_.a();
155inline const Foam::vector& Foam::sixDoFRigidBodyMotion::pi()
const
157 return motionState_.pi();
161inline const Foam::vector& Foam::sixDoFRigidBodyMotion::tau()
const
163 return motionState_.tau();
167inline Foam::point& Foam::sixDoFRigidBodyMotion::initialCentreOfRotation()
169 return initialCentreOfRotation_;
173inline 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());
281 motionState0_ = motionState_;
287 return motionState_.centreOfRotation();
296 return (omega() ^ (pt - centreOfRotation())) + v();
302 const point& initialPoint
308 + (Q() & initialQ_.T() & (initialPoint - initialCentreOfRotation_))
#define R(A, B, C, D, E, F, K, M)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Computes the second invariant of the velocity gradient tensor .
Q(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Holds the motion state of sixDoF object. Wrapped up together to allow rapid scatter to other processo...
point centreOfMass() const
Return the current centre of mass.
const diagTensor & momentOfInertia() const
Return the inertia tensor.
void newTime()
Store the motion state at the beginning of the time-step.
const vector & v() const
Return the current velocity.
const point & initialCentreOfMass() const
Return the initial centre of mass.
bool report() const
Return the report Switch.
const Time & time() const
Return time.
const tensor & orientation() const
Return the orientation tensor, Q.
vector momentArm() const
Return the current momentArm.
vector omega() const
Return the angular velocity in the global frame.
scalar mass() const
Return the mass.
point velocity(const point &pt) const
Return the velocity of a position.
const point & centreOfRotation() const
Return the current centre of rotation.
const sixDoFRigidBodyMotionState & state() const
Return the motion state.
Tensor of scalars, i.e. Tensor<scalar>.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
constexpr scalar pi(M_PI)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensionedScalar cos(const dimensionedScalar &ds)