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 | bodyID () 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 | 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 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 44 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 31 of file rigidBodyRestraintI.H.
References restraint::bodyPointVelocity(), and Foam::Zero.
|
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().
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 externalForce, linearSpring, linearAxialAngularSpring, sphericalAngularDamper, and linearDamper.
|
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.
|
inline |
|
inline |
Definition at line 155 of file rigidBodyRestraint.H.
References restraint::bodyID_, restraint::coeffDict(), restraint::read(), restraint::restrain(), and restraint::write().
|
pure virtual |
Accumulate the retraint internal joint forces into the tau field and.
external forces into the fx field
Implemented in externalForce, linearSpring, linearAxialAngularSpring, sphericalAngularDamper, and linearDamper.
Referenced by restraint::bodyID().
|
virtual |
Update properties from given dictionary.
Reimplemented in externalForce, 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(), linearSpring::read(), and externalForce::read().
const Foam::dictionary & coeffDict | ( | ) | const |
Return access to coeffs.
Definition at line 66 of file rigidBodyRestraint.C.
Referenced by restraint::bodyID().
|
pure virtual |
Write.
Implemented in externalForce, 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(), linearSpring::write(), and externalForce::write().
|
protected |
Name of the restraint.
Definition at line 74 of file rigidBodyRestraint.H.
Referenced by restraint::name().
|
protected |
ID of the body the restraint is applied to.
Definition at line 77 of file rigidBodyRestraint.H.
Referenced by restraint::bodyID().
|
protected |
Index of the body the force 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.