Loading...
Searching...
No Matches
sixDoFRigidBodyMotion Class Reference

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

#include <sixDoFRigidBodyMotion.H>

Public Member Functions

 sixDoFRigidBodyMotion (const Time &)
 Construct null.
 sixDoFRigidBodyMotion (const dictionary &dict, const dictionary &stateDict, const Time &time)
 Construct from constant and state dictionaries.
 sixDoFRigidBodyMotion (const sixDoFRigidBodyMotion &)
 Construct as copy.
 ~sixDoFRigidBodyMotion ()
 Destructor.
scalar mass () const
 Return the mass.
const diagTensormomentOfInertia () const
 Return the inertia tensor.
const sixDoFRigidBodyMotionStatestate () const
 Return the motion state.
const pointcentreOfRotation () const
 Return the current centre of rotation.
const pointinitialCentreOfMass () const
 Return the initial centre of mass.
point centreOfMass () const
 Return the current centre of mass.
const tensororientation () const
 Return the orientation tensor, Q.
vector omega () const
 Return the angular velocity in the global frame.
const vectorv () const
 Return the current velocity.
vectorv ()
 Return non-const access to vector.
vector momentArm () const
 Return the current momentArm.
bool report () const
 Return the report Switch.
bool updateConstraints () const
 Return the update-constraints flag.
const Timetime () const
 Return time.
void newTime ()
 Store the motion state at the beginning of the time-step.
pointcentreOfRotation ()
 Return non-const access to the centre of rotation.
void addRestraints (const dictionary &dict)
 Add restraints to the motion, public to allow external.
void addConstraints (const dictionary &dict)
 Add restraints to the motion, public to allow external.
void update (bool firstIter, const vector &fGlobal, const vector &tauGlobal, scalar deltaT, scalar deltaT0)
 Symplectic integration of velocities, orientation and position.
void status () const
 Report the status of the motion.
point velocity (const point &pt) const
 Return the velocity of a position.
point transform (const point &initialPoints) const
 Transform the given initial state point by the current motion.
tmp< pointFieldtransform (const pointField &initialPoints) const
 Transform the given initial state pointField by the current.
tmp< pointFieldtransform (const pointField &initialPoints, const scalarField &scale) const
 Transform the given initial state pointField by the current.
void write (Ostream &) const
 Write.
bool read (const dictionary &dict)
 Read coefficients dictionary and update system parameters,.

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 65 of file sixDoFRigidBodyMotion.H.

Constructor & Destructor Documentation

◆ sixDoFRigidBodyMotion() [1/3]

sixDoFRigidBodyMotion ( const Time & time)

Construct null.

Definition at line 69 of file sixDoFRigidBodyMotion.C.

References Foam::I, time(), and Foam::Zero.

Referenced by sixDoFRigidBodyMotion(), and sixDoFSolver.

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

◆ sixDoFRigidBodyMotion() [2/3]

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

Construct from constant and state dictionaries.

Definition at line 91 of file sixDoFRigidBodyMotion.C.

References addConstraints(), addRestraints(), Foam::diag(), dict, dictionary::found(), Foam::I, Foam::magSqr(), Foam::New(), R, sixDoFSolver, Foam::sqr(), and time().

Here is the call graph for this function:

◆ sixDoFRigidBodyMotion() [3/3]

sixDoFRigidBodyMotion ( const sixDoFRigidBodyMotion & sDoFRBM)

Construct as copy.

Definition at line 156 of file sixDoFRigidBodyMotion.C.

References sixDoFRigidBodyMotion().

Here is the call graph for this function:

◆ ~sixDoFRigidBodyMotion()

Destructor.

Definition at line 183 of file sixDoFRigidBodyMotion.C.

Member Function Documentation

◆ mass()

Foam::scalar mass ( ) const
inline

Return the mass.

Definition at line 204 of file sixDoFRigidBodyMotionI.H.

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

Here is the caller graph for this function:

◆ momentOfInertia()

const Foam::diagTensor & momentOfInertia ( ) const
inline

Return the inertia tensor.

Definition at line 211 of file sixDoFRigidBodyMotionI.H.

◆ state()

const Foam::sixDoFRigidBodyMotionState & state ( ) const
inline

