Publications

Back to Peer-reviewed journal papers

Development of Hierarchical Domain Decomposition Explicit MPS Method and Application to Large-Scale Tsunami Analysis with Floating Objects

Authors
K. Murotani†, S. Koshizuka, T. Tamai, K. Shibata, N. Mitsume, S. Yoshimura, S. Tanaka, K. Hasegawa, E. Nagai, T. Fujisawa
Published in
Journal of Advanced Simulation in Science and Engineering
Volume, pages
Vol.1, No.1, pp.16–35
Year
2014
Type
Peer-reviewed journal papers
Link
https://doi.org/10.15748/jasse.1.16
Topics
Particle methods Coupled analysis Large-scale parallel computing Tsunami and disaster mitigation Fluid dynamics
Keywords
Hierarchical domain decomposition Explicit MPS method Large-scale tsunami analysis Floating objects MPS Distributed memory parallel computing Explicit algorithm ParMETIS Tsunami Particle data management by buckets
Note
日本シミュレーション学会 Best Paper Award 受賞
グラフィカルアブストラクト
グラフィカルアブストラクト

概要

粒子法は、連続体を粒子の集まりとみなし、微分方程式で表される物理法則を粒子の間の相互作用で離散化して、粒子の状態と運動を計算する手法です。計算点である粒子が時間とともに動くので、自由表面や大変形のような動的な現象を、格子を使う手法より扱いやすい一方で、粒子が動くことが、分散メモリ型の並列計算機での並列化を難しくしています。論文は、これまでの粒子法の分散メモリ型の並列化には、多数のプロセッシングエレメント(PE)で十分な性能が得られていないものや、並列化の効率のような相対的な値だけを示し、達成した FLOPS を示していないものがあると指摘しています。

本論文は、陽的 MPS(moving particle simulation)法のための、新しい分散メモリ型の並列アルゴリズムを示しています。解析領域をバケットで区切り、グラフ分割のライブラリ ParMETIS で PE に分割する既存の方法(バケットを単位とする 1 階層の領域分割による、陽的な粒子法の分散並列計算)に対して、2 階層の領域分割と、バケットによる粒子データの管理の 2 点を改良しました。東京大学の FX10 で、理想的な粒子の配置と領域分割の下、12 から 4800 の PE への強スケーリング効率は 0.823 と 0.931、弱スケーリング効率は 0.952 と 0.957、4800 PE でのピーク性能比は 3.810 % と 7.246 % でした(影響半径を粒子間距離の 2.0 倍と 4.0 倍にした場合)。さらに、東日本大震災の津波で直径 10 m の 2 基のタンクが運ばれた、石巻市の市街地の浸水を含む津波遡上解析に適用しています。

重要点

1. 陽的 MPS 法:圧力を状態方程式から陽的に求める

本論文の陽的 MPS 法は、Shakibaeinia らが、自由表面を持つ弱圧縮性の流れを解析するために提案した方法です。低いマッハ数(0.1〜0.2)の下で人工的な弱い圧縮性を導入することで、圧力を陽的に高速に計算でき、非圧縮性もよく近似できます。支配方程式は、圧力を求めるための状態方程式と、非圧縮性流れの Navier–Stokes 方程式です。

∂P∂ρ=c2(1)\frac{\partial P}{\partial \rho} = c^2 \tag{1} Dv⃗Dt=−1ρ∇P+νΔv⃗+g⃗(2)\frac{D\vec{v}}{Dt} = -\frac{1}{\rho}\nabla P + \nu \Delta \vec{v} + \vec{g} \tag{2}

ここで、PP は圧力、ρ\rho は密度、cc は音速、v⃗\vec{v} は速度、ν\nu は流体の動粘性係数、g⃗\vec{g} は重力、tt は時間です。D/DtD/Dt は粒子とともに動きながら見た時間微分(物質微分)、Δ\Delta はラプラシアンです。

1 時間ステップの計算は、式 (1)、(2) を離散化した次の手順です。まず、粘性項と重力から仮の速度 v⃗∗\vec{v}^* を求め(式 (3))、それで粒子を動かして仮の位置 r⃗∗\vec{r}^* を求めます(式 (4))。ここで、r⃗\vec{r} は粒子の位置、上付きの ∗* はそのステップでの仮の値です。次に、仮の位置での粒子数密度から、圧力を陽的に求めます。

Pik+1=c2ρni∗−n0n0(5)P_i^{k+1} = c^2 \rho \frac{n_i^* - n^0}{n^0} \tag{5}

ここで、上付きの kk は時間ステップの番号、下付きの ii は粒子の番号です。nn は単位体積あたりの粒子の数(粒子数密度)で、n0n^0 は初期の状態での単位体積あたりの粒子の数です。続いて、圧力の勾配から速度の修正量 v⃗′\vec{v}' を求めます。

v⃗′=−Δtρ[∇P]k+1(6)\vec{v}' = -\frac{\Delta t}{\rho}\left[\nabla P\right]^{k+1} \tag{6}

ここで、Δt\Delta t は時間増分です(Δt\Delta t の Δ\Delta は、式 (2) のラプラシアンとは別の意味です)。角括弧 [∇P]k+1[\nabla P]^{k+1} は、圧力の勾配を、粒子の間の相互作用で近似した離散的な演算子で計算したものです。最後に、v⃗k+1=v⃗∗+v⃗′\vec{v}^{k+1} = \vec{v}^* + \vec{v}' と r⃗k+1=r⃗∗+Δt v⃗′\vec{r}^{k+1} = \vec{r}^* + \Delta t\, \vec{v}' で、速度と位置を更新します(式 (7)、(8))。

論文は、MPS 法の粒子の間の相互作用のモデルは、影響半径の中の粒子が格子状に規則正しく並ぶことを前提にしているので、境界を含む不規則な粒子の配置では精度が低くなるという Tamai らの指摘を挙げ、Tamai らが提案した、Taylor 展開に基づく任意の高次の一貫性を持つ空間の離散化を採用しています。

2. バケットを単位に領域を分割し、隣り合う PE とハローで粒子データを交換する

本論文の並列アルゴリズムは、バケットを単位とする 1 階層の領域分割による、陽的な粒子法の分散並列計算(Ferrari らの方法)を改良したものです。まず、解析領域の全体を囲む直方体(バウンディングボックス)を、立方体のバケットで埋め、すべての粒子をバケットに割り当てます。MPS 法では粒子の影響半径が決まっているので、バケットの幅は影響半径より大きくします。次に、各 PE の粒子数が等しくなるように、バケットを単位として領域を分割します。分割には、グラフ分割のライブラリ METIS と、その並列計算機版の ParMETIS を使います。バケットの一つ一つを頂点に、バケットの面を辺に対応させたグラフを作り、PE の間で粒子数をそろえるため、バケットの中の粒子数を頂点の重みにします。

