API

SteadyWaves.SteadyWavesModule

SteadyWaves is an implementation of Rienecker and Fenton (1981) Fourier Approximation Method to steady, periodic, nonlinear waves propagating in water of constant depth.

source
SteadyWaves.fourier_approx!Method
fourier_approx!(u, d, d_p, F, T; cc=1, N=10, g=9.81)

Update approximate solution u of a steady wave of power F and period T propagating in water of changing depth from d to d_p using Fourier Approximation Method.

Arguments

  • u: solution matrix being mutated
  • d: initial water depth (m)
  • d_p: target water depth (m)
  • F: wave power (kg m/s)
  • T: wave period (s)
  • cc: current criterion; cc=1 - Stokes (default), cc=2 - Euler
  • N: number of solution eigenvalues, defaults to N=10
source
SteadyWaves.fourier_approxMethod
fourier_approx(d, H, P; pc=1, cc=1, N=10, M=1, g=9.81)

Approximate solution u of a steady wave of height H and length L propagating in water of depth d using Fourier Approximation Method.

Arguments

  • d: water depth (m)
  • H: wave height (m)
  • P: wave parameter - length L (m) or period T (s)
  • pc: parameter criterion; pc=1 - length (default), pc=2 - period
  • cc: current criterion; cc=1 - Stokes (default), cc=2 - Euler
  • N: number of solution eigenvalues, defaults to N=10
  • M: number of height steps, defaults to M=1
  • g: gravity acceleration (m/s^2), defaults to g=9.81

Output

  • u[1:N+1]: free surface elevation
  • u[N+2:2N+1]: stream function coefficients B
  • u[2N+2]: wave celerity c√(k/g)
  • u[2N+3]: mean water depth kη̄
  • u[2N+4]: volume flux due to waves q√(k³/g)
  • u[2N+5]: Bernoulli constant rk/g
  • u[2N+6]: mean flow velocity Ū√(k/g)
  • u[2N+7]: wave height kH
source
SteadyWaves.init_conditionsMethod
init_conditions(d, H, P, pc, N, M)

Calculate initial conditions u0 of a steady wave of height H and length L propagating in water of depth d using linear wave theory.

Arguments

  • d: water depth (m)
  • H: wave height (m)
  • P: wave parameter - length L (m) or period T (s)
  • pc: parameter criterion; pc=1 - length, pc=2 - period
  • N: number of solution eigenvalues
  • M: number of height steps

Output

  • u[1:N+1]: free surface elevation
  • u[N+2:2N+1]: stream function coefficients B
  • u[2N+2]: wave celerity c√(k/g)
  • u[2N+3]: mean water depth kη̄
  • u[2N+4]: volume flux due to waves q√(k³/g)
  • u[2N+5]: Bernoulli constant rk/g
  • u[2N+6]: mean flow velocity Ū√(k/g)
source
SteadyWaves.shoaling_approxMethod
shoaling_approx(d, H, L; cc=2, N=10, g=9.81)

Calculate shoaling coefficients K in range of depth values d for wave of length L and height H.

Arguments

  • d: vector of decreasing water depths (m)
  • L: initial wavelength (m) - corresponding to d[1]
  • H: initial wave height (m) - corresponding to d[1]
  • cc: current criterion; cc=1 - Stokes, cc=2 - Euler (default)
  • N: number of solution eigenvalues, defaults to N=10
  • g: gravity acceleration (m/s^2), defaults to g=9.81

Output

  • K: vector of shoaling coefficient values
source
SteadyWaves.wave_numberFunction
wave_number(d, ω, g=9.81, ϵ=10^-12)

Calculate wave_number k based on depth d, angular wave frequency ω and gravitational acceleration g for given accuracy ϵ according to linear wave theory.

source