Integration over $\sigma $

Two methods are considered in SWAN for integration over frequency space. The first method is the common trapezoidal rule. We consider the following integration


  $\displaystyle I = \int_{0}^{\sigma_m} f\,E(\sigma)d\sigma
$ (3.117)



where $\sigma_m$ is the highest spectral frequency and $f$ is an arbitrary function. Usually, this function may be $\sigma^p$, $\omega^p$ or $k^p$ with $p$ a power. We assume a discrete (logarithmic) distribution of frequencies: $\sigma_{i}\, ,i=1,...,m$. The approximation of (3.117) is as follows


  $\displaystyle I \approx \sum_{2}^{m} \frac{1}{2}(f_{i-1} \sigma_{i-1} N_{i-1} + f_{i} \sigma_{i} N_{i})(\sigma_{i} - \sigma_{i-1})
$ (3.118)



The contribution by the tail needs to be added as well, as follows. The tail of the energy density is proportional to $\sigma^{-P^*}$. We have,


  $\displaystyle \int_{\sigma_m}^{\infty} R \sigma^{-P^*} d\sigma = \sigma_{m} \frac{R \sigma_{m}^{-P^*}}{P^*-1}
$ (3.119)



Assuming that a function $f$ has a tail with power $P^*$, so that $R \sigma_{m}^{-P^*} = f(\sigma_{m})$. Hence,


  $\displaystyle \int_{\sigma_m}^{\infty} f(\sigma)d\sigma = \frac{\sigma_{m}}{P^*-1} f(\sigma_{m})
$ (3.120)



This integration is only valid if $P^* > 1$.


The second technique for integration over $\sigma $ makes use of the logarithmic discrete distribution of frequencies. We introduced two variables in SWAN: FRINTF and FRINTH. The first is equal to $\ln(\sigma_{i+1}/\sigma_{i})$, the latter to $\sqrt{\sigma_{i+1}/\sigma_{i}}$. Hence, $\sigma_i = e^{\mu i}$ with $\mu = \ln(\sigma_{i+1}/\sigma_{i})$ and can be approximated as $\mu = \Delta \sigma/\sigma$.


The integral over a function of $\sigma $, i.e. $f(\sigma)$ is transformed as follows


  $\displaystyle \int f(\sigma) d\sigma = \int f(\sigma) \mu e^{\mu i} di = \mu \int f(\sigma)\sigma di
$ (3.121)



Thus, the integral can be approximated as


  $\displaystyle \int f(\sigma)d\sigma \approx \mu \sum f_i \sigma_i
$ (3.122)



The boundaries of a mesh in $\sigma-$space are $\sigma_i/\sqrt{\sigma_{i+1}/\sigma_{i}}$ and $\sigma_i \sqrt{\sigma_{i+1}/\sigma_{i}}$.


Computation of the contribution by the tail is done as follows. It is assumed that in the tail the energy density is proportional to $\sigma^{-P^*}$. Furthermore, the discrete integration extends to $M\cdot\sigma_m$, where $M = \sqrt{1+\Delta \sigma/\sigma}$. Then the contribution by the tail is


  $\displaystyle \int_{\theta=0}^{2\pi} \int_{M\sigma_m}^{\infty} R \sigma^{-P^*} ...
...{1-P^*}_{m}}{P^* - 1} =
\frac{\sigma_m}{(P^*-1)M^{P^*-1}} R \sigma^{-P^*}_{m}
$ (3.123)



Assuming that a function $f$ has a tail with power $P^*$, the integral over $f$ has a tail contribution of


  $\displaystyle \int_{\theta=0}^{2\pi} \int_{M\sigma_m}^{\infty} f(\sigma)d\sigma d\theta =
\frac{\sigma_m}{(P^*-1)M^{P^*-1}} f(\sigma_m)
$ (3.124)



Since, $M$ is close to 1, the tail factor can be approximated as


  $\displaystyle \frac{\sigma_m}{(P^*-1)M^{P^*-1}} \approx \frac{\sigma_m}{(P^*-1)(1+(P^*-1)(M-1))}
$ (3.125)



In the SWAN program, we have $M=$FRINTH, $P^*=$PWTAIL(1) and $m=$MSC. The value of $P^*$ depends on the quantity that is integrated. For instance, in the computation of $\overline{k}$, $P^*=P-2n-1$. Note that it is required that $P^* > 1$, otherwise the integration fails.

The SWAN team 2024-03-19