分割した各領域は、境界から 1 バケットの幅だけ広げ、広げた領域の粒子も同じ PE に割り当てます。この 1 バケットの幅の領域を「ハロー」と呼びます。ハローの粒子データは、隣り合う PE の間の通信(ハロー交換)で一致させます(図 1)。ハロー交換は、1 時間ステップに 3 回、式 (4)、(5)、(8) の計算の後に行います。解析が進んで、領域の間で粒子数の偏りが生じたときは、METIS で領域を分割し直して、粒子数の釣り合いを取り戻します。

4 つの PE の間のハロー交換の模式図
図 1 ハロー交換のパターン。丸は粒子、四角はバケットです。濃い色のバケットは各 PE(PE 0〜3)に割り当てた領域、薄い色のバケットはハローを表します。矢印は、ほかの PE の粒子データが PE 0 のハローに送られる様子を表します。出典:原論文 Fig. 4(© 2014 Japan Society for Simulation Technology)。

3. 2 階層の領域分割(Part と Subdomain)

改良の 1 つ目は、2 階層の領域分割です。解析領域を 2 段階で分割します(図 2)。第 1 階層の大きな単位を「Part」、Part をさらに分けた第 2 階層の小さな単位を「Subdomain」と呼びます。並列計算機では、1 つの Part を 1 つの PE に割り当て、各 Part を複数の Subdomain に分けます。Subdomain のループに OpenMP の動的スケジューリングを割り当てると、OpenMP が Subdomain の間の動的な負荷分散を自動で行います。

2 階層の領域分割の模式図
図 2 2 階層の領域分割。中央の解析領域を 4 つの Part(Part 0〜3)に分け、各 Part をさらに 2 つの Subdomain に分けています。出典:原論文 Fig. 5(© 2014 Japan Society for Simulation Technology)。

論文は、この改良の利点として、問題の単位が小さくなるのでデータの局所性が高まることと、Part を Subdomain に分ければ、並列化の難しい計算アルゴリズムも Subdomain ごとに自動で並列化できることを挙げています。

4. バケットごとに粒子データを並べ替え、メモリを直接アクセスする

改良の 2 つ目は、粒子データをバケットで管理することです。MPS 法では、影響半径の中にある粒子どうしの相互作用を計算します。影響半径の中の粒子を探すときは、対象の粒子が属するバケットを中心とする 3×3×3 個のバケットの粒子だけを探せば十分です。この探し方は、分子動力学のシミュレーションで、カットオフの距離の中の原子の組をすべて探す「セルリンクリスト」と同じものです。

従来の方法は、バケットごとの粒子番号の並びを片方向の連結リストで持ち、粒子データ(位置、速度、圧力など)の配列の順番は、解析の初めから終わりまで変えません。図 3 の (a) の例では、6 個の粒子を 4 つのバケットに割り当て、各バケットの最初の粒子番号を書いた配列 FirstIdxInBucket[4] = {0, 4, -1, 1}(-1 は空のバケット)と、各粒子から連結される粒子番号を書いた配列 NextIdx[6] = {2, 3, -1, 5, -1, -1}(-1 は、そのバケットにそれより先の粒子がないこと)を用意します。連結リストを通して粒子データを読むので、メモリの読み方は「間接アクセス(Indirect access)」になります。解析が進むと、メモリで隣り合う粒子データが、解析領域では遠く離れることが多くなり、粒子番号が 1 増えるだけで、粒子が属するバケットが前のバケットから遠く離れることがよくあります(図 4 の (a))。この場合、バケットのすべての粒子データを L1 キャッシュに読み込み直す必要があり、計算の効率が下がります。

バケットへの粒子の割り当てと、バケットごとの並べ替えの例
図 3 バケットへの粒子の割り当て。(a) 連結リストで、粒子をバケットに割り当てた状態。(b) (a) の後に、粒子データをバケットごとに並べ替えた状態。丸の中の数字は粒子番号です。出典:原論文 Fig. 6(© 2014 Japan Society for Simulation Technology)。
並べ替えの前と後のバケットのアクセスのパターン
図 4 バケットのアクセスのパターン。(a) バケットごとに並べ替える前。(b) 並べ替えた後。矢印は、粒子番号が 1 増えたときに、粒子が属するバケットがどう移るかを表します。出典:原論文 Fig. 7(© 2014 Japan Society for Simulation Technology)。

本論文は、粒子番号をバケットに割り当てた後に、粒子データをバケットごとに並べ替えます(図 3 の (b))。バケットの中で並べる必要はなく、バケットの間の粒子番号の境目の位置を、NumParticleInBucket[5] = {0, 2, 3, 3, 6} のような配列で持てば十分です。n 番目のバケットの粒子データは NumParticleInBucket[n] から NumParticleInBucket[n+1]-1 までにあり(この n はバケットの番号で、式 (5) の粒子数密度 nn とは別です)、粒子データを直接読む「直接アクセス(Direct access)」になります。解析領域で隣り合う粒子がメモリでも隣り合って置かれるので、対象の粒子が同じバケットにとどまる間は、同じ近傍粒子のデータを、L1 キャッシュに読み込み直さずに使えます。対象の粒子が隣のバケットに移っても、粒子データの 3 分の 2 は L1 キャッシュに残ります(図 4 の (b))。

論文は、この直接アクセスによって、ソフトウェアパイプラインと SIMD のベクトル化がより有効になり、達成する FLOPS の向上に役立っていると述べています。

数値実験の結果

バケットごとの並べ替えの効果(ダムブレイク問題)

バケットごとに並べ替える前と後の計算時間を、ダムブレイク問題で比べました。解析領域は 1.0 m × 0.2 m × 0.6 m、水柱は 0.25 m × 0.2 m × 0.5 m、解析する時間は 1 秒です。影響半径 rer_e は、初期の粒子の間隔 l0l_0 の 2.1 倍です。九州大学の CX400 の 1 PE(16 スレッド)を使いました。l0l_0 を 0.01 と 0.005 にした 2 つの場合を調べています。図 5 は、l0l_0 を 0.005 にした場合(粒子数は 416,016)の、1 時間ステップあたりの計算時間の推移です。

l0 = 0.005 の場合の、1 時間ステップあたりの計算時間の比較
図 5 l0l_0 を 0.005 にした場合(粒子数は 416,016)の、1 時間ステップあたりの計算時間(wall-clock time)の比較。横軸は解析の中の時刻です。紫の線は連結リストによる MPS の計算の全体(間接アクセス)、赤の線はバケットごとに並べ替えた粒子データによる MPS の計算の全体(直接アクセス)、緑の線は粒子のバケットへの割り当てと連結リストの作成、青の線は粒子のバケットへの割り当てと粒子データの並べ替えにかかった時間です。出典:原論文 Fig. 9(© 2014 Japan Society for Simulation Technology)。
  • 赤の線(直接アクセス)の計算時間は、紫の線(間接アクセス)より短くなりました。緑と青の線の時間は、赤と紫の線よりずっと短くなりました。論文は、粒子データの並べ替えにかかる時間は、MPS の計算の全体に比べて小さいと述べています。
  • 直接アクセスと間接アクセスの計算時間の差は、初めは大きくありませんが、解析が進むにつれて大きくなりました。論文は、その理由を、粒子は初めは座標の順に並んでいるが、解析が進むと入り混じり、メモリで隣り合う粒子が解析領域では遠く離れていくためと説明しています。
  • 論文は、l0l_0 が 0.01 と 0.005 の 2 つの場合について、解析の終わりには、直接アクセスと間接アクセスの計算時間の差が 1.5〜2.0 倍になると述べています。

