Six degree of freedom motion for a rigid body. More...
Public Member Functions | |
| sixDoFRigidBodyMotion (const Time &) | |
| Construct null. More... | |
| sixDoFRigidBodyMotion (const dictionary &dict, const dictionary &stateDict, const Time &time) | |
| Construct from constant and state dictionaries. More... | |
| sixDoFRigidBodyMotion (const sixDoFRigidBodyMotion &) | |
| Construct as copy. More... | |
| ~sixDoFRigidBodyMotion () | |
| Destructor. More... | |
| scalar | mass () const |
| Return the mass. More... | |
| const diagTensor & | momentOfInertia () const |
| Return the inertia tensor. More... | |
| const sixDoFRigidBodyMotionState & | state () const |
| Return the motion state. More... | |
| const point & | centreOfRotation () const |
| Return the current centre of rotation. More... | |
| const point & | initialCentreOfMass () const |
| Return the initial centre of mass. More... | |
| point | centreOfMass () const |
| Return the current centre of mass. More... | |
| const tensor & | orientation () const |
| Return the orientation tensor, Q. More... | |
| vector | omega () const |
| Return the angular velocity in the global frame. More... | |
| const vector & | v () const |
| Return the current velocity. More... | |
| vector & | v () |
| Return non-const access to vector. More... | |
| vector | momentArm () const |
| Return the current momentArm. More... | |
| bool | report () const |
| Return the report Switch. More... | |
| bool | updateConstraints () const |
| Return the update-constraints flag. More... | |
| const Time & | time () const |
| Return time. More... | |
| void | newTime () |
| Store the motion state at the beginning of the time-step. More... | |
| point & | centreOfRotation () |
| Return non-const access to the centre of rotation. More... | |
| void | addRestraints (const dictionary &dict) |
| Add restraints to the motion, public to allow external. More... | |
| void | addConstraints (const dictionary &dict) |
| Add restraints to the motion, public to allow external. More... | |
| void | update (bool firstIter, const vector &fGlobal, const vector &tauGlobal, scalar deltaT, scalar deltaT0) |
| Symplectic integration of velocities, orientation and position. More... | |
| void | status () const |
| Report the status of the motion. More... | |
| point | velocity (const point &pt) const |
| Return the velocity of a position. More... | |
| point | transform (const point &initialPoints) const |
| Transform the given initial state point by the current motion. More... | |
| tmp< pointField > | transform (const pointField &initialPoints) const |
| Transform the given initial state pointField by the current. More... | |
| tmp< pointField > | transform (const pointField &initialPoints, const scalarField &scale) const |
| Transform the given initial state pointField by the current. More... | |
| void | write (Ostream &) const |
| Write. More... | |
| bool | read (const dictionary &dict) |
| Read coefficients dictionary and update system parameters,. More... | |
Friends | |
| class | sixDoFSolver |
Six degree of freedom motion for a rigid body.
Angular momentum stored in body fixed reference frame. Reference orientation of the body (where Q = I) must align with the cartesian axes such that the Inertia tensor is in principle component form. Can add restraints (e.g. a spring) and constraints (e.g. motion may only be on a plane).
The time-integrator for the motion is run-time selectable with options for symplectic (explicit), Crank-Nicolson and Newmark schemes.
Definition at line 65 of file sixDoFRigidBodyMotion.H.
| sixDoFRigidBodyMotion | ( | const Time & | time | ) |
Construct null.
Definition at line 69 of file sixDoFRigidBodyMotion.C.
| sixDoFRigidBodyMotion | ( | const dictionary & | dict, |
| const dictionary & | stateDict, | ||
| const Time & | time | ||
| ) |
Construct from constant and state dictionaries.
Definition at line 92 of file sixDoFRigidBodyMotion.C.
References Foam::diag(), dict, dictionary::found(), Foam::I, Foam::magSqr(), R, and Foam::sqr().

