www.cemf.ir
rotatingAxis Class Reference

An axis which rotates around itself at specified speed. More...

+ Inheritance diagram for rotatingAxis:
+ Collaboration diagram for rotatingAxis:

Public Member Functions

 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
 

Private Attributes

real omega_ = 0
 rotation speed More...
 
bool rotating_ = false
 is rotating More...
 

Additional Inherited Members

- 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

An axis which rotates around itself at specified speed.

This defines an axis with two end points that rotates around itself at specified speed (rad/s).

// This creates an axis of rotation around x-axis, rotation starts at t = 1 s
// and ends at t = 5 s. 
{
    p1      (0 0 0);
    p2      (1 0 0);
    omega   1.57;
    startTime   1;
    endTime     5;
} 
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
startTime real start time of rotation (s) Yes [0]
endTime real end time of rotation (s) Yes [infinity]

Definition at line 61 of file rotatingAxis.hpp.

Constructor & Destructor Documentation

◆ rotatingAxis() [1/5]

Empty constructor.

◆ rotatingAxis() [2/5]

FUNCTION_H rotatingAxis ( const dictionary dict)
explicit

Construct from dictionary.

Definition at line 27 of file rotatingAxis.cpp.

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

+ Here is the call graph for this function:

◆ rotatingAxis() [3/5]

FUNCTION_HD rotatingAxis ( const realx3 p1,
const realx3 p2,
real  omega = 0.0 
)

Construct from components.

Definition at line 41 of file rotatingAxis.cpp.

◆ rotatingAxis() [4/5]

FUNCTION_HD rotatingAxis ( const rotatingAxis )
default

Copy constructor.

◆ rotatingAxis() [5/5]

◆ ~rotatingAxis()

~rotatingAxis ( )
default

destructor

Member Function Documentation

◆ TypeInfoNV()

TypeInfoNV ( "rotatingAxis"  )

◆ operator=() [1/2]

rotatingAxis& operator= ( const rotatingAxis )
default

Copy asssignment.

◆ operator=() [2/2]

rotatingAxis& operator= ( rotatingAxis &&  )
default

Copy asssignment.

◆ setOmega()

FUNCTION_HD pFlow::real setOmega ( real  omega)

Set omega.

Definition at line 57 of file rotatingAxis.cpp.

References pFlow::equal(), rotatingAxis::omega(), rotatingAxis::omega_, and rotatingAxis::rotating_.

+ Here is the call graph for this function:

◆ omega()

INLINE_FUNCTION_HD real omega ( ) const
inline

Return omega.

Definition at line 115 of file rotatingAxis.hpp.

References rotatingAxis::omega_.

Referenced by pFlow::rotate(), and rotatingAxis::setOmega().

+ Here is the caller graph for this function:

◆ isRotating()

INLINE_FUNCTION_HD bool isRotating ( ) const
inline

Is rotating.

Definition at line 122 of file rotatingAxis.hpp.

References rotatingAxis::rotating_.

Referenced by multiRotatingAxis::transferPoint().

+ Here is the caller graph for this function:

◆ linVelocityPoint()

INLINE_FUNCTION_HD pFlow::realx3 linVelocityPoint ( const realx3 p) const

Linear tangential velocity at point p.

Definition at line 23 of file rotatingAxisI.hpp.

References cross(), timeInterval::inTimeRange(), rotatingAxis::omega_, line::projectPoint(), and line::unitVector().

+ Here is the call graph for this function:

◆ transferPoint()

INLINE_FUNCTION_HD pFlow::realx3 transferPoint ( const realx3  p,
real  dt 
) const

Definition at line 33 of file rotatingAxisI.hpp.

References pFlow::rotate().

+ Here is the call graph for this function:

◆ read() [1/2]

FUNCTION_H bool read ( const dictionary dict)

Read from dictionary.

Definition at line 67 of file rotatingAxis.cpp.

References dictionary::getValOrSet(), timeInterval::read(), and line::read().

Referenced by pFlow::operator>>().

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

◆ write() [1/2]

FUNCTION_H bool write ( dictionary dict) const

Write to dictionary.

Definition at line 83 of file rotatingAxis.cpp.

References dictionary::add(), pFlow::endl(), fatalErrorInFunction, dictionary::globalName(), timeInterval::write(), and line::write().

Referenced by pFlow::operator<<().

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

◆ read() [2/2]

FUNCTION_H bool read ( iIstream is)

Read from input stream is.

Definition at line 101 of file rotatingAxis.cpp.

References IOstream::check(), pFlow::endl(), FUNCTION_NAME, ioErrorInFile, IOstream::lineNumber(), IOstream::name(), and iIstream::readEndStatement().

+ Here is the call graph for this function:

◆ write() [2/2]

FUNCTION_H bool write ( iOstream os) const

Write to output stream os.

Definition at line 132 of file rotatingAxis.cpp.

References IOstream::check(), FUNCTION_NAME, and iOstream::writeWordEntry().

+ Here is the call graph for this function:

Member Data Documentation

◆ omega_

real omega_ = 0
private

rotation speed

Definition at line 69 of file rotatingAxis.hpp.

Referenced by rotatingAxis::linVelocityPoint(), rotatingAxis::omega(), and rotatingAxis::setOmega().

◆ rotating_

bool rotating_ = false
private

is rotating

Definition at line 72 of file rotatingAxis.hpp.

Referenced by rotatingAxis::isRotating(), and rotatingAxis::setOmega().


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