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 dictionary &dict, const scalar g, const word &modelName=Airy::typeName, scalar(*celerityPtr)(const AiryCoeffs &)=&AiryCoeffs::celerity)
 Construct from a dictionary and gravity. More...
 
virtual autoPtr< waveModelclone () const
 Construct a clone. More...
 
virtual ~Airy ()
 Destructor. More...
 
scalar depth () const
 Get the depth. More...
 
scalar amplitude (const scalar t) const
 Get the amplitude. More...
 
scalar amplitude () const
 Get the amplitude at steady state. More...
 
scalar length () const
 Get the length. More...
 
scalar phase () const
 Get the phase. 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...
 

Protected Member Functions

AiryCoeffs coeffs (const scalar t) const
 Return the wave coefficients. More...
 
AiryCoeffs coeffs () const
 Return the wave coefficients at steady state. More...
 

Static Protected Member Functions

static scalar celerity (const AiryCoeffs &)
 The wave celerity [m/s]. 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

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.

Usage
Property Description Required? Default
depth The water depth [m] no great
amplitude The amplitude [m] yes
length The wave length [m] if period not set
period The wave period [s] if length not set
phase The phase offset [rad] yes

Example specification in constant/waveProperties:

    waves
    (
        Airy
        {
            length      40;
            amplitude   0.5;
            phase       0;
        }
    );
Source files

Definition at line 113 of file Airy.H.

Constructor & Destructor Documentation

◆ Airy() [1/2]

Airy ( const Airy wave)

Construct a copy.

Definition at line 91 of file Airy.C.

Referenced by Airy::clone().

Here is the caller graph for this function:

◆ Airy() [2/2]

Airy ( const dictionary dict,
const scalar  g,
const word modelName = Airy::typeName,
scalar(*)(const AiryCoeffs &)  celerityPtr = &AiryCoeffs::celerity 
)

Construct from a dictionary and gravity.

Definition at line 101 of file Airy.C.

References Foam::constant::universal::c, Airy::coeffs(), Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ ~Airy()

~Airy ( )
virtual

Destructor.

Definition at line 125 of file Airy.C.

Member Function Documentation

◆ coeffs() [1/2]

Foam::waveModels::AiryCoeffs coeffs ( const scalar  t) const
inlineprotected

Return the wave coefficients.

Definition at line 30 of file AiryI.H.

References waveModel::g().

Here is the call graph for this function:

◆ coeffs() [2/2]

Foam::waveModels::AiryCoeffs coeffs ( ) const
inlineprotected

Return the wave coefficients at steady state.

Definition at line 39 of file AiryI.H.

Referenced by Airy::Airy(), Stokes2::celerity(), and Stokes5::celerity().

Here is the caller graph for this function:

◆ celerity() [1/2]

Foam::scalar celerity ( const AiryCoeffs coeffs)
staticprotected

The wave celerity [m/s].

Definition at line 83 of file Airy.C.

References AiryCoeffs::celerity().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "Airy"  )

Runtime type information.

◆ clone()

virtual autoPtr<waveModel> clone ( ) const
inlinevirtual

Construct a clone.

Implements waveModel.

Reimplemented in Stokes5, and Stokes2.

Definition at line 182 of file Airy.H.

References Airy::Airy().

Here is the call graph for this function:

◆ depth()

Foam::scalar depth ( ) const
inline

Get the depth.

Definition at line 47 of file AiryI.H.

◆ amplitude() [1/2]

Foam::scalar amplitude ( const scalar  t) const
inline

Get the amplitude.

Definition at line 53 of file AiryI.H.

◆ amplitude() [2/2]

Foam::scalar amplitude ( ) const
inline

Get the amplitude at steady state.

Definition at line 59 of file AiryI.H.

◆ length()

Foam::scalar length ( ) const
inline

Get the length.

Definition at line 65 of file AiryI.H.

◆ phase()

Foam::scalar phase ( ) const
inline

Get the phase.

Definition at line 71 of file AiryI.H.

◆ celerity() [2/2]

Foam::scalar celerity ( ) const
virtual

The wave celerity [m/s].

Implements waveModel.

Reimplemented in Stokes5, and Stokes2.

Definition at line 131 of file Airy.C.

Referenced by Stokes2::celerity(), Airy::velocity(), Stokes2::velocity(), and Stokes5::velocity().

Here is the caller 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 Stokes5, and Stokes2.

Definition at line 137 of file Airy.C.

References Foam::cos(), and x.

Referenced by Stokes2::elevation().

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 Stokes5, and Stokes2.

Definition at line 147 of file Airy.C.

References Airy::celerity().

Referenced by Stokes2::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 159 of file Airy.C.

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

Here is the call graph for this function:

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