Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints. More...
Public Member Functions | |
TypeName ("rigidBodyModel") | |
rigidBodyModel (const Time &time) | |
rigidBodyModel (const Time &time, const dictionary &dict) | |
virtual | ~rigidBodyModel () |
const Time & | time () const |
label | nBodies () const |
PtrList< rigidBody > | bodies () const |
const DynamicList< label > & | lambda () const |
const PtrList< joint > & | joints () const |
label | nDoF () const |
bool | unitQuaternions () const |
const vector & | g () const |
vector & | g () |
const word & | name (const label bodyID) const |
const rigidBodyInertia & | I (const label i) const |
const spatialVector & | v (const label i) const |
const spatialVector & | a (const label i) const |
virtual label | join (const label parentID, const spatialTransform &XT, autoPtr< joint > jointPtr, autoPtr< rigidBody > bodyPtr) |
label | join (const label parentID, const spatialTransform &XT, autoPtr< joints::composite > cJoint, autoPtr< rigidBody > bodyPtr) |
label | merge (const label parentID, const spatialTransform &X, autoPtr< rigidBody > bodyPtr) |
bool | merged (label bodyID) const |
label | master (label bodyID) const |
label | mergedBodyIndex (const label mergedBodyID) const |
label | mergedBodyID (const label mergedBodyIndex) const |
const subBody & | mergedBody (label mergedBodyID) const |
label | bodyID (const word &name) const |
spatialTransform | X0 (const label bodyId) const |
vector | masterPoint (const label bodyID, const vector &p) const |
spatialVector | v (const label bodyID, const vector &p) const |
void | applyRestraints (scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const |
void | forwardDynamics (rigidBodyModelState &state, const scalarField &tau, const Field< spatialVector > &fx) const |
void | forwardDynamicsCorrection (const rigidBodyModelState &state) const |
virtual void | write (Ostream &) const |
bool | read (const dictionary &dict) |
Protected Member Functions | |
virtual label | join_ (const label parentID, const spatialTransform &XT, autoPtr< joint > jointPtr, autoPtr< rigidBody > bodyPtr) |
Protected Attributes | |
const Time & | time_ |
PtrList< rigidBody > | bodies_ |
PtrList< subBody > | mergedBodies_ |
HashTable< label > | bodyIDs_ |
DynamicList< label > | lambda_ |
PtrList< joint > | joints_ |
DynamicList< spatialTransform > | XT_ |
label | nDoF_ |
bool | unitQuaternions_ |
PtrList< restraint > | restraints_ |
vector | g_ |
DynamicList< spatialTransform > | Xlambda_ |
DynamicList< spatialTransform > | X0_ |
DynamicList< spatialVector > | v_ |
DynamicList< spatialVector > | a_ |
DynamicList< spatialVector > | c_ |
DynamicList< spatialTensor > | IA_ |
DynamicList< spatialVector > | pA_ |
DynamicList< compactSpatialTensor > | S_ |
DynamicList< spatialVector > | S1_ |
DynamicList< compactSpatialTensor > | U_ |
DynamicList< spatialVector > | U1_ |
DynamicList< tensor > | Dinv_ |
DynamicList< vector > | u_ |
Friends | |
Ostream & | operator<< (Ostream &, const rigidBodyModel &) |
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
This class holds various body and joint state fields needed by the kinematics and forward-dynamics algorithms presented in
reference:
Featherstone, R. (2008). Rigid body dynamics algorithms. Springer. Chapter 4.
Definition at line 79 of file rigidBodyModel.H.
rigidBodyModel | ( | const Time & | time | ) |
Definition at line 162 of file rigidBodyModel.C.
rigidBodyModel | ( | const Time & | time, |
const dictionary & | dict | ||
) |
Definition at line 172 of file rigidBodyModel.C.
References dict, dictionary::found(), dictionary::get(), Foam::glTF::key(), rigidBody::New(), joint::New(), Foam::read(), and dictionary::subDict().
|
virtual |
Definition at line 217 of file rigidBodyModel.C.
|
protectedvirtual |
Definition at line 116 of file rigidBodyModel.C.
References subBody::masterID(), subBody::masterXT(), rigidBody::name(), joint::nDoF(), and joint::unitQuaternion().
TypeName | ( | "rigidBodyModel" | ) |
|
inline |
Definition at line 24 of file rigidBodyModelI.H.
References rigidBodyModel::time_.
Referenced by rigidBodyMotion::read().
|
inline |
Definition at line 30 of file rigidBodyModelI.H.
|
inline |
Definition at line 37 of file rigidBodyModelI.H.
|
inline |
Definition at line 44 of file rigidBodyModelI.H.
|
inline |
Definition at line 51 of file rigidBodyModelI.H.
|
inline |
Definition at line 57 of file rigidBodyModelI.H.
Referenced by rigidBodyModelState::rigidBodyModelState().
|
inline |
Definition at line 63 of file rigidBodyModelI.H.
|
inline |
Definition at line 69 of file rigidBodyModelI.H.
|
inline |
|
inline |
Definition at line 82 of file rigidBodyModelI.H.
|
inline |
Definition at line 98 of file rigidBodyModelI.H.
|
inline |
Definition at line 105 of file rigidBodyModelI.H.
|
inline |
Definition at line 111 of file rigidBodyModelI.H.
|
virtual |
Definition at line 224 of file rigidBodyModel.C.
References autoPtr::ptr().
Foam::label join | ( | const label | parentID, |
const spatialTransform & | XT, | ||
autoPtr< joints::composite > | cJoint, | ||
autoPtr< rigidBody > | bodyPtr | ||
) |
Definition at line 258 of file rigidBodyModel.C.
References autoPtr::ptr().
Foam::label merge | ( | const label | parentID, |
const spatialTransform & | X, | ||
autoPtr< rigidBody > | bodyPtr | ||
) |
Definition at line 316 of file rigidBodyModel.C.
References subBody::masterID(), subBody::masterXT(), subBody::name(), Foam::name(), and autoPtr::reset().
|
inline |
Definition at line 116 of file rigidBodyModelI.H.
|
inline |
Definition at line 122 of file rigidBodyModelI.H.
|
inline |
Definition at line 143 of file rigidBodyModelI.H.
|
inline |
Definition at line 136 of file rigidBodyModelI.H.
|
inline |
Definition at line 150 of file rigidBodyModelI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
Definition at line 163 of file rigidBodyModelI.H.
References Foam::name().
Foam::spatialTransform X0 | ( | const label | bodyId | ) | const |
Definition at line 374 of file rigidBodyModel.C.
References subBody::masterID(), and subBody::masterXT().
|
inline |
Definition at line 170 of file rigidBodyModelI.H.
References Foam::inv(), p, and Foam::Zero.
|
inline |
void applyRestraints | ( | scalarField & | tau, |
Field< spatialVector > & | fx, | ||
const rigidBodyModelState & | state | ||
) | const |
Definition at line 28 of file forwardDynamics.C.
void forwardDynamics | ( | rigidBodyModelState & | state, |
const scalarField & | tau, | ||
const Field< spatialVector > & | fx | ||
) | const |
Definition at line 50 of file forwardDynamics.C.
References Field::block(), joint::XSvc::c, DebugInfo, DebugInFunction, Foam::endl(), Foam::I, Foam::inv(), joint::jcalc(), joint::nDoF(), Foam::nl, rigidBodyModelState::q(), rigidBodyModelState::qDdot(), rigidBodyModelState::qDot(), joint::XSvc::S, joint::XSvc::S1, T, joint::XSvc::v, x, Vector< Cmpt >::x(), joint::XSvc::X, Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Foam::Zero.
Referenced by rigidBodyMotion::forwardDynamics().
void forwardDynamicsCorrection | ( | const rigidBodyModelState & | state | ) | const |
Definition at line 203 of file forwardDynamics.C.
References Field::block(), joint::XSvc::c, DebugInfo, DebugInFunction, Foam::endl(), joint::jcalc(), joint::nDoF(), rigidBodyModelState::q(), rigidBodyModelState::qDdot(), rigidBodyModelState::qDot(), joint::XSvc::S, joint::XSvc::S1, joint::XSvc::v, joint::XSvc::X, and Foam::Zero.
|
virtual |
Reimplemented in rigidBodyMotion.
Definition at line 388 of file rigidBodyModel.C.
References Foam::endl(), forAll, Foam::indent(), Foam::name(), Foam::nl, and os().
Referenced by Foam::RBD::operator<<(), and rigidBodyMotion::write().
bool read | ( | const dictionary & | dict | ) |
Definition at line 449 of file rigidBodyModel.C.
References dict.
Referenced by rigidBodyMotion::read().
|
friend |
|
protected |
Definition at line 99 of file rigidBodyModel.H.
Referenced by rigidBodyModel::time().
Definition at line 107 of file rigidBodyModel.H.
Definition at line 113 of file rigidBodyModel.H.
|
protected |
Definition at line 116 of file rigidBodyModel.H.
|
protected |
Definition at line 119 of file rigidBodyModel.H.
Definition at line 122 of file rigidBodyModel.H.
|
protected |
Definition at line 125 of file rigidBodyModel.H.
|
protected |
Definition at line 129 of file rigidBodyModel.H.
|
protected |
Definition at line 132 of file rigidBodyModel.H.
Definition at line 135 of file rigidBodyModel.H.
|
protected |
Definition at line 141 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 147 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 150 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 156 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 159 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 162 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 170 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 173 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 179 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 182 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 185 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 188 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 191 of file rigidBodyModel.H.
|
mutableprotected |
Definition at line 194 of file rigidBodyModel.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.