www.cemf.ir
vibratingMotion Class Reference

Vibrating motion model for walls. More...

+ Collaboration diagram for vibratingMotion:

Classes

class  Model
 Motion model class to be passed to computational units/kernels for transfing points and returning velocities at various positions. More...
 

Public Member Functions

 TypeInfoNV ("vibratingMotion")
 Type info. More...
 
FUNCTION_H vibratingMotion ()
 Empty. More...
 
FUNCTION_H vibratingMotion (const dictionary &dict)
 Construct with dictionary. More...
 
FUNCTION_H vibratingMotion (const vibratingMotion &)=default
 Copy constructor. More...
 
 vibratingMotion (vibratingMotion &&)=delete
 No move. More...
 
FUNCTION_H vibratingMotionoperator= (const vibratingMotion &)=default
 Copy assignment. More...
 
vibratingMotionoperator= (vibratingMotion &&)=delete
 No Move assignment. More...
 
FUNCTION_H ~vibratingMotion ()=default
 Destructor. More...
 
Model getModel (real t)
 Return motion model at time t. More...
 
INLINE_FUNCTION_H int32 nameToIndex (const word &name) const
 Name to component index. More...
 
INLINE_FUNCTION_H word indexToName (label i) const
 Index to name. More...
 
INLINE_FUNCTION_H realx3 pointVelocity (label n, const realx3 &p) const
 velocity at point p according to motion component n More...
 
INLINE_FUNCTION_H realx3 transferPoint (label n, const realx3 p, real dt) const
 Transfer point p for dt seconds based on motion component n. More...
 
INLINE_FUNCTION_HD bool isMoving () const
 Is moving. More...
 
INLINE_FUNCTION_H bool move (real t, real dt)
 Move ponits at time t for dt seconds. 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...
 

Protected Types

using axisVector_HD = VectorDual< vibrating >
 

Protected Member Functions

bool readDictionary (const dictionary &dict)
 Read from a dictionary. More...
 
bool writeDictionary (dictionary &dict) const
 Write to a dictionary. More...
 

Protected Attributes

axisVector_HD components_
 Vibrating motion components. More...
 
wordList componentName_
 Names of components. More...
 
label numComponents_ = 0
 Number of components. More...
 

Detailed Description

Vibrating motion model for walls.

This class is used for simulaiton that at least one wall components are moving according to a sinoidal viration defined in class vibrating. One or more than one motion components can be defined in vibratingMotionInfo dictionary

// In geometryDict file, this will defines vibrating walls during simulation
...
motionModel vibratingMotion;

vibratingMotionInfo
{
    vibComponent1
    {
        // the definition based on class vibrating
    }
    vibComponent2
    {
        // the definition based on calss vibrating
    }
}
...

Definition at line 68 of file vibratingMotion.hpp.

Member Typedef Documentation

◆ axisVector_HD

using axisVector_HD = VectorDual<vibrating>
protected

Definition at line 124 of file vibratingMotion.hpp.

Constructor & Destructor Documentation

◆ vibratingMotion() [1/4]

Empty.

Definition at line 112 of file vibratingMotion.cpp.

◆ vibratingMotion() [2/4]

vibratingMotion ( const dictionary dict)

Construct with dictionary.

Definition at line 116 of file vibratingMotion.cpp.

References fatalExit.

◆ vibratingMotion() [3/4]

Copy constructor.

◆ vibratingMotion() [4/4]

No move.

◆ ~vibratingMotion()

Destructor.

Member Function Documentation

◆ readDictionary()

bool readDictionary ( const dictionary dict)
protected

Read from a dictionary.

Definition at line 27 of file vibratingMotion.cpp.

References dictionary::dictionaryKeywords(), pFlow::endl(), fatalErrorInFunction, dictionary::getVal(), and dictionary::subDict().

+ Here is the call graph for this function:

◆ writeDictionary()

bool writeDictionary ( dictionary dict) const
protected

Write to a dictionary.

Definition at line 88 of file vibratingMotion.cpp.

References dictionary::add(), pFlow::endl(), fatalErrorInFunction, ForAll, and dictionary::subDictOrCreate().

+ Here is the call graph for this function:

◆ TypeInfoNV()

TypeInfoNV ( "vibratingMotion"  )

Type info.

◆ operator=() [1/2]

FUNCTION_H vibratingMotion& operator= ( const vibratingMotion )
default

Copy assignment.

◆ operator=() [2/2]

vibratingMotion& operator= ( vibratingMotion &&  )
delete

No Move assignment.

◆ getModel()

Model getModel ( real  t)
inline

◆ nameToIndex()

INLINE_FUNCTION_H int32 nameToIndex ( const word name) const
inline

Name to component index.

Definition at line 187 of file vibratingMotion.hpp.

References vibratingMotion::componentName_, fatalErrorInFunction, fatalExit, and List< T >::findi().

+ Here is the call graph for this function:

◆ indexToName()

INLINE_FUNCTION_H word indexToName ( label  i) const
inline

Index to name.

Definition at line 205 of file vibratingMotion.hpp.

References vibratingMotion::componentName_, pFlow::endl(), fatalErrorInFunction, fatalExit, and vibratingMotion::numComponents_.

+ Here is the call graph for this function:

◆ pointVelocity()

INLINE_FUNCTION_H realx3 pointVelocity ( label  n,
const realx3 p 
) const
inline

velocity at point p according to motion component n

Definition at line 221 of file vibratingMotion.hpp.

References vibratingMotion::components_, VectorDual< T, MemorySpace >::hostVectorAll(), and n.

+ Here is the call graph for this function:

◆ transferPoint()

INLINE_FUNCTION_H realx3 transferPoint ( label  n,
const realx3  p,
real  dt 
) const
inline

Transfer point p for dt seconds based on motion component n.

Definition at line 228 of file vibratingMotion.hpp.

References vibratingMotion::components_, VectorDual< T, MemorySpace >::hostVectorAll(), and n.

+ Here is the call graph for this function:

◆ isMoving()

INLINE_FUNCTION_HD bool isMoving ( ) const
inline

Is moving.

Definition at line 235 of file vibratingMotion.hpp.

◆ move()

INLINE_FUNCTION_H bool move ( real  t,
real  dt 
)
inline

Move ponits at time t for dt seconds.

Definition at line 242 of file vibratingMotion.hpp.

◆ read()

bool read ( iIstream is)

Read from input stream is.

Definition at line 127 of file vibratingMotion.cpp.

References ioErrorInFile, IOstream::lineNumber(), pFlow::motionModelFile__, IOstream::name(), and dictionary::read().

+ Here is the call graph for this function:

◆ write()

bool write ( iOstream os) const

Write to output stream os.

Definition at line 148 of file vibratingMotion.cpp.

References ioErrorInFile, IOstream::lineNumber(), pFlow::motionModelFile__, IOstream::name(), and dictionary::write().

+ Here is the call graph for this function:

Member Data Documentation

◆ components_

axisVector_HD components_
protected

Vibrating motion components.

Definition at line 127 of file vibratingMotion.hpp.

Referenced by vibratingMotion::getModel(), vibratingMotion::pointVelocity(), and vibratingMotion::transferPoint().

◆ componentName_

wordList componentName_
protected

Names of components.

Definition at line 130 of file vibratingMotion.hpp.

Referenced by vibratingMotion::indexToName(), and vibratingMotion::nameToIndex().

◆ numComponents_

label numComponents_ = 0
protected

Number of components.

Definition at line 133 of file vibratingMotion.hpp.

Referenced by vibratingMotion::getModel(), and vibratingMotion::indexToName().


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