<%! import os %>
<%namespace name="tools" file="tools.tex"/>



The verification cases so far considered solely the cross-shore dimension and assumed a longshore uniform coast. In the following case the potential of the model to predict coastal and dune erosion in situations that include the two horizontal dimensions is further examined. A first step towards a 2DH response is to verify that the 2DH forcing by surge run-up and run-down is accurately modelled by testing not against \citet{Zelt1986}, but actually \citet{OzkanKirby1997}. The reason is that Zelt modeled the NSW equations including some dispersive and dissipative terms, which the present model does not include. For that reason, we compared the model to the results of \citet{OzkanKirby1997} who modeled the NSW equations using a Fourier-Chebyshev Collocation method, which does not have any numerical dissipation or dispersion errors. They use a moving, adapting grid with a fixed $\Delta y$ (which is equal to the present model's $\Delta y$ in this comparison) but with a spatially and temporally varying $\Delta x$ so that the grid spacing in $x$ near the shoreline is very small. In the present model $\Delta x$ is set equal to $\Delta y$, which means that we can expect to have less resolution at the shoreline than \citet{OzkanKirby1997}.

${tools.image(os.path.join(input_path, 'Zelt_Case1'), 'zeltbath.png', 'Definition scetch of concave beach bathymetry')}
                        
\autoref{fig:zeltbath} shows the definition sketch of the concave beach bathymetry in the present coordinate system, converted from the original system by Zelt (1986). The bathymetry consists of a flat bottom part and a beach part with a sinusoidally varying slope. For \citet{Zelt1986}'s fixed parameter choice of $\sqrt{\beta}\,=\,\frac{h_s}{L_y} = \frac{4}{10\pi}$, the bathymetry is given by

\begin{eqnarray*}
	h = \left \{
		\begin{array}{lcl}
			h_s 										& \mbox{,} & x \leq L_s \\ 
			h_s - \frac{0.4 (x - L_s)}{3 - \cos\left( \frac{\pi y}{L_y} \right)} 	        & \mbox{,} & x > L_s 	\\ 
		\end{array}
	\right.
\end{eqnarray*}

\noindent where $h_s$ is the shelf depth, $L_s$ is the length of the shelf in the modeled domain and $L_y$ is the length scale of the longshore variation of the beach. This results in a beach slope of $h_x = \frac{1}{10}$ in the center of the bay and of $h_x = \frac{1}{5}$ normal to the ``headlands''. In the following we chose $L_y = 8\,m$, which determines $h_s = 1.0182 \, m$. We set $L_s = L_y$. Different values for $L_s$ only cause  phase shifts in the results, but no qualitative difference, so this parameter is not important in this problem. Also indicated in the figure are the five stations where the vertical run-up (the surface elevation at the shoreline) will be measured. 

At the offshore ($x=0$) boundary we specify an incoming solitary wave, which in dimensional form reads

\begin{eqnarray*}
	\zeta_i(t) = \alpha h_s \mbox{sech}^2 \left( \sqrt{\frac{3 g}{4 h_s} \alpha (1+\alpha)} (t - t_o) \right)
\end{eqnarray*}

which is similar to \citet{Zelt1986}'s Eq. (5.3.7). The phase shift $t_o$ is chosen such that the surface elevation of the solitary wave at $t=0$ is 1\% of the maximum amplitude. The only parameter yet to be chosen is $\alpha$. We will compare our model to Zelt's case of $\alpha\,=\,\frac{H}{h_s}\,=\,\,0.02$, where $H$ is the offshore wave height. Zelt found that the wave broke for a value of $\alpha\,=\,0.03$, so the present test should involve no breaking, but has a large enough nonlinearity to exhibit a pronounced two-dimensional run-up. 

Any outgoing waves will be absorbed at the offshore boundary by the absorbing-generating boundary condition. At the lateral boundaries $y=0$ and $y=2\,L_y$ we specify a no-flux (wall) boundary condition following \citet{Zelt1986}. The model equations used in this test are the nonlinear shallow water equations without forcing or friction. The numerical parameters are $\Delta x\,=\,\Delta y\,=\frac{1}{8}\,m$ with a Courant number $\nu\,=\,0.7$.

${tools.image('Zelt_Case1/', 'fig1.eps', 'Normalized vertical runup in time (panel 1) and maximum and minimum values (panel 2)')}
                        
The first panel in \autoref{fig:Zelt_Case1_default_fig1} shows the vertical runup  normalized with the offshore wave height H as a function of time, which is normalized by $\sqrt{g\,h_s}/L_y$ at the 5 cross-sections indicated in \autoref{fig:zeltbath}. The solid lines represent the present model results, while the dashed lines denotes \citet{OzkanKirby1997}'s numerical results. The second panel in \autoref{fig:Zelt_Case1_default_fig1} shows the maximum vertical run-up and run-down, normalized by $H$, versus the alongshore coordinate $y$. \autoref{tab:Zelt_Case1_default_tab1} presents error statistics of the model run with respect to the measurements.

${tools.table('Zelt_Case1/', 'tab1.tex', 'Error statistics Zelt Case 1')}

% if interpret:

We see that the agreement is generally good, except that the present model does not capture the second peak in the time series at $y/Ly = 1$ very well. This secondary peak or ``ringing'' is due to the wave energy that is trapped along the coast and propagates towards the midpoint of the bay \citep{Zelt1986}. It is suspected that this focusing mechanism is not properly captured, because the present method approximates the shoreline as a staircase pattern, which in effect lengthens the shoreline. Also, the spatial derivatives are not evaluated parallel and perpendicular to the actual shoreline but in the fixed $x$ and $y$ directions. The agreement at the locations $y/Ly = 0.25$, $y/Ly = 0.5$ and $y/Ly = 0.75$ is generally good despite the large gradient of the local shoreline relative to our grid.

The maximum runup agrees well with \citet{OzkanKirby1997}, but that the maximum rundown is not represented well in the center of the domain. The 'wiggles' in the solid line are evidence of the staircasing of the shoreline: since the shoreline is not treated as a continuous but rather as a discrete function, so is the runup in the individual nodes. 

In conclusion, the shoreline boundary condition agrees well with the analytical solutions for the longshore uniform case but shows some discrepancies for the case of a concave beach, which can be attributed to the ``staircase'' discretization of the shoreline. The above results are consistent with the results obtained with the SHORECIRC model which is based on similar hydrodynamic equations, see \citet{VanDongeren1997}, and show that also the current model is capable of representing run-up and run-down.

% endif