# Section Averaged 1D SIMPLE method

## 基礎式

$$
    \begin{align}
        \frac{\partial h}{\partial t}+\frac{\partial uh}{\partial x}  &= 0 \\
        \frac{\partial u}{\partial t}+\frac{\partial u u}{\partial x} &= - g\frac{\partial h}{\partial x} + g ( i_0  -  i_e )
    \end{align}
$$


## 基礎式の離散式

$$
    \begin{align}
        \frac{h^{n+1}_i - h^{n}_i}{\Delta t}+\frac{ u^{n+1}_{i+1/2} h^{n+1}_{i} - u^{n+1}_{i-1/2} h^{n+1}_{i-1} }{ \Delta x}  &= 0 \\
        \frac{u^{n+1}_{i+1/2} - u^{n}_{i+1/2}}{\Delta t}+\frac{ u^{n}_{i+1} u^{n+1}_{i+1/2} - u^{n}_{i} u^{n+1}_{i-1/2} }{ \Delta x}  &= -g\frac{h^{n+1}_{i+1} - h^{n+1}_i}{\Delta x}  + g ( i_0 - i_e)\\
    \end{align}
$$


運動方程式を以下の代数方程式の形式に書き換える

$$
    \begin{align}
        a_{i+1/2} u^{n+1}_{i+1/2} + a_{i+3/2} u^{n+1}_{i+3/2} + a_{i-1/2} u^{n+1}_{i-1/2} &= b_{i+1/2}
        -g\frac{h^{n+1}_{i+1} - h^{n+1}_i}{\Delta x}  +  g ( i_0 - i_e) \\
        a_{i+1/2} &= \dfrac{1}{\Delta t} + \dfrac{u^n_{i+1}}{\Delta x} \\
        a_{i+3/2} &= 0 \\
        a_{i-1/2} &= - \dfrac{u^n_{i}}{\Delta x} \\
        b_{i+1/2} &=  \dfrac{u^n_{i+1/2}}{\Delta t}
    \end{align}
$$


ここに，$u^n_{i} = 0.5( u^n_{i+1/2} + u^n_{i-1/2})$, $u^n_{i+1} = 0.5( u^n_{i+3/2} + u^n_{i+1/2})$とする．

## 基礎式の離散式の近似式

上式の近似式は

$$
    \begin{align}
        \frac{h^{*}_i - h^{n}_i}{\Delta t}+\frac{ u^{n+1}_{i+1/2} h^{*}_{i} - u^{n+1}_{i-1/2} h^{*}_{i-1} }{ \Delta x}  &= 0 
    \end{align}
$$


$$
    \begin{align}
        a_{i+1/2} u^{*}_{i+1/2} + a_{i+3/2} u^{*}_{i+3/2} + a_{i-1/2} u^{*}_{i-1/2} &= b_{i+1/2}
        -g\frac{h^{*}_{i+1} - h^{*}_i}{\Delta x}  + g ( i_0  - i_e)
    \end{align}
$$


## 流速の補正式

$$
    \begin{align}
        h^{n+1} &= h^* + \delta h \\
        u^{n+1} &= u^* + \delta u 
    \end{align}
$$

として，運動方程式の元式と近似式の差分をとると，

$$
    \begin{align}
        a_{i+1/2} \delta u_{i+1/2} + a_{i+1/2} \delta u_{i+3/2} + a_{i+1/2} \delta u_{i-1/2} &= 
        -g\frac{ \delta h_{i+1} - \delta h_i}{\Delta x} 
    \end{align}
$$


左辺第2,3項をキャンセルして，

$$
    \begin{align}
         \delta u_{i+1/2}  &= 
        -\dfrac{g}{a_{i+1/2}}
        \frac{ \delta h_{i+1} - \delta h_i}{\Delta x} 
    \end{align}
$$


## 圧力の補正式

これらを連続式の近似式に代入すると，

