app_config から粒子源計画と粒子バッチを構築する実行時変換。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(in) | :: | cfg | |||
| integer(kind=i32), | intent(in) | :: | batch_idx | |||
| type(particles_soa), | intent(out) | :: | pcls | |||
| type(injection_state), | intent(inout), | optional | :: | state | ||
| type(mesh_type), | intent(in), | optional | :: | mesh | ||
| real(kind=dp), | intent(out), | optional | :: | photo_emission_dq(:) | ||
| integer(kind=i32), | intent(in), | optional | :: | mpi_rank | ||
| integer(kind=i32), | intent(in), | optional | :: | mpi_size | ||
| type(mpi_context), | intent(in), | optional | :: | mpi | ||
| integer(kind=i32), | intent(out), | optional | :: | collision_failure_status | ||
| integer(kind=i32), | intent(out), | optional | :: | collision_failure_species | ||
| integer(kind=i32), | intent(out), | optional | :: | collision_failure_ray | ||
| integer(kind=i32), | intent(out), | optional | :: | collision_failure_bounce | ||
| type(electrostatic_snapshot_type), | intent(inout), | optional | :: | snapshot | ||
| type(particle_source_plan_type), | intent(in), | optional, | target | :: | source_plan | |
| real(kind=dp), | intent(out), | optional | :: | photo_emission_dq_by_species(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sim_config), | intent(in) | :: | sim | |||
| type(particle_species_spec), | intent(in) | :: | spec | |||
| integer(kind=i32), | intent(in) | :: | n | |||
| real(kind=dp), | intent(out) | :: | x(:,:) | |||
| real(kind=dp), | intent(out) | :: | v(:,:) | |||
| real(kind=dp), | intent(in), | optional | :: | barrier_normal_energy | ||
| real(kind=dp), | intent(in), | optional | :: | vmin_normal | ||
| logical, | intent(in), | optional | :: | apply_barrier_energy_shift | ||
| real(kind=dp), | intent(in), | optional | :: | temperature_k_override | ||
| real(kind=dp), | intent(in), | optional | :: | drift_velocity_override(3) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sim_config), | intent(in) | :: | sim | |||
| type(particle_species_spec), | intent(in) | :: | spec | |||
| type(mesh_type), | intent(in) | :: | mesh | |||
| integer(kind=i32), | intent(in) | :: | n_rays | |||
| real(kind=dp), | intent(out) | :: | x(:,:) | |||
| real(kind=dp), | intent(out) | :: | v(:,:) | |||
| real(kind=dp), | intent(out) | :: | w(:) | |||
| integer(kind=i32), | intent(out) | :: | n_emit | |||
| integer(kind=i32), | intent(out), | optional | :: | emit_elem_idx(:) | ||
| integer(kind=i32), | intent(in), | optional | :: | global_rays_per_batch | ||
| real(kind=dp), | intent(in), | optional | :: | emit_current_density_override | ||
| real(kind=dp), | intent(in), | optional | :: | normal_drift_speed_override | ||
| real(kind=dp), | intent(in), | optional | :: | vmin_normal | ||
| integer(kind=i32), | intent(out), | optional | :: | collision_failure_status | ||
| integer(kind=i32), | intent(out), | optional | :: | collision_failure_ray | ||
| integer(kind=i32), | intent(out), | optional | :: | collision_failure_bounce |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(in) | :: | cfg | |||
| type(particle_species_spec), | intent(in) | :: | spec | |||
| real(kind=dp), | intent(out) | :: | vmin_normal | |||
| real(kind=dp), | intent(out) | :: | barrier_normal | |||
| type(mesh_type), | intent(in), | optional | :: | mesh | ||
| type(electrostatic_snapshot_type), | intent(inout), | optional | :: | snapshot | ||
| logical, | intent(in), | optional | :: | warn_face_variation | ||
| type(external_boundary_contract_type), | intent(in), | optional | :: | boundary_contract |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(in) | :: | cfg | |||
| type(particle_species_spec), | intent(in) | :: | spec | |||
| real(kind=dp), | intent(in) | :: | reservoir_potential_v | |||
| real(kind=dp), | intent(in) | :: | access_potential_v | |||
| real(kind=dp), | intent(out) | :: | vmin_normal | |||
| real(kind=dp), | intent(out) | :: | barrier_normal | |||
| type(mesh_type), | intent(in), | optional | :: | mesh | ||
| type(electrostatic_snapshot_type), | intent(inout), | optional | :: | snapshot | ||
| logical, | intent(in), | optional | :: | warn_face_variation |
speciesに外部 reservoir 流入を指定したbox面があるかを返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(particle_species_spec), | intent(in) | :: | spec |
face bit順の面に reservoir 流入が有効かを返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(particle_species_spec), | intent(in) | :: | spec | |||
| integer(kind=i32), | intent(in) | :: | face |
面名をboundary bit順のindexへ変換する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | face_name |
粒子種設定から実効密度[m^-3]を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(particle_species_spec), | intent(in) | :: | spec |
粒子種設定。 |
粒子種設定から実効温度[K]を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(particle_species_spec), | intent(in) | :: | spec |
粒子種設定。 |
バッチ生成前に乱数シードだけを初期化する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(in) | :: | cfg |
乱数シード値 |
||
| integer(kind=i32), | intent(in), | optional | :: | mpi_rank | ||
| integer(kind=i32), | intent(in), | optional | :: | mpi_size | ||
| type(mpi_context), | intent(in), | optional | :: | mpi |
設定とMPI配置だけに依存する粒子 source の導出値を構築する。 乱数、残差、mesh/snapshot依存の障壁は扱わず、run中に不変な値だけを保持する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(in) | :: | cfg | |||
| type(particle_source_plan_type), | intent(out) | :: | plan | |||
| integer(kind=i32), | intent(in), | optional | :: | mpi_rank | ||
| integer(kind=i32), | intent(in), | optional | :: | mpi_size | ||
| type(mpi_context), | intent(in), | optional | :: | mpi | ||
| logical, | intent(in), | optional | :: | kinetic_inflow_active(:) | ||
| real(kind=dp), | intent(in), | optional | :: | kinetic_reservoir_potential_v(:) | ||
| real(kind=dp), | intent(in), | optional | :: | kinetic_access_potential_v(:) | ||
| integer(kind=i32), | intent(in), | optional | :: | kinetic_inflow_face(:) | ||
| logical, | intent(in), | optional | :: | number_flux_override_active(:) | ||
| real(kind=dp), | intent(in), | optional | :: | number_flux_override_m2_s(:) |
reservoir/plane sourceの初期位置を、設定されたbox境界条件に従って有効領域へ正規化する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sim_config), | intent(in) | :: | sim | |||
| real(kind=dp), | intent(inout) | :: | x(:,:) |
box全面を開口とする一時的な legacy reservoir spec を構築する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sim_config), | intent(in) | :: | sim | |||
| type(particle_species_spec), | intent(in) | :: | source_spec | |||
| integer(kind=i32), | intent(in) | :: | face | |||
| type(particle_species_spec), | intent(out) | :: | inflow_spec |
plane_sourceの内部面をlegacy face samplerの仮想box境界へ写像する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(particle_species_spec), | intent(in) | :: | spec | |||
| real(kind=dp), | intent(inout) | :: | box_min(3) | |||
| real(kind=dp), | intent(inout) | :: | box_max(3) |
face bit順の面名を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i32), | intent(in) | :: | face | |||
| character(len=*), | intent(out) | :: | name |
reservoir_face 用に、物理流量と残差から今バッチのマクロ粒子数を決める。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sim_config), | intent(in) | :: | sim |
ボックス境界・バッチ時間などのシミュレーション設定。 |
||
| type(particle_species_spec), | intent(in) | :: | spec |
reservoir_face 粒子種設定。 |
||
| real(kind=dp), | intent(inout) | :: | residual |
前バッチから繰り越した端数。 |
||
| integer(kind=i32), | intent(out) | :: | count |
今バッチで生成するマクロ粒子数。 |
||
| real(kind=dp), | intent(in), | optional | :: | vmin_normal |
法線速度の下限 [m/s](省略時は 0)。 |
|
| real(kind=dp), | intent(in), | optional | :: | number_density_override |
数密度の上書き値 [1/m^3]。 |
|
| real(kind=dp), | intent(in), | optional | :: | w_particle_override |
マクロ粒子重みの上書き値。 |
|
| real(kind=dp), | intent(in), | optional | :: | temperature_k_override |
温度の上書き値 [K]。 |
|
| real(kind=dp), | intent(in), | optional | :: | drift_velocity_override(3) | ||
| real(kind=dp), | intent(in), | optional | :: | particle_flux_override |
粒子数 flux の上書き値 [1/m^2/s]。 |
|
| logical, | intent(in), | optional | :: | use_particle_flux_override |
併存対応のため mpi_context と rank/size の両方を受け、最終的なrank/sizeを解決する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i32), | intent(out) | :: | local_rank | |||
| integer(kind=i32), | intent(out) | :: | n_ranks | |||
| integer(kind=i32), | intent(in), | optional | :: | mpi_rank | ||
| integer(kind=i32), | intent(in), | optional | :: | mpi_size | ||
| type(mpi_context), | intent(in), | optional | :: | mpi | ||
| character(len=*), | intent(in) | :: | caller_name |