計算時間の差の原因を調べるため、東京大学の FX10(SPARC64 IXfx。コアあたり 32 KB の L1 キャッシュを持つ)で、富士通のプロファイラを使って L1 キャッシュミス率を測りました。比べたのは、最も時間のかかる粒子の間の相互作用の計算(高次の微分スキームのモーメント行列を作る計算)です。多項式の次数 0 は、元の MPS 法のラプラシアンの演算子を使う場合です。結果は次のとおりです(原論文 Table 1。l0l_0 は 0.005)。

影響半径 rer_e 多項式の次数 計算時間(s):直接 計算時間(s):間接 L1 キャッシュミス率(%):直接 L1 キャッシュミス率(%):間接
2.1×l02.1 \times l_0 0 0.530 1.501 8.584 34.240
2.1×l02.1 \times l_0 1 0.703 1.509 5.251 22.873
2.1×l02.1 \times l_0 2 1.186 2.048 2.328 9.937
3.1×l03.1 \times l_0 0 1.441 4.878 8.278 47.515
3.1×l03.1 \times l_0 1 2.213 5.154 3.531 23.797
3.1×l03.1 \times l_0 2 4.470 7.801 1.089 7.995
3.1×l03.1 \times l_0 3 10.760 14.584 0.351 2.467

計算時間は、1 時間ステップあたりの平均の計算時間(wall-clock time)です。

  • 一般に、多項式の次数が低いほど、L1 キャッシュミス率は大きくなります。論文は、次数が低いと粒子データの再利用の割合が低く、次数が高いと再利用の割合が高くなるためと説明しています。
  • 論文は、次数 0 では、間接アクセスの計算時間が直接アクセスの 3 倍になるが、次数が上がるにつれて差は小さくなると述べ、直接アクセスと間接アクセスの計算時間の差は L1 キャッシュミス率から生じていると結論づけています。

並列性能(強スケーリングと弱スケーリング)

論文は、開発の状況として、(a) 領域分割による動的負荷分散、(b) 隣り合う PE の間のハロー交換、(c) PE の中のチューニングによる高速化の 3 点を挙げ、(b) のハロー交換はほぼ完成したとしています。そこで、ハロー交換の並列性能を主に確かめるため、流体粒子だけの粒子モデルで並列性能を測りました。

計算機は東京大学の FX10(16 コアの SPARC64 IXfx 1.848 GHz の CPU を 1 つずつ持つ 4800 の PE と、6 次元メッシュ/トーラスの相互結合網「Tofu」を持つ)です。ハロー交換の理想的な条件を測るため、ParMETIS による領域分割ではなく、格子状の領域分割を使い、PE の数(12〜4800)ごとに決めた 3 次元の PE の配置(原論文 Table 2)に合わせて分割しました。粘性項(式 (3))は 2 次の多項式近似で、圧力勾配の項(式 (6))は 1 次の多項式近似で計算し、どちらも 1 次の精度の近似になります。

強スケーリング効率と弱スケーリング効率は、mm 個から nn 個の PE(m<nm < n)について、それぞれ (Tmm)/(Tnn)(T_m m)/(T_n n) と Tm/TnT_m / T_n で定義します。ここで、TmT_m と TnT_n はそれぞれの PE の数での計算時間(wall-clock time)で、基準の mm は 12 です(この nn は PE の数で、式 (5) の粒子数密度 nn とは別です)。強スケーリングは、640 × 960 × 512 個の流体粒子を等間隔に並べた 314,572,800 粒子のモデルで、弱スケーリングは、PE あたり 32 × 64 × 32 個の流体粒子を等間隔に並べた 65,536 粒子のモデルで測りました。影響半径 rer_e は、粒子間距離 l0l_0 の 2.0 倍と 4.0 倍の 2 とおりです。

強スケーリングの結果
図 6 314,572,800 粒子の強スケーリング。横軸は PE の数、左の縦軸は計算時間(対数目盛り)、右の縦軸はスケーリング効率です。凡例の l0x2.0 と l0x4.0 は、影響半径が粒子間距離の 2.0 倍と 4.0 倍の場合を表します。出典:原論文 Fig. 11(© 2014 Japan Society for Simulation Technology)。
弱スケーリングの結果
図 7 PE あたり 65,536 粒子の弱スケーリング。横軸は PE の数、左の縦軸は計算時間、右の縦軸はスケーリング効率です。凡例の意味は図 6 と同じです。出典:原論文 Fig. 12(© 2014 Japan Society for Simulation Technology)。
  • 12 から 4800 の PE への強スケーリング効率は、re=2.0×l0r_e = 2.0 \times l_0 で 0.823、re=4.0×l0r_e = 4.0 \times l_0 で 0.931 でした。
  • 弱スケーリング効率は、re=2.0×l0r_e = 2.0 \times l_0 で 0.952、re=4.0×l0r_e = 4.0 \times l_0 で 0.957 でした。
  • 論文は、強スケーリングと弱スケーリングのどちらも高い性能を示したので、(b) のハロー交換の部分はほぼ完成したと述べています。

計算時間と、ピーク性能比(達成した FLOPS を理論ピーク性能で割ったもの)を、FX10 の富士通のプロファイラで測りました。re=2.0×l0r_e = 2.0 \times l_0 の結果は次のとおりです(原論文 Table 3)。

項目 12 PE:時間(s) 12 PE:ピーク性能比(%) 4800 PE:時間(s) 4800 PE:ピーク性能比(%)
計算の全体 0.138 3.898 0.146 3.810
粘性項 0.024 9.657 0.025 9.639
衝突(Collision) 0.009 5.830 0.009 5.863
圧力 0.015 5.493 0.015 5.720
圧力勾配の項 0.033 5.154 0.034 5.137
その他 0.058 0.062

re=4.0×l0r_e = 4.0 \times l_0 の結果は次のとおりです(原論文 Table 4)。

