rigidBodyMotion Class Reference

Multiple rigid body mesh motion in which movement of the bodies is generated by RBD::rigidBodyMotion. More...

Inheritance diagram for rigidBodyMotion:
Collaboration diagram for rigidBodyMotion:

Public Member Functions

 TypeName ("rigidBodyMotion")
 Runtime type information. More...
 
 rigidBodyMotion (const polyMesh &, const dictionary &dict)
 Construct from polyMesh and dictionary. More...
 
 rigidBodyMotion (const rigidBodyMotion &)=delete
 Disallow default bitwise copy construction. More...
 
 ~rigidBodyMotion ()
 Destructor. More...
 
virtual bool write () const
 Write motion state information for restart. More...
 
void operator= (const rigidBodyMotion &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from multiRigidBody
 TypeName ("multiRigidBody")
 Runtime type information. More...
 
 multiRigidBody (const polyMesh &, const dictionary &dict)
 Construct from polyMesh and dictionary. More...
 
 multiRigidBody (const multiRigidBody &)=delete
 Disallow default bitwise copy construction. More...
 
 ~multiRigidBody ()
 Destructor. More...
 
virtual tmp< pointFieldnewPoints ()
 Return point location obtained from the current motion field. More...
 
virtual void topoChange (const polyTopoChangeMap &)
 Update local data for topology changes. More...
 
virtual void mapMesh (const polyMeshMap &)
 Update from another mesh using the given map. More...
 
void operator= (const multiRigidBody &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from displacementPoints0
 TypeName ("displacementPoints0")
 Runtime type information. More...
 
 displacementPoints0 (const polyMesh &, const dictionary &, const word &type)
 Construct from mesh and dictionary. More...
 
 displacementPoints0 (const displacementPoints0 &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~displacementPoints0 ()
 Destructor. More...
 
pointFieldpoints0 ()
 Return reference to the reference field. More...
 
const pointFieldpoints0 () 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 displacementPoints0 &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from pointMeshMover
 TypeName ("pointMeshMover")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, pointMeshMover, dictionary,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
 
 pointMeshMover (const polyMesh &mesh, const word &type)
 Construct from polyMesh and dictionary and type. More...
 
virtual autoPtr< pointMeshMoverclone () const
 Clone function. More...
 
virtual ~pointMeshMover ()
 Destructor. More...
 
const polyMeshpoly () const
 Return reference to mesh. More...
 
virtual void twoDCorrectPoints (pointField &) const
 Correct point field for reduced-dimensionality cases. More...
 
virtual bool solidBodyMotion () const
 Is the motion solid body? I.e., are the volumes and area magnitudes. More...
 
- 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 &)=delete
 Disallow default bitwise copy construction. More...
 
 ~rigidBodyMotion ()
 Destructor. More...
 
bool report () const
 Return the report Switch. More...
 
const rigidBodyModelStatestate () const
 Return the motion state. More...
 
rigidBodyModelStatestate ()
 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...
 
const 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 vectorg () const
 Return the acceleration due to gravity. More...
 
vectorg ()
 Allow the acceleration due to gravity to be set. More...
 
const wordname (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 rigidBodyInertiaI (const label i) const
 Return the inertia of body i. More...
 
const spatialVectorv (const label i) const
 Return the spatial velocity of body i. More...
 
const spatialVectora (const label i) const
 Return the spatial acceleration of body i. 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 subBodymergedBody (label mergedBodyID) const
 Return the merged body for the given body ID. More...
 
label bodyIndex (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
 
vector p (const label bodyID, const vector &p) const
 Return the current position of the given point on the given body. More...
 
vector d (const label bodyID, const vector &d) const
 Return the current direction of the given direction. More...
 
spatialVector v (const label bodyID, const vector &p) const
 Return the velocity of the given point on the given body. More...
 
spatialVector a (const label bodyID, const vector &p) const
 Return the acceleration 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 displacementPoints0
static pointVectorField readPoints0 (const polyMesh &mesh)
 
- Static Public Member Functions inherited from pointMeshMover
static autoPtr< pointMeshMoverNew (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 multiRigidBody
PtrList< bodyMeshbodyMeshes_
 List of the bodyMeshes containing the patches and point motion. More...
 
- Protected Attributes inherited from displacementPoints0
pointVectorField points0_
 Starting points. More...
 
- Protected Attributes inherited from rigidBodyModel
PtrList< rigidBodybodies_
 List of the bodies. More...
 
PtrList< subBodymergedBodies_
 Bodies may be merged into existing bodies, the inertia of which is. More...
 
HashTable< label, wordbodyIndices_
 Lookup-table of the IDs of the bodies. More...
 
DynamicList< labellambda_
 List of indices of the parent of each body. More...
 
PtrList< jointjoints_
 Each body it attached with a joint which are held on this list. More...
 
DynamicList< spatialTransformXT_
 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< restraintrestraints_
 Motion restraints. More...
 
vector g_
 Acceleration due to gravity. More...
 
DynamicList< spatialTransformXlambda_
 Transform from the parent body to the current body. More...
 
DynamicList< spatialTransformX0_
 Transform for external forces to the bodies reference frame. More...
 
DynamicList< spatialVectorv_
 The spatial velocity of the bodies. More...
 
DynamicList< spatialVectora_
 The spatial acceleration of the bodies. More...
 
DynamicList< spatialVectorc_
 The velocity dependent spatial acceleration of the joints. More...
 
DynamicList< spatialTensorIA_
 Velocity-product acceleration. More...
 
DynamicList< spatialVectorpA_
 Articulated body bias force. More...
 
DynamicList< compactSpatialTensorS_
 Motion subspace for joints with 3 degrees of freedom. More...
 
DynamicList< spatialVectorS1_
 Motion subspace for joints with 1 degrees of freedom. More...
 
DynamicList< compactSpatialTensorU_
 Sub-expression IA.S in the forward-dynamics algorithm. More...
 
DynamicList< spatialVectorU1_
 Sub-expression IA.S1 in the forward-dynamics algorithm. More...
 
DynamicList< tensorDinv_
 Sub-expression (S^T.U)^-1 in the forward-dynamics algorithm. More...
 
DynamicList< vectoru_
 Sub-expression tau - S^T.pA in the forward-dynamics algorithm. More...
 

Detailed Description

Multiple rigid body mesh motion in which movement of the bodies is generated by RBD::rigidBodyMotion.

Applies distance weighted SLERP interpolation between the septernion transformations for each body returned provided by the RBD::rigidBodyMotion solution of the multi-body + joint system.

The mesh patches for each body must be specified and optionally pointZones that move with each body. The motion of the mesh around each body may be constrained by the optional innerDistance and outerDistance, the mesh within the innerDistance moves with the body without distortion and the mesh beyond the outerDistance does not move with body but may move by the proximity of other bodies.

Example of the motion of a single constrained and restrained floating hull in a stationary region:

mover
{
    type            pointMeshMover;

    libs            ("librigidBodyMotion_pointMeshMover.so");

    pointMeshMover
    {
        type            rigidBodyMotion;

        report          on;

        solver
        {
            type Newmark;
        }

        accelerationRelaxation 0.4;

        bodies
        {
            hull
            {
                type            rigidBody;
                parent          root;

                centreOfMass    (0 0 0);
                mass            412.73;
                inertia         (40 0 0 921 0 921);
                transform       (1 0 0 0 1 0 0 0 1) (2.929541 0 0.2);

                joint
                {
                    type    composite;
                    joints
                    (
                        {
                            type Pz;
                        }
                        {
                            type Ry;
                        }
                    );
                }

                patches         (hull);
                innerDistance   0.3;
                outerDistance   1;
            }
        }

        restraints
        {
            translationDamper
            {
                type linearDamper;
                body hull;
                coeff 8596;
            }

            rotationDamper
            {
                type sphericalAngularDamper;
                body hull;
                coeff 11586;
            }
        }
    }
}
See also
Foam::RBD::rigidBodyMotion Foam::pointMeshMovers::multiRigidBody
Source files

Definition at line 142 of file rigidBodyMotion_pointMeshMover.H.

Constructor & Destructor Documentation

◆ rigidBodyMotion() [1/2]

rigidBodyMotion ( const polyMesh mesh,
const dictionary dict 
)

◆ rigidBodyMotion() [2/2]

rigidBodyMotion ( const rigidBodyMotion )
delete

Disallow default bitwise copy construction.

◆ ~rigidBodyMotion()

Destructor.

Definition at line 241 of file rigidBodyMotion_pointMeshMover.C.

Member Function Documentation

◆ TypeName()

TypeName ( "rigidBodyMotion"  )

Runtime type information.

◆ write()

bool write ( ) const
virtual

Write motion state information for restart.

Reimplemented from displacementPoints0.

Definition at line 247 of file rigidBodyMotion_pointMeshMover.C.

References IOstream::ASCII, IOstream::currentVersion, dict, Foam::name(), IOobject::NO_READ, IOobject::NO_WRITE, Foam::dimensions::time, and displacementPoints0::write().

Here is the call graph for this function:

◆ operator=()

void operator= ( const rigidBodyMotion )
delete

Disallow default bitwise assignment.


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