コンテンツにスキップ

gallium-melting2d

英語 | 日本語

« Home · « 熱・相変化

Enthalpy-porosity thermal LBM -- convection-coupled melting of pure gallium in a side-heated rectangular cavity (the Gau & Viskanta 1986 benchmark). This is the union of two OpenRheo benchmarks: * thermal_cavity2d.cpp -- DDF thermal LBM: a D2Q9 BGK momentum LBM with a Guo (2002) buoyancy forcing, coupled to a D2Q5 advection-diffusion LBM for the temperature (He, Chen & Doolen 1998); * stefan_melting2d.cpp -- the enthalpy method for isothermal solid-liquid phase change: total enthalpy H = cpT + Lfl, liquid fraction fl recovered each step, latent-heat source S = -(L/cp) dfl/dt in the scalar collision (Jiaung, Ho & Kuo 2001). It adds the piece that couples them -- the ENTHALPY-POROSITY momentum treatment of Brent, Voller & Reid, "Enthalpy-Porosity Technique for Modeling Convection-Diffusion Phase Change: Application to the Melting of a Pure Metal", Numerical Heat Transfer 13 (1988) 297-318:

概要: ガリウムの対流連成融解(Gau & Viskanta 実験)。エンタルピー・ポロシティ法で、融解界面が対流により傾く様子を再現する。

Geometry

gallium-melting2d geometry

Animation

Fields

この計算が最後の出力ステップで書き出した場をそのまま描いたもの。3D ケースは中央断面。

gallium-melting2d T

gallium-melting2d umag

Results

まずギャラリー構成の正直な申告から。runs.json の argv は空 — つまり この実行はバイナリ既定値そのもの:Nx = 179 × Ny = 128(W/H = 1.40)、 Ra = 6e5、Ste = 0.0390、Pr = 0.0216、U = 0.08、C = 1e5、Fo_max = 3.90 (steps = 710374)。Ny = 128 はギャラリー向けの控えめな解像度で、 τ_f = 3ν + 1/2 = 0.50583 と安定限界のすぐ上にいる。さらに Validation-Status はこのケースの Gau–Viskanta 融解前線比較を 未計測としている — 以下の数値は実験写真との定量重ね合わせではなく、 この構成の実行が実際に示したものだけである。壁時計 44.63 秒 (CPU 2427.8 秒、72 コア)。

写像の検算:ν = U·H·√(Pr/Ra) = 10.24 × √(3.6e-8) = 1.943e-3(ログ 0.00194)、α = ν/Pr = 0.08995、gβ = U²/H = 0.0064/128 = 5.000e-5、 L = c_pΔT/Ste = 1/0.039 = 25.641、steps = Fo_max·H²/α = 3.9 × 16384/ 0.08995 ≈ 710374 ✓。

  • 融解率は Fo = 0.32 の 0.1183 から Fo = 3.90 の 0.6953 まで ほぼ √t から線形へ移る成長。スナップショットは Gau–Viskanta の 写真時刻 2/6/10/19 分に対応する Fo = 0.41/1.23/2.05/3.90 で、 melt_frac = 0.1361/0.2817/0.4087/0.6953。
  • 前線の傾き — このベンチマークの眼目。初期はほぼ平面 (Fo = 0.32:top/bot = 21.18/19.75)だが、対流ロールが立つと上部が 先行:Fo = 1.30 で 58.13/38.64、Fo = 3.90 で 145.69/81.68。 RESULT の tilt = 145.6880 − 81.6758 = 64.01 セル(= 0.50 H)。 平面前線なら純伝導 — この傾きこそ浮力対流が前線を歪めた証拠で、 実験写真の定性的特徴(上ほど速い融解)を再現している。
  • Ra = 6e5 はヘッダの言う Gau–Viskanta 範囲 2e5–6e5 の上端の公称値。

Governing equations

エンタルピー・ポロシティ法(Brent–Voller–Reid 1988)= thermal_cavity2d (DDF 熱 LBM + Guo 浮力)と stefan_melting2d(エンタルピー相変化)の 合併 + 両者を結ぶ運動量処理。糊状/固相域を液相率 f_l で透水性が潰れる 多孔質とみなし、Carman–Kozeny の Darcy 型抗力を運動量に加える:

\[
\boldsymbol{S}_u=-A(f_l)\,\boldsymbol{u},\qquad
A(f_l)=C\,\frac{(1-f_l)^2}{f_l^3+\epsilon},\qquad C=10^5
\]

液相(f_l = 1)で A = 0、固相(f_l = 0)で A が巨大となり u ≈ 0 に固定 — 前線追跡なしで固体が固定格子上に静止する。抗力は速度更新で 半陰的(u = m/(ρ + A/2))に扱い、任意に大きい C でも安定。融液は Boussinesq 浮力 F_y = ρgβ(T − T_m) で駆動され、加熱壁を上昇 → 天井を 横断 → 前線で下降するロールが上部の融解を加速する。支配群:

\[
Pr=\frac{\nu}{\alpha}=0.0216,\quad
Ste=\frac{c_p\Delta T}{L}=0.039,\quad
Ra=\frac{g\beta\Delta T H^3}{\nu\alpha}=6\times10^5,\quad
Fo=\frac{\alpha t}{H^2}
\]

低 Pr(液体金属)ゆえ熱境界層が厚く τ_g = 0.7698 は余裕がある一方、 τ_f = 0.50583 と運動量側が薄氷 — U と Ny の選択はこのトレードオフの上に いる。閉包は stefan-melting2d と同じ enthalpy_liquid_fraction / latent_heat_source + mushy_drag_coefficient(closures.hpp)で、 移行時に RESULT(melt_frac 0.695253、tilt 64.0122)のビット同一が 確認済み(docs/design/module-architecture-design.md)。