項目 12 PE:時間(s) 12 PE:ピーク性能比(%) 4800 PE:時間(s) 4800 PE:ピーク性能比(%)
計算の全体 0.566 7.102 0.590 7.246
粘性項 0.150 11.214 0.159 10.993
衝突(Collision) 0.053 7.474 0.060 7.086
圧力 0.087 7.278 0.096 7.056
圧力勾配の項 0.185 7.087 0.201 6.930
その他 0.091 0.074
  • 4800 PE でのピーク性能比は、re=2.0×l0r_e = 2.0 \times l_0 で 3.810 %、re=4.0×l0r_e = 4.0 \times l_0 で 7.246 % でした。
  • 「その他」は、ハロー交換、通信のテーブルの作成、粒子のバケットへの割り当て、粒子データの並べ替えです。
  • 論文は、粘性項は 2 次の多項式近似で計算するので粒子データの再利用が多く、ピーク性能比が高くなると説明しています。圧力勾配の項は、最小の圧力を求めるために近傍粒子のループを 2 回行うので、計算時間が最も長くなります。
  • re=4.0×l0r_e = 4.0 \times l_0 では、4800 PE の計算時間は 12 PE より長いものの、ピーク性能比は 4800 PE のほうが大きくなりました。論文は、4800 PE では 12 PE より内部のバケットの数が多く、ハローの領域が大きいので、MPS の計算の規模が大きくなるためと説明しています。

石巻市の津波遡上解析の条件

東日本大震災(2011 年 3 月 11 日)の津波で、直径 10 m の 2 基のタンクが運ばれた、石巻市の市街地の浸水などを解析しました。地表は国土地理院の 5 m 間隔の数値標高データから作り、海の深さは JTOPO30(1 km 間隔)から得て、川の深さは 10 m と仮定しました。3 次元の建物は、東日本大震災より前のデータから作りました。

海から陸までの範囲で浅水方程式を解くのは難しいので、石巻湾の沖約 1.5 km での浅水方程式の解を使います。石巻湾から市街地までを同じ粒子間距離で解くと、多くの粒子が必要になります。計算資源の都合で、最大で数千万〜数億の粒子の解析を対象とし、石巻湾と沿岸域(4.0 km × 3.5 km)の解析と、石巻市の市街地(400 m × 550 m)の解析に分けた、ズームアップ解析を行いました。

解析領域の境界には、流入と流出の境界条件を設定します(図 8)。流入境界では、解析領域の外に並べた壁粒子を、解析領域の内側に向けて動かします。壁粒子が解析領域に入ると流体粒子に変え、最も外側の壁粒子の後ろに新しい壁粒子を作ります。さらに、境界から l0l_0 の幅の範囲で、境界での水位より高い所にある粒子をすべて消します。これで、境界の付近の水位が一定になります。流出境界では、解析領域の外の壁粒子を止めておき、同じように粒子を消します。論文は、理想的には流出境界でも壁粒子を解析領域の外側へ動かすべきだが、その場合は最も外側の壁粒子の後ろに新しい壁粒子を作れないことと、津波の押し波と引き波が何度も起きて流入と流出がたびたび入れ替わることから、壁粒子をきれいに並べた状態に保つために、やむを得ずこの流出境界条件を採用したと説明しています。

流入と流出の境界条件の模式図
図 8 流入と流出の境界条件。(a) 流入境界条件(壁を動かす)。(b) 流出境界条件(壁を止める)。橙色の枠は、粒子を消す範囲です。出典:原論文 Fig. 14(© 2014 Japan Society for Simulation Technology)。

石巻湾と沿岸域の津波遡上解析

石巻湾と沿岸域(4.0 km × 3.5 km)の津波遡上解析です。粒子間距離は 1.0 m です。音速は、マッハ数が 0.1 より小さくなるように 200 m/s とし、各時間ステップの時間増分は、クーラン数が 0.1 になるように決めました。東北大学の Tsunami Engineering Laboratory と KOKUSAI KOGYO CO., LTD. が提供した流入と流出のデータ(浅水方程式を解いた、東日本大震災のシミュレーションの結果)を、図 9 の下側(南側)の境界に設定し、ほかの辺には粒子の壁を置きました。圧力の境界条件は、自由表面で通常のディリクレ境界条件、ほかの境界で通常のノイマン境界条件を、陽的に設定しています。

FX10 の 96 PE で、800 秒の解析に約 7 日かかりました。最大の粒子数は 2 億 6 千万個、1 時間ステップの計算時間は平均 5.5 秒でした。

石巻湾と沿岸域の津波遡上解析の結果
図 9 石巻湾と沿岸域の津波遡上解析。(a) 200 s、(b) 300 s、(c) 400 s、(d) 600 s。色は流速(m/s)です。Tanaka らが開発した粒子ベースのレンダリングによる半透明の可視化で、海と川の上では透明度を高く、陸の上では透明度を低くしています。出典:原論文 Fig. 15(© 2014 Japan Society for Simulation Technology)。
  • 論文は、東日本大震災の津波は牡鹿半島の南から来たので、石巻湾には南東から北西へ向かって押し寄せたが、タンクは市街地を南西から北東へ運ばれたことが分かっていると述べています。その理由として、津波が石巻湾の防波堤で東へ向きを変えたことと、旧北上川を遡上して川からあふれたことを挙げています。
  • 論文は、これらの現象を再現し(図 9 の (c) と、次の項の図 10 の (b))、詳しい 3 次元の地表のデータによって、市街地への津波の流れの向きを示せたと述べています。

石巻市の市街地での 2 基のタンクの漂流

石巻湾と沿岸域の解析から、市街地(400 m × 550 m)に絞り込んだズームアップ解析で、直径 10 m の 2 基のタンクが津波で運ばれた事象を解析しました。2 基のタンクは剛体とみなし、剛体と流体の相互作用を、Koshizuka らの方法による弱連成で解きます。この方法では、剛体を、相対的な配置を固定した粒子で表し、剛体の粒子も流体の粒子と同じ手順で計算します。剛体の並進と回転を剛体の粒子から求め、最後に、剛体の粒子の位置を剛体の運動で置き換えます。この研究では破壊の現象を扱わないので、2 基のタンクの拘束は 60 秒で外すだけにしています。

市街地の境界条件は、沿岸域の解析の結果から、図 10 の (a) の赤い線に沿って作りました。市街地の境界線の上に等間隔に並べた格子点で、粒子のデータから補間した値を、流入と流出の条件に使います(図 10 の (b))。

沿岸域の解析の中での市街地の位置と、境界の抽出
図 10 石巻市の市街地の位置。(a) 沿岸域の解析の中での市街地の位置(赤い枠)。(b) 境界の抽出。出典:原論文 Fig. 16(© 2014 Japan Society for Simulation Technology)。

粒子間距離は 0.5 m です。音速とクーラン数は、沿岸域の解析と同じ 200 m/s と 0.1 です。FX10 の 600 PE で、200 秒の解析に約 6 時間かかりました。最大の粒子数は 4 千万個、1 時間ステップの計算時間は平均 0.25 秒でした。

