---
# System prepended metadata

title: '***Computational Hydraulics***'
tags: [HW5.3]

---

---
tags: HW5.3
---
# ***Computational Hydraulics***
## **Group 01:** N88071053 洪豪男 N88091011 黃彥鈞
## **HW5.3:** Please prove the above conservative form

* semi-discrete central scheme

$\quad\dfrac{u^{n+1}_j - u^n_j}{\Delta t}
\\\quad=\dfrac{1}{2\Delta x}\Biggl\{-\Bigl[\left(f\left(u^{n+1/2}_{j+1/2,r}\right)+f\left(u^{n+1/2}_{j+1/2,l}\right)\right)-\left(f\left(u^{n+1/2}_{j-1/2,r}\right)+f\left(u^{n+1/2}_{j-1/2,l}\right)\right)\Bigr]\Biggr.
\\\quad\quad \left.+a^n_{j+1/2}\left[\left(u^n_{j+1}-\dfrac{\Delta x}{2}(u_x)^n_{j+1}\right)-\left(u^n_{j}+\dfrac{\Delta x}{2}(u_x)^n_j\right)\right]\right.
 \\\quad\quad \Biggl.-a^n_{j-1/2}\left[\left(u^n_{j}-\dfrac{\Delta x}{2}(u_x)^n_{j}\right)-\left(u^n_{j-1}+\dfrac{\Delta x}{2}(u_x)^n_{j-1}\right)\right]\Biggr\}+{\cal O}(\lambda)$

Note that as $t\rightarrow0$, the midvalues on the right approach

$\quad u^{n+1/2}_{j+1/2,r}\; \rightarrow\; u_{j+1}(t)-\dfrac{\Delta x}{2}(u_x)_{j+1}(t)\;=:u^+_{j+1/2}(t)$

$\quad u^{n+1/2}_{j+1/2,l}\; \rightarrow\; u_{j}(t)+\dfrac{\Delta x}{2}(u_x)_{j}(t)\;=:u^-_{j+1/2}(t)$


Let  $t\rightarrow0$, the resulting semi-discrete central scheme can be written in its compact form:

$\quad\begin{array}{rl}
\dfrac{d}{d t}u_j(t)   & = 
\dfrac{-1}{2\Delta x}\Bigl[\left(f\left(u^{+}_{j+1/2}(t)\right)+f\left(u^-_{j+1/2}(t)\right)\right)-\left(f\left(u^{+}_{j-1/2}(t)\right)+f\left(u^{-}_{j-1/2}(t)\right)\right)\Bigr]\\
& \quad +\dfrac{a_{j+1/2}(t)}{2\Delta x}\Bigl[u^+_{j+1/2}(t)-u^-_{j+1/2}(t)\Bigr]
 -\dfrac{a_{j-1/2}(t)}{2\Delta x}\Bigl[u^+_{j-1/2}(t)-u^-_{j-1/2}(t)\Bigr]+{\cal O}(\lambda)
\end{array}$

* Conservative form

$\quad\dfrac{d}{dt} u_j(t) =-\dfrac{H_{j+1/2}(t)-H_{j-1/2}(t)}{\Delta x}$

$\quad$ with the numerical flux

$\quad\quad H_{j+1/2}(t):=\dfrac{f(u^+_{j+1/2}(t))+f(u^-_{j+1/2}(t))}{2}-\dfrac{a_{j+1/2}(t)}{2}\left[u^+_{j+1/2}(t)-u^-_{j+1/2}(t)\right]$

$\quad\quad H_{j-1/2}(t):=\dfrac{f(u^+_{j-1/2}(t))+f(u^-_{j-1/2}(t))}{2}-\dfrac{a_{j-1/2}(t)}{2}\left[u^+_{j-1/2}(t)-u^-_{j-1/2}(t)\right]$

$\quad$ Here, the intermediate values are given by

$\quad\quad u^+_{j+1/2}(t):=u_{j+1}(t) - \dfrac{\Delta x}{2}(u_x)_{j+1}(t)$
$\quad\quad u^-_{j+1/2}(t):=u_{j}(t) + \dfrac{\Delta x}{2}(u_x)_{j}(t)$