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, objectRegistry,(const objectRegistry &db, const dictionary &dict),(db, dict)) | |
waveModel (const waveModel &wave) | |
Construct a copy. More... | |
waveModel (const objectRegistry &db, const dictionary &dict) | |
Construct from a database and a dictionary. More... | |
virtual autoPtr< waveModel > | clone () const =0 |
Construct a clone. More... | |
virtual | ~waveModel () |
Destructor. More... | |
scalar | length () const |
Get the length. More... | |
scalar | amplitude (const scalar t) const |
Get the amplitude. More... | |
scalar | phase () const |
Get the phase. More... | |
scalar | depth () const |
Get the depth. More... | |
virtual tmp< scalarField > | elevation (const scalar t, const scalar u, const scalarField &x) const =0 |
Get the wave elevation at a given time, mean velocity and local. More... | |
virtual tmp< vector2DField > | velocity (const scalar t, const scalar u, const vector2DField &xz) const =0 |
Get the wave velocity at a given time, mean velocity and local. More... | |
virtual void | write (Ostream &os) const |
Write. More... | |
Static Public Member Functions | |
static autoPtr< waveModel > | New (const objectRegistry &db, const dictionary &dict) |
Select. More... | |
static autoPtr< waveModel > | New (const word &type, const objectRegistry &db, const dictionary &dict) |
Select. More... | |
Protected Member Functions | |
scalar | k () const |
The angular wavenumber [rad/m]. More... | |
scalar | sigma () const |
The intrinsic angular frequency [rad/s]. More... | |
scalar | omega (const scalar u) const |
The observed angular frequency [rad/s]. More... | |
tmp< scalarField > | angle (const scalar t, const scalar u, const scalarField &x) const |
Angle of the oscillation [rad]. More... | |
bool | shallow () const |
Return whether shallow effects are to be included. 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 82 of file waveModel.C.
waveModel | ( | const objectRegistry & | db, |
const dictionary & | dict | ||
) |
Construct from a database and a dictionary.
Definition at line 92 of file waveModel.C.
|
virtual |
Destructor.
Definition at line 104 of file waveModel.C.
|
protected |
The angular wavenumber [rad/m].
Definition at line 42 of file waveModel.C.
References Foam::constant::mathematical::pi().
|
protected |
The intrinsic angular frequency [rad/s].
Definition at line 48 of file waveModel.C.
References g, k, Foam::mag(), Foam::sqrt(), Foam::tanh(), and dimensioned< Type >::value().
|
protected |
The observed angular frequency [rad/s].
Definition at line 57 of file waveModel.C.
References waveModel::angle(), k, and Foam::constant::physicoChemical::sigma.
|
protected |
Angle of the oscillation [rad].
Definition at line 64 of file waveModel.C.
References k.
Referenced by waveModel::omega().
|
protected |
Return whether shallow effects are to be included.
Definition at line 74 of file waveModel.C.
References k, and Foam::log().
TypeName | ( | "waveModel" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
waveModel | , | ||
objectRegistry | , | ||
(const objectRegistry &db, const dictionary &dict) | , | ||
(db, dict) | |||
) |
|
static |
Select.
Definition at line 31 of file newWaveModel.C.
References dict, dictionary::lookup(), and Foam::New().
Referenced by waveSuperposition::waveSuperposition().
|
static |
Select.
Definition at line 41 of file newWaveModel.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, and Foam::nl.
|
inline |
Get the length.
Definition at line 156 of file waveModel.H.
|
inline |
Get the amplitude.
Definition at line 162 of file waveModel.H.
|
inline |
Get the phase.
Definition at line 168 of file waveModel.H.
|
inline |
Get the depth.
Definition at line 174 of file waveModel.H.
References waveModel::elevation(), waveModel::velocity(), and waveModel::write().
|
pure virtual |
Get the wave elevation at a given time, mean velocity and local.
coordinates. Local x is aligned with the mean velocity.
Implemented in Airy, and Stokes2.
Referenced by waveModel::depth().
|
pure virtual |
Get the wave velocity at a given time, mean velocity and local.
coordinates. Local x is aligned with the mean velocity, and z with negative gravity.
Implemented in Airy, and Stokes2.
Referenced by waveModel::depth().
|
virtual |
Write.
Definition at line 110 of file waveModel.C.
References token::END_STATEMENT, Foam::nl, and Ostream::writeKeyword().
Referenced by waveModel::depth().