石巻市の市街地の津波遡上解析の結果
図 11 石巻市の市街地の津波遡上解析。(a) 30 s、(b) 45 s、(c) 75 s、(d) 100 s。ParaView で、流体粒子を半透明の点、タンクや建物を不透明の面で表しています。色は流速(m/s)です。出典:原論文 Fig. 17(© 2014 Japan Society for Simulation Technology)。
  • 図 11 の (b) から、津波が大通りを南から北へ、県道を西から東へ遡上していることが分かります。
  • 図 11 の (a)〜(d) は、建物の間に津波が急に流れ込むことで生じる縮流の現象を示しています。
  • 図 11 の (c) と (d) では、2 基のタンクが高速で運ばれています。その向きは、震災の当日に 1 基のタンクが南西から北東へ運ばれた向きと同じでした。
  • 論文は、タンクは解析領域の外へ出てしまうものの、詳しい 3 次元の建物のデータによって、市街地でのタンクの流れの向きを示せたと述べています。

今後の展開

論文は、開発を進めている 3 つの点のうち、(a) の領域分割による動的負荷分散を、最も重要で難しい問題に挙げています。現時点では、METIS で、PE の間の粒子数の差を約 5 % にできています。難しい問題の一つは、流体粒子と壁粒子の各 PE への配分です。壁粒子は式 (5) の圧力の計算だけに使われますが、全粒子の 30〜70 % を占めることが多く、すべての PE で粒子数が同じでも、流体粒子と壁粒子の割合は PE ごとに違うことがよくあります。論文は、流体粒子の計算コストは壁粒子よりずっと大きいので、計算コストの負荷の釣り合いを保つことが難しいと述べています。

Graphical abstract
Graphical abstract

Overview

A particle method regards a continuum as a set of particles, discretizes the physical laws expressed by differential equations through interactions between the particles, and computes the states and motions of the particles. Because the particles, which are the calculation points, move over time, particle methods handle dynamic phenomena such as free surfaces and large deformations more easily than grid-based methods; on the other hand, the motion of the particles makes parallelization on distributed memory parallel computers difficult. The paper points out that previous distributed memory parallelizations of particle methods either did not achieve sufficient performance with many processing elements (PEs) or reported only relative values such as parallel efficiency, not the achieved FLOPS.

This paper presents a new distributed memory parallel algorithm for the explicit moving particle simulation (MPS) method. Starting from an existing approach that divides the analysis domain into buckets and partitions it among PEs with the graph-partitioning library ParMETIS (distributed parallel computation of an explicit particle method with single-level, bucket-based domain decomposition), the paper makes two improvements: a two-level hierarchical domain decomposition and the management of particle data by buckets. On the FX10 at the University of Tokyo, with ideal particle arrangements and domain decompositions, the strong scaling efficiencies from 12 to 4800 PEs were 0.823 and 0.931, the weak scaling efficiencies were 0.952 and 0.957, and the performed efficiencies to peak with 4800 PEs were 3.810 % and 7.246 % (for influence radii of 2.0 and 4.0 times the particle spacing). The method was further applied to tsunami run-up analyses, including the inundation of the urban area of Ishinomaki City, where two 10-m diameter tanks were carried along by the tsunami of the Great East Japan Earthquake.

Key points

1. Explicit MPS method: pressure is computed explicitly from the equation of state

The explicit MPS method used in this paper was proposed by Shakibaeinia et al. for analyzing weakly compressible flows with a free surface. Introducing artificial weak compressibility under a low Mach number (0.1 to 0.2) allows a fast explicit calculation of pressure and a good approximation of incompressibility. The governing equations are the equation of state, used to obtain the pressure, and the Navier–Stokes equations for an incompressible flow.

∂P∂ρ=c2(1)\frac{\partial P}{\partial \rho} = c^2 \tag{1} Dv⃗Dt=−1ρ∇P+νΔv⃗+g⃗(2)\frac{D\vec{v}}{Dt} = -\frac{1}{\rho}\nabla P + \nu \Delta \vec{v} + \vec{g} \tag{2}

Here, PP is the pressure, ρ\rho the density, cc the sound speed, v⃗\vec{v} the velocity, ν\nu the kinematic viscosity coefficient of the fluid, g⃗\vec{g} the gravity, and tt the time. D/DtD/Dt is the time derivative seen while moving with a particle (the material derivative), and Δ\Delta is the Laplacian.

One time step consists of the following steps, which discretize Eqs. (1) and (2). First, a temporal velocity v⃗∗\vec{v}^* is obtained from the viscosity term and gravity (Eq. (3)), and the particles are moved with it to obtain temporal positions r⃗∗\vec{r}^* (Eq. (4)). Here, r⃗\vec{r} is the position of a particle, and the superscript ∗* denotes a temporal value in the step. Next, the pressure is computed explicitly from the particle number density at the temporal positions.

Pik+1=c2ρni∗−n0n0(5)P_i^{k+1} = c^2 \rho \frac{n_i^* - n^0}{n^0} \tag{5}

Here, the superscript kk is the time step number and the subscript ii is the particle number. nn is the number of particles in a unit volume (the particle number density), and n0n^0 is the number of particles in a unit volume in the initial state. Then, a velocity correction v⃗′\vec{v}' is obtained from the pressure gradient.

v⃗′=−Δtρ[∇P]k+1(6)\vec{v}' = -\frac{\Delta t}{\rho}\left[\nabla P\right]^{k+1} \tag{6}

Here, Δt\Delta t is the time increment (the Δ\Delta in Δt\Delta t has a different meaning from the Laplacian in Eq. (2)). The square brackets [∇P]k+1[\nabla P]^{k+1} denote the pressure gradient computed with a discrete operator that approximates it through interactions between particles. Finally, the velocity and position are updated by v⃗k+1=v⃗∗+v⃗′\vec{v}^{k+1} = \vec{v}^* + \vec{v}' and r⃗k+1=r⃗∗+Δt v⃗′\vec{r}^{k+1} = \vec{r}^* + \Delta t\, \vec{v}' (Eqs. (7) and (8)).

The paper cites the remark by Tamai et al. that the particle interaction models of MPS assume that the particles within the influence radius are regularly arranged in a grid, so the accuracy is low for random particle distributions including boundaries; it adopts the spatial discretization with arbitrary high-order consistency based on a Taylor expansion proposed by Tamai et al.

2. The domain is decomposed by buckets, and neighboring PEs exchange particle data through halos

The parallel algorithm of this paper improves on the distributed parallel computation of an explicit particle method with single-level, bucket-based domain decomposition (the method of Ferrari et al.). First, the box bounding the whole analysis domain is filled with cubic buckets, and all particles are assigned to buckets. Because the influence radius of a particle is fixed in the MPS method, the bucket width must be larger than the influence radius. Next, the domain is decomposed bucket by bucket so that each PE has an equal number of particles. The decomposition uses the graph-partitioning library METIS and its parallel version, ParMETIS. A graph is made in which each bucket corresponds to a vertex and the faces of the buckets correspond to edges, and the number of particles in a bucket is used as the vertex weight so that the numbers of particles in the PEs are equal.

Each decomposed subdomain is expanded by one bucket width from its boundaries, and the particles in the expanded region are also assigned to the same PE. This region of one bucket width is called a "halo". The particle data in a halo are kept consistent by communication between neighboring PEs (halo exchange; Figure 1). Halo exchange is performed three times in one time step, after the calculations of Eqs. (4), (5), and (8). When the numbers of particles in the subdomains become unbalanced as the analysis progresses, the domain is decomposed again with METIS to recover the balance of the number of particles.

