コンテンツにスキップ
開発版ドキュメント — このサイトはmainブランチ向けで、インストール済みリリースと異なる場合があります。変更履歴を確認してください。

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

beach.toml のキーを調べるための一覧です。型、既定値、単位、必須条件と排他条件を記載します。 単位は特記しない限り SI です。最初の設定はケース設計、 編集後の確認は設定の検証から始めてください。

調べる対象このページの項目
時間刻み、batch 数、場 solver、外部場sim
計算領域と周期軸domain
場と粒子の境界条件field_boundary / particle_boundary
粒子種、供給量、放出方式particles.species
表面の形状・材料・配置mesh / 座標・配置の補助
保存する量と再開output
外部プラズマや周期場の詳細reservoir / surface_current_model / periodic2

設定ファイルへ全項目をコピーする必要はありません。使う粒子源・境界・solver に必要な項目を選び、 省略した項目には表の既定値を使います。「必須」「未指定」と書かれた項目は、各表の適用条件も確認してください。


項目仕様
明示指定beach path/to/beach.toml
既定入力引数なしではカレントディレクトリの beach.toml
開発実行fpm run --target beach -- path/to/beach.toml でも同じ
形式TOML。複数行配列も利用可能
未知キー未知のセクション名・キー名はエラー
schemaschemas/beach.schema.json
Python 検証beachx lint beach.toml / beachx config validate beach.toml は同梱 schema と意味的制約を検証
Fortran 検証開発・診断用の beach --check-config beach.toml は読取・正規化・最小のモデル成立条件を確認。path は必須。実行前 lint の代替にはならない
基本値実数と配列成分は有限値。整数項目に実数・真偽値は指定不可
整数の格納範囲符号付き 32 bit の -2147483648..2147483647。範囲外は変換前に拒否。各項目固有の値域は lint で検証
文字列Fortran の格納先を超える長さはエラー。暗黙の切り詰めはしない

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

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

種類代表キー単位・向き
時間dt, batch_duration
長さdomain.box_min, domain.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_degdegree

数値と配列の各成分は有限値でなければなりません。無効化した species も、入力された値の型・有限性・ 文字列長の検査を受けます。整数の格納範囲も同じです。 列挙値、宣言上の値域、無効な機能への指定などの詳細な入力診断は Schema / Python が担当します。 Fortran はその全診断を繰り返さず、派生値・参照解決と実行に必要な最小条件を確認します。 不正入力の採否は一致を保証しません。 物理的な組合せ制約は各項目の適用条件に従います。 *_low / *_high は各軸の下限・上限です。 inject_facex_low, x_high, y_low, y_high, z_low, z_high のいずれかを指定します。


最初の実行には 10 分チュートリアルexamples/tutorial_insulator.toml を使ってください。beachx config init も同一の設定を生成します。この入門ケースは、毎 batch 200 個のマクロ電子による表面電荷更新を 20 batch 追跡し、field_solver="direct"field_boundary.mode="free"を使います。

境界reservoir流入、plane_source、周期境界、閉じた光電子、無限周期補正は、そのケースが実行できた後に シミュレーションケースを設計するから追加する応用設定です。


[sim][domain][field_boundary][particle_boundary][reservoir][surface_current_model][particles][mesh][periodic2][output]が公開構成です。

beach.toml
├── [sim]
├── [domain]
├── [field_boundary]
├── [particle_boundary]
├── [reservoir]
├── [surface_current_model]
├── [particles]
│ └── [[particles.species]] # 1 件以上の array-of-tables
│ ├── [particles.species.boundary_inflow]
│ └── [particles.species.boundary]
├── [mesh]
│ ├── [mesh.groups.<name>] # 名前付きの子 table
│ └── [[mesh.templates]] # 0 件以上の array-of-tables
├── [periodic2]
└── [output]

本文中のsim.dtdomain.periodic_axesは「table名.key」の参照表記です。

