Two methods are considered in SWAN for integration over frequency space. The first method is the common
trapezoidal rule. We consider the following integration
(3.117)
where is the highest spectral frequency and is an arbitrary function. Usually, this function may be
, or with a power. We assume a discrete (logarithmic) distribution
of frequencies:
.
The approximation of (3.117) is as follows
(3.118)
The contribution by the tail needs to be added as well, as follows. The tail of the energy density is proportional to .
We have,
(3.119)
Assuming that a function has a tail with power , so that
.
Hence,
(3.120)
This integration is only valid if .
The second technique for integration over makes use of the logarithmic discrete distribution of frequencies.
We introduced two variables in SWAN: FRINTF and FRINTH. The first is equal to
, the latter to
. Hence,
with
and can be approximated as
.
The integral over a function of , i.e. is transformed as follows
(3.121)
Thus, the integral can be approximated as
(3.122)
The boundaries of a mesh in space are
and
.
Computation of the contribution by the tail is done as follows. It is assumed that in the tail
the energy density is proportional to . Furthermore, the discrete integration extends
to
, where
. Then the contribution by the tail is
(3.123)
Assuming that a function has a tail with power , the integral over has a tail contribution of
(3.124)
Since, is close to 1, the tail factor can be approximated as
(3.125)
In the SWAN program, we have FRINTH, PWTAIL(1) and MSC. The value of
depends on the quantity that is integrated. For instance, in the computation of ,
. Note that it is required that , otherwise the integration fails.
The SWAN team 2024-09-09