irregular Class Reference

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

Inheritance diagram for irregular:
Collaboration diagram for irregular:

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< waveModelclone () 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< scalarFieldelevation (const scalar t, const scalarField &x) const
 Get the wave elevation at a given time and local coordinates. Local. More...
 
virtual tmp< vector2DFieldvelocity (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< waveModelNew (const dictionary &dict, const scalar g)
 Select. More...
 
static autoPtr< waveModelNew (const word &type, const dictionary &dict, const scalar g)
 Select. More...
 

Detailed Description

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

Usage
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);
        }
    );
Source files

Definition at line 113 of file irregular.H.

Constructor & Destructor Documentation

◆ irregular() [1/2]

irregular ( const irregular wave)

Construct a copy.

Definition at line 57 of file irregular.C.

Referenced by irregular::clone().

Here is the caller graph for this function:

◆ irregular() [2/2]

irregular ( const dictionary dict,
const scalar  g,
const word modelName = irregular::typeName 
)

◆ ~irregular()

~irregular ( )
virtual

Destructor.

Definition at line 231 of file irregular.C.

Member Function Documentation

◆ TypeName()

TypeName ( "irregular"  )

Runtime type information.

◆ clone()

virtual autoPtr<waveModel> clone ( ) const
inlinevirtual

Construct a clone.

Implements waveModel.

Definition at line 170 of file irregular.H.

References irregular::irregular().

Here is the call graph for this function:

◆ depth()

scalar depth ( ) const
inline

Get the depth.

Definition at line 185 of file irregular.H.

◆ celerity()

Foam::scalar celerity ( ) const
virtual

The wave celerity [m/s].

Implements waveModel.

Definition at line 237 of file irregular.C.

◆ elevation()

Foam::tmp< Foam::scalarField > elevation ( const scalar  t,
const scalarField x 
) const
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.

Here is the call graph for this function:

◆ velocity()

Foam::tmp< Foam::vector2DField > velocity ( const scalar  t,
const vector2DField xz 
) const
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.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
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().

Here is the call graph for this function:

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