TOML table件数・必須条件内容
[sim]root条件付き時間刻み、バッチ数、場ソルバ、外部場
[domain]rootbox使用時box geometryと周期軸
[field_boundary]root任意場のfree / periodic2 closure
[particle_boundary]root任意非周期面のglobal粒子作用
[reservoir]root任意外部reservoirの流入障壁と基準電位
[surface_current_model]root任意species別fixed_current targetまたはmatching-plane応答を解く外部シースclosure
[particles]root必須[[particles.species]] のコンテナ。直下に通常 key は置かない
[[particles.species]][particles]1 件以上粒子種、注入方式、速度分布、マクロ粒子重み
[particles.species.boundary]最新の[[particles.species]]任意その粒子種だけの非周期面override
[particles.species.boundary_inflow]最新の[[particles.species]]任意外部reservoirから流入する非周期面
[mesh]root任意OBJ または組み込み template の選択
[mesh.groups.<name>][mesh]0 件以上複数 template で共有する配置と scale
[[mesh.templates]][mesh]0 件以上mode="template" で使う組み込み形状
[periodic2]root条件付きsplit periodic2 の非零モード・零モード・下側境界モデル
[output]root任意出力先、履歴、checkpoint 再開

boundary_inflowplane_sourcereservoir_facephoto_raycastを使う場合、[sim][domain]が必要です。 [[particles.species]] は 1 件以上必要です。


キー既定値説明
dtfloat1.0e-9時間刻み [s]。有限かつ >0
rng_seedint12345乱数シード
batch_countint1通常実行のバッチ数。resume 時は累積到達数。>=1
batch_durationfloat0.01 バッチの物理時間 [s]。有限値、流束 source では >0
batch_duration_stepfloat0.0batch_duration=dt*batch_duration_step>0batch_duration と排他
max_stepint400粒子 1 個あたりの最大 push 回数。>=1

batch_durationbatch_duration_step の同時指定はエラーです。 boundary_inflow / plane_source / reservoir_face / photo_raycast では、解決後の batch_duration > 0 が必須です。 刻み・追跡長・粒子数を一緒に設計する手順はケース設計を参照してください。

以下は電荷変化の診断用です。計算終了は batch_count で決まり、これらを変えても早期停止しません。

キー既定値説明
tol_relfloat1.0e-8相対変化量の監視値。有限かつ >=0、停止条件には未使用
q_floorfloat1.0e-30rel_change 計算時の分母下限。有限かつ >0

境界通過の再試行・破棄、または光電子の ray tracing を調整する場合に使います。

キー既定値説明
multiple_box_events_policystring"abort"1 step の境界event上限超過時に abort / soft_discard
multiple_box_events_retry_backendstring"none"multiple_box_events 後の再試行。none / upper_panel_fourier
multiple_box_events_soft_discard_count_graceint1000累積 soft discard 率の判定を開始する件数猶予。>= 0
multiple_box_events_soft_discard_fraction_limitfloat1.0e-6累積 soft discard 率の停止上限。0 < value <= 1
multiple_box_events_soft_discard_abs_charge_limitfloat1.0e-12累積 soft discard 絶対電荷の警告閾値 [C]。有限かつ >0
raycast_max_bounceint16photo_raycast の最大 bounce 数。有効時 >=1

upper_panel_fouriercached_kneq0periodic2 構成でのみ有効です。 soft_discard は、件数猶予の超過後に累積破棄率が率上限を超えた場合だけ停止します。 累積絶対電荷は実行時間とともに増えるため、電荷閾値の初回超過は警告として記録します。 再試行の成立条件と診断値は粒子の衝突・境界イベントを参照してください。

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

e0 での直接指定と、e0_abs と角度による指定は排他です。

field_solver は、要素電荷から Coulomb 場を評価する方式を選びます。

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

solverと場境界の組合せは場の評価の互換表で確認できます。 要素電荷は常に三角形上の一定面密度(P0 panel)として評価され、設定でkernelを選択しません。

共通キー:

キー既定値説明
field_solverstring"auto"direct / treecode / fmm / auto
field_normalizationstring"si"si / box / mesh / length
field_length_scalefloat1.0field_normalization="length" の長さ [m]。>0
field_periodic_image_layersint1periodic2 の近傍 image shell。>=0cached_kneq0 では >=1
field_periodic_far_correctionstring"none"none / auto / cached_kneq0
field_periodic_ewald_alphafloat0.0cache 生成の Ewald 分割値。>=0、0 は自動
field_periodic_ewald_layersint4cache 生成の実・逆空間 shell 深さ。far correction 有効時 >=1
field_periodic_cache_dirstring".beach_cache/periodic2"operator cacheの保存先。cached_kneq0 では空文字不可
field_periodic_generation_tolerancefloat1.0e-8cache identity に含める生成許容誤差。cached_kneq0 では有限かつ >0
tree_thetafloat未指定時は下表の要素数 heuristictreecode / FMM の MAC パラメータ。0<theta<=1、大きいほど速く粗い
tree_leaf_maxint未指定時は下表の要素数 heuristictreecode / FMM の葉あたり最大 source 数。>=1
tree_min_nelemint256auto が direct から FMM へ切り替える要素数。>=1

