\section{Straight channel with sloping bed (hydraulics)}
\newrefsegment

%---------------------------------------------------------------------------------
\section*{Quality Assurance}
{{\footnotesize
\begin{tabular}{p{22mm-2pt}@{}p{27mm-2pt}@{}p{18mm}@{}p{27mm-2pt}@{}p{18mm}@{}p{27mm-2pt}@{}p{\textwidth-139mm-1pt}} \hline
    \rowcolor{dgrey4}
\textbf{Date} & \textbf{Author} & \textbf{Initials} & \textbf{Review} & \textbf{Initials} & \textbf{Approval} & \textbf{Initials}  \\ \hline
08 Dec 2017 & Andries Paarlberg & & Stef Boersen & & Aukje Spruyt &   \\ \hline
06 Feb 2019 &                   & & & & &   \\ \hline
  \end{tabular}
}}

%---------------------------------------------------------------------------------
\section*{Version information}
\begin{tabular}{@{}p{23mm}@{}p{0mm}p{\textwidth-23mm-30pt}}
\textbf{Date of study}& \textbf{:} & \today \\
\textbf{Executable}   & \textbf{:} & Deltares, D-Flow FM Version 1.2.26.60016M, Jan 25 2019, 12:08:55 \\
\textbf{Location}     & \textbf{:} & \url{$HeadURL$} \\ 
\textbf{SVN revision} & \textbf{:} & $Rev$
\end{tabular}

%---------------------------------------------------------------------------------
\section*{Purpose}
The purpose of this test case is to test hydraulics for simple rectangular channel (so non-tabulated) with a non-zero bed slope ($i_b > 0$). This is needed for correct interpretation of 1D-simulations including sediment transport and morphology. Computed water levels in 1D are compared with 2D (which is already validated) and a semi-analytical solution for the surface profile. By comparing flow velocities between 1D and 2D, we gain insight whether roughness and bed shear stress are modelled correctly in 1D. For 2D, we also test the effect of aspect ratio.

%---------------------------------------------------------------------------------
\section*{Linked claims}
\begin{itemize}
\item{Water levels in 1D-model are identical to 2D and Quasi2D-model for non-zero bed slope.}
\item{Water levels are identical to semi-analytical solution of the surface profile.}
\item{Flow velocity (and thus bed shear stress) in 1D-model are identical to 2D and Quasi2D-model for non-zero bed slope.}
\item{Claims above are independent of aspect ratio (in 2D).}
\end{itemize}

%---------------------------------------------------------------------------------
\section*{Approach}
We start from an existing 2D test case which included sediment transport (switched off morphological changes). In \DFLOWFM various options are available to specify the bed level, using so-called bedleveltypes. For morphology we use option 1, but for testing purposes also other zk-types are included. In this test case we consider two bedlevtypes: 1 (faces) and 3 (zk). For zero bed slope (REF), we showed that bedlevtype 6 gives identical results to 3 (c20). For the 2D-grids we use the centerline values to compare with the 1D-results and the semi-analytical solution. For certain cases there appear to be deviations from the analytical solution; this might be to using an aspect ratio $>> 1$, therefore we also test for aspect ratio $= 1$.

%---------------------------------------------------------------------------------
\section*{Model description}
The figure below shows the computational domain, containing the considered grids. 
All channels have a constant bed slope of $4\rm{x}10^{-4} m/m$ ($dz$ 0.01188 on $L$ = 29.7 m = $4\rm{x}10^{-4} m/m$). Pressure points are at identical locations for the centerlines of the models. The effective length of the channels is 30 m (xleft=0.3m, xright=30m, considering the $\Delta$x/2 boundary location gives an effective length of 30 m).

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.85\textwidth]{figures/4_channel_types.png}
    \caption{Figure of the layout of the model.}
\end{figure}

