=============== Routing Methods =============== SWIFlow has two routing methods developed in it. * Direct * Muskingum-Cunge (1969) Direct ====== Direct routing assumes that a bulk of the time water is spent on the hill slope. This is only valid for small catchments. Muskingum-Cunge (Under Development) =================================== Description of technique first provided by `Cunge 1969`_. Numerical discretization taken from `Gallice et. al 2016`_ and re-transcribed below. *Variables* * n - Time index [unitless] * i - Discretize stream reach index [unitless] * t - Time [Seconds] * Q - Flowrate [M^3/S] * l_i - Stream reach discretized length for stream i [m] * w - Stream segment width [m] * S_0 - Local bed slope [] * C_r - Wave celerity [m/s] * Q_r - Representative discharge [m^3/s] * n_m - Mannings coefficient ( 0.03 - 0.10 for small natural streams) [s/m^-1/3] **Assumptions** * C_r is derived from Q_r assuming rectangular channel cross section .. math:: Q^{n+1}_{i} = C_1 Q^{n}_{i-1} + C_2 Q^{n+1}_{i-1} + C_3 Q^{n}_{i} Where .. math:: C_1 = \frac{k_i x_i + 0.5 \Delta t}{k_i (1-x_i) + 0.5\Delta t} C_2 = \frac{-k_i x_i + 0.5 \Delta t}{k_i (1-x_i) + 0.5\Delta t} C_3 = \frac{k_i (1-x_i) - 0.5 \Delta t}{k_i (1-x_i) + 0.5\Delta t} Where .. math:: k_i = \frac{l_i}{c_r} c_r = \frac{5}{3} \bigg(\frac{S_0}{n_{m}^2}\bigg)^{\frac{3}{10}} \bigg(\frac{Q_r}{w}\bigg)^{\frac{2}{5}} x_i = 0.5 * min\bigg(1, 1 - \frac{Q_r}{c_r w S_0 l_i}\bigg) Q_r = \frac{Q^{n}_{i-1} + Q^{n+1}_{i-1} + Q^{n}_{i}}{3} h^{n+1}_i = \bigg(\frac{n_m Q^{n+1}_i}{w S_0}\bigg)^{\frac{3}{5}} Numerical stability guidance provided by the following for lumped systems as opposed to gridded discretized reaches: .. math:: 2k_i x_i <= \Delta t <= 2k_i(1-x_i) .. _Cunge 1969: https://www.tandfonline.com/doi/pdf/10.1080/00221686909500264 .. _Gallice et. al 2016: https://www.geosci-model-dev.net/9/4491/2016/gmd-9-4491-2016.pdf