field_periodic_far_correction="auto" は互換用に受理され、現在は none と同じ扱いです。

field_normalization は内部座標のみを変え、電場・電位の出力単位は SI のままです。

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

mode ごとの追加キー:

field_solver評価使用する追加キー
direct全 source を直接加算する O(MN) 参照計算なし
treecode遠方を monopole、近傍を panel kernel で評価tree_thetatree_leaf_max
fmmCoulomb FMM で大規模近似評価tree_thetatree_leaf_max、periodic2 関連キー
autotree_min_nelem 未満は direct、以上は FMMtree_min_nelem、FMM 選択時の tree_thetatree_leaf_max

FMM の選択と精度確認は FMM を使う、実装は Coulomb FMM コア詳細を参照してください。

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

要素数 nelemtree_thetatree_leaf_max
< 15000.4012
1500 <= nelem < 100000.5016
10000 <= nelem < 500000.5820
50000 <= nelem0.6524
[domain]
box_min = [0.0, 0.0, 0.0]
box_max = [1.0, 1.0, 4.0]
periodic_axes = ["x", "y"]
キー既定値説明
box_min, box_maxfloat[3]なしbox下限・上限 [m]。両方を指定し、全軸で box_max > box_min
box_origin, box_sizefloat[3]なしoriginと正のsize [m]。両方を指定
periodic_axesstring[][]重複しない"x" / "y" / "z"

2組のgeometry表現は同時指定できません。[domain]を使う場合はどちらか1組が必須です。 周期性を指定できる公開キーはdomain.periodic_axesだけです。 field_boundary.mode="periodic2"では、periodic_axes=["x","y"]が必要です。

[field_boundary]
mode = "periodic2"
キー既定値説明
modestring"free"free / periodic2

periodic2では[domain]が必要です。非零・零モードoperatorを明示する場合は[periodic2]も指定します。 solverとの組合せは 場の評価の互換表に従います。

[particle_boundary]
z_low = "open"
z_high = "open"
ordinary_open_model = "escape"
キー既定値説明
x_low, x_highstringdomainに従う非周期x面のopen / reflect / redistributed_reflect
y_low, y_highstringdomainに従う非周期y面のopen / reflect / redistributed_reflect
z_low, z_highstringdomainに従う非周期z面のopen / reflect / redistributed_reflect
ordinary_open_modelstring"escape"effectiveなopen面でescape / potential_barrier

省略面は domain topology を継承し、非周期面は open になります。周期面は上書きできません。 反射・再分布反射・電位障壁の定義は粒子の衝突・境界イベントを参照してください。

[reservoir]
inflow_model = "source_vdf"
phi_infty = 0.0
face_potential_grid_n = 3
キー既定値説明
inflow_modelstring"source_vdf"source_vdf / infinity_barrier
phi_inftyfloat0.0barrierが参照する無限遠基準電位 [V]
face_potential_grid_nint3注入面平均電位のN x N評価格子。>=1

infinity_barrierboundary_inflow だけに適用します。一様電場と併用する場合は、phi_infty を有効な reservoir 基準に設定します。 補正式と適用範囲は境界から粒子を流入させるを参照してください。

[surface_current_model]: 外部シースclosure

Section titled “[surface_current_model]: 外部シースclosure”

省略時は species ごとの手動電流 target を使います。外部シースを使う場合は次の model を選びます。

