restraint Class Referenceabstract

Base class for defining restraints for rigid-body dynamics. More...

Inheritance diagram for restraint:
[legend]
Collaboration diagram for restraint:
[legend]

Public Member Functions

 TypeName ("restraint")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, restraint, dictionary,(const word &name, const dictionary &dict, const rigidBodyModel &model),(name, dict, model))
 
 restraint (const word &name, const dictionary &dict, const rigidBodyModel &model)
 Construct from the dict dictionary and Time. More...
 
virtual autoPtr< restraintclone () const =0
 Construct and return a clone. More...
 
virtual ~restraint ()
 Destructor. More...
 
const wordname () const
 Return the name. More...
 
label bodyID () const
 
virtual void restrain (scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const =0
 Accumulate the restraint internal joint forces into the tau field and. More...
 
virtual bool read (const dictionary &dict)
 Update properties from given dictionary. More...
 
const dictionarycoeffDict () const
 Return access to coeffs. More...
 
virtual void write (Ostream &) const =0
 Write. More...
 

Static Public Member Functions

static autoPtr< restraintNew (const word &name, const dictionary &dict, const rigidBodyModel &model)
 Select constructed from the dict dictionary and Time. More...
 

Protected Member Functions

point bodyPoint (const point &p) const
 Transform the given point on the restrained body to the global frame. More...
 
spatialVector bodyPointVelocity (const point &p) const
 Transform the velocity of the given point on the restrained body. More...
 

Protected Attributes

word name_
 Name of the restraint. More...
 
label bodyID_
 ID of the body the restraint is applied to. More...
 
label bodyIndex_
 Index of the body the force is applied to. More...
 
dictionary coeffs_
 Restraint model specific coefficient dictionary. More...
 
const rigidBodyModelmodel_
 Reference to the model. More...
 

Detailed Description

Base class for defining restraints for rigid-body dynamics.

Source files

Definition at line 68 of file rigidBodyRestraint.H.

Constructor & Destructor Documentation

◆ restraint()

restraint ( const word name,
const dictionary dict,
const rigidBodyModel model 
)

Construct from the dict dictionary and Time.

Definition at line 45 of file rigidBodyRestraint.C.

References Foam::name().

Here is the call graph for this function:

◆ ~restraint()

~restraint ( )
virtual

Destructor.

Definition at line 62 of file rigidBodyRestraint.C.

Member Function Documentation

◆ bodyPoint()

Foam::point bodyPoint ( const point p) const
inlineprotected

Transform the given point on the restrained body to the global frame.

Definition at line 32 of file rigidBodyRestraintI.H.

References restraint::bodyID_, spatialTransform::inv(), restraint::model_, p, rigidBodyModel::X0(), and Foam::Zero.

Here is the call graph for this function:

◆ bodyPointVelocity()

Foam::spatialVector bodyPointVelocity ( const point p) const
inlineprotected

Transform the velocity of the given point on the restrained body.

to the global frame

Definition at line 41 of file rigidBodyRestraintI.H.

References p.

◆ TypeName()

TypeName ( "restraint"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
restraint  ,
dictionary  ,
(const word &name, const dictionary &dict, const rigidBodyModel &model)  ,
(name, dict, model)   
)

◆ clone()

virtual autoPtr< restraint > clone ( ) const
pure virtual

◆ New()

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

Select constructed from the dict dictionary and Time.

Definition at line 34 of file rigidBodyRestraintNew.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), and restraint::name().

Here is the call graph for this function:

◆ name()

const word & name ( ) const
inline

Return the name.

Definition at line 152 of file rigidBodyRestraint.H.

References restraint::name_.

Referenced by restraint::New().

Here is the caller graph for this function:

◆ bodyID()

label bodyID ( ) const
inline

Definition at line 157 of file rigidBodyRestraint.H.

References restraint::bodyID_.

◆ restrain()

virtual void restrain ( scalarField tau,
Field< spatialVector > &  fx,
const rigidBodyModelState state 
) const
pure virtual

Accumulate the restraint internal joint forces into the tau field and.

external forces into the fx field

Implemented in externalForce, linearAxialAngularSpring, linearDamper, linearSpring, prescribedRotation, softWall, and sphericalAngularDamper.

◆ read()

bool read ( const dictionary dict)
virtual

Update properties from given dictionary.

Reimplemented in externalForce, linearAxialAngularSpring, linearDamper, linearSpring, prescribedRotation, softWall, and sphericalAngularDamper.

Definition at line 74 of file rigidBodyRestraint.C.

References dict.

◆ coeffDict()

const Foam::dictionary & coeffDict ( ) const

Return access to coeffs.

Definition at line 68 of file rigidBodyRestraint.C.

◆ write()

void write ( Ostream os) const
pure virtual

Write.

Implemented in externalForce, linearAxialAngularSpring, linearDamper, linearSpring, prescribedRotation, softWall, and sphericalAngularDamper.

Definition at line 81 of file rigidBodyRestraint.C.

References os(), and Foam::type().

Here is the call graph for this function:

Member Data Documentation

◆ name_

word name_
protected

Name of the restraint.

Definition at line 76 of file rigidBodyRestraint.H.

Referenced by restraint::name().

◆ bodyID_

label bodyID_
protected

ID of the body the restraint is applied to.

Definition at line 79 of file rigidBodyRestraint.H.

Referenced by restraint::bodyID(), and restraint::bodyPoint().

◆ bodyIndex_

label bodyIndex_
protected

Index of the body the force is applied to.

Definition at line 82 of file rigidBodyRestraint.H.

◆ coeffs_

dictionary coeffs_
protected

Restraint model specific coefficient dictionary.

Definition at line 85 of file rigidBodyRestraint.H.

◆ model_

const rigidBodyModel& model_
protected

Reference to the model.

Definition at line 88 of file rigidBodyRestraint.H.

Referenced by restraint::bodyPoint().


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