コンテンツにスキップ

BEACH 入力パラメータリファレンス

本文書は、Fortran 実行系が読む最終的な beach.toml のパラメータリファレンスです。 単位は、特に断りがない限り SI 単位です。

初めて設定を組む場合は、先に 設定レシピ を読むと全体像を掴みやすいです。

Fortran parser が解決する高水準記法は Configuration にまとめています。 本書では、正規化後に実行時設定として使われるキーを中心に説明します。

関連ドキュメント内容
設定レシピ目的別の設定手順と調整ポイント
Configurationbeachx config、高水準記法、schema/lint
AlgorithmsBEM 場計算、粒子 push、衝突、蓄積電荷の計算手順への導線
Workflow実行、開発、テスト、KUDPC での注意
FMMCorefield_solver="fmm" の数値アルゴリズム


項目仕様
明示指定beach path/to/beach.toml
既定入力引数なしではカレントディレクトリの beach.toml
開発実行fpm run -- path/to/beach.toml でも同じ
形式TOML。複数行配列も利用可能
未知キー未知のセクション名・キー名はエラー
schemaschemas/beach.schema.json
lintbeachx lint beach.toml

Editor schema を使う場合は、beach.toml の先頭にコメント directive を置きます。 Fortran パーサは最初のセクションより前の通常キーを受け付けないため、"$schema" = "..." は使いません。

#:schema ../schemas/beach.schema.json

GitHub Raw URL を指定することもできます。

#:schema https://raw.githubusercontent.com/Nkzono99/BEACH/main/schemas/beach.schema.json

相対パスは、その beach.toml 自身から見た相対パスです。 outputs/.../beach.toml など深い場所に置く場合は ../../schemas/beach.schema.json のように調整してください。


種類代表キー単位・向き
時間dt, batch_duration
長さbox_min, box_max, pos_low, pos_highm
電荷q_particle, 要素電荷出力C
質量m_particlekg
速度drift_velocity, ray_directionm/s。ただし ray_direction は方向ベクトル
電場e0, e0_absV/m
磁場b0T
密度number_density_cm3, number_density_m3cm^-3 または m^-3
温度temperature_k, temperature_evK または eV。両方の同時指定は不可
角度e0_phi_xy_deg, e0_phi_z_deg, sheath_alpha_degdegree

*_low / *_high は各軸の下限・上限です。 inject_facex_low, x_high, y_low, y_high, z_low, z_high のいずれかを指定します。


初見では、物理流入を直接指定できる source_mode = "reservoir_face" を推奨します。

[sim]
dt = 2.0e-8
batch_duration_step = 60000.0
batch_count = 100
max_step = 10000
softening = 1.0e-6
use_box = true
box_min = [0.0, 0.0, 0.0]
box_max = [1.0, 1.0, 10.0]
bc_x_low = "periodic"
bc_x_high = "periodic"
bc_y_low = "periodic"
bc_y_high = "periodic"
bc_z_low = "open"
bc_z_high = "open"
rng_seed = 12345
field_solver = "fmm"
field_bc_mode = "periodic2"
field_periodic_far_correction = "none"
[[particles.species]]
source_mode = "reservoir_face"
number_density_cm3 = 5.0
temperature_ev = 10.0
q_particle = -1.602176634e-19
m_particle = 9.10938356e-31
target_macro_particles_per_batch = 5000
inject_face = "z_high"
pos_low = [0.0, 0.0, 10.0]
pos_high = [1.0, 1.0, 10.0]
drift_velocity = [0.0, 0.0, -4.0e5]
[[particles.species]]
source_mode = "reservoir_face"
number_density_cm3 = 5.0
temperature_ev = 10.0
q_particle = 1.602176634e-19
m_particle = 1.672482821616e-27
target_macro_particles_per_batch = -1
inject_face = "z_high"
pos_low = [0.0, 0.0, 10.0]
pos_high = [1.0, 1.0, 10.0]
drift_velocity = [0.0, 0.0, -4.0e5]
[mesh]
mode = "template"
[[mesh.templates]]
kind = "plane"
enabled = true
size_x = 1.0
size_y = 1.0
nx = 20
ny = 20
center = [0.5, 0.5, 0.02]
[output]
write_files = true
write_mesh_potential = false
dir = "outputs/latest"
history_stride = 1