model効果詳細
none外部シース closure を使わないspecies 側の surface_charge_closure を設定
zhao_stationaryZhao 定常根から固定電流と z-high のエネルギー障壁を決定Zhao stationary closure
matching_plane_quasistaticbox 上端を外部シース応答と準定常連成matching-plane 準定常連成を使う
キー既定値説明
modelstring"none"none / zhao_stationary / matching_plane_quasistatic
response_backendstring"table"matchingの応答源。table / zhao_online
zhao_branchstring"auto"auto / a / b / c。stationaryまたはonline Zhaoのbranch。PEなしstationaryはauto / cのみ
zhao_root_selectionstring"require_unique"online Zhao の root 選択。require_unique は複数根を拒否、minimum_energy は最小電位エネルギー根を選択、continuation は accepted Type A root を追跡。continuation には zhao_branch="a"implicit_zero_mode=true が必須。stationary / table では指定不可。詳細は数値・応答表リファレンス
electron_speciesstring未指定ambient electron の species_key。Zhao / matching で必須、1–64 文字
ion_speciesstring未指定cold ion の species_key。Zhao / matching で必須、1–64 文字
photoelectron_speciesstringPE有効時に必須PE の species_key。1–64 文字、matching で省略すると PE なし
solar_elevation_degfloatstationaryのPE有効時に必須Zhao sourceに使う太陽高度角 α\alpha0<α900<\alpha\le90 degree
photoelectron_ref_density_m3floatstationaryのPE有効時に必須PE基準密度 npe,refn_{pe,ref} [m^-3]。>0
photoelectron_source_scalefloat1.0stationary Zhao の sUVs_{UV}>=0、0 は PE なし
reference_area_m2floatdomainのx-y面積Zhao電流密度を総電流へ変換する面積 [m^2]。>0、matching では指定不可
response_table_pathstringtable matchingで必須外部シース応答 CSV v1。解決後 1–256 文字、online では指定不可
implicit_zero_modeboolfalsematching の面平均 DHD_H を後退 Euler 更新。e_bottom_zero が必須。table は有限 DHD_H 軸と singleton feedback、online は CSV なしで選択 branch の終点を探索
coupling_rtolfloat1.0e-4matching固定点反復の相対収束許容値。有限な0<r10<r\le1
coupling_atolfloat[4][0.0, 0.0, 0.0, 0.0]feedback成分ごとの絶対許容値。順にPE外向きflux [m^-2 s^-1]、PE平均法線energy [eV]、electron外向きflux [m^-2 s^-1]、ion外向きflux [m^-2 s^-1]。各値は有限かつ非負、inactive成分は0
coupling_max_iterationsint20matching固定点反復の最大回数。>=1
coupling_relaxationfloat0.5matching更新の緩和係数。有限な0<ω10<\omega\le1

入力制約:

項目必要条件
role speciesenabled、相互に異なる、surface_charge_closure="fixed_current"
ambient electron / ionz-high reservoir から内向きに流入、手動 target_*_current_a は指定不可
PE なしphotoelectron_source_scale=0.0、PE 固有キーは省略、zhao_branch="auto" または "c"
PE あり負電荷の photo_raycastinject_face="z_high"deposit_opposite_charge_on_emit=true、有効な z-high 境界は open
species 物性単価電荷、ambient electron と PE の質量は同一、Te>0T_e>0Tpe>0T_{pe}>0Ti0.1TeT_i\le0.1T_e
外部場sim.b0=[0,0,0]reservoir.inflow_model="infinity_barrier" は使用不可

PEなしType CはJe+Ji=0J_e+J_i=0を満たすelectron/ion吸収targetとz-high kinetic barrier mapだけを生成し、 PE emission / return / escape targetは生成しません。 ion_species.number_density_* は無限遠 ion 密度です。electron 密度と PE 放出電流密度の入力は粒子分布の標本化に使い、電流 target は closure が決めます。

この model は定常電流 closure であり、box 外の過渡シースは解きません。電流・障壁・PE return の定義と出力は Zhao stationary closureを参照してください。

計算例は examples/periodic2_zhao_fixed_current.toml です。

response_backend="table" は外部応答 CSV、"zhao_online" は BEACH 内の有限 HH Zhao 応答を使います。 PE なしでは photoelectron_species を省略します。table の PE flux / energy 入力軸も 0 にします。 matching plane の HHdomain.box_max の z 成分で、面積は domain の x-y 面積です。すべての mesh 頂点を HH より下に置きます。

次の入力契約をすべて満たす必要があります。

