Base class for defining restraints for rigid-body dynamics. More...
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< restraint > | clone () const =0 |
Construct and return a clone. More... | |
virtual | ~restraint () |
Destructor. More... | |
const word & | name () const |
Return the name. More... | |
label | bodyIndex () const |
virtual void | restrain (scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) 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 dictionary & | coeffDict () const |
Return access to coeffs. More... | |
virtual void | write (Ostream &) const =0 |
Write. More... | |
Static Public Member Functions | |
static autoPtr< restraint > | New (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 | bodyIndex_ |
Index of the body the restraint is applied to. More... | |
label | masterBodyIndex_ |
Index of the master body the restraint is applied to. More... | |
dictionary | coeffs_ |
Restraint model specific coefficient dictionary. More... | |
const rigidBodyModel & | model_ |
Reference to the model. More... | |
Base class for defining restraints for rigid-body dynamics.
Definition at line 66 of file rigidBodyRestraint.H.
restraint | ( | const word & | name, |
const dictionary & | dict, | ||
const rigidBodyModel & | model | ||
) |
Construct from the dict dictionary and Time.
Definition at line 43 of file rigidBodyRestraint.C.
|
virtual |
Destructor.
Definition at line 60 of file rigidBodyRestraint.C.
|
inlineprotected |
Transform the given point on the restrained body to the global frame.
Definition at line 30 of file rigidBodyRestraintI.H.
References restraint::bodyIndex_, restraint::model_, p, and rigidBodyModel::p().
|
inlineprotected |
Transform the velocity of the given point on the restrained body.
to the global frame
Definition at line 39 of file rigidBodyRestraintI.H.
References p.
TypeName | ( | "restraint" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
restraint | , | ||
dictionary | , | ||
(const word &name, const dictionary &dict, const rigidBodyModel &model) | , | ||
(name, dict, model) | |||
) |
Construct and return a clone.
Implemented in sphericalAngularDamper, linearSpring, linearDamper, linearAxialAngularSpring, and externalForce.
|
static |
Select constructed from the dict dictionary and Time.
Definition at line 31 of file rigidBodyRestraintNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, restraint::name(), and Foam::nl.
|
inline |
Return the name.
Definition at line 150 of file rigidBodyRestraint.H.
References restraint::name_.
Referenced by restraint::New().
|
inline |
Definition at line 155 of file rigidBodyRestraint.H.
References restraint::bodyIndex_.
|
pure virtual |
Accumulate the retraint internal joint forces into the tau field and.
external forces into the fx field
Implemented in sphericalAngularDamper, linearSpring, linearDamper, linearAxialAngularSpring, and externalForce.
|
virtual |
Update properties from given dictionary.
Reimplemented in sphericalAngularDamper, linearSpring, linearDamper, linearAxialAngularSpring, and externalForce.
Definition at line 72 of file rigidBodyRestraint.C.
References dict.
Referenced by externalForce::read(), linearAxialAngularSpring::read(), linearDamper::read(), linearSpring::read(), and sphericalAngularDamper::read().
const Foam::dictionary & coeffDict | ( | ) | const |
Return access to coeffs.
Definition at line 66 of file rigidBodyRestraint.C.
|
pure virtual |
Write.
Implemented in sphericalAngularDamper, linearSpring, linearDamper, linearAxialAngularSpring, and externalForce.
Definition at line 79 of file rigidBodyRestraint.C.
References IOstream::name(), Foam::type(), and Foam::writeEntry().
Referenced by externalForce::write(), linearAxialAngularSpring::write(), linearDamper::write(), linearSpring::write(), and sphericalAngularDamper::write().
|
protected |
Name of the restraint.
Definition at line 74 of file rigidBodyRestraint.H.
Referenced by restraint::name().
|
protected |
Index of the body the restraint is applied to.
Definition at line 77 of file rigidBodyRestraint.H.
Referenced by restraint::bodyIndex(), and restraint::bodyPoint().
|
protected |
Index of the master body the restraint is applied to.
Definition at line 80 of file rigidBodyRestraint.H.
|
protected |
Restraint model specific coefficient dictionary.
Definition at line 83 of file rigidBodyRestraint.H.
|
protected |
Reference to the model.
Definition at line 86 of file rigidBodyRestraint.H.
Referenced by restraint::bodyPoint().