セクション必須内容
[sim]条件付き時間刻み、バッチ数、場ソルバ、境界、外部場、シース補正
[particles]yes[[particles.species]] のコンテナ
[[particles.species]]yes粒子種、注入方式、速度分布、マクロ粒子重み
[mesh]noOBJ または組み込み template の選択
[[mesh.templates]]nomode="template" で使う組み込み形状
[output]no出力先、履歴、checkpoint 再開

reservoir_face または photo_raycast を使う場合、[sim] は必須です。 [[particles.species]] は 1 件以上必要です。


キー既定値説明
dtfloat1.0e-9時間刻み [s]
rng_seedint12345乱数シード
batch_countint1通常実行では処理するバッチ数。output.resume=true では累積の到達バッチ数
batch_durationfloat0.01 バッチの物理時間 [s]
batch_duration_stepfloat0.0batch_duration = dt * batch_duration_step として解決
max_stepint400粒子 1 個あたりの最大 push 回数
tol_relfloat1.0e-8相対変化量の監視値。停止条件には未使用
q_floorfloat1.0e-30rel_change 計算時の分母下限

batch_durationbatch_duration_step の同時指定はエラーです。 reservoir_face / photo_raycast では、解決後の batch_duration > 0 が必須です。

field_solver は、境界要素電荷から評価点の Coulomb 電場を計算する方式です。 選択肢ごとの対応パラメータは下表のとおりです。

field_solver用途対応する場境界
direct要素数が小さい場合の厳密な全対全評価field_bc_mode="free"
treecode中規模以上の近似評価field_bc_mode="free"
fmm大規模評価、periodic2、FMM コア検証field_bc_mode="free" / "periodic2"
auto要素数に応じて direct / treecode を自動選択field_bc_mode="free"

共通キー:

キー既定値説明
softeningfloat1.0e-6Coulomb 場計算の softening 長さ [m]
field_solverstring"auto"direct / treecode / fmm / auto
field_normalizationstring"si"si / box / mesh / length
field_length_scalefloat1.0field_normalization="length" で使う長さスケール [m]

field_normalization は場計算内部の座標・softening・周期 cell の正規化だけを変えます。 出力される電場・電位は SI に戻されます。

field_normalization長さスケール
si入力 SI 座標をそのまま使う
boxsim.box_max - sim.box_min の最大幅。sim.use_box=true が必須
meshmesh bounding box の最大幅。mesh が空なら field_length_scale
lengthfield_length_scale

全 source 要素を直接足し上げます。 近似誤差はなく、計算量は評価点数を M、要素数を N として O(MN) です。

キー既定値説明
field_solverstring"auto""direct" を指定
softeningfloat1.0e-6source と評価点が近いときの特異性を緩和
field_normalizationstring"si"direct 評価前に座標を正規化
field_length_scalefloat1.0field_normalization="length" または mesh fallback で使用
field_bc_modestring"free"direct では "free" のみ

tree_thetatree_leaf_maxtree_min_nelemdirect では使いません。

source octree を作り、遠方 node は multipole 近似、近傍 node は direct 和で評価します。 FMM のような local expansion は使わず、評価点ごとに木を走査します。

キー既定値説明
field_solverstring"auto""treecode" を指定
softeningfloat1.0e-6近傍 direct 和と multipole 評価の softening
field_normalizationstring"si"tree 構築前に座標を正規化
field_length_scalefloat1.0field_normalization="length" または mesh fallback で使用
tree_thetafloat0.5MAC パラメータ。0 < theta <= 1。大きいほど速く粗い
tree_leaf_maxint16葉 node あたり最大 source 数。>= 1
field_bc_modestring"free"treecode では "free" のみ

