---
# System prepended metadata

title: '***Computational Hydraulics***'
tags: [HW02]

---

---
tags: HW02
---
# ***Computational Hydraulics***
## **Group 01:** N88071053 洪豪男 N88091011 黃彥鈞
## **HW02:** Please compute the characteristics of the system of shallow water equations (1D)


$\dfrac{\partial h}{\partial t}+\dfrac{\partial }{\partial x}(h \overline u)=0$

$\dfrac{\partial }{\partial t} (h \overline u)+\dfrac{\partial }{\partial x}(h \overline u^2 +\dfrac{1}{2}g_zh^2)=hg_x-\dfrac {\tau_{bx}}{\rho}$ 


$\Rightarrow \dfrac{\partial}{\partial t}\left (\begin{array}{cc} h \\ h\overline u \end{array}\right ) 
+\dfrac{\partial}{\partial x}\left (\begin{array}{cc} h\overline u \\ h\overline u^2+\dfrac{1}{2}g_zh^2 \end{array}\right ) 
=\left (\begin{array}{cc} 0 \\ hg_x-\dfrac{\tau_{bx}}{\rho} \end{array}\right )$

$\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad \Downarrow$

$\dfrac{\partial \pmb u}{\partial t}+\dfrac{\partial \pmb f}{\partial x}
= \pmb \tau
\quad\quad\quad\Rightarrow \quad\quad\dfrac{\partial \pmb u}{\partial t}+ \pmb M\dfrac{\partial \pmb u}{\partial x}
= \pmb\tau$

where 

$\pmb u = \left (\begin{array}{cc} h \\m \end{array}\right )$ , $\quad\quad\pmb f 
= \left (\begin{array}{cc} f_1 \\ f_2 \end{array}\right )
=\left (\begin{array}{cc} m \\ \dfrac{m^2}{h}+\dfrac{1}{2}g_zh^2 \end{array}\right )$ , $\quad\quad\pmb M =\nabla\pmb f
=\left (\begin{array}{cc} \dfrac{\partial f_1}{\partial h} & \dfrac{\partial f_1}{\partial m} \\ \dfrac{\partial f_2}{\partial h} & \dfrac{\partial f_2}{\partial m}\end{array}\right )$


$\Rightarrow \left\{
\begin{array}{l}
\dfrac{\partial f_1}{\partial h}=\dfrac{\partial m}{\partial h}=0\\
\dfrac{\partial f_1}{\partial m}=\dfrac{\partial m}{\partial m}=1\\
\dfrac{\partial f_2}{\partial h}=\dfrac{\partial}{\partial h}(\dfrac{m^2}{h}+\dfrac{1}{2}g_zh^2)=-\dfrac{m^2}{h^2}+g_zh\\
\dfrac{\partial f_2}{\partial m}=\dfrac{\partial}{\partial m}(\dfrac{m^2}{h}+\dfrac{1}{2}g_zh^2)=\dfrac{2m}{h} 
\end{array}\right .$

 
 $\Rightarrow\pmb M =\left (\begin{array}{cc}
    0 & 1 \\ -\dfrac{m^2}{h^2}+g_zh & \dfrac{2m}{h}
    \end{array}\right )=\left (\begin{array}{cc}
    0 & 1 \\ -\overline u^2+g_zh & 2\overline u 
    \end{array}\right )$
    
$(\pmb M-\lambda I)=\left (\begin{array}{cc}-\lambda & 1 \\ -\overline u^2+g_zh & 2\overline u-\lambda\end{array}\right )$
   
$det (\pmb M-\lambda I)=0$

$\Rightarrow(-\lambda)(2\overline u-\lambda)-(-\overline u^2+g_zh)=2\overline u\lambda+\lambda^2+\overline u^2-g_zh=0$ 

$\Rightarrow\lambda^2-2\overline u\lambda+\overline u^2=g_zh$

$\Rightarrow(\lambda-\overline u)^2=g_zh$

$\Rightarrow\lambda=\overline u\pm\sqrt{g_zh}$