Return the motion state.

Definition at line 218 of file sixDoFRigidBodyMotionI.H.

◆ centreOfRotation() [1/2]

const Foam::point & centreOfRotation ( ) const
inline

Return the current centre of rotation.

Definition at line 224 of file sixDoFRigidBodyMotionI.H.

Referenced by linearAxialAngularSpring::restrain(), sphericalAngularSpring::restrain(), tabulatedAxialAngularSpring::restrain(), status(), transform(), transform(), transform(), velocity(), 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 231 of file sixDoFRigidBodyMotionI.H.

◆ centreOfMass()

Foam::point centreOfMass ( ) const
inline

Return the current centre of mass.

Definition at line 237 of file sixDoFRigidBodyMotionI.H.

References Foam::transform().

Referenced by momentArm(), status(), and 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 250 of file sixDoFRigidBodyMotionI.H.

Referenced by linearAxialAngularSpring::restrain(), sphericalAngularSpring::restrain(), tabulatedAxialAngularSpring::restrain(), status(), 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 256 of file sixDoFRigidBodyMotionI.H.

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

Referenced by linearAxialAngularSpring::restrain(), sphericalAngularDamper::restrain(), sphericalAngularSpring::restrain(), tabulatedAxialAngularSpring::restrain(), status(), velocity(), 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 136 of file sixDoFRigidBodyMotionI.H.

Referenced by linearDamper::restrain(), status(), velocity(), 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 178 of file sixDoFRigidBodyMotionI.H.

◆ momentArm()

Foam::vector momentArm ( ) const
inline

Return the current momentArm.

Definition at line 243 of file sixDoFRigidBodyMotionI.H.

References centreOfMass().

Here is the call graph for this function:

◆ report()

◆ updateConstraints()

bool updateConstraints ( ) const
inline

Return the update-constraints flag.

Definition at line 271 of file sixDoFRigidBodyMotionI.H.

◆ time()

const Foam::Time & time ( ) const
inline

Return time.

Definition at line 261 of file sixDoFRigidBodyMotionI.H.

Referenced by linearSpringDamper::restrain(), sixDoFRigidBodyMotion(), sixDoFRigidBodyMotion(), and sixDoFSolver.

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 277 of file sixDoFRigidBodyMotionI.H.

◆ centreOfRotation() [2/2]

Foam::point & centreOfRotation ( )
inline

Return non-const access to the centre of rotation.

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

References dict, sixDoFRigidBodyMotionRestraint::New(), and DLListBase::size().

Referenced by read(), and 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 223 of file sixDoFRigidBodyMotion.C.

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

Referenced by read(), and 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 328 of file sixDoFRigidBodyMotion.C.

References UPstream::broadcast, UPstream::master(), and status().

Here is the call graph for this function:

◆ status()

void status ( ) const

Report the status of the motion.

Definition at line 351 of file sixDoFRigidBodyMotion.C.

References centreOfMass(), centreOfRotation(), Foam::endl(), Foam::Info, Foam::nl, omega(), orientation(), and v().

Referenced by update().

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

◆ velocity()

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

Return the velocity of a position.

Definition at line 289 of file sixDoFRigidBodyMotionI.H.

References centreOfRotation(), omega(), and v().

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

Here is the call graph for this function:
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 298 of file sixDoFRigidBodyMotionI.H.

References centreOfRotation().

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

Here is the call graph for this function:
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 363 of file sixDoFRigidBodyMotion.C.

References centreOfRotation().

Here is the call graph for this function:

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

References centreOfRotation(), forAll, septernion::I, septernion::invTransformPoint(), tmp< T >::New(), points, 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 47 of file sixDoFRigidBodyMotionIO.C.

References forAll, Foam::indent(), name, os(), and Foam::type().

Here is the call 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 28 of file sixDoFRigidBodyMotionIO.C.

References addConstraints(), addRestraints(), and dict.

Here is the call graph for this function:

◆ sixDoFSolver

friend class sixDoFSolver
friend

Definition at line 67 of file sixDoFRigidBodyMotion.H.

References dict, sixDoFRigidBodyMotion(), sixDoFSolver, and time().

Referenced by sixDoFRigidBodyMotion(), and sixDoFSolver.


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