0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

移流項の差分近似(再訪)

Posted at

初めに

これの再訪である.

特に,空間スキームの収束性が興味の対象である.この意味で,時間が混じるLax-WendroffとQUICKESTは混乱を生みそうなので議論の対象から省く.

Methods

移流方程式

初期条件はGauss波とする.

\begin{align}
    \partial_t \phi
    + a \partial_x \phi
    &= 0 \\
    \phi (x, t=0)
    &= f (x)
     = \exp \left( - \frac{(x - x')^2}{2 s^2} \right)
\end{align}

$a = 0.5, \ \Omega = (0, L), \ \mathcal{I} = (0, T), \ L = 1, \ T = 1$とする.

$x' = L/5, \ s = L/20$を選ぶ.

初期条件 解析解
advc_ic.png advc_analytic.gif

滑らかなので,風上化をしなくても安定して解けるが,いま,それには興味が無い.

移流スキーム

既に述べたように,

  • (所謂,原始的な)風上差分近似: 1次精度
  • QUICK: 2次精度
  • KK: 3次精度

であると考えている.QUICKについては,私の考えとLeaonard1979Versteeg&Malalasekera1995の主張が食い違うことは明記しておく.だから,間違えているかもしれない.

時間進行スキーム

昔の実験では,Euler法をかなり細かく刻んだ.が,あまり美しくないし,時間方向の誤差を十分に排除できたか少し自信が無い.もう少しだけ高級な時間進行法を使って再度調べてみる.

簡単に,陽的な方法を採用する.

  • Euler法: 1次精度
  • Heun法: 2次精度
  • Runge-Kutta法: 4次精度

Results

Sanity check

離散化パラメータ: $h = 1 \times 10^{-2}, \tau = 2 \times 10^{-3}$(空間,時間).

Euler Heun Runge-Kutta
$\text{Animation}$ Euler.gif Heun.gif RK.gif
$\text{Snapshot}$ fig_500.png fig_500.png fig_500.png

この程度の細かさでは,QUICKの方が誤差が小さい.これは,昔の実験と一致する.

Convergence

$t=T$での誤差を測る.

実線+四角マーカー: 誤差の最大値,破線+丸マーカー: 誤差の平均値.

Euler Heun RK4
$\tau = 1 \times 10^{-4}$ image.png image.png image.png
$\tau = 1 \times 10^{-5}$ image.png image.png image.png
$\tau = 1 \times 10^{-6}$ image.png image.png image.png

Euler法で$\tau = 1 \times 10^{-4}$とした場合,空間解像度を細かくしてみると,QUICKとKKは山の裾が振動し始め,それが増幅していき,爆発した.

所々,かなり一致する結果が並んでいるが,貼り付ける結果は間違っていないはずである(何度も確認した).数値誤差の影響だろう.

終わりに

素朴にEuler法で細かく刻んだときとそう変わらない結果であった.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?