| sixDoFRigidBodyMotion | ( | const sixDoFRigidBodyMotion & | sDoFRBM | ) |
Construct as copy.
Definition at line 157 of file sixDoFRigidBodyMotion.C.
Destructor.
Definition at line 183 of file sixDoFRigidBodyMotion.C.
|
inline |
Return the mass.
Definition at line 204 of file sixDoFRigidBodyMotionI.H.
Referenced by softWall::restrain(), linearSpringDamper::restrain(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

|
inline |
Return the inertia tensor.
Definition at line 211 of file sixDoFRigidBodyMotionI.H.
|
inline |
Return the motion state.
Definition at line 218 of file sixDoFRigidBodyMotionI.H.
Referenced by axis::constrainRotation().

|
inline |
Return the current centre of rotation.
Definition at line 224 of file sixDoFRigidBodyMotionI.H.
Referenced by sphericalAngularSpring::restrain(), linearAxialAngularSpring::restrain(), tabulatedAxialAngularSpring::restrain(), and sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

|
inline |
Return the initial centre of mass.
Definition at line 231 of file sixDoFRigidBodyMotionI.H.
|
inline |
Return the current centre of mass.
Definition at line 237 of file sixDoFRigidBodyMotionI.H.
References Foam::transform().

|
inline |
Return the orientation tensor, Q.
globalVector = Q & bodyLocalVector bodyLocalVector = Q.T() & globalVector
Definition at line 250 of file sixDoFRigidBodyMotionI.H.
Referenced by sphericalAngularSpring::restrain(), linearAxialAngularSpring::restrain(), and tabulatedAxialAngularSpring::restrain().

|
inline |
Return the angular velocity in the global frame.
Definition at line 256 of file sixDoFRigidBodyMotionI.H.
References Foam::inv(), and Foam::constant::mathematical::pi().
Referenced by sphericalAngularDamper::restrain(), sphericalAngularSpring::restrain(), linearAxialAngularSpring::restrain(), and tabulatedAxialAngularSpring::restrain().


|
inline |
Return the current velocity.
Definition at line 136 of file sixDoFRigidBodyMotionI.H.
Referenced by linearDamper::restrain().

|
inline |
Return non-const access to vector.
Definition at line 178 of file sixDoFRigidBodyMotionI.H.
|
inline |
Return the current momentArm.
Definition at line 243 of file sixDoFRigidBodyMotionI.H.
Referenced by sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

|
inline |
Return the report Switch.
Definition at line 266 of file sixDoFRigidBodyMotionI.H.
Referenced by sphericalAngularDamper::restrain(), linearDamper::restrain(), sphericalAngularSpring::restrain(), linearAxialAngularSpring::restrain(), softWall::restrain(), linearSpring::restrain(), tabulatedAxialAngularSpring::restrain(), and linearSpringDamper::restrain().

|
inline |
Return the update-constraints flag.
Definition at line 271 of file sixDoFRigidBodyMotionI.H.
|
inline |
Return time.
Definition at line 261 of file sixDoFRigidBodyMotionI.H.
Referenced by axis::constrainRotation(), and linearSpringDamper::restrain().

|
inline |
Store the motion state at the beginning of the time-step.
Definition at line 277 of file sixDoFRigidBodyMotionI.H.
Referenced by uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

|
inline |
Return non-const access to the centre of rotation.
Definition at line 283 of file sixDoFRigidBodyMotionI.H.
| void addRestraints | ( | const dictionary & | dict | ) |
Add restraints to the motion, public to allow external.
addition of restraints after construction
Definition at line 190 of file sixDoFRigidBodyMotion.C.
References dict, dictionary::found(), sixDoFRigidBodyMotionRestraint::New(), dictionary::set(), and dictionary::subDict().
Referenced by sixDoFRigidBodyMotion::read().


| void addConstraints | ( | const dictionary & | dict | ) |
Add restraints to the motion, public to allow external.
addition of restraints after construction
Definition at line 224 of file sixDoFRigidBodyMotion.C.
References pointConstraint::constraintTransformation(), dict, Foam::endl(), dictionary::found(), Foam::Info, sixDoFRigidBodyMotionConstraint::New(), Foam::nl, and dictionary::subDict().
Referenced by sixDoFRigidBodyMotion::read().


| void update | ( | bool | firstIter, |
| const vector & | fGlobal, | ||
| const vector & | tauGlobal, | ||
| scalar | deltaT, | ||
| scalar | deltaT0 | ||
| ) |
Symplectic integration of velocities, orientation and position.
Changes to Crank-Nicolson integration for subsequent iterations.
Definition at line 329 of file sixDoFRigidBodyMotion.C.
References Pstream::broadcast(), and UPstream::master().
Referenced by uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().


| void status | ( | ) | const |
Report the status of the motion.
Definition at line 351 of file sixDoFRigidBodyMotion.C.
References Foam::endl(), Foam::Info, and Foam::nl.

|
inline |
Return the velocity of a position.
Definition at line 290 of file sixDoFRigidBodyMotionI.H.
Referenced by softWall::restrain(), linearSpring::restrain(), and linearSpringDamper::restrain().

|
inline |
Transform the given initial state point by the current motion.
state
Definition at line 299 of file sixDoFRigidBodyMotionI.H.
Referenced by softWall::restrain(), linearSpring::restrain(), linearSpringDamper::restrain(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

| Foam::tmp< Foam::pointField > transform | ( | const pointField & | initialPoints | ) | const |
Transform the given initial state pointField by the current.
motion state
Definition at line 364 of file sixDoFRigidBodyMotion.C.
| Foam::tmp< Foam::pointField > transform | ( | const pointField & | initialPoints, |
| const scalarField & | scale | ||
| ) | const |
Transform the given initial state pointField by the current.
motion state scaled by the given scale
Definition at line 377 of file sixDoFRigidBodyMotion.C.
References forAll, septernion::I, septernion::invTransformPoint(), tmp< T >::New(), points, s, Foam::slerp(), Foam::T(), and Foam::transform().

| void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 47 of file sixDoFRigidBodyMotionIO.C.
References Ostream::beginBlock(), Ostream::endBlock(), forAll, Foam::indent(), Foam::name(), Foam::type(), Ostream::write(), and Ostream::writeEntry().
Referenced by sixDoFRigidBodyDisplacementPointPatchVectorField::write().


| bool read | ( | const dictionary & | dict | ) |
Read coefficients dictionary and update system parameters,.
constraints and restraints but not the current state
Definition at line 28 of file sixDoFRigidBodyMotionIO.C.
References sixDoFRigidBodyMotion::addConstraints(), sixDoFRigidBodyMotion::addRestraints(), and dict.

|
friend |
Definition at line 67 of file sixDoFRigidBodyMotion.H.