Schematic of halo exchange among four PEs
Figure 1. Halo exchange pattern. Circles are particles and squares are buckets. Buckets in deep colors are the regions assigned to each PE (PE 0 to 3), and buckets in faint colors are halos. The arrows show particle data of the other PEs being sent to the halo of PE 0. Source: Fig. 4 of the original paper (© 2014 Japan Society for Simulation Technology).

3. Two-level hierarchical domain decomposition (Parts and Subdomains)

The first improvement is the two-level hierarchical domain decomposition. The analysis domain is decomposed in two steps (Figure 2). The large unit of the first level is called a "Part", and the smaller unit of the second level, obtained by dividing a Part, is called a "Subdomain". In a parallel computer, one Part is assigned to one PE, and each Part is further divided into several Subdomains. When the dynamic scheduling of OpenMP is assigned to the loop over Subdomains, OpenMP automatically performs dynamic load balancing among the Subdomains.

Schematic of the two-level hierarchical domain decomposition
Figure 2. Two-level hierarchical domain decomposition. The analysis domain in the center is divided into four Parts (Part 0 to 3), and each Part is further divided into two Subdomains. Source: Fig. 5 of the original paper (© 2014 Japan Society for Simulation Technology).

The paper lists two advantages of this improvement: the locality of data increases because the units of the problem become smaller, and once a Part is divided into Subdomains, even calculation algorithms that are difficult to parallelize can be parallelized automatically over the Subdomains.

4. Particle data are rearranged by buckets, and memory is accessed directly

The second improvement is that particle data are managed by buckets. In the MPS method, the interactions between particles within the influence radius are computed. When searching for the particles within the influence radius, it is sufficient to search only the particles in the 3×3×3 buckets centered on the bucket to which the target particle belongs. This search is the same as the "cell linked lists" used in molecular dynamics simulations to search all atom pairs within a cut-off distance.

The conventional approach keeps the sequence of particle numbers in each bucket as a one-way linked list, and the order of the arrays of particle data (position, velocity, pressure, and so on) is not changed from the beginning to the end of the analysis. In the example of Figure 3 (a), six particles are assigned to four buckets, and two arrays are prepared: FirstIdxInBucket[4] = {0, 4, -1, 1}, which holds the first particle number in each bucket (-1 means an empty bucket), and NextIdx[6] = {2, 3, -1, 5, -1, -1}, which holds the particle number linked from each particle (-1 means that no further particle exists in the bucket). Because particle data are read through the linked list, memory reads become "Indirect access". As the analysis progresses, particle data that are neighbors in memory often become far apart in the analysis domain, and an increase of the particle number by one often moves the bucket to which the particle belongs far away from the previous bucket (Figure 4 (a)). In this case, all particle data in a bucket must be reloaded into the L1 cache, and the calculation becomes less efficient.

Example of assigning particles to buckets and rearranging them by bucket
Figure 3. Particles assigned to buckets. (a) Particles assigned to buckets with a linked list. (b) Particle data rearranged by bucket after (a). The numbers in the circles are particle numbers. Source: Fig. 6 of the original paper (© 2014 Japan Society for Simulation Technology).
Access patterns of buckets before and after rearrangement
Figure 4. Access patterns of buckets. (a) Before rearranging by bucket. (b) After rearranging by bucket. The arrows show how the bucket to which a particle belongs moves when the particle number increases by one. Source: Fig. 7 of the original paper (© 2014 Japan Society for Simulation Technology).

In this paper, after particle numbers are assigned to buckets, the particle data are rearranged by bucket (Figure 3 (b)). The particle data need not be sorted within each bucket; it is sufficient to keep the positions of the boundaries of particle numbers between buckets in an array such as NumParticleInBucket[5] = {0, 2, 3, 3, 6}. The particle data of bucket n lie from NumParticleInBucket[n] to NumParticleInBucket[n+1]-1 (this n is a bucket number and is different from the particle number density nn in Eq. (5)), so memory reads become "Direct access", which reads particle data directly. Because particles that are neighbors in the analysis domain are also stored next to each other in memory, the same neighboring-particle data can be used without reloading them into the L1 cache while the target particles remain in the same bucket. Even when the target particles move to a neighboring bucket, two-thirds of the particle data remain in the L1 cache (Figure 4 (b)).

The paper states that this direct access makes software pipelining and SIMD vectorization more effective, contributing to a higher achieved FLOPS.

Numerical results

Effect of rearrangement by bucket (dam break problem)

The calculation times before and after rearranging by bucket were compared on a dam break problem. The analysis domain is 1.0 m × 0.2 m × 0.6 m, the water column is 0.25 m × 0.2 m × 0.5 m, and the analyzed time is 1 second. The influence radius rer_e is 2.1 times the initial particle spacing l0l_0. One PE (16 threads) of the CX400 at Kyushu University was used. Two cases, with l0l_0 of 0.01 and 0.005, were examined. Figure 5 shows the history of the calculation time per time step for l0l_0 of 0.005 (416,016 particles).

Comparison of calculation times per time step for l0 = 0.005
Figure 5. Comparison of the calculation time (wall-clock time) per time step for l0l_0 of 0.005 (416,016 particles). The horizontal axis is the time in the analysis. The purple line is the total MPS calculation with the linked list (Indirect access), the red line is the total MPS calculation with particle data rearranged by bucket (Direct access), the green line is the time for assigning particles to buckets and making the linked list, and the blue line is the time for assigning particles to buckets and rearranging the particle data. Source: Fig. 9 of the original paper (© 2014 Japan Society for Simulation Technology).
  • The calculation time of the red line (Direct access) was shorter than that of the purple line (Indirect access). The times of the green and blue lines were much shorter than those of the red and purple lines. The paper states that the time for rearranging particle data is small compared with the total MPS calculation.
  • The difference in calculation time between Direct access and Indirect access was not large at first but grew as the analysis progressed. The paper explains that the particles are initially arranged in the order of their coordinates but become mixed as the analysis progresses, so particles that are neighbors in memory become farther apart in the analysis domain.
  • The paper states that, for the two cases with l0l_0 of 0.01 and 0.005, the difference in calculation time between Direct access and Indirect access at the end of the analysis is a factor of 1.5 to 2.0.

To investigate the cause of the difference in calculation time, the L1 cache miss rate was measured with a Fujitsu profiler on the FX10 at the University of Tokyo (SPARC64 IXfx, with a 32-KB L1 cache per core). The comparison was made for the particle-interaction calculation that takes the longest time (the calculation that generates the moment matrix of the higher-order derivative scheme). Polynomial order 0 corresponds to the Laplacian operator of the original MPS method. The results are as follows (Table 1 of the original paper; l0l_0 is 0.005).

