sixDoFRigidBodyMotion Class Reference

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 diagTensormomentOfInertia () const
 Return the inertia tensor. More...
 
const sixDoFRigidBodyMotionStatestate () const
 Return the motion state. More...
 
const pointcentreOfRotation () const
 Return the current centre of rotation. More...
 
const pointinitialCentreOfMass () const
 Return the initial centre of mass. More...
 
point centreOfMass () const
 Return the current centre of mass. More...
 
const tensororientation () const
 Return the orientation tensor, Q. More...
 
vector omega () const
 Return the angular velocity in the global frame. More...
 
const vectorv () const
 Return the current velocity. More...
 
vectorv ()
 Return non-const access to vector. More...
 
vector momentArm () const
 Return the current momentArm. More...
 
bool report () const
 Return the report Switch. More...
 
const Timetime () const
 Return time. More...
 
void newTime ()
 Store the motion state at the beginning of the time-step. More...
 
pointcentreOfRotation ()
 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< pointFieldtransform (const pointField &initialPoints) const
 Transform the given initial state pointField by the current. More...
 
tmp< pointFieldtransform (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
 

Detailed Description

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.

Source files

Definition at line 69 of file sixDoFRigidBodyMotion.H.

Constructor & Destructor Documentation

◆ sixDoFRigidBodyMotion() [1/3]

sixDoFRigidBodyMotion ( const Time time)

Construct null.

Definition at line 76 of file sixDoFRigidBodyMotion.C.

◆ sixDoFRigidBodyMotion() [2/3]

sixDoFRigidBodyMotion ( const dictionary dict,
const dictionary stateDict,
const Time time 
)

Construct from constant and state dictionaries.

Definition at line 97 of file sixDoFRigidBodyMotion.C.

References sixDoFRigidBodyMotion::addConstraints(), sixDoFRigidBodyMotion::addRestraints(), sixDoFRigidBodyMotionState::centreOfRotation(), Foam::diag(), dict, dictionary::found(), Foam::I, Foam::magSqr(), R, and Foam::sqr().

Here is the call graph for this function:

◆ sixDoFRigidBodyMotion() [3/3]

Construct as copy.

Definition at line 161 of file sixDoFRigidBodyMotion.C.

◆ ~sixDoFRigidBodyMotion()

Destructor.

Definition at line 187 of file sixDoFRigidBodyMotion.C.

Member Function Documentation

◆ mass()

Foam::scalar mass ( ) const
inline

Return the mass.

Definition at line 211 of file sixDoFRigidBodyMotionI.H.

Referenced by linearSpringDamper::restrain(), softWall::restrain(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

Here is the caller graph for this function:

◆ momentOfInertia()

const Foam::diagTensor & momentOfInertia ( ) const
inline

Return the inertia tensor.

Definition at line 218 of file sixDoFRigidBodyMotionI.H.

◆ state()

const Foam::sixDoFRigidBodyMotionState & state ( ) const
inline

Return the motion state.

Definition at line 225 of file sixDoFRigidBodyMotionI.H.

◆ centreOfRotation() [1/2]

const Foam::point & centreOfRotation ( ) const
inline

Return the current centre of rotation.

Definition at line 231 of file sixDoFRigidBodyMotionI.H.

Referenced by linearAxialAngularSpring::restrain(), sphericalAngularSpring::restrain(), tabulatedAxialAngularSpring::restrain(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and sixDoFRigidBodyState::write().

Here is the caller graph for this function:

◆ initialCentreOfMass()

const Foam::point & initialCentreOfMass ( ) const
inline

Return the initial centre of mass.

Definition at line 238 of file sixDoFRigidBodyMotionI.H.

◆ centreOfMass()

Foam::point centreOfMass ( ) const
inline

Return the current centre of mass.

Definition at line 244 of file sixDoFRigidBodyMotionI.H.

References Foam::transform().

Referenced by sixDoFRigidBodyState::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ orientation()

const Foam::tensor & orientation ( ) const
inline

Return the orientation tensor, Q.

globalVector = Q & bodyLocalVector bodyLocalVector = Q.T() & globalVector

Definition at line 257 of file sixDoFRigidBodyMotionI.H.

Referenced by linearAxialAngularSpring::restrain(), sphericalAngularSpring::restrain(), tabulatedAxialAngularSpring::restrain(), and sixDoFRigidBodyState::write().

Here is the caller graph for this function:

◆ omega()

Foam::vector omega ( ) const
inline

Return the angular velocity in the global frame.

Definition at line 263 of file sixDoFRigidBodyMotionI.H.

References Foam::inv().

Referenced by linearAxialAngularSpring::restrain(), sphericalAngularDamper::restrain(), sphericalAngularSpring::restrain(), tabulatedAxialAngularSpring::restrain(), and sixDoFRigidBodyState::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ v() [1/2]

const Foam::vector & v ( ) const
inline

Return the current velocity.

Definition at line 143 of file sixDoFRigidBodyMotionI.H.

Referenced by linearDamper::restrain(), and sixDoFRigidBodyState::write().

Here is the caller graph for this function:

◆ v() [2/2]

Foam::vector & v ( )
inline

Return non-const access to vector.

Definition at line 185 of file sixDoFRigidBodyMotionI.H.

◆ momentArm()

Foam::vector momentArm ( ) const
inline

Return the current momentArm.

Definition at line 250 of file sixDoFRigidBodyMotionI.H.

Referenced by sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

Here is the caller graph for this function:

◆ report()

bool report ( ) const
inline

Return the report Switch.

Definition at line 273 of file sixDoFRigidBodyMotionI.H.

Referenced by linearAxialAngularSpring::restrain(), linearDamper::restrain(), linearSpring::restrain(), linearSpringDamper::restrain(), softWall::restrain(), sphericalAngularDamper::restrain(), sphericalAngularSpring::restrain(), and tabulatedAxialAngularSpring::restrain().

Here is the caller graph for this function:

◆ time()

const Foam::Time & time ( ) const
inline

Return time.

Definition at line 268 of file sixDoFRigidBodyMotionI.H.

Referenced by linearSpringDamper::restrain().

Here is the caller graph for this function:

◆ newTime()

void newTime ( )
inline

Store the motion state at the beginning of the time-step.

Definition at line 279 of file sixDoFRigidBodyMotionI.H.

Referenced by sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

Here is the caller graph for this function:

◆ centreOfRotation() [2/2]

Foam::point & centreOfRotation ( )
inline

Return non-const access to the centre of rotation.

Definition at line 285 of file sixDoFRigidBodyMotionI.H.

◆ addRestraints()

void addRestraints ( const dictionary dict)

Add restraints to the motion, public to allow external.

addition of restraints after construction

Definition at line 193 of file sixDoFRigidBodyMotion.C.

References dict, dictionary::found(), Time::New(), dictionary::set(), and dictionary::subDict().

Referenced by sixDoFRigidBodyMotion::read(), and sixDoFRigidBodyMotion::sixDoFRigidBodyMotion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addConstraints()

void addConstraints ( const dictionary dict)

Add restraints to the motion, public to allow external.

addition of restraints after construction

Definition at line 227 of file sixDoFRigidBodyMotion.C.

References pointConstraint::constraintTransformation(), dict, Foam::endl(), dictionary::found(), Foam::Info, Time::New(), Foam::nl, and dictionary::subDict().

Referenced by sixDoFRigidBodyMotion::read(), and sixDoFRigidBodyMotion::sixDoFRigidBodyMotion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

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 307 of file sixDoFRigidBodyMotion.C.

References splitCell::master(), and Pstream::scatter().

Referenced by sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ status()

void status ( ) const

Report the status of the motion.

Definition at line 330 of file sixDoFRigidBodyMotion.C.

References Foam::endl(), Foam::Info, and Foam::nl.

Here is the call graph for this function:

◆ velocity()

Foam::point velocity ( const point pt) const
inline

Return the velocity of a position.

Definition at line 291 of file sixDoFRigidBodyMotionI.H.

Referenced by linearSpring::restrain(), linearSpringDamper::restrain(), and softWall::restrain().

Here is the caller graph for this function:

◆ transform() [1/3]

Foam::point transform ( const point initialPoints) const
inline

Transform the given initial state point by the current motion.

state

Definition at line 300 of file sixDoFRigidBodyMotionI.H.

Referenced by linearSpring::restrain(), linearSpringDamper::restrain(), softWall::restrain(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), and uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

Here is the caller graph for this function:

◆ transform() [2/3]

Foam::tmp< Foam::pointField > transform ( const pointField initialPoints) const

Transform the given initial state pointField by the current.

motion state

Definition at line 342 of file sixDoFRigidBodyMotion.C.

◆ transform() [3/3]

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 355 of file sixDoFRigidBodyMotion.C.

References forAll, septernion::I, septernion::invTransformPoint(), points, tmp< T >::ref(), s(), Foam::slerp(), T, and Foam::transform().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write.

Definition at line 53 of file sixDoFRigidBodyMotionIO.C.

References Ostream::beginBlock(), Ostream::endBlock(), forAll, Foam::indent(), Foam::name(), os(), Foam::type(), Ostream::write(), and Ostream::writeEntry().

Referenced by sixDoFRigidBodyDisplacementPointPatchVectorField::write(), and uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read()

bool read ( const dictionary dict)

Read coefficients dictionary and update system parameters,.

constraints and restraints but not the current state

Definition at line 35 of file sixDoFRigidBodyMotionIO.C.

References sixDoFRigidBodyMotion::addConstraints(), sixDoFRigidBodyMotion::addRestraints(), dict, dictionary::getOrDefault(), and dictionary::readEntry().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ sixDoFSolver

friend class sixDoFSolver
friend

Definition at line 71 of file sixDoFRigidBodyMotion.H.


The documentation for this class was generated from the following files: