Loading...
Searching...
No Matches
restraint Class Referenceabstract

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

#include <rigidBodyRestraint.H>

Inheritance diagram for restraint:
Collaboration diagram for restraint:

Public Member Functions

 TypeName ("restraint")
 Runtime type information.
 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.
virtual autoPtr< restraintclone () const =0
 Construct and return a clone.
virtual ~restraint ()
 Destructor.
const wordname () const
 Return the name.
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.
virtual bool read (const dictionary &dict)
 Update properties from given dictionary.
const dictionarycoeffDict () const
 Return access to coeffs.
virtual void write (Ostream &) const =0
 Write.

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

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 )

◆ ~restraint()

~restraint ( )
virtual

Destructor.

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

References bodyID_, model_, p, and Foam::Zero.

Referenced by linearSpring::restrain(), and softWall::restrain().

Here is the caller 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 34 of file rigidBodyRestraintI.H.

References bodyID_, model_, and p.

Referenced by linearSpring::restrain(), and softWall::restrain().

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

References dict, name(), and restraint().

Here is the call graph for this function:

◆ clone()

virtual autoPtr< restraint > clone ( ) const
pure virtual

Construct and return a clone.

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

References dict, and name().

Here is the call graph for this function:

◆ 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 27 of file rigidBodyRestraintNew.C.

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

Here is the call graph for this function:

◆ name()

◆ bodyID()

label bodyID ( ) const
inline

Definition at line 181 of file rigidBodyRestraint.H.

References bodyID_.

Referenced by restraint().

Here is the caller graph for this function:

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

References dict.

◆ read()

bool read ( const dictionary & dict)
virtual

◆ coeffDict()

const Foam::dictionary & coeffDict ( ) const

Return access to coeffs.

Definition at line 61 of file rigidBodyRestraint.C.

References coeffs_.

◆ write()

void write ( Ostream & os) const
pure virtual

Member Data Documentation

◆ name_

word name_
protected

Name of the restraint.

Definition at line 75 of file rigidBodyRestraint.H.

Referenced by name(), and restraint().

◆ bodyID_

◆ bodyIndex_

◆ coeffs_

◆ model_


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