項目必要条件
box / 場x/y 周期・z 非周期 open、field_boundary.mode="periodic2"、明示的な [periodic2] split 設定
splitnonzero_mode_backendcached_kneq0 または panel_spectral_referencezero_mode_policy="exclude_k0"、下側は e_bottom_zero または symmetric_vacuum
外部場・開放面sim.e0=sim.b0=[0,0,0]ordinary_open_model="escape"、generic reservoir potential model は使用不可
event policyabort、または率・件数猶予・絶対電荷警告閾値を指定した soft_discard
roleenabled かつ相互に異なる electron / ion / 任意の PE だけを置き、surface_charge_closure="explicit"
electron / ion sourceそれぞれ負 / 正電荷、source_mode="volume_seed"npcls_per_step=0、z-high の boundary_inflow="reservoir" のみ
PE source負電荷の photo_raycastinject_face="z_high"deposit_opposite_charge_on_emit=true
粒子境界全 role で x/y は periodic、z-low/z-high は open
電流 target手動 fixed_current target は指定不可
backend必須・禁止・物性制約
tableresponse_table_path が必須、zhao_branchzhao_root_selection は指定不可
zhao_onlineresponse_table_path は指定不可、zhao_branchauto / a / b / czhao_root_selectionrequire_unique / minimum_energy / continuationcontinuation は明示的な Type A と implicit_zero_mode=true に限定。implicit mode では response/query CSV なしで選択 branch の終点を探索
zhao_online の species全 role は単価電荷、Te>0T_e>00Ti0.1Te0\le T_i\le0.1T_e、ion 密度は正、electron / ion の drift_velocity の z 成分は負。PE 指定時は electron と同一質量かつ Tpe>0T_{pe}>0
matching 共通stationary 専用の solar_elevation_degphotoelectron_ref_density_m3photoelectron_source_scale は指定不可

model="none" では model 以外を指定しません。廃止済みの [outer_plasma] / [coupling] は未対応です。 model の選択、物理的意味、適用限界はmatching-plane 準定常連成を使う、 CSV 契約、陰的更新、固定点反復はmatching-plane 数値・応答表リファレンスを参照してください。

[periodic2]: 非零モード・零モード・下側境界

Section titled “[periodic2]: 非零モード・零モード・下側境界”

[periodic2]はトップレベルtableです。domain.periodic_axes=["x","y"]field_boundary.mode="periodic2"を指定します。productionではfield_solver="fmm"を使い、 小規模検証用のsplit referenceに限りfield_solver="direct"を使います。

キー既定値意味・制約
nonzero_mode_backendstring必須panel_spectral_reference / cached_kneq0
zero_mode_policystring必須exclude_k0
lower_boundary_modelstring必須symmetric_vacuum / e_bottom_zero
max_nonzero_mode_potential_stepfloat0accepted trial の k0k\ne0 電位変化上限 [V]。>=0、0 は無効、cached_kneq0 専用
reference_mode_layersint4Fourier mode cutoff。>=1
panel_quadrature_orderint12panel 面積積分次数。>=2

適応的な電位変化上限は boundary_inflow / plane_source / reservoir_face / photo_raycast に対応します。 最初の 3 source は target_macro_particles_per_batch が必須で固定 w_particle は使用不可、正の volume_seed も併用不可です。 sim.batch_count は accepted batch 数、simulated_time_s は受理幅の総和です。受理条件、rollback、収束確認は batch_duration をどう決めるかを参照してください。

periodic2では[domain]periodic_axes=["x","y"]field_boundary.mode="periodic2"が必要です。 examples/periodic2_closed_photoelectron.tomlは、x/y周期、境界reservoir、閉じた光電子を組み合わせた基準例です。 同じ周期条件をfield、collision、photo_raycastに適用します。

nonzero_mode_backend意味
panel_spectral_reference小規模なsplit reference
cached_kneq0versioned operatorを再利用するproduction非零モード

非零・零modeの分割、exclude_k0の役割、下側境界から決まる平均場は periodic2静電場を参照してください。

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

キー既定値説明
species_keystring"species_<1-based index>"安定 ID。1–64 文字、粒子種間で一意
enabledbooltrue種を有効化
source_modestring"volume_seed"volume_seed / plane_source / photo_raycast / deprecated reservoir_face
q_particlefloat-1.602176634e-19粒子電荷 [C]。enabled speciesでは非0
m_particlefloat9.10938356e-31粒子質量 [kg]。>0
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]。>=0
temperature_evfloat未指定温度 [eV]。>=0temperature_k と排他
velocity_distributionstring"maxwellian"maxwellian / grid
inject_facestring未指定photo_raycastの照射開口面。deprecatedなreservoir_faceでも必須
source_normalfloat[3]未指定plane_sourceの一方向法線。axis-alignedな非ゼロベクトル
boundarytable未指定[particles.species.boundary] のspecies別6面override
boundary_inflowtable未指定[particles.species.boundary_inflow]のspecies別reservoir流入面
surface_charge_closurestring"explicit"表面 source 電荷 closure。explicit / fixed_current / neutral_return
target_absorbed_current_afloat未指定fixed_current の signed 吸収電流 [A]。0またはq_particleと同符号
target_emission_current_afloat未指定fixed_current の signed 放出反作用電流 [A]。0またはq_particleと逆符号