Explanation of different channels (counting from bottom to top):
\begin{enumerate}
\item{2D grid, 3 cells wide, 0.3 m long x 0.1 m wide, so aspect ratio = 3 (“2D”)}
\item{2D grid, 1 cell wide, 0.3 m long x 0.1 m wide, so aspect ratio = 3 (“Quasi2D\_ar3”)}
\item{1D channel, 0.1 m wide (so width equal to grid 2), 30 m long (“1D”)}
\item{2D grid, 1 cell wide, cells 0.3 m long x 0.3 m wide, so aspect ratio = 1 (“Quasi2D\_ar1”)}
\end{enumerate}

To create sample xyz-files for the bed levels including the required bed slope, we used Matlab/createbedslope.m. For bedlevtype=3, the samples have to be interpolated to the zk-nodes in the network-file. For bedlevtype=1 (tiles), the xyz-file has to be added to the MDU-input file, as well, where it is important to have samples are each grid point. Another important aspect is that for bedlevtype=1 (so bed levels specified in pressure points), the velocities are still calculated at the (upwind) u-points ($h_u$). To be able to compare results for both bedlevtypes, the input bed level has to be shifted half a grid cell, because for the bed level in the u-point the maximum depth of the surrounding tiles is used. This is taken into account in the aforementioned Matlab-script (for straight 2D channels with constant bed slope).

In \DFLOWFM the boundary conditions can be specified in different ways. For river models, it is a common choice to use a discharge upstream and a water level downstream. 
This is our first test. We use a constant bed roughness Chezy coefficient $C = 45$. The downstream water level is chosen 0 m (w.r.t. an arbitrary reference level). This boundary condition holds half a grid cell \emph{outside} the grid, so the water level we need to specify is $0 - \left( dx/2 \right) * ib = 0 - (0.3/2) * 4\rm{x}10^{-4} = -6\rm{x}10^{-4} m$. The bed level at the downstream boundary = -0.40188 (netnode), so the water depth ($h$) is 0.40188 m.
The discharge is estimated such that in equilibrium for steady uniform flow, the water surface slope ($i_w$) should be equal to the bed slope ($i_b$). For this case we have (with discharge $Q$ and constant channel width $B$): $Q = B h C \sqrt{(hi)}$, or the specific discharge ($q$): $q = h C \sqrt{( h i_b)}$ = 0.2293 m$^2$/s.

During testing, it turned out to be difficult to ensure perfectly steady uniform flow using an upstream discharge. Since we use Ch\'ezy for bed friction, theoretically, there should be an equilibrium between the pressure gradient and bed friction. Therefore, we also considered tests where we force the model with two water level boundaries, such that the pressure gradient is identical to the bed slope, i.e. $i_w = i_b$. To determine the upstream water level boundary condition, we also need to take into account the shift of half a grid cell at the boundary: $(L) * ib + (dx/2) * ib = 29.7 * 4\rm{x}10^{-4} + (0.3/2)*4\rm{x}10^{-4} = 0.01188 + 6\rm{x}10^{-5} = 0.01194 m$.

%---------------------------------------------------------------------------------
\section*{Results - upstream discharge}

The following figures show the water level and flow velocity (the latter only for bedlevtype=1). For this case we only considered aspect ratio = 3. Since the discharge is chosen such that the water depth should be equal to the downstream water depth in the domain, we use that as approximation for the "analytical solution".

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.65\textwidth]{figures/t02_Qup_bedlevtype1.png}
    \caption{Water depth (top) and difference with "uniform depth assumption" (bottom) for bedlevtype=1, upstream forcing: discharge.}
\end{figure}

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.65\textwidth]{figures/t02_Qup_bedlevtype3.png}
    \caption{Water depth (top) and difference with "uniform depth assumption" (bottom) for bedlevtype=3, upstream forcing: discharge.}
\end{figure}

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.85\textwidth]{figures/t02_Qup_bedlevtype1_velmagnitude_map5.png}
    \caption{Flow velocity comparison in 1D and 2D for bedlevtype=1, upstream forcing: discharge.}
\end{figure}

