Vibrating motion model for walls. More...
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 vibratingMotion & | operator= (const vibratingMotion &)=default |
Copy assignment. More... | |
vibratingMotion & | operator= (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... | |
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.
|
protected |
Definition at line 124 of file vibratingMotion.hpp.
vibratingMotion | ( | ) |
Empty.
Definition at line 112 of file vibratingMotion.cpp.
vibratingMotion | ( | const dictionary & | dict | ) |
Construct with dictionary.
Definition at line 116 of file vibratingMotion.cpp.
References fatalExit.
|
default |
Copy constructor.
|
delete |
No move.
|
default |
Destructor.
|
protected |
Read from a dictionary.
Definition at line 27 of file vibratingMotion.cpp.
References dictionary::dictionaryKeywords(), pFlow::endl(), fatalErrorInFunction, dictionary::getVal(), and dictionary::subDict().
|
protected |
Write to a dictionary.
Definition at line 88 of file vibratingMotion.cpp.
References dictionary::add(), pFlow::endl(), fatalErrorInFunction, ForAll, and dictionary::subDictOrCreate().
TypeInfoNV | ( | "vibratingMotion" | ) |
Type info.
|
default |
Copy assignment.
|
delete |
No Move assignment.
Return motion model at time t.
Definition at line 173 of file vibratingMotion.hpp.
References vibratingMotion::components_, VectorDual< T, MemorySpace >::deviceVectorAll(), VectorDual< T, MemorySpace >::modifyOnHost(), vibratingMotion::numComponents_, and VectorDual< T, MemorySpace >::syncViews().
|
inline |
Name to component index.
Definition at line 187 of file vibratingMotion.hpp.
References vibratingMotion::componentName_, fatalErrorInFunction, fatalExit, and List< T >::findi().
|
inline |
Index to name.
Definition at line 205 of file vibratingMotion.hpp.
References vibratingMotion::componentName_, pFlow::endl(), fatalErrorInFunction, fatalExit, and vibratingMotion::numComponents_.
|
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.
|
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.
|
inline |
Is moving.
Definition at line 235 of file vibratingMotion.hpp.
|
inline |
Move ponits at time t for dt seconds.
Definition at line 242 of file vibratingMotion.hpp.
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().
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().
|
protected |
Vibrating motion components.
Definition at line 127 of file vibratingMotion.hpp.
Referenced by vibratingMotion::getModel(), vibratingMotion::pointVelocity(), and vibratingMotion::transferPoint().
|
protected |
Names of components.
Definition at line 130 of file vibratingMotion.hpp.
Referenced by vibratingMotion::indexToName(), and vibratingMotion::nameToIndex().
|
protected |
Number of components.
Definition at line 133 of file vibratingMotion.hpp.
Referenced by vibratingMotion::getModel(), and vibratingMotion::indexToName().