流束駆動 source(boundary_inflowplane_source、旧 reservoir_face)の共通キー:

キー既定値説明・制約
number_density_cm3float未指定Maxwell 分布の上流密度 [cm^-3]。>0number_density_m3 と排他
number_density_m3float未指定Maxwell 分布の上流密度 [m^-3]。>0number_density_cm3 と排他
w_particlefloattarget_macro_particles_per_batch といずれか一方必須マクロ粒子重み。>0
target_macro_particles_per_batchintw_particle といずれか一方必須マクロ粒子数 target。>0、または species 2 以降で species 1 の重みを共有する -1
velocity_grid_pathstring未指定velocity_distribution="grid" の非空 CSV path。列は vx_m_s,vy_m_s,vz_m_s,f
velocity_grid_pdf_kindstring"phase_space"phase_space / flux_weighted
velocity_grid_samplingstring"auto"auto / rectilinear / discrete
particle_flux_m2_sfloat未指定grid 分布の入射粒子 flux [m^-2 s^-1]。>0current_density_a_m2 と排他
current_density_a_m2float未指定grid 分布の入射電流密度 [A/m^2]。非0、particle_flux_m2_s と排他

w_particletarget_macro_particles_per_batch はちょうど一方を明示します。 Maxwell 分布では密度2形式のちょうど一方と温度を、grid 分布では CSV と flux 2形式のちょうど一方を指定します。 分布の意味と CSV の sampling は境界から粒子を流入させるを参照してください。

[particles.species.boundary]: species別override

Section titled “[particles.species.boundary]: species別override”

このtableは直前の[[particles.species]]に属します。

[particles.species.boundary]
z_high = "reflect"
キー既定値説明
x_low, x_highstring"inherit"inherit / open / reflect / redistributed_reflect
y_low, y_highstring"inherit"inherit / open / reflect / redistributed_reflect
z_low, z_highstring"inherit"inherit / open / reflect / redistributed_reflect

inherit[particle_boundary]のglobal作用を使います。周期面はoverrideできません。 inject_facephoto_raycastと旧reservoir_faceの生成面、species境界は生成後の軌道作用です。 boundary_inflowは外部からの生成であり、外向き作用を上書きしません。

surface_charge_closure効果必要条件
explicit追跡した電荷をそのまま反映既定
neutral_returnPE による表面総電荷増分を 0 に補正負電荷 photo_raycast、放出反作用あり、注入面は反射、escape / soft_discard なし、未帰還率 5%\le5\%
fixed_current要素別の標本分布を保ち、総電流を target へ倍率化正の batch_duration、手動 target_*_current_a または [surface_current_model]、非ゼロ target に対応する raw channel

fixed_currentneutral_return は同じ species では排他です。 補正式、PE return の二重計上を避ける条件、標本数の収束確認は 表面電荷更新の数値仕様光電子の放出とライフサイクル出力形式リファレンスを参照してください。

キー既定値説明
npcls_per_stepint01 バッチに生成するマクロ粒子数。>=0
w_particlefloat1.0マクロ粒子重み。>0

制約:

条件内容
粒子数境界流入を使わない場合、有効 species 全体で npcls_per_step 合計が 1 以上必要
重み自動解決boundary_inflowを持たないvolume_seedではtarget_macro_particles_per_batchは使用不可

boundary_inflowを持つspeciesではnpcls_per_step=0を許容します。Maxwell分布で正の値なら、 体積seedと境界流入を同じspeciesに加えます。速度gridの境界流入は正の値と併用できません。

このtableは直前の[[particles.species]]に属します。

[particles.species.boundary_inflow]
z_high = "reservoir"
キー既定値説明
x_low, x_highstring省略reservoir。省略時は流入なし
y_low, y_highstring省略reservoir。省略時は流入なし
z_low, z_highstring省略reservoir。省略時は流入なし

