All the quantities deals with in SWAN are located at the vertices. Hence, due to the user-defined locations of the wave parameters, interpolations are required.
Let parameter
and Cartesian coordinates
, with
indicating the vertices of cell , be given.
The vertices 1, 2 and 3 are ordered in a counterclockwise direction, see Figure 8.2. The associated 3 edges are denoted as 12, 23 and 31.
Linear interpolation, with inside cell and
, is given by
(8.17)
where
is a constant vector inside cell . We apply Green-Gauss reconstruction, i.e.,
(8.18)
where is the area of cell and the summation runs over the 3 edges
of cell .
The values at edges are taken as averages:
(8.19)
Furthermore, is the outward pointing normal
at edge and is obtained by rotating the edge over 90 in the clockwise
direction. Hence,
(8.20)
We also need the following identity
(8.21)
It is not difficult to show that
or
(8.23)
and
(8.24)
The area of cell is given by
. Hence, with
(8.25)
we have
(8.26)
Alternatively, we may interpolate using the following relation
(8.27)
where is a linear shape function with the following properties:
- is linear per cell and
-
with is the Kronecker delta.
We choose the following shape function
(8.28)
and the coefficients follow from solving
(8.29)
The SWAN team 2024-09-09