.. sectionauthor:: Yasuyuki SHIMIZU .. _xy2sn: #################################################################### Appendix II (Basic equations for 2D flow in the s-n coordinates) #################################################################### Conversion of the basic 2D flow equations to the s-n coordinates =============================================================================== Let us assume that the :math:`s-n` coordinates are Cartesian curvilinear coordinates. On the :math:`s-n` coordinates, the :math:`s` axis is an arbitrary curve, and the :math:`n` axis is a straight coordinate axis perpendicular to the `s` axis. .. _xy_sn: .. figure:: images/0C/xy_sn.png :width: 80% :align: center : The :math:`x-y` coordinate and the :math:`s-n` coordinate As shown in :numref:`xy_sn`, for the :math:`x-y` coordinates, let the flow velocity in the :math:`x` axis direction be `u` and the flow velocity in the :math:`y` axis direction be :math:`v`, and for the :math:`s-n` coordinates, let the flow velocity in the :math:`s` axis direction be `u_s` and the flow velocity in the :math:`n` axis direction be :math:`u_n`. Also, let the angle between the :math:`s` axis and the :math:`x` axis be :math:`\theta`, and the radius of curvature of the :math:`s` axis be :math:`r`. As shown in :numref:`xy_sn`, let us define the radius of curvature such that :math:`r` is positive for a curvature whose :math:`\theta` increases in the positive direction of the :math:`s` axis. From the definition of the curvature, .. math:: :label: sn1 r d\theta = ds, \; \; \cfrac{\partial \theta}{\partial s}= \cfrac{1}{r}, \; \; \cfrac{\partial \theta}{\partial n}=0 :math:`u,v` and :math:`u, v` have the following relationships. .. math:: :label: sn2 u=u_s \cos \theta - u_n \sin \theta \\ v=u_s \sin \theta + u_n \cos \theta .. math:: :label: sn3 u_s=u \cos \theta + v \sin \theta \\ u_n=-u \sin \theta + v \cos \theta Each partial derivative has the following relationship. .. math:: :label: sn4 \left( \begin{array}{c} \cfrac{\partial}{\partial x} \\ \\ \cfrac{\partial}{\partial y} \end{array} \right) = \left( \begin{array}{cc} \cos{\theta} & -\sin{\theta} \\ \\ \sin{\theta} & \cos{\theta} \end{array} \right) \left( \begin{array}{c} \cfrac{\partial}{\partial s} \\ \\ \cfrac{\partial}{\partial n} \end{array} \right) .. math:: :label: sn5 \left( \begin{array}{c} \displaystyle{{\partial}\over{\partial s}} \\ \\ \displaystyle{{\partial}\over{\partial n}} \end{array} \right) = \left( \begin{array}{cc} \cos{\theta} & \sin{\theta} \\ \\ -\sin{\theta} & \cos{\theta} \end{array} \right) \left( \begin{array}{c} \displaystyle{{\partial}\over{\partial x}} \\ \\ \displaystyle{{\partial}\over{\partial y}} \end{array} \right) Also, .. math:: :label: sn6 \cfrac{\partial s}{\partial x}=\cos \theta, \; \; \cfrac{\partial s}{\partial y}=\sin \theta, \; \; \cfrac{\partial n}{\partial x}=-\sin \theta, \; \; \cfrac{\partial n}{\partial y}=\cos \theta Equation of continuity ------------------------------------ .. math:: :label: sn7 \cfrac{\partial h}{\partial t} +\cfrac{\partial (hu)}{\partial x} +\cfrac{\partial (hv)}{\partial y}=0 .. math:: :label: sn8 \cfrac{\partial h}{\partial t} +\cfrac{\partial}{\partial x} \left\{ h(u_s \cos \theta - u_n \sin \theta) \right\} +\cfrac{\partial}{\partial y} \left\{ h(u_s \sin \theta + u_n \cos \theta) \right\}=0 .. math:: :label: sn9 \cfrac{\partial h}{\partial t} +\cos \theta \cfrac{\partial}{\partial s} \left\{ h(u_s \cos \theta - u_n \sin \theta) \right\} -\sin \theta \cfrac{\partial}{\partial n} \left\{ h(u_s \cos \theta - u_n \sin \theta) \right\} \\ +\sin \theta \cfrac{\partial}{\partial s} \left\{ h(u_s \sin \theta + u_n \cos \theta) \right\} +\cos \theta \cfrac{\partial}{\partial n} \left\{ h(u_s \sin \theta + u_n \cos \theta) \right\}=0 .. math:: :label: sn10 \cfrac{\partial h}{\partial t} +\cos \theta \left\{ \cos\theta \cfrac{\partial(h u_s)}{\partial s}+h u_s \cfrac{\partial \cos \theta}{\partial s} -\sin\theta \cfrac{\partial(h u_n)}{\partial s}-h u_n \cfrac{\partial \sin \theta}{\partial s} \right\} \\ -\sin \theta \left\{ \cos\theta \cfrac{\partial(h u_s)}{\partial n}+h u_s \cancelto{0}{\cfrac{\partial \cos \theta}{\partial n}} -\sin\theta \cfrac{\partial(h u_n)}{\partial n}-h u_n \cancelto{0}{\cfrac{\partial \sin \theta}{\partial n}} \right\} \\ +\sin \theta \left\{ \sin\theta \cfrac{\partial(h u_s)}{\partial s}+h u_s \cfrac{\partial \sin \theta}{\partial s} +\cos\theta \cfrac{\partial(h u_n)}{\partial s}+h u_n \cfrac{\partial \cos \theta}{\partial s} \right\} \\ +\cos \theta \left\{ \sin\theta \cfrac{\partial(h u_s)}{\partial n}+h u_s \cancelto{0}{\cfrac{\partial \sin \theta}{\partial n}} +\cos\theta \cfrac{\partial(h u_n)}{\partial n}+h u_n \cancelto{0}{\cfrac{\partial \cos \theta}{\partial n}} \right\} .. math:: :label: sn11 \cfrac{\partial h}{\partial t} +\cos^2\theta\cfrac{\partial(hu_s)}{\partial s} \cancel{-\cos\theta\sin\theta hu_s\cfrac{\partial\theta}{\partial s}} \cancel{-\cos\theta\sin\theta\cfrac{\partial(hu_n)}{\partial s}}-\cos^2\theta hu_n\cfrac{\partial\theta}{\partial s} \\ \cancel{-\sin\theta\cos\theta\cfrac{\partial(hu_s)}{\partial n}} +\sin^2\theta\cfrac{\partial(hu_n)}{\partial n} \\ +\sin^2\theta\cfrac{\partial(hu_s)}{\partial s} +\cancel{\sin\theta\cos\theta hu_s\cfrac{\partial\theta}{\partial s}} \cancel{+\sin\theta\cos\theta\cfrac{\partial(hu_n)}{\partial s}}-\sin^2\theta hu_n\cfrac{\partial\theta}{\partial s} \\ \cancel{+\cos\theta\sin\theta\cfrac{\partial(hu_s)}{\partial n}} +\cos^2\theta\cfrac{\partial(hu_n)}{\partial n} .. math:: :label: sn12 \cfrac{\partial h}{\partial t} +(\cos^2\theta+\sin^2\theta)\cfrac{\partial(hu_s)}{\partial s} -(\cos^2\theta+\sin^2\theta)hu_n\cfrac{\partial\theta}{\partial s} \\ +(\cos^2\theta+\sin^2\theta)\cfrac{\partial(hu_n)}{\partial n} =0 .. math:: :label: sn13 \cfrac{\partial h}{\partial t} +\cfrac{\partial(hu_s)}{\partial s}-\cfrac{hu_n}{r} +\cfrac{\partial(hu_n)}{\partial n} =0 Where, .. math:: :label: sn14 \cfrac{\partial(rhu_n)}{\partial n}=r\cfrac{\partial(hu_n)}{\partial n} +hu_n\cfrac{\partial r}{\partial n} \\ = r\cfrac{\partial(hu_n)}{\partial n}-hu_n Finally, the equation of continuity on the :math:`s-n` axis is... .. math:: :label: sn15 \cfrac{\partial h}{\partial t} +\cfrac{\partial(hu_s)}{\partial s} +\cfrac{1}{r}\cfrac{\partial(rhu_n)}{\partial n} =0 Momentum equation --------------------------------- Let us review the equations of motion for the :math:`x-y` axis. .. math:: :label: sn_a1 \frac{\partial u}{\partial t}+u \frac{\partial u}{\partial x}+ v \frac{\partial u}{\partial y}= -g \frac{\partial H}{\partial x} -\frac{\tau_x}{\rho h}+D_x .. math:: :label: sn_a2 \frac{\partial v}{\partial t}+u \frac{\partial v}{\partial x}+ v \frac{\partial v}{\partial y}= -g \frac{\partial H}{\partial y} -\frac{\tau_y}{\rho h}+D_y Where, :math:`x, y` are plane coordinate axes that are mutually perpendicular, :math:`t` is time, :math:`u, v` are the depth-averaged velocity in the :math:`x, y` directions, :math:`h` is the water depth, :math:`H` is the water level, :math:`g` is the gravitational acceleration, :math:`\tau_x, \tau_y` are the riverbed shear force in the directions of :math:`x, y`, :math:`\rho` is the density of water and :math:`D_x, D_y` are the diffusion term in the :math:`x, y` directions. Then, Equation :eq:`sn_a1` and Equation :eq:`sn_a2` are expressed as follows. .. math:: :label: sn_a3 A_x = P_x + F_x + D_x\\ A_y = P_y + F_y + D_x Where, :math:`A_x, A_y, P_x, P_y, F_x, F_y, D_x, D_y` respectively express the advection term (acceleration term), the pressure gradient term, the friction term, and the diffusion terms in the directions of :math:`x, y`. By changing the subscript of each term to :math:`s,n`, we have each term in the :math:`s,n` axis directions.  The advection terms ^^^^^^^^^^^^^^^^^^^^^^ Acceleration in the :math:`x, y` directions can be written as follows: .. math:: :label: adv1 A_x = {{\partial u}\over{\partial t}} +u{{\partial u}\over{\partial x}} +v{{\partial u}\over{\partial y}} ={{\partial u}\over{\partial t}} +u\left( \cos\theta{{\partial u}\over{\partial s}} -\sin\theta{{\partial u}\over{\partial n}} \right) +v\left( \sin\theta{{\partial u}\over{\partial s}} +\cos\theta{{\partial u}\over{\partial n}} \right) \\ ={{\partial u}\over{\partial t}}+ {{\partial u}\over{\partial s}} \underbrace{(u\cos\theta+v\sin\theta)}_{u_s} +{{\partial u}\over{\partial n}} \underbrace{(-u\sin\theta+v\cos\theta)}_{u_n} ={{\partial u}\over{\partial t}}+ u_s{{\partial u}\over{\partial s}} +u_n{{\partial u}\over{\partial n}} .. math:: :label: adv_2 A_y = {{\partial v}\over{\partial t}} +u{{\partial v}\over{\partial x}} +v{{\partial v}\over{\partial y}} ={{\partial u}\over{\partial t}} +u\left( \cos\theta{{\partial v}\over{\partial s}} -\sin\theta{{\partial v}\over{\partial n}} \right) +v\left( \sin\theta{{\partial v}\over{\partial s}} +\cos\theta{{\partial v}\over{\partial n}} \right) \\ ={{\partial v}\over{\partial t}}+ {{\partial v}\over{\partial s}} \underbrace{(u\cos\theta+v\sin\theta)}_{u_s} +{{\partial v}\over{\partial n}} \underbrace{(-u\sin\theta+v\cos\theta)}_{u_n} ={{\partial u}\over{\partial t}}+ u_s{{\partial v}\over{\partial s}} +u_n{{\partial v}\over{\partial n}} Acceleration along the channel downstream direction ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Then the acceleration in the :math:`s` directions becomes: .. math:: :label: sn_a4 A_s = & A_x\cos\theta+A_y\sin\theta =\left( {{\partial u}\over{\partial t}}+ u_s{{\partial u}\over{\partial s}} +u_n{{\partial u}\over{\partial n}} \right)\cos\theta+ \left( {{\partial v}\over{\partial t}}+ u_s{{\partial v}\over{\partial s}} +u_n{{\partial v}\over{\partial n}} \right)\sin\theta = &\cos\theta{{\partial u}\over{\partial t}} + \cos\theta u_s {{\partial}\over{\partial s}} (u_s\cos\theta-u_n\sin\theta) +\cos\theta u_n{{\partial}\over{\partial n}} (u_s\cos\theta-u_n\sin\theta) & +\sin\theta{{\partial v}\over{\partial t}} +\sin\theta u_s {{\partial}\over{\partial s}} (u_s\sin\theta+u_n\cos\theta) +\sin\theta u_n {{\partial}\over{\partial n}} (u_s\sin\theta+u_n\cos\theta) = & {{\partial u_s}\over{\partial t}} +u_s\cos^2\theta {{\partial u_s}\over{\partial s}} +u_s^2\cos\theta{{\partial(\cos\theta)}\over{\partial s}} -u_s\sin\theta \cos\theta{{\partial u_n}\over{\partial s}} -u_s u_n\cos\theta{{\partial(\sin\theta)}\over{\partial s}} & +u_n\cos^2\theta {{\partial u_s}\over{\partial n}} +u_s u_n\cos\theta{{\partial(\cos\theta)}\over{\partial n}} -u_n\sin\theta \cos\theta{{\partial u_n}\over{\partial n}} -u_n^2\cos\theta{{\partial(\sin\theta)}\over{\partial n}} & +u_s\sin^2\theta {{\partial u_s}\over{\partial s}} +u_s^2\sin\theta{{\partial(\sin\theta)}\over{\partial s}} +u_s\sin\theta \cos\theta{{\partial u_n}\over{\partial s}} +u_s u_n\sin\theta{{\partial(\cos\theta)}\over{\partial s}} & +u_n\sin^2\theta {{\partial u_s}\over{\partial n}} +u_s u_n\sin\theta{{\partial(\sin\theta)}\over{\partial n}} +u_n\sin\theta \cos\theta{{\partial u_n}\over{\partial n}} +u_n^2\sin\theta{{\partial(\cos\theta)}\over{\partial n}} = & {{\partial u_s}\over{\partial t}} +u_s{{\partial u_s}\over{\partial s}} +u_n{{\partial u_s}\over{\partial n}} & +u_s^2\cos\theta{{\partial(\cos\theta)}\over{\partial s}} -u_s u_n\cos\theta{{\partial(\sin\theta)}\over{\partial s}} +u_s u_n\cos\theta{{\partial(\cos\theta)}\over{\partial n}} -u_n^2\cos\theta{{\partial(\sin\theta)}\over{\partial n}} & +u_s^2\sin\theta{{\partial(\sin\theta)}\over{\partial s}} +u_s u_n\sin\theta{{\partial(\cos\theta)}\over{\partial s}} +u_s u_n\sin\theta{{\partial(\sin\theta)}\over{\partial n}} +u_n^2\sin\theta{{\partial(\cos\theta)}\over{\partial n}} = & {{\partial u_s}\over{\partial t}} +u_s{{\partial u_s}\over{\partial s}} +u_n{{\partial u_s}\over{\partial n}} +u_s^2\left\{\sin\theta{{\partial(\sin\theta)}\over{\partial s}} +\cos\theta{{\partial(\cos\theta)}\over{\partial s}}\right\} & +u_s u_n\left\{ \cos\theta{{\partial(\cos\theta)}\over{\partial n}} -\cos\theta{{\partial(\sin\theta)}\over{\partial s}} +\sin\theta{{\partial(\cos\theta)}\over{\partial s}} +\sin\theta{{\partial(\sin\theta)}\over{\partial n}} \right\} & +u_n^2\left\{ \sin\theta{{\partial(\cos\theta)}\over{\partial n}} -\cos\theta{{\partial(\sin\theta)}\over{\partial n}} \right\} Where, .. math:: :label: sn_a5 \sin\theta{{\partial(\sin\theta)}\over{\partial s}} +\cos\theta{{\partial(\cos\theta)}\over{\partial s}} =\sin\theta\cos\theta{{\partial \theta}\over{\partial s}} -\cos\theta\sin\theta{{\partial \theta}\over{\partial s}}=0 .. math:: :label: sn_a6 & \cos\theta{{\partial(\cos\theta)}\over{\partial n}} -\cos\theta{{\partial(\sin\theta)}\over{\partial s}} +\sin\theta{{\partial(\cos\theta)}\over{\partial s}} +\sin\theta{{\partial(\sin\theta)}\over{\partial n}} = & \cancel{-\cos\theta\sin\theta{{\partial \theta}\over{\partial n}}} -\cos^2\theta{{\partial \theta}\over{\partial s}} -\sin^2\theta{{\partial \theta}\over{\partial s}} \cancel{+\sin\theta\cos\theta{{\partial \theta}\over{\partial n}}} = &-\left(\cos^2\theta+\sin^2\theta\right){{\partial \theta}\over{\partial s}} = &-{{\partial \theta}\over{\partial s}}=-{1 \over r} Also, .. math:: :label: sn_a7 \sin\theta{{\partial(\cos\theta)}\over{\partial n}} -\cos\theta{{\partial(\sin\theta)}\over{\partial n}}= -\sin^2\theta{{\partial \theta}\over{\partial n}} -\cos^2\theta{{\partial \theta}\over{\partial n}} =-{{\partial \theta}\over{\partial n}}=0 Therefore, the advection term in the :math:`s` axis direction is as follows. .. math:: :label: sn_a8 A_s= {{\partial u_s}\over{\partial t}} +u_s{{\partial u_s}\over{\partial s}} +u_n{{\partial u_s}\over{\partial n}} -{{u_s u_n}\over{r}} Acceleration in the transverse direction ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Acceleration in the channel transverse direction, :math:`n` axis directions can be written as, .. math:: :label: nn_a4 A_n = & -A_x\sin\theta+A_y\cos\theta \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad = & -\left( {{\partial u_x}\over{\partial t}}+ u_s{{\partial u_x}\over{\partial s}} +u_n{{\partial u_x}\over{\partial n}} \right)\sin\theta+ \left( {{\partial u_y}\over{\partial t}}+ u_s{{\partial u_y}\over{\partial s}} +u_n{{\partial u_y}\over{\partial n}} \right)\cos\theta = & {{\partial u_n}\over{\partial t}} -\sin\theta u_s {{\partial}\over{\partial s}} (u_s\cos\theta-u_n\sin\theta) -\sin\theta u_n{{\partial}\over{\partial n}} (u_s\cos\theta-u_n\sin\theta) & +\cos\theta u_s {{\partial}\over{\partial s}} (u_s\sin\theta+u_n\cos\theta) +\cos\theta u_n {{\partial}\over{\partial n}} (u_s\sin\theta+u_n\cos\theta) = & {{\partial u_n}\over{\partial t}} -u_s\sin\theta\cos\theta {{\partial u_s}\over{\partial s}} -u_s^2\sin\theta{{\partial(\cos\theta)}\over{\partial s}} +u_s\sin^2\theta {{\partial u_n}\over{\partial s}} +u_s u_n\sin\theta{{\partial(\sin\theta)}\over{\partial s}} & -u_n\sin\theta\cos\theta {{\partial u_s}\over{\partial n}} -u_s u_n\sin\theta{{\partial(\cos\theta)}\over{\partial n}} +u_n\sin^2\theta {{\partial u_n}\over{\partial n}} +u_n^2\sin\theta{{\partial(\sin\theta)}\over{\partial n}} & +u_s\cos\theta\sin\theta {{\partial u_s}\over{\partial s}} +u_s^2\cos\theta{{\partial(\sin\theta)}\over{\partial s}} +u_s\cos^2\theta{{\partial u_n}\over{\partial s}} +u_s u_n\cos\theta{{\partial(\cos\theta)}\over{\partial s}} & +u_n\sin\theta\cos\theta {{\partial u_s}\over{\partial n}} +u_s u_n\cos\theta{{\partial(\sin\theta)}\over{\partial n}} +u_n\cos^2\theta{{\partial u_n}\over{\partial n}} +u_n^2\cos\theta{{\partial(\cos\theta)}\over{\partial n}} = & {{\partial u_n}\over{\partial t}} +u_s{{\partial u_n}\over{\partial s}} +u_n{{\partial u_n}\over{\partial n}} & -u_s^2\sin\theta{{\partial(\cos\theta)}\over{\partial s}} +u_s u_n\sin\theta{{\partial(\sin\theta)}\over{\partial s}} -u_s u_n\sin\theta{{\partial(\cos\theta)}\over{\partial n}} +u_n^2\sin\theta{{\partial(\sin\theta)}\over{\partial n}} & +u_s^2\cos\theta{{\partial(\sin\theta)}\over{\partial s}} +u_s u_n\cos\theta{{\partial(\cos\theta)}\over{\partial s}} +u_s u_n\cos\theta{{\partial(\sin\theta)}\over{\partial n}} +u_n^2\cos\theta{{\partial(\cos\theta)}\over{\partial n}} = & {{\partial u_n}\over{\partial t}} +u_s{{\partial u_n}\over{\partial s}} +u_n{{\partial u_n}\over{\partial n}} +u_s^2\left\{-\sin\theta{{\partial(\cos\theta)}\over{\partial s}} +\cos\theta{{\partial(\sin\theta)}\over{\partial s}}\right\} & +u_s u_n\left\{ \sin\theta{{\partial(\sin\theta)}\over{\partial s}} -\sin\theta{{\partial(\cos\theta)}\over{\partial n}} +\cos\theta{{\partial(\cos\theta)}\over{\partial s}} +\cos\theta{{\partial(\sin\theta)}\over{\partial n}} \right\} & +u_n^2\left\{ \sin\theta{{\partial(\sin\theta)}\over{\partial n}} +\cos\theta{{\partial(\cos\theta)}\over{\partial n}} \right\} Where, .. math:: :label: nn_a5 -\sin\theta{{\partial(\cos\theta)}\over{\partial s}} +\cos\theta{{\partial(\sin\theta)}\over{\partial s}} =\sin^2\theta{{\partial \theta}\over{\partial s}} +\cos^2\theta{{\partial \theta}\over{\partial s}}={1 \over r} .. math:: :label: nn_a6 & \sin\theta{{\partial(\sin\theta)}\over{\partial s}} -\sin\theta{{\partial(\cos\theta)}\over{\partial n}} +\cos\theta{{\partial(\cos\theta)}\over{\partial s}} +\cos\theta{{\partial(\sin\theta)}\over{\partial n}} = & \cancel{\sin\theta\cos\theta{{\partial \theta}\over{\partial s}}} +\sin^2\theta{{\partial \theta}\over{\partial n}} \cancel{-\sin\theta\cos\theta{{\partial \theta}\over{\partial s}}} +\cos^2\theta{{\partial \theta}\over{\partial n}} = & {{\partial \theta}\over{\partial n}}=0 .. math:: :label: nn_a7 \sin\theta{{\partial(\sin\theta)}\over{\partial n}} +\cos\theta{{\partial(\cos\theta)}\over{\partial n}}= \sin\theta\cos\theta{{\partial \theta}\over{\partial n}} -\sin\theta\cos\theta{{\partial \theta}\over{\partial n}} =0 Therefore, the advection term in the :math:`n` axis direction is as follows. .. math:: :label: nn_a8 A_n= {{\partial u_n}\over{\partial t}} +u_s{{\partial u_n}\over{\partial s}} +u_n{{\partial u_n}\over{\partial n}} +{{u_s^2}\over{r}} Pressure term ------------------------- The pressure gradient in the :math:`x,y` axis directions are... .. math:: :label: ps_1 P_x= & -g\cfrac{\partial H}{\partial x} =-g\left(\cos\theta\cfrac{\partial H}{\partial s} -\sin\theta\cfrac{\partial H}{\partial n} \right) P_y= & -g\cfrac{\partial H}{\partial y} =-g\left(\sin\theta\cfrac{\partial H}{\partial s} +\cos\theta\cfrac{\partial H}{\partial n} \right) Convert these to the pressure gradients, :math:`P_s, P_n`, in the :math:`s, n` axis directions. .. math:: :label: ps_2 P_s= & P_x \cos\theta+P_y \sin\theta \\ = & \cos\theta\left\{ -g\left(\cos\theta\cfrac{\partial H}{\partial s} -\sin\theta\cfrac{\partial H}{\partial n} \right) \right\} +\sin\theta\left\{ -g\left(\sin\theta\cfrac{\partial H}{\partial s} +\cos\theta\cfrac{\partial H}{\partial n} \right) \right\} \\ = & g\left( -\cos^2\theta\cfrac{\partial H}{\partial s} \cancel{+\cos\theta\sin\theta\cfrac{\partial H}{\partial n}} -\sin^2\theta\cfrac{\partial H}{\partial s} \cancel{-\cos\theta\sin\theta\cfrac{\partial H}{\partial n}} \right) \\ = & -g\cfrac{\partial H}{\partial s} .. math:: :label: ps_3 P_n= & -P_x \sin\theta+P_y \cos\theta \\ = & -\sin\theta\left\{ -g\left(\cos\theta\cfrac{\partial H}{\partial s} -\sin\theta\cfrac{\partial H}{\partial n} \right) \right\} +\cos\theta\left\{ -g\left(\sin\theta\cfrac{\partial H}{\partial s} +\cos\theta\cfrac{\partial H}{\partial n} \right) \right\} \\ = & g\left( \cancel{\cos\theta\sin\theta\cfrac{\partial H}{\partial s}} -\sin^2\theta\cfrac{\partial H}{\partial n} \cancel{-\cos\theta\sin\theta\cfrac{\partial H}{\partial s}} -\cos^2\theta\cfrac{\partial H}{\partial s} \right) \\ =& -g\cfrac{\partial H}{\partial n} Friction term ------------------- From :eq:`tauxy`, when Manning’s law is adopted, the friction term in the :math:`x,y` axis directions are expressed as follows: .. math:: :label: frc_1 F_x = & -\cfrac{\tau_x}{\rho h} = -{{g n_m^2 u \sqrt{u^2+v^2}}\over h^{4/3}} =-u V_\tau F_y = & -\cfrac{\tau_y}{\rho h} = -{{g n_m^2 u \sqrt{u^2+v^2}}\over h^{4/3}} =-v V_\tau Where, .. math:: :label: frc_2 V_\tau = \cfrac{g n_m^2 \sqrt{u^2+v^2}}{h^{4/3}} = \cfrac{g n_m^2 \sqrt{u_s^2+u_n^2}}{h^{4/3}} Convert Equation :eq:`frc_1` to the :math:`s,n` axis directions. Assume :math:`F_s, F_n` are the friction term in the :math:`s, n` directions. .. math:: :label: frc_3 F_s & = F_x\cos\theta+F_y\sin\theta = -u V_\tau\cos\theta-v V_\tau\sin\theta & = -(u_s \cos \theta - u_n \sin \theta)V_\tau\cos\theta -(u_s \sin \theta + u_n \cos \theta) V_\tau\sin\theta & = -u_s V_\tau \cos^2 \theta \cancel{- u_n V_\tau \sin\theta\cos\theta} -u_s V_\tau \sin^2\theta +\cancel{u_n V_\tau \sin\theta\cos\theta} & = -u_s(\sin^2\theta+\cos^2 \theta)V_\tau = -u_s V_\tau =-{{g n_m^2 u_s \sqrt{u_s^2+u_n^2}}\over h^{4/3}} .. math:: :label: frc_4 F_n & = -F_x\sin\theta+F_y\cos\theta =u V_\tau\sin\theta-v V_\tau\cos\theta & = (u_s \cos\theta - u_n \sin \theta)V_\tau\sin\theta -(u_s \sin \theta + u_n \cos \theta)V_\tau\cos\theta & = \cancel{u_s V_\tau\cos\theta\sin\theta}-u_nV_\tau\sin^2\theta -\cancel{u_s V_\tau\sin\theta\cos\theta}-u_nV_\tau\cos^2\theta & = -u_n(\sin^2\theta+\cos^2 \theta)V_\tau = -u_n V_\tau =-{{g n_m^2 u_n \sqrt{u_s^2+u_n^2}}\over h^{4/3}} Diffusion term ------------------- Similar to the density diffusion equation (Equation :eq:`sn_dif5`) on the :math:`s-n` coordinates, the diffusion of momentums are expressed as follows. .. math:: :label: frc_5 D_s & = \cfrac{\partial}{\partial s}\left(\nu_t\cfrac{\partial u_s}{\partial s}\right) +\cfrac{\partial}{\partial n}\left(\nu_t\cfrac{\partial u_s}{\partial n}\right) +\cfrac{\nu_t}{r}\cfrac{\partial u_s}{\partial n} D_n & =\cfrac{\partial}{\partial s}\left(\nu_t \cfrac{\partial u_n}{\partial s}\right) +\cfrac{\partial}{\partial n}\left(\nu_t\cfrac{\partial u_n}{\partial n}\right) +\cfrac{\nu_t}{r}\cfrac{\partial u_n}{\partial n} Summary ------------------- The equations of motion and the equations of continuity of 2D free surface flow on the :math:`s-n` coordinates are as follows. .. math:: :label: sn_cont \cfrac{\partial h}{\partial t} +\cfrac{\partial(hu_s)}{\partial s} +\cfrac{1}{r}\cfrac{\partial(rhu_n)}{\partial n} =0 .. math:: :label: sn_mom1 {{\partial u_s}\over{\partial t}} +u_s{{\partial u_s}\over{\partial s}} +u_n{{\partial u_s}\over{\partial n}} -{{u_s u_n}\over{r}}= \hspace{4.5cm} -g\cfrac{\partial H}{\partial s} -{{g n_m^2 u_s \sqrt{u_s^2+u_n^2}}\over h^{4/3}} +\cfrac{\partial}{\partial s}\left(\nu_t\cfrac{\partial u_s}{\partial s}\right) +\cfrac{\partial}{\partial n}\left(\nu_t\cfrac{\partial u_s}{\partial n}\right) +\cfrac{\nu_t}{r}\cfrac{\partial u_s}{\partial n} .. math:: :label: sn_mom2 {{\partial u_n}\over{\partial t}} +u_s{{\partial u_n}\over{\partial s}} +u_n{{\partial u_n}\over{\partial n}} +{{u_s^2}\over{r}}= \hspace{4.5cm} -g\cfrac{\partial H}{\partial n} -{{g n_m^2 u_n \sqrt{u_s^2+u_n^2}}\over h^{4/3}} +\cfrac{\partial}{\partial s}\left(\nu_t \cfrac{\partial u_n}{\partial s}\right) +\cfrac{\partial}{\partial n}\left(\nu_t\cfrac{\partial u_n}{\partial n}\right) +\cfrac{\nu_t}{r}\cfrac{\partial u_n}{\partial n}