Influence radius rer_e Polynomial order Time (s): direct Time (s): indirect L1 cache miss rate (%): direct L1 cache miss rate (%): indirect
2.1×l02.1 \times l_0 0 0.530 1.501 8.584 34.240
2.1×l02.1 \times l_0 1 0.703 1.509 5.251 22.873
2.1×l02.1 \times l_0 2 1.186 2.048 2.328 9.937
3.1×l03.1 \times l_0 0 1.441 4.878 8.278 47.515
3.1×l03.1 \times l_0 1 2.213 5.154 3.531 23.797
3.1×l03.1 \times l_0 2 4.470 7.801 1.089 7.995
3.1×l03.1 \times l_0 3 10.760 14.584 0.351 2.467

The time is the average calculation time (wall-clock time) per time step.

  • In general, the lower the polynomial order, the larger the L1 cache miss rate. The paper explains that the reuse ratio of particle data is low for a low polynomial order and high for a high polynomial order.
  • The paper states that, for polynomial order 0, the calculation time with Indirect access is three times that with Direct access, but the difference decreases as the polynomial order increases, and concludes that the difference in calculation time between Direct access and Indirect access stems from the L1 cache miss rate.

Parallel performance (strong and weak scaling)

As the status of development, the paper lists three points, (a) dynamic load balancing by domain decomposition, (b) halo exchange between neighboring PEs, and (c) speed-up by tuning within a PE, and states that the halo exchange of (b) has been mostly completed. Therefore, the parallel performance was measured with particle models consisting only of fluid particles, mainly to confirm the parallel performance of the halo exchange.

The computer is the FX10 at the University of Tokyo, which has 4800 PEs, each with one 16-core SPARC64 IXfx 1.848-GHz CPU, and the six-dimensional mesh/torus interconnect "Tofu". To measure an ideal condition for the halo exchange, a grid-like domain decomposition was used instead of the domain decomposition by ParMETIS, following the three-dimensional configuration of PEs defined for each number of PEs (12 to 4800; Table 2 of the original paper). The viscosity term (Eq. (3)) is computed with a second-order polynomial approximation and the pressure gradient term (Eq. (6)) with a first-order polynomial approximation, both resulting in first-order accurate approximations.

The strong and weak scaling efficiencies from mm to nn PEs (m<nm < n) are defined as (Tmm)/(Tnn)(T_m m)/(T_n n) and Tm/TnT_m / T_n, respectively. Here, TmT_m and TnT_n are the calculation times (wall-clock time) with the respective numbers of PEs, and the reference mm is 12 (this nn is a number of PEs and is different from the particle number density nn in Eq. (5)). Strong scaling was measured with a model of 314,572,800 particles, in which 640 × 960 × 512 fluid particles are arranged at equal distances, and weak scaling with a model of 65,536 particles per PE, in which 32 × 64 × 32 fluid particles are arranged at equal distances. Two influence radii rer_e were used: 2.0 and 4.0 times the particle spacing l0l_0.

Results of strong scaling
Figure 6. Strong scaling of 314,572,800 particles. The horizontal axis is the number of PEs, the left vertical axis is the calculation time (logarithmic scale), and the right vertical axis is the scaling efficiency. In the legend, l0x2.0 and l0x4.0 denote influence radii of 2.0 and 4.0 times the particle spacing. Source: Fig. 11 of the original paper (© 2014 Japan Society for Simulation Technology).
Results of weak scaling
Figure 7. Weak scaling of 65,536 particles per PE. The horizontal axis is the number of PEs, the left vertical axis is the calculation time, and the right vertical axis is the scaling efficiency. The legend has the same meaning as in Figure 6. Source: Fig. 12 of the original paper (© 2014 Japan Society for Simulation Technology).
  • The strong scaling efficiencies from 12 to 4800 PEs were 0.823 for re=2.0×l0r_e = 2.0 \times l_0 and 0.931 for re=4.0×l0r_e = 4.0 \times l_0.
  • The weak scaling efficiencies were 0.952 for re=2.0×l0r_e = 2.0 \times l_0 and 0.957 for re=4.0×l0r_e = 4.0 \times l_0.
  • The paper states that both strong and weak scaling showed high performance, and therefore the part of the halo exchange of (b) has been mostly completed.

The calculation time and the performed efficiency to peak (the achieved FLOPS divided by the theoretical peak performance) were measured with a Fujitsu profiler on the FX10. The results for re=2.0×l0r_e = 2.0 \times l_0 are as follows (Table 3 of the original paper).

Item 12 PEs: time (s) 12 PEs: efficiency to peak (%) 4800 PEs: time (s) 4800 PEs: efficiency to peak (%)
Total calculation time 0.138 3.898 0.146 3.810
Viscosity term 0.024 9.657 0.025 9.639
Collision 0.009 5.830 0.009 5.863
Pressure 0.015 5.493 0.015 5.720
Pressure gradient term 0.033 5.154 0.034 5.137
Other 0.058 0.062

The results for re=4.0×l0r_e = 4.0 \times l_0 are as follows (Table 4 of the original paper).

Item 12 PEs: time (s) 12 PEs: efficiency to peak (%) 4800 PEs: time (s) 4800 PEs: efficiency to peak (%)
Total calculation time 0.566 7.102 0.590 7.246
Viscosity term 0.150 11.214 0.159 10.993
Collision 0.053 7.474 0.060 7.086
Pressure 0.087 7.278 0.096 7.056
Pressure gradient term 0.185 7.087 0.201 6.930
Other 0.091 0.074
  • The performed efficiencies to peak with 4800 PEs were 3.810 % for re=2.0×l0r_e = 2.0 \times l_0 and 7.246 % for re=4.0×l0r_e = 4.0 \times l_0.
  • "Other" consists of the halo exchange, the generation of communication tables, the assignment of particles to buckets, and the arrangement of particle data.
  • The paper explains that the viscosity term, which is computed with a second-order polynomial approximation, reuses particle data heavily, so its performed efficiency to peak is high. The pressure gradient term takes the longest time because the loop over neighboring particles is performed twice to obtain the minimum pressure.
  • For re=4.0×l0r_e = 4.0 \times l_0, although the calculation time with 4800 PEs was longer than with 12 PEs, the performed efficiency to peak was larger with 4800 PEs. The paper explains that, with 4800 PEs, the number of interior buckets is larger than with 12 PEs and the halo area is larger, so the size of the MPS calculation becomes larger.

Conditions of the tsunami run-up analysis for Ishinomaki City

The analyses covered events such as the inundation of the urban area of Ishinomaki City, where two 10-m diameter tanks were carried along by the tsunami of the Great East Japan Earthquake (March 11, 2011). The land surface was generated from 5-m spacing digital elevation data of the Geospatial Information Authority of Japan, the sea depth was obtained from JTOPO30 (1-km spacing), and the river depth was assumed to be 10 m. The three-dimensional buildings were generated from data prior to the Great East Japan Earthquake.

