sixDoFRigidBodyMotion Class Reference

Six degree of freedom motion for a rigid body. More...

Public Member Functions

 sixDoFRigidBodyMotion ()
 Construct null. More...
 
 sixDoFRigidBodyMotion (const dictionary &dict, const dictionary &stateDict)
 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...
 
vector momentArm () const
 
bool report () const
 Return the report Switch. 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 66 of file sixDoFRigidBodyMotion.H.

Constructor & Destructor Documentation

Construct null.

Definition at line 73 of file sixDoFRigidBodyMotion.C.

sixDoFRigidBodyMotion ( const dictionary dict,
const dictionary stateDict 
)

Construct from constant and state dictionaries.

Definition at line 94 of file sixDoFRigidBodyMotion.C.

References Foam::diag(), dictionary::found(), Foam::I, Foam::magSqr(), R, and Foam::sqr().

Here is the call graph for this function:

Construct as copy.

Definition at line 156 of file sixDoFRigidBodyMotion.C.

Destructor.

Definition at line 179 of file sixDoFRigidBodyMotion.C.

Member Function Documentation

Foam::scalar mass ( ) const
inline

Return the mass.

Definition at line 208 of file sixDoFRigidBodyMotionI.H.

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

Here is the caller graph for this function:

const Foam::diagTensor & momentOfInertia ( ) const
inline

Return the inertia tensor.

Definition at line 215 of file sixDoFRigidBodyMotionI.H.

const Foam::sixDoFRigidBodyMotionState & state ( ) const
inline

Return the motion state.

Definition at line 222 of file sixDoFRigidBodyMotionI.H.

const Foam::point & centreOfRotation ( ) const
inline

Return the current centre of rotation.

Definition at line 228 of file sixDoFRigidBodyMotionI.H.

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

Here is the caller graph for this function:

const Foam::point & initialCentreOfMass ( ) const
inline

Return the initial centre of mass.

Definition at line 235 of file sixDoFRigidBodyMotionI.H.

Foam::point centreOfMass ( ) const
inline

Return the current centre of mass.

Definition at line 241 of file sixDoFRigidBodyMotionI.H.

References Foam::transform().

Here is the call graph for this function:

const Foam::tensor & orientation ( ) const
inline

Return the orientation tensor, Q.

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

Definition at line 254 of file sixDoFRigidBodyMotionI.H.

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

Here is the caller graph for this function:

Foam::vector omega ( ) const
inline

Return the angular velocity in the global frame.

Definition at line 260 of file sixDoFRigidBodyMotionI.H.

References Foam::inv(), and Foam::constant::mathematical::pi().

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

Here is the call graph for this function:

Here is the caller graph for this function:

const Foam::vector & v ( ) const
inline

Return the current velocity.

Definition at line 140 of file sixDoFRigidBodyMotionI.H.

Foam::vector momentArm ( ) const
inline

Definition at line 247 of file sixDoFRigidBodyMotionI.H.

Referenced by sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs().

Here is the caller graph for this function:

bool report ( ) const
inline
void newTime ( )
inline

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

Definition at line 272 of file sixDoFRigidBodyMotionI.H.

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

Here is the caller graph for this function:

Foam::point & centreOfRotation ( )
inline

Return non-const access to the centre of rotation.

Definition at line 278 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 186 of file sixDoFRigidBodyMotion.C.

References dict, forAllConstIter, dictionary::found(), sixDoFRigidBodyMotionRestraint::New(), DLListBase::size(), and dictionary::subDict().

Referenced by sixDoFRigidBodyMotion::read().

Here is the call graph for this function:

Here is the caller graph for this function:

void addConstraints ( const dictionary dict)

Add restraints to the motion, public to allow external.

addition of restraints after construction

Definition at line 220 of file sixDoFRigidBodyMotion.C.

References pointConstraint::constraintTransformation(), dict, Foam::endl(), forAllConstIter, dictionary::found(), Foam::Info, sixDoFRigidBodyMotionConstraint::New(), Foam::nl, DLListBase::size(), and dictionary::subDict().

Referenced by sixDoFRigidBodyMotion::read().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void status ( ) const

Report the status of the motion.

Definition at line 320 of file sixDoFRigidBodyMotion.C.

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

Here is the call graph for this function:

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

Return the velocity of a position.

Definition at line 285 of file sixDoFRigidBodyMotionI.H.

Referenced by linearSpring::restrain().

Here is the caller graph for this function:

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

Transform the given initial state point by the current motion.

state

Definition at line 294 of file sixDoFRigidBodyMotionI.H.

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

Here is the caller graph for this function:

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

Transform the given initial state pointField by the current.

motion state

Definition at line 333 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 346 of file sixDoFRigidBodyMotion.C.

References forAll, septernion::I, points, s(), Foam::slerp(), Foam::T(), Foam::transform(), and septernion::transform().

Here is the call graph for this function:

void write ( Ostream os) const

Write.

Definition at line 49 of file sixDoFRigidBodyMotionIO.C.

References token::BEGIN_BLOCK, Foam::decrIndent(), token::END_BLOCK, token::END_STATEMENT, Foam::endl(), forAll, Foam::incrIndent(), Foam::indent(), IOstream::name(), Foam::nl, and Ostream::writeKeyword().

Referenced by sixDoFRigidBodyDisplacementPointPatchVectorField::write().

Here is the call graph for this function:

Here is the caller graph for this function:

bool read ( const dictionary dict)

Read coefficients dictionary and update system parameters,.

constraints and restraints but not the current state

Definition at line 31 of file sixDoFRigidBodyMotionIO.C.

References sixDoFRigidBodyMotion::addConstraints(), sixDoFRigidBodyMotion::addRestraints(), dictionary::lookup(), and dictionary::lookupOrDefault().

Here is the call graph for this function:

Friends And Related Function Documentation

friend class sixDoFSolver
friend

Definition at line 68 of file sixDoFRigidBodyMotion.H.


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