$$
    \begin{align}
        \frac{h^{*}_i - h^{n}_i}{\Delta t}
       +\dfrac{1}{\Delta x} 
        \left[ (u^*_{i+1/2} + \delta u_{i+1/2}) h^*_{i}  - (u^*_{i-1/2} + \delta u_{i-1/2}) h^*_{i-1}  \right]
        = 0
%         h^{n+1}_{i} - u^{n+1}_{i-1/2} h^{n+1}_{i-1} }{ \Delta x}  &= 0 \\
%         \frac{u^{n+1}_{i+1/2} - u^{n}_{i+1/2}}{\Delta t}+\frac{ u^{n}_{i+1} u^{n+1}_{i+1/2} - u^{n}_{i} u^{n+1}_{i-1/2} }{ \Delta x}  &= -g\frac{H^{n+1}_{i+1} - H^{n+1}_i}{\Delta x}  - g i_0 \\
    \end{align}
$$


代数方程式の形式に書き換えると，

$$
    \begin{align}
        A_{i} \delta h_{i} + A_{i+1} \delta h_{i+1} + A_{i-1} \delta h_{i-1} &= B_i \\
        A_{i} &= \dfrac{g}{\Delta x^2} \left( \dfrac{h^*_i}{a_{i+1/2}} + \dfrac{h^*_{i-1}}{a_{i-1/2}} \right) \\ 
        A_{i+1} &= - \dfrac{g}{\Delta x^2} \dfrac{h^*_{i}}{a_{i+1/2}}  \\
        A_{i-1} &= - \dfrac{g}{\Delta x^2} \dfrac{h^*_{i-1}}{a_{i-1/2}}  \\
        B_{i} &=  -\frac{h^{*}_i - h^{n}_i}{\Delta t} - \dfrac{  u^*_{i+1/2} h^*_{i} - u^*_{i-1/2} h^*_{i-1} }{ \Delta x}
    \end{align}
$$


## 緩和係数の導入

緩和係数$\alpha_p$,$\alpha_u$を導入すると，水深の更新式および運動方程式の近似式は以下となる．

$$
    \begin{align}
        h^{n+1} &= h^* + \alpha_p \delta h \\
    \end{align}
$$


$$
    \begin{align}
        \dfrac{a_{i+1/2}}{\alpha_u} u^{*}_{i+1/2} + a_{i+3/2} u^{*}_{i+3/2} + a_{i-1/2} u^{*}_{i-1/2} &= b_{i+1/2}
        -g\frac{h^{*}_{i+1} - h^{*}_i}{\Delta x}  + g ( i_0  - i_e) + (1-\alpha_u)\dfrac{a_{i+1/2}}{\alpha_u} u^{*old}_{i+1/2}
    \end{align}
$$


ここに，$u^{*old}$は，反復計算の前のステップの値を示す．

## 計算手順

1. $h^*$の仮値を設定
1. 運動方程式の近似式より$u^*$を計算
1. 圧力の補正式より$\delta h$を計算
1. 流速の補正式より$\delta u$を計算
1. 収束判定：$\delta h$が十分小さいか
1. 小さくない場合．$h^{n+1}$を$h^*$として計算を進める


a8707e9bfd8330a06039f5f0eaf19f78c0a9fceb
ipynb
Jupyter Notebook
document.ipynb
computational-sediment-hyd/SIMPLEmethodForSectionAveraged1DRiverFlow
d943c6d60af6affda8e0ca780b6bb9cc3bfb9b52
MIT
document.ipynb
computational-sediment-hyd/SIMPLEmethodForSectionAveraged1DRiverFlow
d943c6d60af6affda8e0ca780b6bb9cc3bfb9b52
MIT
document.ipynb
computational-sediment-hyd/SIMPLEmethodForSectionAveraged1DRiverFlow
d943c6d60af6affda8e0ca780b6bb9cc3bfb9b52
MIT
Qwen/Qwen-72B
1. YES
2. YES