Loading...
Searching...
No Matches
sphere Class Reference

#include <sphere.H>

Inheritance diagram for sphere:
Collaboration diagram for sphere:

Public Member Functions

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

Additional Inherited Members

Static Public Member Functions inherited from rigidBody
static autoPtr< rigidBodyNew (const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
 Select constructed from components.
static autoPtr< rigidBodyNew (const word &name, const dictionary &dict)
 Select constructed from name and dictionary.
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.

Detailed Description

Definition at line 52 of file sphere.H.

Constructor & Destructor Documentation

◆ sphere() [1/2]

sphere ( const word & name,
const scalar m,
const vector & c,
const scalar r )
inline

Construct from name, mass, centre of mass and radius.

Definition at line 35 of file sphereI.H.

References rigidBodyInertia::c(), rigidBodyInertia::m(), rigidBody::name(), r(), and rigidBody::rigidBody().

Referenced by clone().

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

◆ sphere() [2/2]

sphere ( const word & name,
const dictionary & dict )
inline

Construct from dictionary.

Definition at line 48 of file sphereI.H.

References rigidBodyInertia::c(), dict, Foam::I, rigidBodyInertia::m(), rigidBody::name(), rigidBody::rigidBody(), and rigidBodyInertia::rigidBodyInertia().

Here is the call graph for this function:

◆ ~sphere()

~sphere ( )
virtual

Destructor.

Definition at line 52 of file sphere.C.

Member Function Documentation

◆ TypeName()

TypeName ( "sphere" )

Runtime type information.

References rigidBodyInertia::c(), dict, rigidBodyInertia::m(), rigidBody::name(), and r().

Here is the call graph for this function:

◆ clone()

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

Return clone of this sphere.

Reimplemented from rigidBody.

Definition at line 44 of file sphere.C.

References sphere().

Here is the call graph for this function:

◆ r()

Foam::scalar r ( ) const
inline

Return the radius of the sphere.

Definition at line 65 of file sphereI.H.

Referenced by sphere(), TypeName(), and write().

Here is the caller graph for this function:

◆ write()

void write ( Ostream & os) const
virtual

Write.

Reimplemented from rigidBody.

Definition at line 58 of file sphere.C.

References rigidBodyInertia::m(), os(), r(), and Foam::type().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • src/rigidBodyDynamics/bodies/sphere/sphere.H
  • src/rigidBodyDynamics/bodies/sphere/sphere.C
  • src/rigidBodyDynamics/bodies/sphere/sphereI.H