tree_min_nelemfield_solver="auto" 用のしきい値なので、明示 treecode では切替には使いません。

simulator 非依存の Coulomb FMM コアを使います。 source 幾何の plan と、電荷更新ごとの state を分け、P2M/M2M/M2L/L2L/L2P と近傍 direct 和で評価します。 詳細は Coulomb FMM コア詳細 を参照してください。

キー既定値説明
field_solverstring"auto""fmm" を指定
softeningfloat1.0e-6近傍 direct 和と FMM 評価の softening
field_normalizationstring"si"FMM plan 構築前に座標を正規化
field_length_scalefloat1.0field_normalization="length" または mesh fallback で使用
tree_thetafloat0.5near/far 判定の MAC パラメータ。0 < theta <= 1
tree_leaf_maxint16source tree の葉 node あたり最大 source 数。>= 1
field_bc_modestring"free"free / periodic2
field_periodic_image_layersint1periodic2 の近傍画像層数
field_periodic_far_correctionstring"none"periodic2 の遠方補正。none / auto / m2l_root_oracle
field_periodic_ewald_alphafloat0.0m2l_root_oracle 用 Ewald 分解パラメータ
field_periodic_ewald_layersint4Ewald oracle の real-space outer shell / reciprocal cutoff 深さ

field_periodic_*field_bc_mode="periodic2" のときだけ意味を持ちます。 tree_min_nelem は明示 fmm では使いません。

要素数が tree_min_nelem 未満なら direct、以上なら treecode を使います。 auto は FMM へは切り替えません。

キー既定値説明
field_solverstring"auto""auto" を指定
softeningfloat1.0e-6direct / treecode の softening
field_normalizationstring"si"自動選択前に共通で使う正規化
field_length_scalefloat1.0field_normalization="length" または mesh fallback で使用
tree_min_nelemint256treecode へ切り替える要素数しきい値。>= 1
tree_thetafloat0.5treecode 選択時の MAC パラメータ
tree_leaf_maxint16treecode 選択時の葉 node あたり最大 source 数
field_bc_modestring"free"auto では "free" のみ

tree_thetatree_leaf_max は、明示指定がなければ要素数から次の値を使います。

要素数 nelemtree_thetatree_leaf_max
< 15000.4012
1500 <= nelem < 100000.5016
10000 <= nelem < 500000.5820
50000 <= nelem0.6524
キー既定値説明
field_bc_modestring"free"free / periodic2
field_periodic_image_layersint1periodic2 の近傍画像層数
field_periodic_far_correctionstring"none"none / auto / m2l_root_oracle
field_periodic_ewald_alphafloat0.0m2l_root_oracle 用 Ewald 分解パラメータ
field_periodic_ewald_layersint4Ewald oracle の outer shell / reciprocal cutoff 深さ

periodic2field_solver="fmm" のみで利用できます。 sim.use_box=true、かつ 2 軸だけが periodic、残り 1 軸が開放のときに有効です。 場評価だけでなく、collision と photo_raycast の raycast でも periodic image を考慮します。

field_periodic_far_correction="auto" は互換用に受理され、現在は none と同じ扱いです。 m2l_root_oracle は build 時の診断用で、exact periodic Ewald residual を root operator に fit する高コストモードです。

キー既定値説明
e0float[3][0,0,0]一様外部電場 [V/m]
e0_absfloat未指定一様外部電場の大きさ [V/m]
e0_phi_xy_degfloat0.0e0_abs 指定時の xy 面内方位角 [deg]
e0_phi_z_degfloat0.0e0_abs 指定時の xy 面からの仰角 [deg]
b0float[3][0,0,0]一様磁場 [T]

一様外部電場は、e0 = [Ex, Ey, Ez] で直接指定するか、e0_abs と角度で指定します。 両形式の混在はエラーです。

