www.cemf.ir
multiRotatingAxis Class Reference

Defines an axis of rotation that rotates around itself and rotates around another axis. More...

+ Inheritance diagram for multiRotatingAxis:
+ Collaboration diagram for multiRotatingAxis:

Public Member Functions

INLINE_FUNCTION_HD multiRotatingAxis ()
 Empty Constructor. More...
 
FUNCTION_H multiRotatingAxis (multiRotatingAxisMotion *axisMotion)
 Empty with list of axes. More...
 
FUNCTION_H multiRotatingAxis (multiRotatingAxisMotion *axisMotion, const dictionary &dict)
 Construct from dictionary and list of axes. More...
 
FUNCTION_HD multiRotatingAxis (const multiRotatingAxis &)=default
 Copy constructor. More...
 
FUNCTION_HD multiRotatingAxisoperator= (const multiRotatingAxis &)=default
 Copy assignment. More...
 
 ~multiRotatingAxis ()=default
 Destructor. More...
 
INLINE_FUNCTION_HD realx3 pointTangentialVel (const realx3 &p) const
 Tangential velocity at point p. More...
 
INLINE_FUNCTION_HD realx3 transferPoint (const realx3 &p, real dt) const
 Translate point p for dt seconds based on the axis information. More...
 
INLINE_FUNCTION_HD bool hasParent () const
 Does this axis have a parent. More...
 
INLINE_FUNCTION_HD int32 parentAxisIndex () const
 Return the index of parent axis. More...
 
INLINE_FUNCTION_H void setAxisListPtr (multiRotatingAxis *axisList)
 Set the pointer to the list of all axes. More...
 
void move (real dt)
 Move the end points of the axis. More...
 
FUNCTION_H bool read (multiRotatingAxisMotion *axisMotion, const dictionary &dict)
 Read from dictionary. More...
 
FUNCTION_H bool write (const multiRotatingAxisMotion *axisMotion, dictionary &dict) const
 Write to dictionary. More...
 
- Public Member Functions inherited from rotatingAxis
 TypeInfoNV ("rotatingAxis")
 
FUNCTION_HD rotatingAxis ()=default
 Empty constructor. More...
 
FUNCTION_H rotatingAxis (const dictionary &dict)
 Construct from dictionary. More...
 
FUNCTION_HD rotatingAxis (const realx3 &p1, const realx3 &p2, real omega=0.0)
 Construct from components. More...
 
FUNCTION_HD rotatingAxis (const rotatingAxis &)=default
 Copy constructor. More...
 
FUNCTION_HD rotatingAxis (rotatingAxis &&)=default
 
rotatingAxisoperator= (const rotatingAxis &)=default
 Copy asssignment. More...
 
rotatingAxisoperator= (rotatingAxis &&)=default
 Copy asssignment. More...
 
 ~rotatingAxis ()=default
 destructor More...
 
FUNCTION_HD real setOmega (real omega)
 Set omega. More...
 
INLINE_FUNCTION_HD real omega () const
 Return omega. More...
 
INLINE_FUNCTION_HD bool isRotating () const
 Is rotating. More...
 
INLINE_FUNCTION_HD realx3 linVelocityPoint (const realx3 &p) const
 Linear tangential velocity at point p. More...
 
INLINE_FUNCTION_HD realx3 transferPoint (const realx3 p, real dt) const
 
FUNCTION_H bool read (const dictionary &dict)
 Read from dictionary. More...
 
FUNCTION_H bool write (dictionary &dict) const
 Write to dictionary. More...
 
FUNCTION_H bool read (iIstream &is)
 Read from input stream is. More...
 
FUNCTION_H bool write (iOstream &os) const
 Write to output stream os. More...
 
- Public Member Functions inherited from timeInterval
INLINE_FUNCTION_HD timeInterval ()
 
INLINE_FUNCTION_HD timeInterval (const timeInterval &)=default
 
