restraint Class Referenceabstract

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

Inheritance diagram for restraint:
Collaboration diagram for restraint:

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 =0
 Accumulate the retraint 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 65 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 44 of file rigidBodyRestraint.C.

◆ ~restraint()

~restraint ( )
virtual

Destructor.

Definition at line 60 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 31 of file rigidBodyRestraintI.H.

References restraint::bodyPointVelocity(), 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 40 of file rigidBodyRestraintI.H.

Referenced by restraint::bodyPoint().

Here is the caller graph for this function:

◆ 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

Construct and return a clone.

Implemented in linearSpring, linearAxialAngularSpring, sphericalAngularDamper, and linearDamper.

◆ 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 32 of file rigidBodyRestraintNew.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 word& name ( ) const
inline

Return the name.

Definition at line 149 of file rigidBodyRestraint.H.

References restraint::name_.

◆ bodyID()

label bodyID ( ) const
inline

Definition at line 154 of file rigidBodyRestraint.H.

References restraint::bodyID_, restraint::coeffDict(), restraint::read(), restraint::restrain(), and restraint::write().

Here is the call graph for this function:

◆ restrain()

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

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

external forces into the fx field

Implemented in linearSpring, linearAxialAngularSpring, sphericalAngularDamper, and linearDamper.

Referenced by restraint::bodyID().

Here is the caller graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Update properties from given dictionary.

Reimplemented in linearSpring, linearAxialAngularSpring, sphericalAngularDamper, and linearDamper.

Definition at line 72 of file rigidBodyRestraint.C.

References dict.

Referenced by restraint::bodyID(), linearDamper::read(), sphericalAngularDamper::read(), linearAxialAngularSpring::read(), and linearSpring::read().

Here is the caller graph for this function:

◆ coeffDict()

const Foam::dictionary & coeffDict ( ) const

Return access to coeffs.

Definition at line 66 of file rigidBodyRestraint.C.

Referenced by restraint::bodyID().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
pure virtual

Write.

Implemented in linearSpring, linearAxialAngularSpring, sphericalAngularDamper, and linearDamper.

Definition at line 79 of file rigidBodyRestraint.C.

References IOstream::name(), Foam::type(), and Foam::writeEntry().

Referenced by restraint::bodyID(), linearDamper::write(), sphericalAngularDamper::write(), linearAxialAngularSpring::write(), and linearSpring::write().

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

Member Data Documentation

◆ name_

word name_
protected

Name of the restraint.

Definition at line 73 of file rigidBodyRestraint.H.

Referenced by restraint::name().

◆ bodyID_

label bodyID_
protected

ID of the body the restraint is applied to.

Definition at line 76 of file rigidBodyRestraint.H.

Referenced by restraint::bodyID().

◆ bodyIndex_

label bodyIndex_
protected

Index of the body the force is applied to.

Definition at line 79 of file rigidBodyRestraint.H.

◆ coeffs_

dictionary coeffs_
protected

Restraint model specific coefficient dictionary.

Definition at line 82 of file rigidBodyRestraint.H.

◆ model_

const rigidBodyModel& model_
protected

Reference to the model.

Definition at line 85 of file rigidBodyRestraint.H.


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