キー既定値説明
reservoir_potential_modelstring"none"none / infinity_barrier
phi_inftyfloat0.0無限遠基準電位 [V]
open_boundary_modelstring"escape"escape / potential_barrier
injection_face_phi_grid_nint3注入面平均電位の N x N 評価格子
raycast_max_bounceint16photo_raycast の最大反射回数
sheath_injection_modelstring"none"none / zhao_auto / zhao_a / zhao_b / zhao_c / floating_no_photo
sheath_alpha_degfloat60.0Zhao シースの太陽高度角 [deg]
sheath_photoelectron_ref_density_cm3float64.0Zhao シースの基準光電子密度 [cm^-3]
sheath_reference_coordinatefloat未指定シース 1D 座標の基準平面位置 [m]
sheath_electron_drift_modestring"normal"normal / full
sheath_ion_drift_modestring"normal"normal / full

sheath_injection_model != "none" は、現状 reservoir_potential_model="none" と組み合わせて使います。 詳細は sim.sheath_injection_model を参照してください。

キー既定値説明
use_boxboolfalseボックス境界を有効化
box_minfloat[3][-1,-1,-1]ボックス下限 [m]
box_maxfloat[3][1,1,1]ボックス上限 [m]
bc_x_low, bc_x_highstring"open"x 方向下限・上限の粒子境界
bc_y_low, bc_y_highstring"open"y 方向下限・上限の粒子境界
bc_z_low, bc_z_highstring"open"z 方向下限・上限の粒子境界

粒子境界は open, reflect, periodic を指定します。 openoutflow, escape も同義語として受理されます。

open_boundary_model="potential_barrier" では、open 面を越えた粒子について、 境界通過点の BEM 電位 phi_boundaryphi_infty から電位障壁 q_particle * (phi_infty - phi_boundary) を評価します。障壁が正で、開境界法線方向の運動エネルギー 0.5 * m_particle * v_normal^2 より大きい場合は法線速度を反転して反射し、それ以外は脱出として扱います。 一様外部電場 e0 は無限遠基準の電位を定義しないため、この障壁評価には含めません。

periodic2 の mesh は、runtime で collision 用 canonical unwrapped 表現へ平行移動してから ray-triangle 判定します。 raw 頂点は periodic 軸で box 外を含んでも構いませんが、triangle を頂点ごとに mod 折り返すことはしません。


[[particles.species]] は 1 件以上必須です。 source_mode によって、使うキーと制約が変わります。

キー既定値説明
enabledbooltrue種を有効化
source_modestring"volume_seed"volume_seed / reservoir_face / photo_raycast
q_particlefloat-1.602176634e-19粒子電荷 [C]
m_particlefloat9.10938356e-31粒子質量 [kg]
pos_lowfloat[3][-0.4,-0.4,0.2]位置下限 [m]
pos_highfloat[3][0.4,0.4,0.5]位置上限 [m]
drift_velocityfloat[3][0,0,-8e5]ドリフト速度 [m/s]
temperature_kfloat2.0e4温度 [K]
temperature_evfloat未指定温度 [eV]。temperature_k と排他
velocity_distributionstring"maxwellian"maxwellian / grid
inject_facestring未指定注入面。reservoir_face / photo_raycast で必須
キー既定値説明
npcls_per_stepint01 バッチに生成するマクロ粒子数
w_particlefloat1.0マクロ粒子重み

制約:

条件内容
粒子数有効 species 全体で npcls_per_step 合計が 1 以上必要
重み自動解決target_macro_particles_per_batch は使用不可
キー説明
number_density_cm3, number_density_m3float上流密度。どちらか片方を指定
w_particlefloatマクロ粒子重み。正値
target_macro_particles_per_batchintw_particle 自動解決用。>0 または -1
velocity_grid_pathstringvelocity_distribution="grid" の CSV パス
velocity_grid_pdf_kindstringphase_space / flux_weighted
velocity_grid_samplingstringauto / rectilinear / discrete
particle_flux_m2_s, current_density_a_m2floatgrid 分布の流入量。どちらか片方を指定

基本制約:

