Public Member Functions | List of all members
Stokes2 Class Reference

Second-order wave model. More...

Inheritance diagram for Stokes2:
Inheritance graph
[legend]
Collaboration diagram for Stokes2:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("Stokes2")
 Runtime type information. More...
 
 Stokes2 (const objectRegistry &db, const dictionary &dict)
 Construct from a database and a dictionary. More...
 
virtual autoPtr< waveModelclone () const
 Construct a clone. More...
 
virtual ~Stokes2 ()
 Destructor. More...
 
virtual tmp< scalarFieldelevation (const scalar t, const scalar u, const scalarField &x) const
 Get the wave elevation at a given time, mean velocity and local. More...
 
virtual tmp< vector2DFieldvelocity (const scalar t, const scalar u, const vector2DField &xz) const
 Get the wave velocity at a given time, mean velocity and local. More...
 
- Public Member Functions inherited from Airy
 TypeName ("Airy")
 Runtime type information. More...
 
 Airy (const objectRegistry &db, const dictionary &dict)
 Construct from a database and a dictionary. More...
 
virtual ~Airy ()
 Destructor. More...
 
- Public Member Functions inherited from waveModel
 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 ~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 void write (Ostream &os) const
 Write. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from waveModel
static autoPtr< waveModelNew (const objectRegistry &db, const dictionary &dict)
 Select. More...
 
static autoPtr< waveModelNew (const word &type, const objectRegistry &db, const dictionary &dict)
 Select. More...
 
- Protected Member Functions inherited from waveModel
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< scalarFieldangle (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...
 

Detailed Description

Second-order wave model.

Reference:

    "On the Theory of Oscillatory Waves"
    G G Stokes
    Transactions of the Cambridge Philosophical Society (1847), Volume 8,
    Pages 441-455, Equations 18 and 19
Source files

Definition at line 58 of file Stokes2.H.

Constructor & Destructor Documentation

◆ Stokes2()

Stokes2 ( const objectRegistry db,
const dictionary dict 
)

Construct from a database and a dictionary.

Definition at line 44 of file Stokes2.C.

Referenced by Stokes2::clone().

Here is the caller graph for this function:

◆ ~Stokes2()

~Stokes2 ( )
virtual

Destructor.

Definition at line 55 of file Stokes2.C.

References Stokes2::elevation().

Referenced by Stokes2::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "Stokes2"  )

Runtime type information.

◆ clone()

virtual autoPtr<waveModel> clone ( ) const
inlinevirtual

Construct a clone.

Reimplemented from Airy.

Definition at line 74 of file Stokes2.H.

References Stokes2::elevation(), Stokes2::Stokes2(), Stokes2::velocity(), x, and Stokes2::~Stokes2().

Here is the call graph for this function:

◆ elevation()

Foam::tmp< Foam::scalarField > elevation ( const scalar  t,
const scalar  u,
const scalarField x 
) const
virtual

Get the wave elevation at a given time, mean velocity and local.

coordinates. Local x is aligned with the mean velocity.

Reimplemented from Airy.

Definition at line 62 of file Stokes2.C.

References Foam::correction(), Foam::cos(), Airy::elevation(), k, Foam::sqr(), Foam::tanh(), and Stokes2::velocity().

Referenced by Stokes2::clone(), and Stokes2::~Stokes2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ velocity()

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

Reimplemented from Airy.

Definition at line 84 of file Stokes2.C.

References Field< Type >::component(), Foam::cos(), Foam::cosh(), k, Foam::mag(), phi, Foam::pos0(), Foam::pow4(), Foam::sin(), Foam::sinh(), Foam::sqr(), Airy::velocity(), x, and Foam::zip().

Referenced by Stokes2::clone(), and Stokes2::elevation().

Here is the call graph for this function:
Here is the caller graph for this function:

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