Generic base class for waves. Derived classes must implement field functions which return the elevation above the wave surface and the velocity field, both as a function of position. More...
Public Member Functions | |
TypeName ("waveModel") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, waveModel, dictionary,(const dictionary &dict, const scalar g),(dict, g)) | |
waveModel (const waveModel &wave) | |
Construct a copy. More... | |
waveModel (const dictionary &dict, const scalar g) | |
Construct from a dictionary and gravity. More... | |
virtual autoPtr< waveModel > | clone () const =0 |
Construct a clone. More... | |
virtual | ~waveModel () |
Destructor. More... | |
scalar | g () const |
Get the value of gravity. More... | |
virtual tmp< scalarField > | elevation (const scalar t, const scalarField &x) const =0 |
Get the wave elevation at a given time and local coordinates. Local. More... | |
virtual tmp< vector2DField > | velocity (const scalar t, const vector2DField &xz) const =0 |
Get the wave velocity at a given time and local coordinates. Local. More... | |
virtual void | write (Ostream &os) const |
Write. More... | |
Static Public Member Functions | |
static autoPtr< waveModel > | New (const dictionary &dict, const scalar g) |
Select. More... | |
static autoPtr< waveModel > | New (const word &type, const dictionary &dict, const scalar g) |
Select. More... | |
Generic base class for waves. Derived classes must implement field functions which return the elevation above the wave surface and the velocity field, both as a function of position.
Definition at line 55 of file waveModel.H.
Construct a copy.
Definition at line 39 of file waveModel.C.
waveModel | ( | const dictionary & | dict, |
const scalar | g | ||
) |
Construct from a dictionary and gravity.
Definition at line 46 of file waveModel.C.
|
virtual |
Destructor.
Definition at line 57 of file waveModel.C.
TypeName | ( | "waveModel" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
waveModel | , | ||
dictionary | , | ||
(const dictionary &dict, const scalar g) | , | ||
(dict, g) | |||
) |
|
static |
Select.
Definition at line 31 of file waveModelNew.C.
References dict, g, dictionary::lookup(), and Foam::compressible::New().
Referenced by waveSuperposition::waveSuperposition().
|
static |
Select.
Definition at line 41 of file waveModelNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, g, Foam::Info, and Foam::nl.
|
inline |
Get the value of gravity.
Definition at line 119 of file waveModel.H.
References waveModel::elevation(), waveModel::velocity(), waveModel::write(), and x.
Referenced by Stokes5::celerity(), Stokes2::celerity(), and Airy::celerity().
|
pure virtual |
Get the wave elevation at a given time and local coordinates. Local.
x is aligned with the direction of propagation.
Implemented in Airy, solitary, Stokes2, and Stokes5.
Referenced by waveModel::g().
|
pure virtual |
Get the wave velocity at a given time and local coordinates. Local.
x is aligned with the direction of propagation, and z with negative gravity.
Implemented in Airy, solitary, Stokes2, and Stokes5.
Referenced by waveModel::g().
|
virtual |
Write.
Reimplemented in Airy, and solitary.
Definition at line 63 of file waveModel.C.
Referenced by waveModel::g(), solitary::write(), and Airy::write().