AiryCoeffs Class Reference

Calculation engine for the Airy wave model and other models that are a correction on top of the Airy model or a superposition of Airy models. More...

Public Member Functions

 AiryCoeffs (const scalar depth, const scalar amplitude, const scalar length, const scalar g)
 Construct from components. More...
 
 AiryCoeffs (const scalar depth, const scalar amplitude, const scalar period, const scalar g, scalar(*celerityPtr)(const AiryCoeffs &))
 Construct from components but with period instead of length. More...
 
scalar k () const
 The angular wavenumber [rad/m]. More...
 
bool deep () const
 Return whether shallow and intermediate effects are to be omitted. More...
 
scalar celerity () const
 The wave celerity [m/s]. More...
 
tmp< scalarFieldangle (const scalar phase, const scalar t, const scalarField &x) const
 Angle of the oscillation [rad]. More...
 
tmp< scalarFieldelevation (const scalar phase, const scalar t, const scalarField &x) const
 Get the wave elevation at a given time and local coordinates. Local. More...
 
tmp< vector2DFieldvi (const label i, const scalar phase, const scalar t, const vector2DField &xz) const
 Return the non-dimensionalised i-th harmonic of the velocity. More...
 
tmp< vector2DFieldvelocity (const scalar phase, const scalar t, const vector2DField &xz) const
 Get the wave velocity at a given time and local coordinates. Local. More...
 

Static Public Member Functions

static scalar celerity (const AiryCoeffs &coeffs)
 The wave celerity [m/s]. More...
 

Public Attributes

const scalar depth
 Depth [m]. More...
 
const scalar amplitude
 Amplitude [m]. More...
 
const scalar length
 Wavelength [m]. More...
 
const scalar g
 Gravitational acceleration [m/s^2]. More...
 

Detailed Description

Calculation engine for the Airy wave model and other models that are a correction on top of the Airy model or a superposition of Airy models.

Source files

Definition at line 51 of file AiryCoeffs.H.

Constructor & Destructor Documentation

◆ AiryCoeffs() [1/2]

AiryCoeffs ( const scalar  depth,
const scalar  amplitude,
const scalar  length,
const scalar  g 
)

Construct from components.

Definition at line 60 of file AiryCoeffs.C.

◆ AiryCoeffs() [2/2]

AiryCoeffs ( const scalar  depth,
const scalar  amplitude,
const scalar  period,
const scalar  g,
scalar(*)(const AiryCoeffs &)  celerityPtr 
)

Construct from components but with period instead of length.

Definition at line 75 of file AiryCoeffs.C.

Member Function Documentation

◆ k()

Foam::scalar k ( ) const

The angular wavenumber [rad/m].

Definition at line 93 of file AiryCoeffs.C.

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

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

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

◆ deep()

bool deep ( ) const

Return whether shallow and intermediate effects are to be omitted.

Definition at line 99 of file AiryCoeffs.C.

References k, and Foam::log().

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

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

◆ celerity() [1/2]

Foam::scalar celerity ( const AiryCoeffs coeffs)
static

The wave celerity [m/s].

Definition at line 105 of file AiryCoeffs.C.

References AiryCoeffs::depth, AiryCoeffs::g, AiryCoeffs::k(), Foam::sqrt(), and Foam::tanh().

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

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

◆ celerity() [2/2]

Foam::scalar celerity ( ) const

The wave celerity [m/s].

Definition at line 111 of file AiryCoeffs.C.

Referenced by irregular::irregular().

Here is the caller graph for this function:

◆ angle()

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

Angle of the oscillation [rad].

Definition at line 117 of file AiryCoeffs.C.

References k, and x.

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

Here is the caller graph for this function:

◆ elevation()

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

Get the wave elevation at a given time and local coordinates. Local.

x is aligned with the direction of propagation.

Definition at line 128 of file AiryCoeffs.C.

References Foam::cos(), and x.

Here is the call graph for this function:

◆ vi()

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

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

Definition at line 139 of file AiryCoeffs.C.

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

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

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

◆ velocity()

Foam::tmp< Foam::vector2DField > velocity ( const scalar  phase,
const scalar  t,
const vector2DField xz 
) const

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.

Definition at line 169 of file AiryCoeffs.C.

References k.

Member Data Documentation

◆ depth

const scalar depth

Depth [m].

Definition at line 76 of file AiryCoeffs.H.

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

◆ amplitude

const scalar amplitude

Amplitude [m].

Definition at line 79 of file AiryCoeffs.H.

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

◆ length

const scalar length

Wavelength [m].

Definition at line 82 of file AiryCoeffs.H.

Referenced by irregular::irregular().

◆ g

const scalar g

Gravitational acceleration [m/s^2].

Definition at line 85 of file AiryCoeffs.H.

Referenced by AiryCoeffs::celerity().


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