アプリ設定の型定義と、設定由来の粒子数計算をまとめるモジュール。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | max_templates | = | 8 |
設定配列の初期確保サイズ(上限ではない)。 |
| integer, | public, | parameter | :: | max_particle_species | = | 8 | |
| integer(kind=i32), | public, | parameter | :: | particle_bc_inherit | = | -1_i32 | |
| integer(kind=i32), | public, | parameter | :: | particle_inflow_none | = | 0_i32 | |
| integer(kind=i32), | public, | parameter | :: | particle_inflow_reservoir | = | 1_i32 |
外部シースの零電流根から species 別の表面電流と境界写像を与えるモデルの設定。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=32), | public | :: | model | = | 'none' | ||
| character(len=16), | public | :: | zhao_branch | = | 'auto' | ||
| character(len=64), | public | :: | electron_species | = | '' | ||
| character(len=64), | public | :: | ion_species | = | '' | ||
| character(len=64), | public | :: | photoelectron_species | = | '' | ||
| character(len=64), | public | :: | secondary_electron_species | = | '' | ||
| real(kind=dp), | public | :: | solar_elevation_deg | = | 0.0_dp | ||
| real(kind=dp), | public | :: | photoelectron_ref_density_m3 | = | 0.0_dp | ||
| real(kind=dp), | public | :: | photoelectron_source_scale | = | 1.0_dp | ||
| real(kind=dp), | public | :: | reference_area_m2 | = | 0.0_dp | ||
| logical, | public | :: | has_reference_area_m2 | = | .false. | ||
| integer(kind=i32), | public | :: | outflow_refresh_batches | = | 0_i32 |
zhao_stationary の外部シース源を観測PE流出で解き直す accepted batch 間隔。0 は初期根を固定する。 |
|
| logical, | public | :: | include_reflected_electrons | = | .true. |
外部根の源に、セル内で反射して z-high を外向きに抜けた上流電子を含める。外部根を更新する (outflow_refresh_batches>0)ときだけ効く。既定は sheath-model の結合ガイドどおり含める。 |
|
| logical, | public | :: | has_include_reflected_electrons | = | .false. |
include_reflected_electrons を設定ファイルで明示したか。明示した値だけを preflight で検査する。 |
|
| real(kind=dp), | public | :: | zhao_upstream_band_tolerance | = | 0.0_dp |
電子drift時のA/C根で、上流に接するE^2<0の幅を |phi_m|(A) / |phi_0|(C) の何割まで許すか。0 は厳密判定。 |
|
| real(kind=dp), | public | :: | zhao_upstream_field_floor_v_m | = | 0.0_dp |
上流境界を「場がこの外部レベル [V/m] まで落ちた点」に置く。電子drift時のA/C根で、帯の内側の場の不足 sqrt(-min E^2) がこれ以下なら受理する。0 はこの判定を使わない。 |
|
| real(kind=dp), | public | :: | zhao_ion_pressure_factor | = | 1.0_dp |
外部根のイオン流体の圧力係数 (Sana & Mishra 2026, Eq. 17)。1 は等温。イオン温度は ion species の温度を使う。 |
1粒子種の注入設定を表す。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=64), | public | :: | species_key | = | '' | ||
| logical, | public | :: | enabled | = | .false. | ||
| integer(kind=i32), | public | :: | npcls_per_step | = | 0_i32 | ||
| character(len=32), | public | :: | source_mode | = | 'volume_seed' | ||
| logical, | public | :: | secondary_emission_enabled | = | .false. | ||
| character(len=16), | public | :: | secondary_emission_model | = | 'whipple' | ||
| real(kind=dp), | public | :: | secondary_emission_yield_max | = | 1.5_dp | ||
| real(kind=dp), | public | :: | secondary_emission_energy_max_ev | = | 500.0_dp | ||
| real(kind=dp), | public | :: | secondary_emission_const_yield | = | 0.0_dp | ||
| character(len=64), | public | :: | secondary_emission_target_species | = | '' | ||
| integer(kind=i32), | public | :: | secondary_emission_target_idx | = | 0_i32 | ||
| logical, | public | :: | has_secondary_forbidden_source_option | = | .false. | ||
| logical, | public | :: | has_surface_charge_closure | = | .false. | ||
| real(kind=dp), | public | :: | number_density_cm3 | = | 0.0d0 | ||
| real(kind=dp), | public | :: | number_density_m3 | = | 0.0d0 | ||
| logical, | public | :: | has_number_density_cm3 | = | .false. | ||
| logical, | public | :: | has_number_density_m3 | = | .false. | ||
| real(kind=dp), | public | :: | q_particle | = | -1.602176634d-19 | ||
| real(kind=dp), | public | :: | m_particle | = | 9.10938356d-31 | ||
| real(kind=dp), | public | :: | w_particle | = | 1.0d0 | ||
| logical, | public | :: | has_w_particle | = | .false. | ||
| integer(kind=i32), | public | :: | target_macro_particles_per_batch | = | 0_i32 | ||
| logical, | public | :: | has_target_macro_particles_per_batch | = | .false. | ||
| real(kind=dp), | public | :: | pos_low(3) | = | [-0.4d0, -0.4d0, 0.2d0] | ||
| real(kind=dp), | public | :: | pos_high(3) | = | [0.4d0, 0.4d0, 0.5d0] | ||
| real(kind=dp), | public | :: | drift_velocity(3) | = | [0.0d0, 0.0d0, -8.0d5] | ||
| real(kind=dp), | public | :: | temperature_k | = | 2.0d4 | ||
| real(kind=dp), | public | :: | temperature_ev | = | -1.0d0 | ||
| logical, | public | :: | has_temperature_ev | = | .false. | ||
| real(kind=dp), | public | :: | emit_current_density_a_m2 | = | 0.0d0 | ||
| integer(kind=i32), | public | :: | rays_per_batch | = | 0_i32 | ||
| logical, | public | :: | deposit_opposite_charge_on_emit | = | .false. | ||
| real(kind=dp), | public | :: | normal_drift_speed | = | 0.0d0 | ||
| real(kind=dp), | public | :: | ray_direction(3) | = | [0.0d0, 0.0d0, 0.0d0] | ||
| logical, | public | :: | has_ray_direction | = | .false. | ||
| character(len=16), | public | :: | inject_face | = | '' | ||
| integer(kind=i32), | public | :: | boundary_low(3) | = | [particle_bc_inherit, particle_bc_inherit, particle_bc_inherit] | ||
| integer(kind=i32), | public | :: | boundary_high(3) | = | [particle_bc_inherit, particle_bc_inherit, particle_bc_inherit] | ||
| integer(kind=i32), | public | :: | boundary_inflow_low(3) | = | particle_inflow_none | ||
| integer(kind=i32), | public | :: | boundary_inflow_high(3) | = | particle_inflow_none | ||
| character(len=16), | public | :: | surface_charge_closure | = | 'explicit' | ||
| real(kind=dp), | public | :: | target_absorbed_current_a | = | 0.0_dp | ||
| logical, | public | :: | has_target_absorbed_current_a | = | .false. | ||
| real(kind=dp), | public | :: | target_emission_current_a | = | 0.0_dp | ||
| logical, | public | :: | has_target_emission_current_a | = | .false. |
OBJ または template 1 要素の表面と幾何パラメータを保持する。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | enabled | = | .false. | ||
| character(len=16), | public | :: | kind | = | '' | ||
| character(len=256), | public | :: | path | = | '' | ||
| real(kind=dp), | public | :: | scale | = | 1.0_dp | ||
| real(kind=dp), | public | :: | rotation(3) | = | 0.0_dp | ||
| real(kind=dp), | public | :: | offset(3) | = | 0.0_dp | ||
| character(len=16), | public | :: | surface_model | = | 'insulator' | ||
| character(len=32), | public | :: | surface_side_policy | = | 'not_specified' | ||
| real(kind=dp), | public | :: | epsilon_r | = | 1.0d0 | ||
| real(kind=dp), | public | :: | center(3) | = | 0.0d0 | ||
| real(kind=dp), | public | :: | size_x | = | 1.0d0 | ||
| real(kind=dp), | public | :: | size_y | = | 1.0d0 | ||
| real(kind=dp), | public | :: | size(3) | = | [1.0d0, 1.0d0, 1.0d0] | ||
| integer(kind=i32), | public | :: | nx | = | 1 | ||
| integer(kind=i32), | public | :: | ny | = | 1 | ||
| integer(kind=i32), | public | :: | nz | = | 1 | ||
| real(kind=dp), | public | :: | radius | = | 0.5d0 | ||
| real(kind=dp), | public | :: | inner_radius | = | 0.25d0 | ||
| real(kind=dp), | public | :: | height | = | 1.0d0 | ||
| integer(kind=i32), | public | :: | n_theta | = | 24 | ||
| integer(kind=i32), | public | :: | n_r | = | 4 | ||
| integer(kind=i32), | public | :: | n_z | = | 1 | ||
| logical, | public | :: | cap | = | .true. | ||
| logical, | public | :: | cap_top | = | .true. | ||
| logical, | public | :: | cap_bottom | = | .true. | ||
| logical, | public | :: | has_cap_top | = | .false. | ||
| logical, | public | :: | has_cap_bottom | = | .false. | ||
| integer(kind=i32), | public | :: | n_lon | = | 24 | ||
| integer(kind=i32), | public | :: | n_lat | = | 12 | ||
| character(len=16), | public | :: | tessellation | = | '' | ||
| integer(kind=i32), | public | :: | subdivisions | = | 2 | ||
| logical, | public | :: | has_n_lon_lat | = | .false. | ||
| logical, | public | :: | has_subdivisions | = | .false. |
実行条件・メッシュ入力・粒子注入・出力設定を一元管理する。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=i32), | public | :: | n_mesh_parts | = | 0_i32 | ||
| type(template_spec), | public, | allocatable | :: | mesh_parts(:) | |||
| integer(kind=i32), | public | :: | n_particle_species | = | 0_i32 | ||
| type(particle_species_spec), | public, | allocatable | :: | particle_species(:) | |||
| integer(kind=i32), | public | :: | secondary_emission_max_generations | = | 3_i32 | ||
| integer(kind=i32), | public | :: | particle_boundary_low(3) | = | [particle_bc_inherit, particle_bc_inherit, particle_bc_inherit] | ||
| integer(kind=i32), | public | :: | particle_boundary_high(3) | = | [particle_bc_inherit, particle_bc_inherit, particle_bc_inherit] | ||
| logical, | public | :: | write_output | = | .true. | ||
| logical, | public | :: | write_mesh_potential | = | .false. | ||
| logical, | public | :: | write_potential_history | = | .false. | ||
| character(len=256), | public | :: | output_dir | = | 'outputs/latest' | ||
| character(len=256), | public | :: | output_restart_from | = | '' | ||
| integer(kind=i32), | public | :: | history_stride | = | 1 | ||
| integer(kind=i32), | public | :: | checkpoint_stride | = | 0 | ||
| logical, | public | :: | resume_output | = | .false. | ||
| type(sim_config), | public | :: | sim | ||||
| type(external_boundary_contract_type), | public | :: | boundary_contract |
preflight で解決する基底契約。種別 kinetic barrier の面別 override は run 側で重ねる。 |
|||
| type(field_physics_config), | public | :: | field | ||||
| type(periodic2_physics_config), | public | :: | periodic2 | ||||
| type(panel_kernel_config), | public | :: | panel | ||||
| type(surface_current_model_config), | public | :: | surface_current |
診断に使う公開 mesh 配列の添字付きパスを返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | part_idx |
診断に使う公開 species 配列の添字付きパスを返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | species_idx |
有効な粒子種の npcls_per_step を合計し、1バッチあたりの粒子数を返す。
1つ以上の粒子種が有効で、かつ合計が正でない場合は停止する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(in) | :: | cfg |
粒子種設定を含むアプリ設定。 |
[[particles.species]] の既定値を返す。
現行仕様では、列挙された粒子種は既定で有効とみなす。
app_config を既定値で初期化し、TOML 上書き前の状態を作る。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(out) | :: | cfg |
既定値で初期化したアプリ設定。 |