INLINE_FUNCTION_HD timeIntervaloperator= (const timeInterval &)=default
 
FUNCTION_H timeInterval (const dictionary &dict)
 
INLINE_FUNCTION_HD ~timeInterval ()=default
 
INLINE_FUNCTION_HD auto startTime () const
 
INLINE_FUNCTION_HD auto endTime () const
 
INLINE_FUNCTION_HD auto time () const
 
INLINE_FUNCTION_HD void setTime (real t)
 
INLINE_FUNCTION_HD bool inTimeRange (real t) const
 
INLINE_FUNCTION_HD bool inTimeRange () const
 
FUNCTION_H bool read (const dictionary &dict)
 
FUNCTION_H bool write (dictionary &dict) const
 
FUNCTION_H bool read (iIstream &is)
 
FUNCTION_H bool write (iOstream &os) const
 
- Public Member Functions inherited from line
 TypeInfoNV ("line")
 
FUNCTION_HD line ()
 
FUNCTION_HD line (const realx3 &lp1, const realx3 &lp2)
 
INLINE_FUNCTION_HD line (const realx3 &v21, const realx3 &p1, bool)
 
FUNCTION_H line (const dictionary &dict)
 
INLINE_FUNCTION_HD line (const line &src)=default
 
INLINE_FUNCTION_HD line (line &&src)=default
 
INLINE_FUNCTION_HD lineoperator= (const line &)=default
 
INLINE_FUNCTION_HD lineoperator= (line &&)=default
 
INLINE_FUNCTION_HD void set (const realx3 &lp1, const realx3 &lp2)
 
INLINE_FUNCTION_HD realx3 point1 () const
 
INLINE_FUNCTION_HD realx3 point2 () const
 
INLINE_FUNCTION_HD realx3 point (real t) const
 
INLINE_FUNCTION_HD real length () const
 
INLINE_FUNCTION_HD realx3 unitVector () const
 
INLINE_FUNCTION_HD realx3 projectPoint (const realx3 &p) const
 
INLINE_FUNCTION_HD real projectNormalizedLength (realx3 p) const
 
FUNCTION_H bool read (const dictionary &dict)
 
FUNCTION_H bool write (dictionary &ditc) const
 
FUNCTION_H bool read (iIstream &is)
 
FUNCTION_H bool write (iOstream &os) const
 

Protected Attributes

multiRotatingAxisaxisList_
 This is device pointer to all axes. More...
 
int32 parentAxisIndex_ = -1
 Index of parent axis. More...
 
- Protected Attributes inherited from timeInterval
real startTime_ = 0
 
real endTime_ = largeValue
 
real time_ =0
 
bool isInInterval_ = true
 
- Protected Attributes inherited from line
realx3 p1_
 
realx3 v21_
 

Detailed Description

Defines an axis of rotation that rotates around itself and rotates around another axis.

This axis rotates around itself and can have one axis of rotation, and that axis of rotation can have another axis of rotatoin and so on.

// This creates an axis around x-axis. This axis rotates round itself at 
// 1.57 rad/s and at the same time rotates around rotating axis axisName. 
// axisName is separatly defined in the same dictionray. 
axis1
{
    p1          (0 0 0);
    p2          (1 0 0);
    omega       1.57;
    rotationAxis axisName;
    startTime   1;
    endTime     5;
}

axisName 
{
    p1          (0 0 0);
    p2          (0 1 1);
    omega       3.14;
} 
Parameter Type Description Optional [default value]
p1 realx3 begin point of axis No
p2 realx3 end point of axis No
omega real rotation speed (rad/s) No
rotationAxis word the axis rotates around this axis Yes [none]
startTime real start time of rotation (s) Yes [0]
endTime real end time of rotation (s) Yes [infinity]

Definition at line 75 of file multiRotatingAxis.hpp.

Constructor & Destructor Documentation

◆ multiRotatingAxis() [1/4]

Empty Constructor.

Definition at line 93 of file multiRotatingAxis.hpp.