reservoir は選択した非周期 box 面全体から流入させます。対象面の有効な粒子境界は open でなければなりません。 source_mode="volume_seed" とのみ併用でき、複数面の target_macro_particles_per_batch は全流入面の合計です。 流束と電位障壁の詳細は境界から粒子を流入させるを参照してください。

plane_source は box 内部の axis-aligned 矩形面から source_normal 方向へ流束を生成します。

条件内容
領域[domain]が必須
時間sim.batch_duration > 0が必須
矩形面pos_low / pos_highはちょうど1軸で一致し、残る2軸は正の長さを持つ
配置法線座標はbox境界より厳密に内側。接線範囲はbox内で、境界との一致を許容
方向source_normalはzero-thickness軸に沿う非ゼロベクトル。内部で正規化し、入力は正負単位ベクトルを推奨
外部補正[reservoir]infinity_barrierphi_inftyface_potential_grid_nは適用しない

流束と速度分布は上記の共通キーで指定します。

source_mode = "reservoir_face"(deprecated)

Section titled “source_mode = "reservoir_face"(deprecated)”

キーは上記の流束駆動 source 共通表を使います。互換入力の追加制約:

条件内容
領域[domain]が必須
時間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 を共有

新しいケースでは、外部 plasma に boundary_inflow、内部矩形面に plane_source を使います。 BEACH は旧 mode を暗黙変換しません。CSV と重みの契約は境界から粒子を流入させるを参照してください。

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

制約:

条件内容
領域[domain]が必須
時間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

レイ重み、周期 image、再吸収、closed PE の設定は 光電子の放出とライフサイクルを参照してください。


キー既定値説明
modestring"template"auto / obj / template
obj_pathstring"examples/simple_plate.obj"OBJ ファイルパス
surface_modelstring"insulator"OBJ 全体の表面モデル
surface_sidestringmode="obj"または"auto"で必須OBJ panelの真空側: normal_plus / normal_minus / outward_closed
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 を使います。どちらを選んでも 設定が妥当になるよう、autoでもOBJ用のsurface_sideを必ず指定します。 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
surface_sidestringenabled=true で必須panel の真空側: normal_plus / normal_minus / outward_closed
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は、分極を解かないmetadata aliasになっていたため入力から削除しました。 誘電体分極、誘電率interface条件、内部fieldは未実装です。

conductor の制約:

  • field_boundary.mode="free"の直接Coulomb係数で電荷を再配分します。
  • field_boundary.mode="periodic2"とは併用できません。
  • 導体要素数が大きい場合、dense solve のバッチごとのコストが増えます。

要素 source は暗黙の P0 triangle panel に固定されています。旧 [field] table と sim.softening は削除されており、入力に残すと unknown table / key として停止します。

項目規則
sourceq_elem を三角形上の一様な面電荷密度として扱う
solverdirect / treecode / fmm / autoautotree_min_nelem で direct / FMM を選ぶ
対象表面insulator / conductor の共通 source 離散化
Treecode厳密 panel near + monopole far
FMM厳密 panel near + 厳密 triangle P2M
面の向きOBJ は [mesh].surface_side、template は各 [[mesh.templates]].surface_side を指定

outward_closed は、法線の向きが整合した閉じた two-manifold だけに使用できます。


キー既定値説明
write_filesbooltrueファイル出力の有効/無効
write_mesh_potentialboolfalsemesh_potential.csv を出力
write_potential_historyboolfalsepotential_history.csvを出力。[domain]があれば同じbatchのtop_reference_history.csvも出力
dirstring"outputs/latest"出力先ディレクトリ
history_strideint1履歴 CSV の出力間隔 [batch]。>=0、0 は無効
checkpoint_strideint0再開用 checkpoint の間隔 [accepted batch]。>=0、0 は定期出力なし、正値では write_files=true
resumeboolfalse既存 checkpoint から再開
restart_fromstringなしresume=true 時の checkpoint 読み込み元。指定時は write_files=true

生成条件、列定義、電位の評価規約、matching-plane の状態、ledger の解釈は 出力形式リファレンスを参照してください。

resume=true の要件:

