Irregular wave model. Phase fraction and velocity field are built up from multiple first-order waves, sampled from a selectable wave spectrum. More...


Public Member Functions | |
| TypeName ("irregular") | |
| Runtime type information. More... | |
| irregular (const irregular &wave) | |
| Construct a copy. More... | |
| irregular (const dictionary &dict, const scalar g, const word &modelName=irregular::typeName) | |
| Construct from a dictionary and gravity. More... | |
| virtual autoPtr< waveModel > | clone () const |
| Construct a clone. More... | |
| virtual | ~irregular () |
| Destructor. More... | |
| scalar | depth () const |
| Get the depth. More... | |
| virtual scalar | celerity () const |
| The wave celerity [m/s]. More... | |
| virtual tmp< scalarField > | elevation (const scalar t, const scalarField &x) const |
| Get the wave elevation at a given time and local coordinates. Local. More... | |
| virtual tmp< vector2DField > | velocity (const scalar t, const vector2DField &xz) const |
| Get the wave velocity at a given time and local coordinates. Local. More... | |
| virtual void | write (Ostream &os) const |
| Write. More... | |
Public Member Functions inherited from waveModel | |
| 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 | ~waveModel () |
| Destructor. More... | |
| scalar | g () const |
| Get the value of gravity. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from waveModel | |
| 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... | |
Irregular wave model. Phase fraction and velocity field are built up from multiple first-order waves, sampled from a selectable wave spectrum.
| Property | Description | Required? | Default |
|---|---|---|---|
depth | The water depth [m] | no | great |
spectrum | The wave spectrum | yes | |
n | The number of times to sample the spectrum | yes | |
span | The fractional range across which to sample the spectrum | no | (0.01 0.99) |
setFormat | The format with which to plot the spectrum | no | none |
Example specification in constant/waveProperties:
waves
(
irregular
{
spectrum PiersonMoskowitz;
PiersonMoskowitzCoeffs
{
U19_5 15;
}
n 16;
span (0.01 0.99);
}
);Definition at line 113 of file irregular.H.
Construct a copy.
Definition at line 57 of file irregular.C.
Referenced by irregular::clone().

| irregular | ( | const dictionary & | dict, |
| const scalar | g, | ||
| const word & | modelName = irregular::typeName |
||
| ) |
Construct from a dictionary and gravity.
Definition at line 71 of file irregular.C.
References AiryCoeffs::celerity(), Foam::cwd(), Foam::endl(), f(), Foam::fv::ff(), UList< T >::first(), Pair< Type >::first(), forAll, waveModel::g(), Foam::identityMap(), Foam::Info, Foam::j0(), Foam::j1(), UList< T >::last(), AiryCoeffs::length, UPstream::master(), Foam::max(), Foam::modelName(), writeFile::outputPrefix, rndGen(), Pair< Type >::second(), Foam::sqr(), Foam::sqrt(), Foam::constant::mathematical::twoPi(), and x.

|
virtual |
Destructor.
Definition at line 231 of file irregular.C.
| TypeName | ( | "irregular" | ) |
Runtime type information.
Construct a clone.
Implements waveModel.
Definition at line 170 of file irregular.H.
References irregular::irregular().

|
inline |
Get the depth.
Definition at line 185 of file irregular.H.
|
virtual |
|
virtual |
Get the wave elevation at a given time and local coordinates. Local.
x is aligned with the direction of propagation.
Implements waveModel.
Definition at line 243 of file irregular.C.
References forAll, tmp< T >::ref(), and x.

|
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.
Implements waveModel.
Definition at line 261 of file irregular.C.
References forAll, tmp< T >::ref(), List< T >::size(), and VectorSpace< Form, Cmpt, Ncmpts >::zero.

|
virtual |
Write.
Reimplemented from waveModel.
Definition at line 279 of file irregular.C.
References token::BEGIN_BLOCK, Foam::decrIndent(), token::END_BLOCK, Foam::incrIndent(), Foam::indent(), Foam::nl, Ostream::write(), waveModel::write(), Foam::writeEntry(), and Foam::writeEntryIfDifferent().
