key points in development of the amr-pic...
TRANSCRIPT
![Page 1: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/1.jpg)
AMR-PICコード開発のポイント
藤本
桂三
理化学研究所
計算宇宙物理研究室
(Ref. Fujimoto, JCP, vol.230, 8508, 2011)
![Page 2: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/2.jpg)
発表内容
開発の動機、戦略
AMR-PICコードの開発
応用例(磁気リコネクション)
まとめ
![Page 3: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/3.jpg)
開発の動機、戦略
![Page 4: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/4.jpg)
磁気リコネクションとそのマルチスケール性
10km
Coroniti [1985]
De
i ~ 1
e , e i , i L Lc
∬磁気拡散 ホール効果 トポロジー
Full PIC(粒子) MHD(流体)
Coulomb mean free path
(Particle-In-Cell) (Magnetohydrodynamics)
103km 105km 108km1km
![Page 5: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/5.jpg)
陽的PICスキームの制約と電流層プロファイル
Bx = -B0 tanh(z/)n = n0 sech2(z/)+nb
格子点間隔
x ≲ 3De
電流層中心付近
De ≈
3
102 m
磁場支配領域
De ≈
6
103 m
![Page 6: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/6.jpg)
物理的に要求される解像度
電子スケールの構造
![Page 7: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/7.jpg)
粒子分割・統合
適合細分化格子(AMR)の適用
AMR(Adaptive Mesh Refinement)適合細分化格子
![Page 8: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/8.jpg)
AMR-PIC Simulations
![Page 9: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/9.jpg)
AMR-PICコードの開発
![Page 10: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/10.jpg)
AMRの使用例
多階層格子を偏微分方程式系に適用
Berger and Oliger (1984), Berger and Colella (1989)
MHD + AMRGroth et al. (2000), Toth et al. (2012) (U Michigan)
PIC + AMR (N-body code)Villumsen (1989), Kravtsov et al. (1997), Yahagi and Yoshii (2001)
ElectroStaticPIC + AMR Vay et al. (2004), Colella et al.(2010)
ElectroMagneticPIC + AMRVay et al. (2004?), Fujimoto & Machida (2006), Fujimoto (2011)
![Page 11: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/11.jpg)
開発履歴
2003 2006 2008 2011開発スタート 2D AMR-PIC
コード完成
3D AMR-PIC コード完成
超並列AMR-PIC コード完成
[Fujimoto & Machida, 2006; Fujimoto & Sydora, 2008, Fujimoto, 2011]
ポアソン方程式
ノード内並列
• 電荷保存法
• 適合ブロック法
CPU数、メモリ容量
の制約より多くの計算機資源が利
用可能!
![Page 12: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/12.jpg)
電磁粒子(EMPIC)コード [Birdsall and Langdon, IOP, 1991]
電荷保存法[Villasenor & Buneman,
1992]
超粒子(Buneman-Boris法)
電磁場(Yee-Bunemanスキーム)
S: Shape function
![Page 13: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/13.jpg)
Staggering Grid Scheme [Yee, 1966; Buneman, 1968]
C
Bx
C’
Ex
電磁フラックスが厳格に保存
電磁波に対する数値散逸なし
![Page 14: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/14.jpg)
von Neumannの安定解析
![Page 15: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/15.jpg)
AMRの適用:データ構造
Similar to a fully threaded tree (FTT) structure (Khokhlov, 1998).
[Fujimoto & Machida, JCP, 2006]
![Page 16: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/16.jpg)
AMRの適用:階層間同期
細分化格子の解がより高精度
(アンペールの式を満たす)
(ファラデーの式を満たす)
![Page 17: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/17.jpg)
AMRの適用:電磁場のスムージング
ESM =fSM (E)BSM =fSM (B)
![Page 18: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/18.jpg)
超粒子の分割・統合
格子点上のモーメント(c , J)、全電荷・質
量(c , m)、粒子の全エネルギー
(mv2/2)、粒子の分布関数(f(v))
分割前後で保存させる
2次元の場合 3次元の場合
[Lapenta, JCP, 2002]
q1 = q2 ; m1 = m2
x0 = (x1 + x2 )/2V0 = (V1 + V2 )/2q0 = q1 + q2 ; m0 = m1 + m2
x, y, z
![Page 19: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/19.jpg)
分散並列化:問題点
8ノード並列の例 PICシミュレーションでは全計算時間の 99%以上を粒子に関する計算に要する。
ノード当たり粒子数の不均衡性
![Page 20: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/20.jpg)
適合ブロック法(その1)
全計算領域の基底オクト(グローバルオクト)を 適な順番に並べ替える。
(ブロック:
並列計算において各ノードが分担する計算領域)
出発点から数えて(xoct , yoct , zoct )番目にあるオクトの順番
初期に1度だけ実施
この順番に沿って粒子数を数
え、各ノード(ブロック)の粒子数
が均等になるように基底オクトを
分割する。
ブロックの表面積を小さく
し、通信量を減らす。
![Page 21: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/21.jpg)
グローバルオクト
適合ブロック法(その2)バッファ領域とプライベートオクトの生成
すべてのノードでシェア各ノードで個別に設定
バッファブ領域
grank: ノード番号
gOctNb: 隣接するオクト
rank: ノード番号iNb: 隣接するオクトの親セル
ipr: 親セルOctCh: 子オクト
・・・
物理データ
プライベートオクト
pOct
iPr
![Page 22: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/22.jpg)
適合ブロックを用いたシミュレーション
8ノード並列の例
ノード当たり粒子数の不均衡性
![Page 23: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/23.jpg)
超並列AMR-PICコードの性能
CPU(4コア)
メモリ(32G)
Fujitsu FX1(名大情報基盤センター)
CPU(4コア)
メモリ(32G)
CPU(4コア)
メモリ(32G)
CPU(4コア)
メモリ(32G)
並列化率:
99.8%
ノード
![Page 24: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/24.jpg)
応用例(磁気リコネクション)
![Page 25: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/25.jpg)
Simulation Setup
Bx = -B0 tanh(z/)Jy = -J0 sech2(z/)
81i ~ 10Re10i ~ 1Re
81 imi /me = 100
Max resolution:4096×
512×
4096 ~ 1010
Max number of particlesIon + Electron ~ 1011
Max memory used ~ 6TB
Fujitsu FX1, 1024 cores
![Page 26: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/26.jpg)
Time Evolution of the Current SheetSurface: |J|, Line: Field lineColor on the surface: Ey, Cut plane:Jy
![Page 27: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/27.jpg)
Wave Number Spectrum
|Ve |
Y
Z
![Page 28: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/28.jpg)
Wave-Particle Interactions
Anomalous effects
3D reconnection
2D reconnection
φ Vez
Bx
ES turb. EM turb.
Ve
![Page 29: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/29.jpg)
EM vs. ES Turbulence Effects
EM Turbulence
ES Turbulence
![Page 30: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/30.jpg)
まとめ
AMR-PICコード開発のポイント
1. 細分化レベル間の同期(電磁波動の分散性を保持)
2. 電磁場のスムージング(短波長モードの除去)
3. データ構造(ツリー構造が便利)
4. 粒子分割・統合(格子当たりの粒子数調節)
5. あきらめずにコツコツやる。
![Page 31: Key points in development of the AMR-PIC modelsth.nao.ac.jp/MEMBER/keizo/presen/WS2012.pdfAMR-PICコード開発のポイント 藤本 桂三 理化学研究所 計算宇宙物理研究室](https://reader034.vdocuments.pub/reader034/viewer/2022050423/5f91dfe2694b773fdf7eb9cf/html5/thumbnails/31.jpg)
今後の課題
超並列2次元AMR-PICコードの開発
開放境界条件
粒子データのソーティング
逐次計算効率の向上
適合ブロック法の改良
数千コア並列以上の場合における 適化
ソースコードの公開
マニュアルの作成
ユーザの拡大
・・・