API
SteadyWaves.SteadyWavesSteadyWaves.fourier_approxSteadyWaves.fourier_approx!SteadyWaves.init_conditionsSteadyWaves.nonlinear_system_shoalingSteadyWaves.nonlinear_system_steadySteadyWaves.shoaling_approxSteadyWaves.wave_heightSteadyWaves.wave_numberSteadyWaves.wave_periodSteadyWaves.wave_powerSteadyWaves.wavelength
SteadyWaves.SteadyWaves — ModuleSteadyWaves is an implementation of Rienecker and Fenton (1981) Fourier Approximation Method to steady, periodic, nonlinear waves propagating in water of constant depth.
SteadyWaves.fourier_approx! — Methodfourier_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 mutatedd: 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- EulerN: number of solution eigenvalues, defaults toN=10
SteadyWaves.fourier_approx — Methodfourier_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 - lengthL(m) or periodT(s)pc: parameter criterion;pc=1- length (default),pc=2- periodcc: current criterion;cc=1- Stokes (default),cc=2- EulerN: number of solution eigenvalues, defaults toN=10M: number of height steps, defaults toM=1g: gravity acceleration (m/s^2), defaults tog=9.81
Output
u[1:N+1]: free surface elevation kηu[N+2:2N+1]: stream function coefficients Bu[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/gu[2N+6]: mean flow velocity Ū√(k/g)u[2N+7]: wave height kH
SteadyWaves.init_conditions — Methodinit_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 - lengthL(m) or periodT(s)pc: parameter criterion;pc=1- length,pc=2- periodN: number of solution eigenvaluesM: number of height steps
Output
u[1:N+1]: free surface elevation kηu[N+2:2N+1]: stream function coefficients Bu[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/gu[2N+6]: mean flow velocity Ū√(k/g)
SteadyWaves.nonlinear_system_shoaling — Methodnonlinear_system_shoaling(du, u, p)Define nonlinear system for shoaling waves f(u) = 0 with parameters p.
SteadyWaves.nonlinear_system_steady — Methodnonlinear_system_steady(du, u, p)Define nonlinear system for steady waves f(u) = 0 with parameters p.
SteadyWaves.shoaling_approx — Methodshoaling_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 toN=10g: gravity acceleration (m/s^2), defaults tog=9.81
Output
K: vector of shoaling coefficient values
SteadyWaves.wave_height — Methodwave_height(u, d, N)Calculate dimensional wave height H from solution u.
SteadyWaves.wave_number — Functionwave_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.
SteadyWaves.wave_period — Methodwave_period(u, d, N; g=9.81)Calculate dimensional wave period T from solution u.
SteadyWaves.wave_power — Methodwave_power(u, N)Calculate dimensionless wave power F from solution u (non-public function).
SteadyWaves.wavelength — Methodwavelength(u, d, N)Calculate dimensional wavelength L from solution u.