条件内容
領域sim.use_box=true が必須
時間sim.batch_duration > 0 が必須
注入面inject_face が必須
注入範囲pos_low / pos_high は指定 face 上にある必要がある
重みw_particletarget_macro_particles_per_batch は同時指定不可
重み共有target_macro_particles_per_batch=-1 は species 2 以降だけ可。species 1 の w_particle を共有

Maxwellian 分布では、number_density_* と温度から drifting Maxwellian の片側流束を計算します。

Grid 分布では、velocity_grid_path の CSV を読み込みます。 必要列は vx_m_s, vy_m_s, vz_m_s, f です。 f は内部で sum f = 1 に正規化されます。 この場合、number_density_* / temperature_* は使わず、particle_flux_m2_s または current_density_a_m2 で流入量を決めます。 current_density_a_m2abs(J / q_particle) として粒子 flux に変換します。

velocity_grid_sampling挙動
auto完全な直交格子なら三線形補間。不完全格子や散布点なら離散サンプル
rectilinear直交格子補間を強制。直交格子でなければエラー
discreteCSV 行を直接サンプル
velocity_grid_pdf_kind挙動
phase_space流入面の内向き法線速度 v_n を掛けた v_n f(v) でサンプル
flux_weightedCSV の f を流束重み済み分布として扱う

どちらの PDF でも、v_n > 0 の速度だけを使います。 velocity_grid_path の相対パスは実行時のカレントディレクトリ基準です。 現状、velocity_distribution="grid"sim.sheath_injection_model="none" のときのみ有効です。

粒子数は次のように決まります。

n_macro_expected = gamma_in * A * batch_duration / w_particle
n_injected = floor(residual + n_macro_expected)

残差は次バッチへ繰り越されます。 target_macro_particles_per_batch > 0 のときは、その値に近づくよう w_particle を自動計算します。

キー既定値説明
emit_current_density_a_m2float0.0レイ垂直面基準の放出電流密度 [A/m^2]
rays_per_batchint01 バッチの発射レイ数
deposit_opposite_charge_on_emitboolfalse放出元要素に逆符号電荷を堆積
photo_escape_modelstring"none"none / boltzmann_cutoff
normal_drift_speedfloat0.0放出法線方向ドリフト [m/s]
ray_directionfloat[3]注入面内向き法線レイ方向

制約:

条件内容
領域sim.use_box=true が必須
時間sim.batch_duration > 0 が必須
放出量emit_current_density_a_m2 > 0, rays_per_batch > 0 が必須
注入面inject_face が必須
粒子属性q_particle は非ゼロ、m_particle > 0
レイ方向正規化可能で、注入面内向き法線との内積が正
使用不可npcls_per_step, number_density_*, w_particle, target_macro_particles_per_batch

レイ 1 本が命中したときの重みは次の式です。

w_hit = J_perp * A_perp * batch_duration / (|q_particle| * rays_per_batch)

実際の生成粒子数はレイの命中率で決まるため、バッチごとの生成数は rays_per_batch 以下です。 field_bc_mode="periodic2" では、periodic image に命中しても primary cell に wrap した hit 座標から放出します。

photo_escape_model="boltzmann_cutoff" では、放出元要素の自己寄与を除いた中心電位で障壁を評価します。

barrier = max(phi_emit - phi_infty, 0)
escape_factor = exp(-|q_particle| * barrier / (k_B * T_PE))

deposit_opposite_charge_on_emit=true の場合、放出元要素へ残す逆符号電荷にも同じ実効重みを使います。 抑制された光電子電流は即時 return として扱います。


sim.sheath_injection_model: シース流入補正

Section titled “sim.sheath_injection_model: シース流入補正”

sim.sheath_injection_model は、既存の reservoir_face / photo_raycast species を束ね、シースに対応する流束や法線速度 cutoff を上書きする共有設定です。

内容
none補正なし
zhao_auto太陽高度角に応じて Zhao の Type A/B/C 分枝を自動選択
zhao_a, zhao_b, zhao_cZhao の 1D 光電子シース条件を指定分枝で使用
floating_no_photo光電子を含まない簡易 floating sheath

