11. Wavemaker#
WAVE_MAKER is useful for wave-resolving simulations in the nearshore zone. In wave-resolving nearshore problem, a spectrum of linear waves can be forced at the offshore boundary via an analytical wavemaker (parameters set in croco.in and used in wave_maker.h as part of the ana_bry subroutine). The spectrum is based by default on a JONSWAP statistical distribution and has frequency and directional spreading.
A single-sum wavemaker (i.e. each component of the wave has a distinct frequency and direction) is implemented in CROCO to alleviate the problem of coherent wave interference arising from double-summation methods (Treillou et al. [2024]). A single-sum wavemaker solves this problem and is also much more cost-effective (and does not require high-frequency resolution).
11.1. Formulation#
The offshore wavemaker is used with OBC_WEST or OBC_EAST, providing BRY array values for free surface elevation \(\eta\), cross-shore and alongshore velocities \((u,v)\), according to the following equations:
with :
\(a_i = a_m \sqrt{\frac{D(\theta_i) S(\omega_i) d\omega}{\sum_i D(\theta_i) S(\omega_i) d\omega}}\) : amplitude given by the statistical distribution \(S(\omega_i,\theta_i)=S(\omega_i) \times D(\theta_i)\), the product of a JONSWAP frequency spectrum \(S(\omega_i)\) and a Gaussian-type directional spectrum \(D(\theta_i)\). \(i\) is the index of spectral distribution in frequency and direction; N and M are the number of frequencies and directions; and \(d\omega\) is frequency resolution.
\(a_m=\sqrt{H_s/8}\) is the rms wave amplitude (related to significant wave height \(H_s\)).
\(\theta_i, \theta_m, \sigma_{\theta}\) : i-th wave direction, mean wave direction, and directional spread around the mean.
\(k_{y,i}=k_i \text{sin}(\theta_i )\) : alongshore wavenumber (\(k_i\) being the linear theory wavenumber given by \(\omega_i^2 = g k_i \text{tanh}(k_i h)\) with \(h\) the mean water depth)
\(\omega_p, k_p\) : peak frequency and wavenumber,
\(\phi_i\) uniformly distributed random phase.
11.2. Input parameters#
Input parameters for the wavemaker are set in croco.in under keyword: wave_maker (e.g., Flash Rips test case):
wave_maker: amp [m], prd [s], ang [deg], ang spread [deg], freq spread (gamma) 0.24 13. 0. 30. 3.3
amp
: wave amplitude \(a_m=\sqrt{H_s/8}\)
prd
: peak period \(T_p = 2 \pi / \omega_p\)
ang
: mean wave angle \(\theta_m\)
ang spread
: directional spread \(\sigma_{\theta}\)
freq spread
: peak enhancement factor \(\gamma\) of JONSWAP spectrum
Note
The directional spread is essential for generating short-crested waves (and flash rips). The mean crest length should vary as \(\lambda_p/(2 \sin{\sigma_{\theta}})\), with \(\lambda_p=2 \pi / k_p\) the peak wavelength.
Note
if WAVE_MAKER_SPECTRUM is not defined (see below), the wavemaker produces a monochromatic wave.
Related CPP options:
WAVE_MAKER |
Activate Wavemaker for wave resolving nonhydrostatic case |
WAVE_MAKER_SPECTRUM |
Activate Wave spectrum with frequency spread (default: JONSWAP) |
WAVE_MAKER_DSPREAD |
Add directional spread in wave spectrum |
WAVE_MAKER_OBLIQUE |
Specify if Non-zero mean angle (compute v component) |
Preselected options:
#ifdef WAVE_MAKER
# if defined WAVE_MAKER_JONSWAP || defined WAVE_MAKER_GAUSSIAN
# define WAVE_MAKER_SPECTRUM
# endif
# ifdef WAVE_MAKER_SPECTRUM
# ifdef WAVE_MAKER_JONSWAP
# elif defined WAVE_MAKER_GAUSSIAN
# else
# define WAVE_MAKER_JONSWAP /* default */
# endif
# endif
# if defined WAVE_MAKER_DSPREAD && defined NS_PERIODIC
# define WAVE_MAKER_DSPREAD_PER /* correct direction for periodicity */
# endif
# ifndef WAVE_MAKER_SPECTRUM
# define STOKES_WAVES
# endif
#endif
11.3. JONSWAP spectrum#
As previously said, the spectrum distribution is the product of a JONSWAP frequency spectrum \(S(\omega)\) and a Gaussian-type directional spectrum \(D(\theta)\) : \(S(\omega,\theta)=S(\omega) \times D(\theta)\).
The JONSWAP spectrum is formulated in CROCO as follows:
function of the significant wave height \(H_s\), peak wave frequency \(\omega_p\), peak enhancement factor \(\gamma\), and:
The directional spectrum around the mean direction \(\theta_m\), with directional spread \(\sigma_{\theta}\), is:
with \(\int_{\theta_{min}}^{\theta_{max}} D(\theta) d\theta = 1\) to ensure that the directional spread (\(\sigma_{\theta}\)) around the mean wave angle does not affect wave energy.