Loading...
Searching...
No Matches
axis Class Reference

This constraint imposes an orientation limitation where bodies are restricted to rotate only around a fixed axis, optionally with the inclusion of maximum and minimum rotation angle constraints. More...

#include <sixDoFRigidBodyMotionAxisConstraint.H>

Inheritance diagram for axis:
Collaboration diagram for axis:

Public Member Functions

 TypeName ("axis")
 Runtime type information.
 axis (const word &name, const dictionary &sDoFRBMCDict, const sixDoFRigidBodyMotion &motion)
 Construct from components.
virtual autoPtr< sixDoFRigidBodyMotionConstraintclone () const
 Construct and return a clone.
void operator= (const sixDoFRigidBodyMotionConstraint &)=delete
 No copy assignment.
virtual ~axis ()=default
 Destructor.
virtual void constrainTranslation (pointConstraint &) const
 Apply and accumulate translational constraints.
virtual void constrainRotation (pointConstraint &) const
 Apply and accumulate rotational constraints.
virtual bool read (const dictionary &sDoFRBMCCoeff)
 Update properties from given dictionary.
virtual void write (Ostream &) const
 Write.
Public Member Functions inherited from sixDoFRigidBodyMotionConstraint
 TypeName ("sixDoFRigidBodyMotionConstraint")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, sixDoFRigidBodyMotionConstraint, dictionary,(const word &name, const dictionary &sDoFRBMCDict, const sixDoFRigidBodyMotion &motion),(name, sDoFRBMCDict, motion))
 sixDoFRigidBodyMotionConstraint (const word &name, const dictionary &sDoFRBMCDict, const sixDoFRigidBodyMotion &motion)
 Construct from the sDoFRBMCDict dictionary and Time.
virtual ~sixDoFRigidBodyMotionConstraint ()
 Destructor.
const wordname () const
 Return the name.
virtual void setCentreOfRotation (point &) const
 Set the centre of rotation if not the centre of mass.
const dictionarycoeffDict () const
const sixDoFRigidBodyMotionmotion () const noexcept
 Return const access to motion.

Additional Inherited Members

Static Public Member Functions inherited from sixDoFRigidBodyMotionConstraint
static autoPtr< sixDoFRigidBodyMotionConstraintNew (const word &name, const dictionary &sDoFRBMCDict, const sixDoFRigidBodyMotion &motion)
 Select constructed from the sDoFRBMCDict dictionary and Time.
Protected Attributes inherited from sixDoFRigidBodyMotionConstraint
word name_
 Name of the constraint.
dictionary sDoFRBMCCoeffs_
 Constraint model specific coefficient dictionary.
const sixDoFRigidBodyMotionmotion_
 Reference to the body motion.

Detailed Description

This constraint imposes an orientation limitation where bodies are restricted to rotate only around a fixed axis, optionally with the inclusion of maximum and minimum rotation angle constraints.

Usage
Minimal example by constant/dynamicMeshDict.sixDoFRigidBodyMotionCoeffs:
constraints
{
    constrainRotation1
    {
        // Mandatory entries
        sixDoFRigidBodyMotionConstraint     axis;
        axis                                <vector>;

        // Optional entries
        maxClockwiseTheta                   <Function1<scalar>>;
        maxCounterclockwiseTheta            <Function1<scalar>>;
        thetaUnits                          <word>;
        referenceOrientation                <tensor>;
    }
}

where the entries mean:

Property Description Type Reqd Deflt
sixDoFRigidBodyMotionConstraint Type name: axis word yes -
axis Reference rotation axis fixed in global space vector yes -
maxClockwiseTheta Maximum clockwise rotation angle about the rotation axis Function1<scalar> no -
maxCounterlockwiseTheta Maximum counterclockwise rotation angle about the rotation axis Function1<scalar> no -
thetaUnits Units of theta angles word no radians
referenceOrientation Reference orientation where there is no moment tensor no I

The inherited entries are elaborated in:

Notes

  • The units for thetaUnits can be specified as either degrees or radians.
  • The maxClockwiseTheta and maxCounterlockwiseTheta are always non-negative.
  • Negative and positive theta correspond to clockwise and counterclockwise rotation sectors with respect to the reference orientation, respectively.
Source files

Definition at line 150 of file sixDoFRigidBodyMotionAxisConstraint.H.

Constructor & Destructor Documentation

◆ axis()

axis ( const word & name,
const dictionary & sDoFRBMCDict,
const sixDoFRigidBodyMotion & motion )

Construct from components.

Definition at line 83 of file sixDoFRigidBodyMotionAxisConstraint.C.

References sixDoFRigidBodyMotionConstraint::motion(), sixDoFRigidBodyMotionConstraint::name(), read(), and sixDoFRigidBodyMotionConstraint::sixDoFRigidBodyMotionConstraint().

Referenced by clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~axis()

virtual ~axis ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "axis" )

Runtime type information.

References sixDoFRigidBodyMotionConstraint::motion(), and sixDoFRigidBodyMotionConstraint::name().

Here is the call graph for this function:

◆ clone()

virtual autoPtr< sixDoFRigidBodyMotionConstraint > clone ( ) const
inlinevirtual

Construct and return a clone.

Implements sixDoFRigidBodyMotionConstraint.

Definition at line 223 of file sixDoFRigidBodyMotionAxisConstraint.H.

References axis().

Here is the call graph for this function:

◆ operator=()

void operator= ( const sixDoFRigidBodyMotionConstraint & )
delete

No copy assignment.

References sixDoFRigidBodyMotionConstraint::sixDoFRigidBodyMotionConstraint().

Here is the call graph for this function:

◆ constrainTranslation()

void constrainTranslation ( pointConstraint & pc) const
virtual

Apply and accumulate translational constraints.

Implements sixDoFRigidBodyMotionConstraint.

Definition at line 103 of file sixDoFRigidBodyMotionAxisConstraint.C.

◆ constrainRotation()

void constrainRotation ( pointConstraint & pc) const
virtual

◆ read()

bool read ( const dictionary & sDoFRBMCCoeff)
virtual

Update properties from given dictionary.

Reimplemented from sixDoFRigidBodyMotionConstraint.

Definition at line 227 of file sixDoFRigidBodyMotionAxisConstraint.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::I, Foam::mag(), sixDoFRigidBodyMotionConstraint::motion(), Foam::nl, sixDoFRigidBodyMotionConstraint::read(), sixDoFRigidBodyMotionConstraint::sDoFRBMCCoeffs_, and Foam::sqrt().

Referenced by axis().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

void write ( Ostream & os) const
virtual

Write.

Reimplemented from sixDoFRigidBodyMotionConstraint.

Definition at line 308 of file sixDoFRigidBodyMotionAxisConstraint.C.

References os().

Here is the call graph for this function:

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