rigidBody Class Reference
Inheritance diagram for rigidBody:
Collaboration diagram for rigidBody:

Public Member Functions

 TypeName ("rigidBody")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, rigidBody, dictionary,(const word &name, const dictionary &dict),(name, dict))
 
 rigidBody (const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
 Construct from mass, centre of mass and moment of inertia tensor. More...
 
 rigidBody (const word &name, const rigidBodyInertia &rbi)
 Construct from with the given rigidBodyInertia. More...
 
 rigidBody (const word &name, const dictionary &dict)
 Construct from dictionary. More...
 
virtual autoPtr< rigidBodyclone () const
 Return clone of this rigidBody. More...
 
virtual ~rigidBody ()
 Destructor. More...
 
const wordname () const
 Return name. More...
 
virtual bool massless () const
 Return false as this body is not massless. More...
 
void merge (const subBody &)
 Merge a body into this parent body. More...
 
virtual void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from rigidBodyInertia
 rigidBodyInertia ()
 Null constructor, initialises to zero. More...
 
 rigidBodyInertia (const scalar m, const vector &c, const symmTensor &Ic)
 Construct from mass, centre of mass and moment of inertia tensor. More...
 
 rigidBodyInertia (const dictionary &dict)
 Construct from dictionary. More...
 
 rigidBodyInertia (const spatialTensor &st)
 Construct from the components of a spatial tensor. More...
 
 rigidBodyInertia (Istream &is)
 Construct from Istream. More...
 
scalar m () const
 Return the mass of the rigid-body. More...
 
const vectorc () const
 Return the centre of mass of the rigid-body. More...
 
const symmTensorIc () const
 Return the inertia tensor of the rigid-body about the centre of mass. More...
 
symmTensor Ioc () const
 Return the difference between the inertia tensor of the rigid-body. More...
 
symmTensor Icc (const vector &c) const
 Return the difference between the inertia tensor of the rigid-body. More...
 
symmTensor Io () const
 Return the inertia tensor of the rigid-body about the origin. More...
 
scalar kineticEnergy (const spatialVector &v)
 Return the kinetic energy of the body with the given velocity. More...
 
 operator spatialTensor () const
 Conversion to spatial tensor. More...
 
void operator+= (const rigidBodyInertia &)
 

Static Public Member Functions

static autoPtr< rigidBodyNew (const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
 Select constructed from components. More...
 
static autoPtr< rigidBodyNew (const word &name, const dictionary &dict)
 Select constructed from name and dictionary. More...
 
- Static Public Member Functions inherited from rigidBodyInertia
static symmTensor Ioc (const scalar m, const vector &c)
 Return the difference between the inertia tensor of the rigid-body. More...
 

Friends

Ostreamoperator<< (Ostream &, const rigidBody &)
 

Detailed Description

Source files

Definition at line 60 of file rigidBody.H.

Constructor & Destructor Documentation

◆ rigidBody() [1/3]

rigidBody ( const word name,
const scalar &  m,
const vector c,
const symmTensor Ic 
)
inline

Construct from mass, centre of mass and moment of inertia tensor.

about the centre of mass

Definition at line 29 of file rigidBodyI.H.

Referenced by rigidBody::rigidBody().

Here is the caller graph for this function:

◆ rigidBody() [2/3]

rigidBody ( const word name,
const rigidBodyInertia rbi 
)
inline

Construct from with the given rigidBodyInertia.

Definition at line 42 of file rigidBodyI.H.

References rigidBody::rigidBody().

Here is the call graph for this function:

◆ rigidBody() [3/3]

rigidBody ( const word name,
const dictionary dict 
)
inline

Construct from dictionary.

Definition at line 53 of file rigidBodyI.H.

◆ ~rigidBody()

~rigidBody ( )
virtual

Destructor.

Definition at line 98 of file rigidBody.C.

Member Function Documentation

◆ TypeName()

TypeName ( "rigidBody"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
rigidBody  ,
dictionary  ,
(const word &name, const dictionary &dict ,
(name, dict  
)

◆ clone()

Foam::autoPtr< Foam::RBD::rigidBody > clone ( ) const
virtual

Return clone of this rigidBody.

Reimplemented in cuboid, sphere, jointBody, masslessBody, and compositeBody.

Definition at line 51 of file rigidBody.C.

References rigidBody::New().

Here is the call graph for this function:

◆ New() [1/2]

Foam::autoPtr< Foam::RBD::rigidBody > New ( const word name,
const scalar &  m,
const vector c,
const symmTensor Ic 
)
static

Select constructed from components.

Definition at line 60 of file rigidBody.C.

Referenced by rigidBody::clone(), and rigidBodyModel::rigidBodyModel().

Here is the caller graph for this function:

◆ New() [2/2]

Foam::autoPtr< Foam::RBD::rigidBody > New ( const word name,
const dictionary dict 
)
static

Select constructed from name and dictionary.

Definition at line 72 of file rigidBody.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, dictionary::lookup(), Foam::name(), and Foam::nl.

Here is the call graph for this function:

◆ name()

const Foam::word & name ( ) const
inline

Return name.

Definition at line 65 of file rigidBodyI.H.

Referenced by rigidBodyModel::join_().

Here is the caller graph for this function:

◆ massless()

bool massless ( ) const
virtual

Return false as this body is not massless.

Reimplemented in masslessBody.

Definition at line 104 of file rigidBody.C.

◆ merge()

void merge ( const subBody subBody)

Merge a body into this parent body.

Definition at line 110 of file rigidBody.C.

References subBody::body(), subBody::masterXT(), Foam::name(), and Foam::RBD::transform().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented in cuboid, sphere, masslessBody, and compositeBody.

Definition at line 120 of file rigidBody.C.

References Foam::constant::universal::c, Foam::type(), and Foam::writeEntry().

Referenced by Foam::RBD::operator<<().

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

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const rigidBody  
)
friend

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