Zhao 系モデルでは、次の species が自動検出されます。

対象検出条件
solar-wind electron最初の負電荷 reservoir_face species
ion最初の正電荷 reservoir_face species
photoelectron最初の負電荷 photo_raycast species

Zhao 系モデルの効果:

対象上書き内容
electron reservoir有効密度を Zhao 解の n_swe_inf に置換し、障壁に応じた vmin_normal を適用
ion reservoirsheath_reference_coordinate 指定時に局所密度・局所法線速度・冷たいビーム近似へ更新
photoelectronemit_current_density_a_m2 を Zhao の自由光電子電流へ置換し、normal_drift_speed=0 として扱う

floating_no_photo では、最初の負電荷 / 正電荷 reservoir_face species の電流釣り合いから負の浮遊電位を解きます。 electron reservoir species には cutoff を掛け、photo_raycast species があっても放出電流は 0 とみなします。

補足:

  • Zhao 系モデルは temperature_*, number_density_*, drift_velocity, m_particle, q_particle を背景プラズマ条件として再利用します。
  • sheath_reference_coordinate は、共有 inject_face の法線軸に沿った基準平面位置です。
  • 例: inject_face="z_high" かつ sheath_reference_coordinate=0.02 なら、平面 z=0.02z_sheath=0 とみなします。
  • sheath_reference_coordinate 未指定時は、共有 cutoff ベースの補正だけを適用します。
  • Fortran 実装では、Type A は 1 次積分、Type B/C は単調分枝の 1 次積分で局所プロファイルを再構成します。
  • zhao_autoalpha < 20 degC -> A -> B、それ以外で A -> B -> C の順に分枝解を試みます。

キー既定値説明
modestring"auto"auto / obj / template
obj_pathstring"examples/simple_plate.obj"OBJ ファイルパス
surface_modelstring"insulator"OBJ 全体の表面モデル
epsilon_rfloat1.0OBJ 全体の相対誘電率。>= 1
obj_scalefloat1.0OBJ 読み込み後の一様スケール
obj_rotationfloat[3][0,0,0]OBJ 読み込み後の回転角 [deg]
obj_offsetfloat[3][0,0,0]OBJ 読み込み後の平行移動 [m]

mode="auto" では、obj_path が存在すれば OBJ、なければ template を使います。 OBJ 変換順序は scale -> rotate -> offset です。

v_new = R(rotation) * (v_old * obj_scale) + obj_offset

OBJ 入力では、ファイル全体を mesh_id=1 として読みます。 1 つの OBJ 内に離れた conductor 部品があっても同じ浮遊導体として扱われます。 独立導体として扱う場合は、template 入力などで mesh_id を分けてください。

OBJ の対応範囲:

項目対応
改行LF / CRLF
面行f v, f v/vt, f v/vt/vn, f v//vn
多角形四角形以上はファン三角形分割

共通キー:

キー既定値説明
enabledbooltruetemplate を有効化
kindstring"plane"plane / plate_hole / plane_hole / disk / annulus / box / cylinder / sphere
surface_modelstring"insulator"insulator / conductor / dielectric
epsilon_rfloat1.0相対誘電率。>= 1
centerfloat[3][0,0,0]形状中心 [m]

[[mesh.templates]] を書いた場合、実際に使うテンプレート数は定義件数で決まります。 無効化された template は mesh に追加されず、mesh_id も消費しません。

kind の概要:

kind生成形状基準面・軸
plane長方形平面XY 平面、z=center[3]
plate_hole, plane_hole中央に円形穴を持つ長方形平面XY 平面、穴中心は center
disk円板XY 平面、中心は center
annulus同心リングXY 平面、中心は center
box閉じた直方体表面各軸に平行な 6 面
cylinder円柱側面と任意の上下キャップz 軸方向
sphere球面中心は center

XY 平面上の長方形を nx * ny 個の矩形セルに分け、各セルを 2 三角形へ分割します。

キー既定値説明
centerfloat[3][0,0,0]平面中心 [x, y, z] [m]
size_xfloat1.0x 方向サイズ [m]。> 0
size_yfloat1.0y 方向サイズ [m]。> 0
nxint1x 方向分割数。>= 1
nyint1y 方向分割数。>= 1

要素数は 2 * nx * ny です。

XY 平面上の長方形プレートから、中心の円形穴を除いた形状です。 plane_holeplate_hole の別名です。 穴境界は n_theta 分割の多角形で近似し、穴縁から外周までを n_r 層に分けます。

キー既定値説明
centerfloat[3][0,0,0]プレート中心および穴中心 [x, y, z] [m]
size_xfloat1.0x 方向サイズ [m]。> 0
size_yfloat1.0y 方向サイズ [m]。> 0
radiusfloat0.5穴半径 [m]。実行時には 0 < radius < min(size_x, size_y) / 2
n_thetaint24穴境界の周方向分割数。>= 3
n_rint4穴縁から外周までの半径方向分割数。>= 1

外周は長方形境界に一致します。 円形穴の半径が半幅または半高以上になる設定はエラーです。 共通 default の radius=0.5 は、既定の size_x=size_y=1.0 ではこの制約に当たるため、plate_hole では radius を明示指定してください。

XY 平面上の円板です。 内部は極座標で分割され、中心から外周へ向かって三角形化されます。

キー既定値説明
centerfloat[3][0,0,0]円板中心 [x, y, z] [m]
radiusfloat0.5円板半径 [m]。> 0
n_thetaint24周方向分割数。>= 3
n_rint4半径方向分割数。>= 1

内部的には inner_radius=0annulus と同じ生成経路を使います。

XY 平面上の同心リングです。 内半径から外半径までを n_r 層に分けます。

キー既定値説明
centerfloat[3][0,0,0]リング中心 [x, y, z] [m]
radiusfloat0.5外半径 [m]。> 0
inner_radiusfloat0.25内半径 [m]。0 <= inner_radius < radius
n_thetaint24周方向分割数。>= 3
n_rint4半径方向分割数。>= 1

inner_radius=0 も受理されますが、円板を作る場合は kind="disk" の方が意図が明確です。

閉じた直方体表面です。 6 面すべてを三角形化し、法線は外向きになるように頂点順序を設定します。

キー既定値説明
centerfloat[3][0,0,0]直方体中心 [x, y, z] [m]
sizefloat[3][1,1,1]x, y, z 方向サイズ [m]。各成分 > 0
nxint1x 方向分割数。>= 1
nyint1y 方向分割数。>= 1
nzint1z 方向分割数。>= 1

要素数は 4 * (nx * ny + ny * nz + nx * nz) です。 これは、各面の矩形セルを 2 三角形へ分け、対向する 2 面分を数えたものです。

z 軸方向の円柱です。 側面を n_theta * n_z の矩形セルに分け、必要に応じて上下キャップを追加します。

キー既定値説明
centerfloat[3][0,0,0]円柱中心 [x, y, z] [m]
radiusfloat0.5円柱半径 [m]。> 0
heightfloat1.0z 方向高さ [m]。> 0
n_thetaint24周方向分割数。>= 3
n_zint1軸方向分割数。>= 1
capbooltrue上下キャップをまとめて有効化
cap_topboolcap の値上面キャップ。指定時は cap より優先
cap_bottomboolcap の値下面キャップ。指定時は cap より優先

円柱は z = center[3] - height/2 から z = center[3] + height/2 まで伸びます。 側面の要素数は 2 * n_theta * n_z です。 各キャップを有効化すると、それぞれ n_theta 個の三角形が追加されます。

経度・緯度分割に基づく球面です。

キー既定値説明
centerfloat[3][0,0,0]球中心 [x, y, z] [m]
radiusfloat0.5球半径 [m]。> 0
n_lonint24経度方向分割数。>= 3
n_latint12緯度方向分割数。>= 2