◆ multiRotatingAxis() [2/4]

Empty with list of axes.

Definition at line 27 of file multiRotatingAxis.cpp.

◆ multiRotatingAxis() [3/4]

FUNCTION_H multiRotatingAxis ( multiRotatingAxisMotion axisMotion,
const dictionary dict 
)

Construct from dictionary and list of axes.

Definition at line 36 of file multiRotatingAxis.cpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, and dictionary::globalName().

+ Here is the call graph for this function:

◆ multiRotatingAxis() [4/4]

Copy constructor.

◆ ~multiRotatingAxis()

~multiRotatingAxis ( )
default

Destructor.

Member Function Documentation

◆ operator=()

FUNCTION_HD multiRotatingAxis& operator= ( const multiRotatingAxis )
default

Copy assignment.

◆ pointTangentialVel()

INLINE_FUNCTION_HD realx3 pointTangentialVel ( const realx3 p) const
inline

Tangential velocity at point p.

  • Methods

Definition at line 118 of file multiRotatingAxis.hpp.

References multiRotatingAxis::axisList_, and multiRotatingAxis::parentAxisIndex().

+ Here is the call graph for this function:

◆ transferPoint()

INLINE_FUNCTION_HD realx3 transferPoint ( const realx3 p,
real  dt 
) const
inline

Translate point p for dt seconds based on the axis information.

Definition at line 135 of file multiRotatingAxis.hpp.

References multiRotatingAxis::axisList_, rotatingAxis::isRotating(), multiRotatingAxis::parentAxisIndex_, and pFlow::rotate().

Referenced by multiRotatingAxis::move().

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

◆ hasParent()

INLINE_FUNCTION_HD bool hasParent ( ) const
inline

Does this axis have a parent.

Definition at line 158 of file multiRotatingAxis.hpp.

References multiRotatingAxis::parentAxisIndex_.

Referenced by multiRotatingAxis::move().

+ Here is the caller graph for this function:

◆ parentAxisIndex()

INLINE_FUNCTION_HD int32 parentAxisIndex ( ) const
inline

Return the index of parent axis.

Definition at line 165 of file multiRotatingAxis.hpp.

References multiRotatingAxis::parentAxisIndex_.

Referenced by multiRotatingAxis::move(), and multiRotatingAxis::pointTangentialVel().

+ Here is the caller graph for this function:

◆ setAxisListPtr()

INLINE_FUNCTION_H void setAxisListPtr ( multiRotatingAxis axisList)
inline

Set the pointer to the list of all axes.

This pointer is device pointer

Definition at line 173 of file multiRotatingAxis.hpp.

References multiRotatingAxis::axisList_.

◆ move()

void move ( real  dt)
inline

Move the end points of the axis.

This function moves the end points of this axis, if it has any parrents. It is assumed that the axis with deepest level (with more parrents) is moved first and then the axis with lower levels.

Definition at line 185 of file multiRotatingAxis.hpp.

References multiRotatingAxis::axisList_, multiRotatingAxis::hasParent(), multiRotatingAxis::parentAxisIndex(), line::point1(), line::point2(), line::set(), and multiRotatingAxis::transferPoint().

+ Here is the call graph for this function:

◆ read()

FUNCTION_H bool read ( multiRotatingAxisMotion axisMotion,
const dictionary dict 
)

Read from dictionary.

Definition at line 56 of file multiRotatingAxis.cpp.

References dictionary::getValOrSet().

+ Here is the call graph for this function:

◆ write()

FUNCTION_H bool write ( const multiRotatingAxisMotion axisMotion,
dictionary dict 
) const

Write to dictionary.

Definition at line 80 of file multiRotatingAxis.cpp.

References dictionary::add(), and multiRotatingAxisMotion::indexToName().

+ Here is the call graph for this function:

Member Data Documentation

◆ axisList_

◆ parentAxisIndex_

int32 parentAxisIndex_ = -1
protected

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