Airy Class Reference

First-order wave model. More...

Inheritance diagram for Airy:
Collaboration diagram for Airy:

Public Member Functions

 TypeName ("Airy")
 Runtime type information. More...
 
 Airy (const Airy &wave)
 Construct a copy. More...
 
 Airy (const objectRegistry &db, const dictionary &dict)
 Construct from a database and a dictionary. More...
 
virtual autoPtr< waveModelclone () const
 Construct a clone. More...
 
virtual ~Airy ()
 Destructor. More...
 
scalar length () const
 Get the length. More...
 
scalar phase () const
 Get the phase. More...
 
scalar depth () const
 Get the depth. 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 tmp< scalarFieldpressure (const scalar t, const vector2DField &xz) const
 Get the wave pressure 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, 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 amplitude (const scalar t) const
 Get the amplitude. More...
 
scalar g () const
 Get the (scalar) value of gravity. More...
 

Protected Member Functions

scalar k () const
 The angular wavenumber [rad/m]. More...
 
scalar celerity () const
 The wave celerity [m/s]. More...
 
tmp< scalarFieldangle (const scalar t, const scalarField &x) const
 Angle of the oscillation [rad]. More...
 
bool deep () const
 Return whether shallow and intermdiate effects are to be omitted. More...
 
tmp< vector2DFieldvi (const label i, const scalar t, const vector2DField &xz) const
 Return the non-dimensionalised i-th harmonic of the velocity. 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...
 

Detailed Description

First-order wave model.

Reference:

    Stokes, G.G. (1847)
    On the theory of oscillatory waves.
    Transactions of the Cambridge Philosophical Society, 8, 441.

See the leading terms of equations 18 and 19.

Source files

Definition at line 59 of file Airy.H.

Constructor & Destructor Documentation

◆ Airy() [1/2]

Airy ( const Airy wave)

Construct a copy.

Definition at line 100 of file Airy.C.

Referenced by Airy::clone().

Here is the caller graph for this function:

◆ Airy() [2/2]

Airy ( const objectRegistry db,
const dictionary dict 
)

Construct from a database and a dictionary.

Definition at line 110 of file Airy.C.

◆ ~Airy()

~Airy ( )
virtual

Destructor.

Definition at line 124 of file Airy.C.

References Airy::elevation().

Referenced by Airy::clone().

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

Member Function Documentation

◆ k()

Foam::scalar k ( ) const
protected

The angular wavenumber [rad/m].

Definition at line 44 of file Airy.C.

References Foam::constant::mathematical::pi().

Referenced by Airy::velocity().

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

◆ celerity()

Foam::scalar celerity ( ) const
protected

The wave celerity [m/s].

Definition at line 50 of file Airy.C.

References Airy::angle(), g, k, Foam::sqrt(), and Foam::tanh().

Referenced by Airy::pressure(), and Airy::velocity().

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

◆ angle()

Foam::tmp< Foam::scalarField > angle ( const scalar  t,
const scalarField x 
) const
protected

Angle of the oscillation [rad].

Definition at line 57 of file Airy.C.

References k.

Referenced by Airy::celerity(), and Airy::elevation().

Here is the caller graph for this function:

◆ deep()

bool deep ( ) const
protected

Return whether shallow and intermdiate effects are to be omitted.

Definition at line 66 of file Airy.C.

References k, Foam::log(), and Airy::vi().

Referenced by Airy::write().

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

◆ vi()

Foam::tmp< Foam::vector2DField > vi ( const label  i,
const scalar  t,
const vector2DField xz 
) const
protected

Return the non-dimensionalised i-th harmonic of the velocity.

Definition at line 73 of file Airy.C.

References Field< Type >::component(), Foam::cos(), Foam::cosh(), Foam::exp(), k, Foam::max(), phi, Foam::sin(), Foam::sinh(), x, and Foam::zip().

Referenced by Airy::deep(), and Airy::velocity().

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

◆ TypeName()

TypeName ( "Airy"  )

Runtime type information.

◆ clone()

virtual autoPtr<waveModel> clone ( ) const
inlinevirtual

Construct a clone.

Implements waveModel.

Reimplemented in Stokes2, and Stokes5.

Definition at line 119 of file Airy.H.

References Airy::Airy(), and Airy::~Airy().

Here is the call graph for this function:

◆ length()

scalar length ( ) const
inline

Get the length.

Definition at line 134 of file Airy.H.

◆ phase()

scalar phase ( ) const
inline

Get the phase.

Definition at line 140 of file Airy.H.

◆ depth()

scalar depth ( ) const
inline

Get the depth.

Definition at line 146 of file Airy.H.

References Airy::elevation(), Airy::pressure(), Airy::velocity(), and Airy::write().

Here is the call graph for this function:

◆ 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.

Reimplemented in Stokes2, and Stokes5.

Definition at line 131 of file Airy.C.

References waveModel::amplitude(), Airy::angle(), Foam::cos(), and Airy::velocity().

Referenced by Airy::depth(), Stokes2::elevation(), and Airy::~Airy().

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 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.

Reimplemented in Stokes2, and Stokes5.

Definition at line 141 of file Airy.C.

References waveModel::amplitude(), Airy::celerity(), Airy::k(), Airy::pressure(), and Airy::vi().

Referenced by Airy::depth(), Airy::elevation(), Airy::pressure(), and Stokes2::velocity().

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

◆ pressure()

Foam::tmp< Foam::scalarField > pressure ( const scalar  t,
const vector2DField xz 
) const
virtual

Get the wave pressure 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 153 of file Airy.C.

References Airy::celerity(), and Airy::velocity().

Referenced by Airy::depth(), and Airy::velocity().

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

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented from waveModel.

Definition at line 165 of file Airy.C.

References Airy::deep(), waveModel::write(), and Foam::writeEntry().

Referenced by Airy::depth().

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: