49 #ifndef sixDoFRigidBodyMotion_H 50 #define sixDoFRigidBodyMotion_H 98 point initialCentreOfMass_;
101 point initialCentreOfRotation_;
123 bool updateConstraints_;
133 inline tensor rotationTensorX(scalar deltaT)
const;
137 inline tensor rotationTensorY(scalar deltaT)
const;
141 inline tensor rotationTensorZ(scalar deltaT)
const;
153 void applyRestraints();
156 void updateAcceleration(
const vector& fGlobal,
const vector& tauGlobal);
159 void updateConstraints();
176 inline const point& initialCentreOfRotation()
const;
179 inline const tensor& initialQ()
const;
182 inline const tensor& Q()
const;
185 inline const vector& a()
const;
191 inline const vector& tau()
const;
197 inline point& initialCentreOfRotation();
200 inline tensor& initialQ();
243 inline scalar
mass()
const;
269 inline const vector&
v()
const;
278 inline bool report()
const;
281 inline bool updateConstraints()
const;
Six degree of freedom motion for a rigid body.
~sixDoFRigidBodyMotion()
Destructor.
void addConstraints(const dictionary &dict)
Add restraints to the motion, public to allow external.
bool read(const dictionary &dict)
Read coefficients dictionary and update system parameters,.
bool report() const
Return the report Switch.
void write(Ostream &) const
Write.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
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.
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.
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)
void status() const
Report the status of the motion.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
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.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
scalar mass() const
Return the mass.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
sixDoFRigidBodyMotion(const Time &)
Construct null.
A class for managing temporary objects.
Tensor of scalars, i.e. Tensor<scalar>.
void update(bool firstIter, const vector &fGlobal, const vector &tauGlobal, scalar deltaT, scalar deltaT0)
Symplectic integration of velocities, orientation and position.
const point & initialCentreOfMass() const
Return the initial centre of mass.
const vector & v() const
Return the current velocity.
void addRestraints(const dictionary &dict)
Add restraints to the motion, public to allow external.