www.cemf.ir
vibrating Class Reference

Vibrating model for a wall. More...

+ Inheritance diagram for vibrating:
+ Collaboration diagram for vibrating:

Public Member Functions

 TypeInfoNV ("vibrating")
 
FUNCTION_HD vibrating ()=default
 
FUNCTION_H vibrating (const dictionary &dict)
 
FUNCTION_HD vibrating (const vibrating &)=default
 
vibratingoperator= (const vibrating &)=default
 
INLINE_FUNCTION_HD void setTime (real t)
 
INLINE_FUNCTION_HD realx3 linVelocityPoint (const realx3 &) const
 
INLINE_FUNCTION_HD realx3 transferPoint (const realx3 &p, real dt) 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 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
 

Private Member Functions

INLINE_FUNCTION_HD void calculateVelocity ()
 

Private Attributes

realx3 angularFreq_ {0,0,0}
 
realx3 phaseAngle_ {0,0,0}
 
realx3 amplitude_ {0,0,0}
 
realx3 velocity_ {0,0,0}
 
realx3 velocity0_ {0,0,0}
 

Additional Inherited Members

- Protected Attributes inherited from timeInterval
real startTime_ = 0
 
real endTime_ = largeValue
 
real time_ =0
 
bool isInInterval_ = true
 

Detailed Description

Vibrating model for a wall.

Creates a sinoidal virating model for a wall. The viration is defined by frequency, amplitude and phase angle.

\[ \vec{v}(t) = \vec{A} sin(\vec{\omega}(t-startTime)+\vec{\phi}) \]

// This creates sinoidal vibration on the wall in x-direction. The viration
// starts at t = 0 s and ends at t = 10 s. 
{
    angularFreq     (10 0 0);
    amplitude       ( 1 0 0);
    phaseAngle      ( 0 0 0);
    startTime       0;
    endTime         10;
} 
  • Parameter Type Description Optional [default value]
    angularFreq realx3 angular frequency of vibration (rad/s) No
    amplitude realx3 rotation speed (m/s) No
    phaseAngle realx3 phase angle (rad) Yes [(0 0 0)]
    startTime real start time of rotation (s) Yes [0]
    endTime real end time of rotation (s) Yes [infinity]

Definition at line 65 of file vibrating.hpp.

Constructor & Destructor Documentation

◆ vibrating() [1/3]

FUNCTION_HD vibrating ( )
default

◆ vibrating() [2/3]

FUNCTION_H vibrating ( const dictionary dict)
explicit

Definition at line 26 of file vibrating.cpp.

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

+ Here is the call graph for this function:

◆ vibrating() [3/3]

FUNCTION_HD vibrating ( const vibrating )
default

Member Function Documentation

◆ calculateVelocity()

INLINE_FUNCTION_HD void calculateVelocity ( )
inlineprivate

Definition at line 84 of file vibrating.hpp.

References vibrating::amplitude_, vibrating::angularFreq_, timeInterval::inTimeRange(), vibrating::phaseAngle_, pFlow::sin(), timeInterval::startTime(), timeInterval::time(), and vibrating::velocity_.

Referenced by vibrating::setTime().

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

◆ TypeInfoNV()

TypeInfoNV ( "vibrating"  )

◆ operator=()

vibrating& operator= ( const vibrating )
default

◆ setTime()

INLINE_FUNCTION_HD void setTime ( real  t)
inline

Definition at line 112 of file vibrating.hpp.

References vibrating::calculateVelocity(), pFlow::equal(), timeInterval::setTime(), timeInterval::time(), vibrating::velocity0_, and vibrating::velocity_.

+ Here is the call graph for this function:

◆ linVelocityPoint()

INLINE_FUNCTION_HD realx3 linVelocityPoint ( const realx3 ) const
inline

Definition at line 120 of file vibrating.hpp.

References vibrating::velocity_.

◆ transferPoint()

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

Definition at line 126 of file vibrating.hpp.

References timeInterval::inTimeRange(), vibrating::velocity0_, and vibrating::velocity_.

+ Here is the call graph for this function:

◆ read() [1/2]

FUNCTION_H bool read ( const dictionary dict)

Definition at line 40 of file vibrating.cpp.

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

Referenced by pFlow::operator>>(), and vibrating::vibrating().

+ 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

Definition at line 55 of file vibrating.cpp.

References dictionary::add(), pFlow::endl(), fatalErrorInFunction, dictionary::globalName(), and timeInterval::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)

Definition at line 85 of file vibrating.cpp.

References notImplementedFunction.

◆ write() [2/2]

FUNCTION_H bool write ( iOstream os) const

Definition at line 94 of file vibrating.cpp.

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

+ Here is the call graph for this function:

Member Data Documentation

◆ angularFreq_

realx3 angularFreq_ {0,0,0}
private

Definition at line 73 of file vibrating.hpp.

Referenced by vibrating::calculateVelocity().

◆ phaseAngle_

realx3 phaseAngle_ {0,0,0}
private

Definition at line 75 of file vibrating.hpp.

Referenced by vibrating::calculateVelocity().

◆ amplitude_

realx3 amplitude_ {0,0,0}
private

Definition at line 77 of file vibrating.hpp.

Referenced by vibrating::calculateVelocity().

◆ velocity_

realx3 velocity_ {0,0,0}
private

◆ velocity0_

realx3 velocity0_ {0,0,0}
private

Definition at line 81 of file vibrating.hpp.

Referenced by vibrating::setTime(), and vibrating::transferPoint().


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