pointMasses Class Reference

Specialisation of rigidBody to construct a pointMasses given the mass and lengths of the sides. More...

Inheritance diagram for pointMasses:
Collaboration diagram for pointMasses:

Public Member Functions

 TypeName ("pointMasses")
 Runtime type information. More...
 
 pointMasses (const word &name, const dictionary &dict)
 Construct from dictionary. More...
 
 pointMasses (const pointMasses &)
 Copy construct. More...
 
virtual autoPtr< rigidBodyclone () const
 Return clone of this pointMasses. More...
 
virtual ~pointMasses ()
 Destructor. More...
 
virtual tmp< scalarFieldsectionMu0s (const direction axis, const scalarField &distances) const
 Return the zeroth moments of the sections of the body between. More...
 
virtual tmp< vectorFieldsectionMu1s (const direction axis, const scalarField &distances) const
 Return the first moments of the sections of the body between. More...
 
virtual tmp< symmTensorFieldsectionMu2s (const direction axis, const scalarField &distances) const
 Return the second moments of the sections of the body between. More...
 
virtual void write (Ostream &) const
 Write. More...
 
template<class Type , class Op >
Foam::tmp< Foam::Field< Type > > sectionMuNs (const direction axis, const scalarField &distances, const Op &op) const
 
- Public Member Functions inherited from rigidBody
 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 ~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...
 
- 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 &)
 

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. 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...
 

Detailed Description

Specialisation of rigidBody to construct a pointMasses given the mass and lengths of the sides.

Source files

Definition at line 54 of file pointMasses.H.

Constructor & Destructor Documentation

◆ pointMasses() [1/2]

pointMasses ( const word name,
const dictionary dict 
)

Construct from dictionary.

Definition at line 106 of file pointMasses.C.

References Foam::dimLength, and Foam::dimMass.

◆ pointMasses() [2/2]

pointMasses ( const pointMasses pm)

Copy construct.

Definition at line 177 of file pointMasses.C.

◆ ~pointMasses()

~pointMasses ( )
virtual

Destructor.

Definition at line 195 of file pointMasses.C.

Member Function Documentation

◆ TypeName()

TypeName ( "pointMasses"  )

Runtime type information.

◆ clone()

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

Return clone of this pointMasses.

Reimplemented from rigidBody.

Definition at line 187 of file pointMasses.C.

◆ sectionMu0s()

Foam::tmp< Foam::scalarField > sectionMu0s ( const direction  axis,
const scalarField distances 
) const
virtual

Return the zeroth moments of the sections of the body between.

planes defined by distances along the given axis

Reimplemented from rigidBody.

Definition at line 201 of file pointMasses.C.

◆ sectionMu1s()

Foam::tmp< Foam::vectorField > sectionMu1s ( const direction  axis,
const scalarField distances 
) const
virtual

Return the first moments of the sections of the body between.

planes defined by distances along the given axis

Reimplemented from rigidBody.

Definition at line 217 of file pointMasses.C.

References p.

◆ sectionMu2s()

Foam::tmp< Foam::symmTensorField > sectionMu2s ( const direction  axis,
const scalarField distances 
) const
virtual

Return the second moments of the sections of the body between.

planes defined by distances along the given axis

Reimplemented from rigidBody.

Definition at line 233 of file pointMasses.C.

References p, and Foam::sqr().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

◆ sectionMuNs()

Foam::tmp<Foam::Field<Type> > sectionMuNs ( const direction  axis,
const scalarField distances,
const Op op 
) const

Definition at line 47 of file pointMasses.C.

References b, tmp< T >::ref(), UIndirectList< T >::size(), List< T >::size(), and Foam::sortedOrder().

Here is the call graph for this function:

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