要素数は 2 * n_lon * (n_lat - 1) です。 極付近は 1 三角形、その他の緯度帯は 2 三角形で構成されます。

表面モデル:

surface_model挙動
insulator衝突粒子の電荷を要素へ蓄積
conductormesh_id ごとの浮遊導体として、総電荷を保存しながら等電位になるよう要素電荷を再配分
dielectricepsilon_r をメタデータとして保存。現行の場計算・電荷蓄積では誘電体分極をまだ分岐しない

conductor は現時点で field_bc_mode="free" の直接 Coulomb 係数を使って再配分します。 field_bc_mode="periodic2" とは併用できません。 導体要素数が大きいケースでは、dense solve によりバッチごとの追加コストが増えます。


キー既定値説明
write_filesbooltrueファイル出力の有効/無効
write_mesh_potentialboolfalsemesh_potential.csv を出力
write_potential_historyboolfalsepotential_history.csv を出力
dirstring"outputs/latest"出力先ディレクトリ
history_strideint1履歴 CSV の出力間隔 [batch]
resumeboolfalse既存 checkpoint から再開
restart_fromstringなしresume=true 時の checkpoint 読み込み元

出力ファイル:

ファイル条件・内容
summary.txt実行統計と設定概要
charges.csv最終要素電荷
mesh_triangles.csv要素 geometry。mesh_id 列を含む
mesh_sources.csvmesh_id ごとの元メッシュ種別、表面モデル、epsilon_r、要素数
mesh_potential.csvwrite_mesh_potential=true のとき
charge_history.csvhistory_stride > 0 のとき
potential_history.csvwrite_potential_history=true かつ history_stride > 0 のとき
rng_state.txt乱数状態
macro_residuals.csvマクロ粒子数の残差繰越

mesh_potential.csv は要素重心での電位 [V] を記録します。 自己項は softening > 0 なら 1/softening、そうでなければ面積等価半径近似を使います。 periodic2 では explicit image shell を加えます。 field_periodic_far_correction="m2l_root_oracle" のときだけ exact Ewald residual も加えます。

potential_history.csvcharge_history.csv と同じ history_stride で要素ごとの電位を記録します。 形式は batch, elem_idx, potential_V です。 履歴ごとに field_solver%refreshcompute_mesh_potential が走るため、有効化すると計算コストが増えます。

resume=true の要件:

条件内容
出力write_files=true が必須
読み込み元restart_from 未指定なら output.dir、指定時は restart_from
必須ファイルsummary.txt, charges.csv, rng_state.txt
任意ファイルmacro_residuals.csv は存在すれば読み込む
挙動必須 checkpoint がなければ新規実行にフォールバックせず停止

restart_from は checkpoint の読み込み元だけを変更します。 新しい出力は常に output.dir に書かれます。

MPI 実行時:

ファイル内容
rng_state_rankNNNNN.txtrank 別乱数状態
macro_residuals_rankNNNNN.csvrank 別残差

summary.txtmpi_world_size は現在の rank 数と一致している必要があります。


次のキーは schema には含まれますが、Fortran parser が実行時キーへ解決する高水準記法です。 Fortran parser は読み込み時に右列のキーとして扱います。

高水準キー解決先・用途
sim.box_origin, sim.box_sizesim.box_min, sim.box_max
inject_region_mode, uv_low, uv_highinject_face 上の pos_low, pos_high
mesh.groups, template の group, center_localtemplate ごとの実座標
template の placement_mode, anchor, offset, offset_fraccenter
template の size_mode, size_fracsize_x, size_y, size, radius など

高水準記法の詳細、例、lint 時の扱いは Configuration を参照してください。


項目ルール
未知キーすべてエラー
[particles][[particles.species]] のコンテナとしてのみ使用。直下に key = value は書かない
旧キー旧名は未知キーとして扱う
schema と Fortran パーサの両方で検証
値域beachx lint と実行時 parser が既知制約を検証

実行前には次を推奨します。

Terminal window
beachx lint beach.toml