Because it is difficult to solve the shallow water equation over the area from the sea to dry land, solutions of the shallow water equation about 1.5 km off Ishinomaki bay are used. Solving the area from Ishinomaki bay to the urban area with the same particle spacing would require a large number of particles. Because of computational resources, analyses with up to tens of millions to hundreds of millions of particles were targeted, and a zoom-up analysis was performed, divided into an analysis of Ishinomaki bay and the coastal area (4.0 km × 3.5 km) and an analysis of the urban area of Ishinomaki City (400 m × 550 m).

Inflow and outflow boundary conditions are set on the boundaries of the analysis domain (Figure 8). At an inflow boundary, wall particles arranged outside the analysis domain are moved toward the inside of the analysis domain. When the wall particles enter the analysis domain, they are changed to fluid particles, and new wall particles are generated behind the outermost wall particles. In addition, all particles above the water height on the boundary within a width of l0l_0 from the boundary are deleted. This keeps the water height near the boundary constant. At an outflow boundary, the wall particles outside the analysis domain are kept static, and particles are deleted in the same way. The paper explains that, ideally, the wall particles should also be moved toward the outside of the analysis domain at an outflow boundary, but new wall particles cannot then be generated behind the outermost wall particles; moreover, because the incoming and receding waves of the tsunami occur several times, inflow and outflow are often switched. Therefore, this outflow boundary condition was reluctantly adopted to keep the wall particles neatly arranged.

Schematic of the inflow and outflow boundary conditions
Figure 8. Inflow and outflow boundary conditions. (a) Inflow boundary condition (moving wall). (b) Outflow boundary condition (static wall). The orange frames are the regions where particles are deleted. Source: Fig. 14 of the original paper (© 2014 Japan Society for Simulation Technology).

Tsunami run-up analysis of Ishinomaki bay and the coastal area

This is the tsunami run-up analysis of Ishinomaki bay and the coastal area (4.0 km × 3.5 km). The particle spacing is 1.0 m. The sound speed was set to 200 m/s so that the Mach number is less than 0.1, and the time increment of each time step was determined so that the Courant number is 0.1. The inflow and outflow data provided by the Tsunami Engineering Laboratory of Tohoku University and KOKUSAI KOGYO CO., LTD. (results of a simulation of the Great East Japan Earthquake obtained by solving the shallow water equation) were set on the bottom (south) boundary in Figure 9, and particle walls were placed on the other sides. For pressure, the standard Dirichlet boundary condition on the free surface and the standard Neumann boundary condition on the other boundaries are set explicitly.

The analysis of 800 seconds took about 7 days with 96 PEs of the FX10. The maximum number of particles was 260 million, and the calculation time per time step was 5.5 seconds on average.

Results of the tsunami run-up analysis of Ishinomaki bay and the coastal area
Figure 9. Tsunami run-up analysis of Ishinomaki bay and the coastal area. (a) 200 s, (b) 300 s, (c) 400 s, (d) 600 s. Colors show the flow velocity (m/s). This is a transparent visualization made with the particle-based rendering developed by Tanaka et al.; transparency is increased over the sea and river and decreased over dry land. Source: Fig. 15 of the original paper (© 2014 Japan Society for Simulation Technology).
  • The paper states that, because the tsunami of the Great East Japan Earthquake came from the south of the Ojika Peninsula, it struck Ishinomaki bay from southeast to northwest, whereas it is known that the tanks were carried from southwest to northeast in the urban area. As the reasons, it gives that the tsunami was turned east by the breakwaters in Ishinomaki bay and that it went upstream along the former Kitakami River and overflowed from the river.
  • The paper states that these phenomena were reproduced (Figure 9 (c) and Figure 10 (b) in the next section) and that the flow direction of the tsunami toward the urban area was demonstrated by means of detailed three-dimensional land surface data.

Drift of two tanks in the urban area of Ishinomaki City

In a zoom-up analysis narrowed from the analysis of Ishinomaki bay and the coastal area to the urban area (400 m × 550 m), the event in which two 10-m diameter tanks were carried along by the tsunami was analyzed. The two tanks are regarded as rigid bodies, and the interplay between the rigid bodies and the fluid is solved by weak coupling with the method of Koshizuka et al. In this method, the rigid bodies are represented by particles with fixed relative configurations, and the rigid-body particles are calculated with the same procedure as the fluid particles. The translations and rotations of the rigid bodies are calculated from the rigid-body particles, and finally the positions of the rigid-body particles are replaced by the motions of the rigid bodies. Because fragmentation is not simulated in this study, the restraint of the two tanks is simply released at 60 seconds.

The boundary conditions for the urban area were generated from the results of the coastal analysis along the red lines in Figure 10 (a). Values interpolated from the particle data at grid points arranged at equal distances on the boundary lines of the urban area are used as the inflow and outflow conditions (Figure 10 (b)).

Location of the urban area in the coastal analysis and extraction of the boundaries
Figure 10. Location of the urban area of Ishinomaki City. (a) Location of the urban area in the coastal analysis (red frame). (b) Extraction of the boundaries. Source: Fig. 16 of the original paper (© 2014 Japan Society for Simulation Technology).

The particle spacing is 0.5 m. The sound speed and the Courant number are the same as in the coastal analysis, 200 m/s and 0.1. The analysis of 200 seconds took about 6 hours with 600 PEs of the FX10. The maximum number of particles was 40 million, and the calculation time per time step was 0.25 seconds on average.

Results of the tsunami run-up analysis of the urban area of Ishinomaki City
Figure 11. Tsunami run-up analysis of the urban area of Ishinomaki City. (a) 30 s, (b) 45 s, (c) 75 s, (d) 100 s. With ParaView, fluid particles are shown as transparent points, and structures such as tanks and buildings as opaque surfaces. Colors show the flow velocity (m/s). Source: Fig. 17 of the original paper (© 2014 Japan Society for Simulation Technology).
  • Figure 11 (b) shows that the tsunami runs up along an avenue from south to north and along a prefectural road from west to east.
  • Figure 11 (a) to (d) show contracted flow phenomena generated by the rapid flooding of the tsunami among the buildings.
  • In Figure 11 (c) and (d), the two tanks are carried along at high speed. Their direction was the same as that of one tank carried from southwest to northeast on the day of the earthquake.
  • The paper states that, although the tanks move out of the analysis domain, the flow direction of the tanks in the urban area was demonstrated by using detailed three-dimensional building data.

Outlook

Of the three points under development, the paper identifies (a), dynamic load balancing by domain decomposition, as the most important and difficult problem. To date, the difference in the number of particles between PEs has been reduced to about 5 % with METIS. One of the most difficult problems is the distribution of fluid and wall particles to the PEs. The wall particles are used only for the pressure calculation of Eq. (5), but they often account for 30 % to 70 % of all particles, and even when all PEs have the same number of particles, the ratio of fluid to wall particles often differs among the PEs. The paper states that, because the calculation cost of fluid particles is much larger than that of wall particles, it is difficult to maintain the load balance of the calculation cost.