Code walkthrough

ソース(379 行)。

%%{init: {'themeVariables': {'fontSize': '11px'}}}%%
flowchart LR
    H["左壁 T_h(高温)<br/>アンチBB Dirichlet<br/>ノースリップ"] --> LQ["融液:D2Q9 BGK<br/>+ Guo 浮力 + Darcy 抗力<br/>上下断熱・ノースリップ"]
    LQ --> F(("傾いた前線<br/>0<f_l<1 部分制動")) --> S["固相 f_l=0<br/>Carman–Kozeny で不動化"]
    S --> C["右壁 T_m(融点)<br/>Dirichlet"]
  1. 写像 — (Ny, Ra, Ste, Pr, U) から ν, α, gβ, L を導出、Fo_max で ステップ数を自動決定。
  2. 運動量 — D2Q9 BGK + Guo 浮力。半陰的 Darcy 抗力 u = m/(ρ + A/2)。
  3. 温度 — D2Q5 + 潜熱ソース、f_l をエンタルピーから毎ステップ回復。
  4. 診断 — melt_frac と前線(平均/上端/下端)を定期出力、 Gau–Viskanta の写真時刻 4 点でスナップショット CSV。
  5. 出力 — RESULT 行(melt_frac、front_top/bot、tilt)とギャラリー アニメ(傾く前線が映る)。

Build & run

cmake -S native -B native/build && cmake --build native/build -j
./native/build/orheo-gallium-melting2d

gallium_melting2d [Ny] [Ra] [Ste] [Pr] [out_prefix] [U] [C] [Nx] [Fo_max]

このページの図を作った計算のコスト(Miyabi-G Grace CPU (72 cores, -stdpar=multicore)): 44.6 s wall。

Things to try

  • 未計測の検証を埋める:snap{0..3} の f_l = 0.5 等値線を Gau–Viskanta の写真前線と重ねる後処理を書く — Validation-Status の 🧩 を ✅ に する最短経路。
  • 解像度を上げる:gallium_melting2d 256 — τ_f が 0.5 にさらに 近づくので U も下げる必要がある。tilt = 64(0.50 H)が収束量か確かめる。
  • C 掃引:mushy 定数 1e3–1e7。前線幅と tilt の感度は Brent–Voller–Reid の主要な議論点そのもの。
  • Ra を 2e5 に:実験範囲の下端。対流が弱まり前線の傾きがどれだけ 減るか(純伝導なら stefan-melting2d の平面前線に退化する)。

Validation

Tier T1 — 自動ゲートあり
QoI melt_front
Reference Gau & Viskanta (1986) J.Heat Transfer 108:174
Gate 🧩 モジュールゲート (closures)

Source & run details

View source

Item Value
Target orheo-gallium-melting2d
Source native/benchmarks/gallium_melting2d.cpp
Lattice D2Q9
GPU twin no
Modules closures.hpp
Gallery run 2026-07-27 @ 7628c0cf
Args ``
Wall time 44.63 s
CPU time 2427.82 s
Device Miyabi-G Grace CPU (72 cores, -stdpar=multicore)

Computation log

この計算の実際の出力(先頭と末尾)。

gallium_melting2d Nx=179 Ny=128 (W/H=1.40) Ra=6e+05 Ste=0.0390 Pr=0.0216
  U=0.080 nu=0.00194 alpha=0.08995 gbeta=5.000e-05 L=25.641 C=1.00e+05 tau_f=0.50583 tau_g=0.7698 steps=710374 (Fo_max=3.900)
  step 59180 Fo=0.3249 melt_frac=0.1183 front(mean/top/bot)=21.18/21.18/19.75
  snapshot 0: Fo=0.4100 step=74680 melt_frac=0.1361
  step 118360 Fo=0.6498 melt_frac=0.1816 front(mean/top/bot)=32.49/36.46/27.18
  step 177540 Fo=0.9747 melt_frac=0.2419 front(mean/top/bot)=43.28/51.02/33.01
  snapshot 1: Fo=1.2300 step=224041 melt_frac=0.2817
  step 236720 Fo=1.2996 melt_frac=0.2924 front(mean/top/bot)=52.32/58.13/38.64
  step 295900 Fo=1.6245 melt_frac=0.3419 front(mean/top/bot)=61.20/69.47/43.16
  step 355080 Fo=1.9494 melt_frac=0.3930 front(mean/top/bot)=70.33/84.61/47.97
  snapshot 2: Fo=2.0500 step=373402 melt_frac=0.4087
  step 414260 Fo=2.2743 melt_frac=0.4436 front(mean/top/bot)=79.40/96.25/52.02
  step 473440 Fo=2.5992 melt_frac=0.4941 front(mean/top/bot)=88.43/107.02/55.80
  step 532620 Fo=2.9241 melt_frac=0.5446 front(mean/top/bot)=97.48/117.04/59.01

References

  • C. Gau & R. Viskanta, J. Heat Transfer 108 (1986) 174–181 — ガリウム側方加熱融解実験、2/6/10/19 分の前線写真。
  • A. D. Brent, V. R. Voller & K. J. Reid, Numerical Heat Transfer 13 (1988) 297–318 — エンタルピー・ポロシティ法。
  • W.-S. Jiaung, J.-R. Ho & C.-N. Kuo, Numerical Heat Transfer B 39 (2001) 167–187.
  • X. He, S. Chen & G. D. Doolen, J. Comput. Phys. 146 (1998) 282; Z. Guo, C. Zheng & B. Shi, Phys. Rev. E 65 (2002) 046308.