条件内容
出力write_files=true が必須
読み込み元restart_from 未指定なら output.dir、指定時は restart_from
必須ファイルsummary.txt, charges.csv, serialのrng_state.txtまたはMPI全rankのrng_state_rankNNNNN.txt。schema v8 以降はcheckpoint_complete.txtも必須
条件付きファイルledger metadataがある場合のcharge_ledger.csv
条件付き stateschema v8 以降はcheckpoint_complete.txtが宣言したmacro_residuals.csvを必須とし、旧schemaでは存在時に復元
挙動必須 checkpoint がなければ新規実行にフォールバックせず停止

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

定期 slot の選択、MPI の必須ファイル、mesh 識別子と schema の互換条件は 再開に使うファイルを参照してください。


次の入力キーは box 基準の値を実座標・実寸へ変換します。

キー既定値効果・制約
domain.box_originfloat[3]未指定box_min を設定。box_size と組にし、box_min / box_max と排他
domain.box_sizefloat[3]未指定box_max=box_origin+box_size。全成分 >0
inject_region_modestring"absolute"absolute / face_fractionface_fractionreservoir_face / photo_raycast 専用
uv_low, uv_highfloat[2]未指定face_fraction で両方必須。各成分は [0,1]pos_low / pos_high と排他
template placement_modestring"absolute"absolute / box_anchor
template anchorstring未指定box_anchor で使う box 中心または 6 面中心
template offsetfloat[3]未指定anchor からの差 [m]。offset_frac と排他
template offset_fracfloat[3]未指定box 幅に対する差。offset と排他
template size_modestring"absolute"absolute / box_fraction
template size_fracfloat / float[2] / float[3]未指定box_fraction で必須。全成分 >0、kind により下表の寸法を上書き
template groupstring未指定[mesh.groups.<name>] の name。空文字不可
template center_localfloat[3]未指定group 使用時に必須。center=group_origin+group_scale*center_local
group placement_modestring"absolute"absolute / box_anchor
group anchorstring未指定box_anchor で使う box 中心または 6 面中心
group offsetfloat[3]未指定group 原点へ加える差 [m]。offset_frac と排他
group offset_fracfloat[3]未指定box 幅に対する差。offset と排他
group scalefloat1.0group 座標と明示寸法の倍率。>0scale_from / scale_factor と排他
group scale_fromstring未指定box 幅の参照名。scale_factor と組で指定
group scale_factorfloat未指定scale_from に掛ける正値。>0

group 使用時は、template の center、直接 placement キー、size_modesize_frac を併用できません。

size_mode="box_fraction"が上書きする寸法は形状ごとに異なります。

kindsize_frac上書きするkey
plane, plane_hole, plate_holefloat[2]size_x, size_y
boxfloat[3]size
spherefloatradius。box 3辺の最小値を基準にする
cylinderfloat[2]radius, height。radiusはx/y幅の最小値、heightはz幅を基準にする

補助パラメータの選択肢:

  • group scale は、template で明示した size_x, size_y, size, radius, inner_radius, height にだけ掛けます。
  • anchorbox_center または各軸の *_low_face_center / *_high_face_center です。
  • scale_frombox_x, box_y, box_z, box_min_xy, box_max_xy, box_min_xyz, box_max_xyz から選びます。
  • placement_mode="absolute"size_mode="absolute"inject_region_mode="absolute" は直接指定値をそのまま使います。

入力前にbeach.tomlを作成・検証するbeachx lint で組合せを確認してください。


項目ルール
未知キーすべてエラー
[particles][[particles.species]] のコンテナとしてのみ使用。直下に key = value は書かない
旧キー旧名は未知キーとして扱う
schema と Fortran パーサの両方で検証
列挙値・値域・無効な機能への指定beachx lint が詳細を診断。Fortran は実行に必要な最小条件を確認

次の旧 sim キーは schema、Python、Fortran のすべてで未知キーとして拒否します。暗黙の移行は行いません。

拒否する旧キー現行の指定先
sim.box_min / sim.box_max / sim.box_origin / sim.box_sizedomain 内の同名キー
sim.bc_x_low / sim.bc_x_high / sim.bc_y_low / sim.bc_y_high / sim.bc_z_low / sim.bc_z_high周期性は domain.periodic_axes、粒子の面作用は particle_boundary
sim.use_box公開フラグを削除。領域の指定は domain に書く
sim.field_bc_modefield_boundary.mode
sim.phi_inftyreservoir.phi_infty
sim.injection_face_phi_grid_nreservoir.face_potential_grid_n

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

Terminal window
beachx lint beach.toml