Rigid-body mesh motion solver for fvMesh. More...
Public Member Functions | |
TypeName ("rigidBodyMotion") | |
Runtime type information. More... | |
rigidBodyMeshMotion (const word &name, const polyMesh &, const dictionary &dict) | |
Construct from polyMesh and dictionary. More... | |
rigidBodyMeshMotion (const rigidBodyMeshMotion &)=delete | |
Disallow default bitwise copy construction. More... | |
~rigidBodyMeshMotion () | |
Destructor. More... | |
virtual tmp< pointField > | curPoints () const |
Return point location obtained from the current motion field. More... | |
virtual void | solve () |
Solve for motion. More... | |
virtual void | topoChange (const polyTopoChangeMap &) |
Update local data for topology changes. More... | |
virtual bool | write () const |
Write motion state information for restart. More... | |
void | operator= (const rigidBodyMeshMotion &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from displacementMotionSolver | |
TypeName ("displacementMotionSolver") | |
Runtime type information. More... | |
displacementMotionSolver (const word &name, const polyMesh &, const dictionary &, const word &type) | |
Construct from mesh and dictionary. More... | |
displacementMotionSolver (const displacementMotionSolver &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~displacementMotionSolver () |
Destructor. More... | |
pointVectorField & | pointDisplacement () |
Return reference to the point motion displacement field. More... | |
const pointVectorField & | pointDisplacement () const |
Return const reference to the point motion displacement field. More... | |
virtual void | mapMesh (const polyMeshMap &) |
Update from another mesh using the given map. More... | |
void | operator= (const displacementMotionSolver &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from points0MotionSolver | |
TypeName ("points0MotionSolver") | |
Runtime type information. More... | |
points0MotionSolver (const word &name, const polyMesh &, const dictionary &, const word &type) | |
Construct from mesh and dictionary. More... | |
points0MotionSolver (const points0MotionSolver &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~points0MotionSolver () |
Destructor. More... | |
pointField & | points0 () |
Return reference to the reference field. More... | |
const pointField & | points0 () const |
Return reference to the reference field. More... | |
virtual void | movePoints (const pointField &) |
Update local data for geometry changes. More... | |
virtual void | distribute (const polyDistributionMap &) |
Update corresponding to the given distribution map. More... | |
void | operator= (const points0MotionSolver &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from motionSolver | |
TypeName ("motionSolver") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, motionSolver, dictionary,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict)) | |
motionSolver (const word &name, const polyMesh &mesh, const dictionary &, const word &type) | |
Construct from polyMesh and dictionary and type. More... | |
virtual autoPtr< motionSolver > | clone () const |
Clone function. More... | |
virtual | ~motionSolver () |
Destructor. More... | |
const word & | name () const |
Return name. More... | |
const word & | keyword () const |
Return keyword. More... | |
const polyMesh & | mesh () const |
Return reference to mesh. More... | |
const dictionary & | coeffDict () const |
Const access to the coefficients dictionary. More... | |
virtual tmp< pointField > | newPoints () |
Provide new points for motion. Solves for motion. More... | |
virtual void | twoDCorrectPoints (pointField &) const |
Public Member Functions inherited from rigidBodyMotion | |
rigidBodyMotion () | |
Construct null. More... | |
rigidBodyMotion (const dictionary &dict) | |
Construct from dictionary. More... | |
rigidBodyMotion (const dictionary &dict, const dictionary &stateDict) | |
Construct from constant and state dictionaries. More... | |
rigidBodyMotion (const rigidBodyMotion &) | |
Disallow default bitwise copy construction. More... | |
~rigidBodyMotion () | |
Destructor. More... | |
bool | report () const |
Return the report Switch. More... | |
const rigidBodyModelState & | state () const |
Return the motion state. More... | |
rigidBodyModelState & | state () |
Return the motion state for modification. More... | |
spatialTransform | X00 (const label bodyId) const |
Return the initial transform to the global frame for the. More... | |
void | newTime () |
Store the motion state at the beginning of the time-step. More... | |
void | forwardDynamics (rigidBodyModelState &state, const scalarField &tau, const Field< spatialVector > &fx) const |
Calculate and optionally relax the joint acceleration qDdot from. More... | |
void | solve (const scalar t, const scalar deltaT, const scalarField &tau, const Field< spatialVector > &fx) |
Integrate velocities, orientation and position. More... | |
void | status (const label bodyID) const |
Report the status of the motion of the given body. More... | |
spatialTransform | transform0 (const label bodyID) const |
Return the transformation of bodyID relative to the initial time. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
bool | read (const dictionary &dict) |
Read coefficients dictionary and update system parameters,. More... | |
void | operator= (const rigidBodyMotion &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from rigidBodyModel | |
TypeName ("rigidBodyModel") | |
Runtime type information. More... | |
rigidBodyModel () | |
Null-constructor which adds the single root-body at the origin. More... | |
rigidBodyModel (const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~rigidBodyModel () |
Destructor. More... | |
label | nBodies () const |
Return the number of bodies in the model (bodies().size()) More... | |
PtrList< rigidBody > | bodies () const |
Return the list of the bodies in the model. More... | |
const DynamicList< label > & | lambda () const |
List of indices of the parent of each body. More... | |
const PtrList< joint > & | joints () const |
Return the list of joints in the model. More... | |
label | nDoF () const |
Return the number of degrees of freedom of the model. More... | |
bool | unitQuaternions () const |
Return true if any of the joints using quaternions. More... | |
const vector & | g () const |
Return the acceleration due to gravity. More... | |
vector & | g () |
Allow the acceleration due to gravity to be set. More... | |
const word & | name (const label bodyID) const |
Return the name of body with the given ID. More... | |
wordList | movingBodyNames () const |
Return the names of the moving bodies. More... | |
const rigidBodyInertia & | I (const label i) const |
Return the inertia of body i. More... | |
const spatialVector & | v (const label i) const |
Return the spatial velocity of the bodies. More... | |
virtual label | join (const label parentID, const spatialTransform &XT, autoPtr< joint > jointPtr, autoPtr< rigidBody > bodyPtr) |
Join the given body to the parent with ID parentID via the given. More... | |
label | join (const label parentID, const spatialTransform &XT, autoPtr< joints::composite > cJoint, autoPtr< rigidBody > bodyPtr) |
Join the given body to the parent with ID parentID via the given. More... | |
label | merge (const label parentID, const spatialTransform &X, autoPtr< rigidBody > bodyPtr) |
Merge the given body with transform X into the parent with ID. More... | |
bool | merged (label bodyID) const |
Return true if the body with given ID has been merged with a parent. More... | |
label | master (label bodyID) const |
Return the ID of the master body for a sub-body otherwise. More... | |
label | mergedBodyIndex (const label mergedBodyID) const |
Return the index of the merged body in the mergedBody list. More... | |
label | mergedBodyID (const label mergedBodyIndex) const |
Return the merged body ID for the given merged body index. More... | |
const subBody & | mergedBody (label mergedBodyID) const |
Return the merged body for the given body ID. More... | |
label | bodyID (const word &name) const |
Return the ID of the body with the given name. More... | |
spatialTransform | X0 (const label bodyId) const |
Return the current transform to the global frame for the given body. More... | |
vector | masterPoint (const label bodyID, const vector &p) const |
spatialVector | v (const label bodyID, const vector &p) const |
Return the velocity of the given point on the given body. More... | |
void | applyRestraints (scalarField &tau, Field< spatialVector > &fx, const rigidBodyModelState &state) const |
Apply the restraints and accumulate the internal joint forces. More... | |
void | forwardDynamics (rigidBodyModelState &state, const scalarField &tau, const Field< spatialVector > &fx) const |
Calculate the joint acceleration qDdot from the joint state q,. More... | |
void | forwardDynamicsCorrection (const rigidBodyModelState &state) const |
Correct the velocity and acceleration of the bodies in the model. More... | |
bool | read (const dictionary &dict) |
Read coefficients dictionary and update system parameters,. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from points0MotionSolver | |
static pointVectorField | readPoints0 (const polyMesh &mesh) |
Static Public Member Functions inherited from motionSolver | |
static autoPtr< motionSolver > | New (const word &name, const polyMesh &, const dictionary &) |
Select constructed from polyMesh and dictionary. More... | |
Protected Member Functions inherited from rigidBodyModel | |
virtual label | join_ (const label parentID, const spatialTransform &XT, autoPtr< joint > jointPtr, autoPtr< rigidBody > bodyPtr) |
Join the given body to the parent with ID parentID via the given. More... | |
Protected Attributes inherited from displacementMotionSolver | |
pointVectorField | pointDisplacement_ |
Point motion field. More... | |
Protected Attributes inherited from points0MotionSolver | |
pointVectorField | points0_ |
Starting points. More... | |
Protected Attributes inherited from rigidBodyModel | |
PtrList< rigidBody > | bodies_ |
List of the bodies. More... | |
PtrList< subBody > | mergedBodies_ |
Bodies may be merged into existing bodies, the inertia of which is. More... | |
HashTable< label, word > | bodyIDs_ |
Lookup-table of the IDs of the bodies. More... | |
DynamicList< label > | lambda_ |
List of indices of the parent of each body. More... | |
PtrList< joint > | joints_ |
Each body it attached with a joint which are held on this list. More... | |
DynamicList< spatialTransform > | XT_ |
Transform from the parent body frame to the joint frame. More... | |
label | nDoF_ |
The number of degrees of freedom of the model. More... | |
bool | unitQuaternions_ |
True if any of the joints using quaternions. More... | |
PtrList< restraint > | restraints_ |
Motion restraints. More... | |
vector | g_ |
Acceleration due to gravity. More... | |
DynamicList< spatialTransform > | Xlambda_ |
Transform from the parent body to the current body. More... | |
DynamicList< spatialTransform > | X0_ |
Transform for external forces to the bodies reference frame. More... | |
DynamicList< spatialVector > | v_ |
The spatial velocity of the bodies. More... | |
DynamicList< spatialVector > | a_ |
The spatial acceleration of the bodies. More... | |
DynamicList< spatialVector > | c_ |
The velocity dependent spatial acceleration of the joints. More... | |
DynamicList< spatialTensor > | IA_ |
Velocity-product acceleration. More... | |
DynamicList< spatialVector > | pA_ |
Articulated body bias force. More... | |
DynamicList< compactSpatialTensor > | S_ |
Motion subspace for joints with 3 degrees of freedom. More... | |
DynamicList< spatialVector > | S1_ |
Motion subspace for joints with 1 degrees of freedom. More... | |
DynamicList< compactSpatialTensor > | U_ |
Sub-expression IA.S in the forward-dynamics algorithm. More... | |
DynamicList< spatialVector > | U1_ |
Sub-expression IA.S1 in the forward-dynamics algorithm. More... | |
DynamicList< tensor > | Dinv_ |
Sub-expression (S^T.U)^-1 in the forward-dynamics algorithm. More... | |
DynamicList< vector > | u_ |
Sub-expression tau - S^T.pA in the forward-dynamics algorithm. More... | |
Rigid-body mesh motion solver for fvMesh.
Applies septernion interpolation of movement as function of distance to the object surface.
Definition at line 53 of file rigidBodyMeshMotion.H.
rigidBodyMeshMotion | ( | const word & | name, |
const polyMesh & | mesh, | ||
const dictionary & | dict | ||
) |
Construct from polyMesh and dictionary.
Definition at line 137 of file rigidBodyMeshMotion.C.
References PtrList< T >::append(), rigidBodyModel::bodyID(), motionSolver::coeffDict(), pointConstraints::constrain(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter, dictionary::found(), motionSolver::keyword(), dictionary::lookup(), MeshObject< polyMesh, PatchMeshObject, pointMesh >::New(), MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New(), Function1< Type >::New(), points0MotionSolver::points0(), GeometricField< Type, PatchField, GeoMesh >::primitiveField(), and dictionary::subDict().
|
delete |
Disallow default bitwise copy construction.
~rigidBodyMeshMotion | ( | ) |
Destructor.
Definition at line 238 of file rigidBodyMeshMotion.C.
References Foam::cos(), Foam::max(), Foam::min(), and Foam::constant::mathematical::pi().
TypeName | ( | "rigidBodyMotion" | ) |
Runtime type information.
|
virtual |
Return point location obtained from the current motion field.
Implements motionSolver.
Definition at line 273 of file rigidBodyMeshMotion.C.
References displacementMotionSolver::pointDisplacement_, points0MotionSolver::points0(), and GeometricField< Type, PatchField, GeoMesh >::primitiveField().
|
virtual |
Solve for motion.
Implements motionSolver.
Definition at line 279 of file rigidBodyMeshMotion.C.
References dictionary::add(), Foam::average(), rigidBodyModel::bodyID(), forces::calcForcesMoment(), motionSolver::coeffDict(), TimeState::deltaTValue(), Foam::endl(), Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, forAll, forces::forceEff(), objectRegistry::foundObject(), rigidBodyModel::g(), septernion::I, objectRegistry::lookupObject(), UPstream::master(), motionSolver::mesh(), DimensionedField< Type, GeoMesh >::mesh(), forces::momentEff(), rigidBodyModel::nBodies(), rigidBodyModel::nDoF(), MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New(), rigidBodyMotion::newTime(), nPoints, primitiveMesh::nPoints(), displacementMotionSolver::pointDisplacement(), displacementMotionSolver::pointDisplacement_, points0MotionSolver::points0(), GeometricField< Type, PatchField, GeoMesh >::primitiveFieldRef(), rigidBodyMotion::report(), UPtrList< T >::size(), List< T >::size(), Foam::slerp(), rigidBodyMotion::solve(), rigidBodyMotion::status(), objectRegistry::time(), TimeState::timeIndex(), rigidBodyMotion::transform0(), septernion::transformPoint(), dimensioned< Type >::value(), Foam::Zero, and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
|
virtual |
Update local data for topology changes.
Reimplemented from points0MotionSolver.
Definition at line 415 of file rigidBodyMeshMotion.C.
References IOobject::AUTO_WRITE, Foam::average(), regIOobject::checkIn(), pointConstraints::constrain(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, polyTopoChangeMap::hasMotionPoints(), septernion::I, IOobject::instance(), spatialTransform::inv(), motionSolver::mesh(), MeshObject< polyMesh, PatchMeshObject, pointMesh >::New(), MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >::New(), polyTopoChangeMap::pointMap(), points, polyMesh::points(), points0MotionSolver::points0(), points0MotionSolver::points0_, polyTopoChangeMap::preMotionPoints(), regIOobject::rename(), polyTopoChangeMap::reversePointMap(), UPtrList< T >::size(), List< T >::size(), Foam::slerp(), objectRegistry::time(), Time::timeName(), List< T >::transfer(), rigidBodyMotion::transform0(), spatialTransform::transformPoint(), and IOobject::writeOpt().
|
virtual |
Write motion state information for restart.
Reimplemented from points0MotionSolver.
Definition at line 535 of file rigidBodyMeshMotion.C.
References IOstream::ASCII, IOstream::currentVersion, dict, motionSolver::mesh(), IOobject::NO_READ, IOobject::NO_WRITE, rigidBodyMotion::state(), timeName, points0MotionSolver::write(), and rigidBodyModelState::write().
|
delete |
Disallow default bitwise assignment.