Analysis:
\begin{itemize}
\item{No difference in water level for 1D and 2D (for 2D centerlines).}
\item{No difference for bedlevtype=1 and 3.}
\item{The water level on the downstream boundary is correct.}
\item{There appears to be a (small) backwater effect (“opstuwing”) towards the upstream boundary of the model. It is not entirely clear where this difference originates from, since the dicharge is chosen such that the water depth upstream should be equal to downstream. Possible reasons are related to the fact that the discharge is not calculated with sufficient accuracy (decimals), or with the fact that in \DFLOWFM, a discharge boundary is internally recalculated to a velocity, which might introduce some (rounding?) error?}
\item{There is a "jump" in 1D at the upstream boundary in the first 3 computational cells in the domain. The difference is small, and not further considered herein.}
\item{Differences in flow velocity between 1D and 2D are very small, with maximum differences at the inflow boundary, where the water levels also deviates from the semi-analytical solution.}
\end{itemize}

\section*{Results - Pressure gradient (including aspect ratio)}

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.65\textwidth]{figures/t02_WLup_bedlevtype1.png}
    \caption{Water depth (top) and difference with "uniform depth assumption" (bottom) for bedlevtype=1, upstream forcing: water level (pressure gradient).}
\end{figure}

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.65\textwidth]{figures/t02_WLup_bedlevtype3.png}
    \caption{Water depth (top) and difference with "uniform depth assumption" (bottom) for bedlevtype=3, upstream forcing: water level (pressure gradient).}
\end{figure}

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.85\textwidth]{figures/t02_WLup_bedlevtype1_velmagnitude_map5.png}
    \caption{Flow velocity comparison in 1D and 2D for \emph{bedlevtype=1}, upstream forcing: water level (pressure gradient).}
\end{figure}

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.85\textwidth]{figures/t02_WLup_bedlevtype3_velmagnitude_map5.png}
    \caption{Flow velocity comparison in 1D and 2D for \emph{bedlevtype=3}, upstream forcing: water level (pressure gradient).}
\end{figure}

\begin{figure}[H]
    \centering
    \includegraphics*[width=0.65\textwidth]{figures/t03_WLup_bedlevtype1.png}
    \caption{Water depth (top) and difference with "uniform depth assumption" (bottom) for bedlevtype=1, upstream forcing: water level (pressure gradient). This includes aspect ratio = 1 for the 2D grid.}
\end{figure}

Analysis:
\begin{itemize}
\item{The water level at the downstream boundary is correct.}
\item{For bedlevtype=3 the computed water levels are identical and as expected (constant water depth along the channel). Note that the fluctuations in the figure are in the order of $10^{-13}$.}
\item{For bedlevtype=1, the above results only hold for the 1D channel.}
\item{For 2D also with a pressure gradient as forcing, there is a striking difference for the first three grid points in the domain. It should be noted that for an upstream discharge, this was the other way around.}
\item{The boundary effects (e.g. at the first 3 cells) is still present for an aspect ratio of 1 (see last figure).}
\item{The are no differences in flow velocity for this case between 1D and 2D for bedlevtype=3. For bedlevtype=1 (which is relevant for morphology), there is expected to be no differences for 1D, but for 2D there are differences near the upstream boundary of the model, perhaps related to the treatments of the upstream boundary condition in 2D? (in the figure, it appears there is a difference for 1D, but this is because we compare velocities in 1D to velocity computed in 2D, what causes the differences here.)}
\end{itemize}

%---------------------------------------------------------------------------------
\section*{Conclusion} 
For bedlevtype=3 and a pressure gradient as model forcing, the results in 1D and 2D are equal to each other and the surface profile is virtually indentical to a semi-analytical solution of the surface profile. However, for bedlevtype=1, which is used for morphological simulation, the are differences in water level and flow velocity, especially near the upstream boundary of the model. The differences are small though, and knowing these (small) differences, we can continue with the morphological validation cases.

%---------------------------------------------------------------------------------
\printrefsegment
