bem_injection_flux Module

Maxwell reservoirの流束、macro粒子数、面速度sampling。


Uses

  • module~~bem_injection_flux~~UsesGraph module~bem_injection_flux bem_injection_flux ieee_arithmetic ieee_arithmetic module~bem_injection_flux->ieee_arithmetic module~bem_constants bem_constants module~bem_injection_flux->module~bem_constants module~bem_injection_geometry bem_injection_geometry module~bem_injection_flux->module~bem_injection_geometry module~bem_injection_random bem_injection_random module~bem_injection_flux->module~bem_injection_random module~bem_kinds bem_kinds module~bem_injection_flux->module~bem_kinds module~bem_constants->module~bem_kinds module~bem_injection_geometry->module~bem_kinds module~bem_string_utils bem_string_utils module~bem_injection_geometry->module~bem_string_utils module~bem_injection_random->module~bem_constants module~bem_injection_random->module~bem_kinds module~bem_particles bem_particles module~bem_injection_random->module~bem_particles module~bem_types bem_types module~bem_injection_random->module~bem_types iso_fortran_env iso_fortran_env module~bem_kinds->iso_fortran_env module~bem_particles->module~bem_kinds module~bem_particles->module~bem_types module~bem_types->module~bem_kinds

Used by

  • module~~bem_injection_flux~~UsedByGraph module~bem_injection_flux bem_injection_flux module~bem_app_config_parser bem_app_config_parser module~bem_app_config_parser->module~bem_injection_flux module~bem_injection bem_injection module~bem_injection->module~bem_injection_flux module~bem_photoelectron_injection bem_photoelectron_injection module~bem_injection->module~bem_photoelectron_injection module~bem_photoelectron_injection->module~bem_injection_flux module~bem_app_config bem_app_config module~bem_app_config->module~bem_app_config_parser module~bem_app_config_runtime bem_app_config_runtime module~bem_app_config->module~bem_app_config_runtime module~bem_app_config_parser_finalize bem_app_config_parser_finalize module~bem_app_config_parser_finalize->module~bem_app_config_parser module~bem_app_config_parser_preflight_particles bem_app_config_parser_preflight_particles module~bem_app_config_parser_preflight_particles->module~bem_app_config_parser module~bem_app_config_parser_preflight_sim bem_app_config_parser_preflight_sim module~bem_app_config_parser_preflight_sim->module~bem_app_config_parser module~bem_app_config_parser_preflight_surface bem_app_config_parser_preflight_surface module~bem_app_config_parser_preflight_surface->module~bem_app_config_parser module~bem_app_config_parser_read_mesh bem_app_config_parser_read_mesh module~bem_app_config_parser_read_mesh->module~bem_app_config_parser module~bem_app_config_parser_read_particles bem_app_config_parser_read_particles module~bem_app_config_parser_read_particles->module~bem_app_config_parser module~bem_app_config_parser_read_sim bem_app_config_parser_read_sim module~bem_app_config_parser_read_sim->module~bem_app_config_parser module~bem_app_config_parser_read_surface bem_app_config_parser_read_surface module~bem_app_config_parser_read_surface->module~bem_app_config_parser module~bem_app_config_parser_validate bem_app_config_parser_validate module~bem_app_config_parser_validate->module~bem_app_config_parser module~bem_app_config_particle_runtime bem_app_config_particle_runtime module~bem_app_config_particle_runtime->module~bem_injection module~bem_app_config_particle_runtime_batch bem_app_config_particle_runtime_batch module~bem_app_config_particle_runtime_batch->module~bem_app_config_particle_runtime module~bem_app_config_particle_runtime_sampling bem_app_config_particle_runtime_sampling module~bem_app_config_particle_runtime_sampling->module~bem_app_config_particle_runtime module~bem_app_config_runtime->module~bem_app_config_particle_runtime module~bem_matching_plane_coupling bem_matching_plane_coupling module~bem_matching_plane_coupling->module~bem_app_config module~bem_simulator bem_simulator module~bem_simulator->module~bem_app_config module~bem_simulator->module~bem_app_config_runtime program~main main program~main->module~bem_app_config program~main->module~bem_simulator program~zhao_atlas_main zhao_atlas_main program~zhao_atlas_main->module~bem_app_config program~zhao_response_main zhao_response_main program~zhao_response_main->module~bem_app_config module~bem_simulator_charge bem_simulator_charge module~bem_simulator_charge->module~bem_simulator module~bem_simulator_io bem_simulator_io module~bem_simulator_io->module~bem_app_config_runtime module~bem_simulator_io->module~bem_simulator module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_app_config_runtime module~bem_simulator_loop->module~bem_matching_plane_coupling module~bem_simulator_loop->module~bem_simulator module~bem_simulator_particles bem_simulator_particles module~bem_simulator_particles->module~bem_simulator module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator

Functions

public pure function compute_inflow_flux_from_drifting_maxwellian(number_density_m3, temperature_k, m_particle, drift_velocity, inward_normal, vmin_normal) result(gamma_in)

drifting Maxwellian の片側流入束 [#/m^2/s] を返す。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: number_density_m3

粒子数密度 [1/m^3]。

real(kind=dp), intent(in) :: temperature_k

温度 [K]。

real(kind=dp), intent(in) :: m_particle

粒子1個あたりの質量 [kg]。

real(kind=dp), intent(in) :: drift_velocity(3)
real(kind=dp), intent(in) :: inward_normal(3)
real(kind=dp), intent(in), optional :: vmin_normal

法線速度の下限 [m/s](省略時は 0)。

Return Value real(kind=dp)


Subroutines

public subroutine compute_macro_particles_for_batch(number_density_m3, temperature_k, m_particle, drift_velocity, box_min, box_max, inject_face, pos_low, pos_high, batch_duration, w_particle, residual, n_macro, vmin_normal)

物理流量・重み・残差から今バッチのマクロ粒子数を決める。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: number_density_m3

粒子数密度 [1/m^3]。

real(kind=dp), intent(in) :: temperature_k

温度 [K]。

real(kind=dp), intent(in) :: m_particle

粒子1個あたりの質量 [kg]。

real(kind=dp), intent(in) :: drift_velocity(3)
real(kind=dp), intent(in) :: box_min(3)
real(kind=dp), intent(in) :: box_max(3)
character(len=*), intent(in) :: inject_face

注入面識別子(x_low/x_high/y_low/y_high/z_low/z_high)。

real(kind=dp), intent(in) :: pos_low(3)
real(kind=dp), intent(in) :: pos_high(3)
real(kind=dp), intent(in) :: batch_duration

1バッチの物理時間長 [s]。

real(kind=dp), intent(in) :: w_particle

マクロ粒子重み。

real(kind=dp), intent(inout) :: residual

前バッチから繰り越すマクロ粒子端数(呼び出し後に更新)。

integer(kind=i32), intent(out) :: n_macro

今バッチで生成するマクロ粒子数。

real(kind=dp), intent(in), optional :: vmin_normal

法線速度の下限 [m/s](省略時は 0)。

public subroutine compute_macro_particles_from_flux(particle_flux_m2_s, inject_face, pos_low, pos_high, batch_duration, w_particle, residual, n_macro)

指定済み粒子 flux・重み・残差から今バッチのマクロ粒子数を決める。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: particle_flux_m2_s

粒子数 flux [1/m^2/s]。

character(len=*), intent(in) :: inject_face

注入面識別子。

real(kind=dp), intent(in) :: pos_low(3)
real(kind=dp), intent(in) :: pos_high(3)
real(kind=dp), intent(in) :: batch_duration

1バッチの物理時間長 [s]。

real(kind=dp), intent(in) :: w_particle

1バッチの物理時間長 [s]。 マクロ粒子重み。

real(kind=dp), intent(inout) :: residual

前バッチから繰り越すマクロ粒子端数。

integer(kind=i32), intent(out) :: n_macro

今バッチで生成するマクロ粒子数。

public subroutine sample_reservoir_face_particles(box_min, box_max, inject_face, pos_low, pos_high, drift_velocity, m_particle, temperature_k, batch_duration, x, v, barrier_normal_energy, vmin_normal, position_jitter_dt, apply_barrier_energy_shift)

上流リザーバ境界から流入する粒子群を面注入としてサンプルする。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: box_min(3)
real(kind=dp), intent(in) :: box_max(3)
character(len=*), intent(in) :: inject_face

注入面識別子(x_low/x_high/y_low/y_high/z_low/z_high)。

real(kind=dp), intent(in) :: pos_low(3)
real(kind=dp), intent(in) :: pos_high(3)
real(kind=dp), intent(in) :: drift_velocity(3)
real(kind=dp), intent(in) :: m_particle

粒子1個あたりの質量 [kg]。

real(kind=dp), intent(in) :: temperature_k

粒子1個あたりの質量 [kg]。 温度 [K]。

real(kind=dp), intent(in) :: batch_duration

粒子1個あたりの質量 [kg]。 温度 [K]。 1バッチの物理時間長 [s](現在は妥当性チェックのみ)。

real(kind=dp), intent(out) :: x(:,:)
real(kind=dp), intent(out) :: v(:,:)
real(kind=dp), intent(in), optional :: barrier_normal_energy

法線方向のエネルギー障壁 2 q Δφ / m [m^2/s^2](省略時 0)。

real(kind=dp), intent(in), optional :: vmin_normal

法線速度の下限 [m/s](省略時は barrier_normal_energy から自動導出)。

real(kind=dp), intent(in), optional :: position_jitter_dt

互換用のlaunch位相時間幅[s]。乱数列は保つが位置移動には使わない。

logical, intent(in), optional :: apply_barrier_energy_shift

.true. のとき法線速度へ障壁エネルギー変換を適用する。

public subroutine sample_flux_weighted_normal_component(mu, sigma, vn, vmin_normal, sigma_cutoff)

flux-weighted half-range 正規分布から法線速度をサンプルする。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: mu

法線速度分布の平均ドリフト成分 [m/s]。

real(kind=dp), intent(in) :: sigma

法線速度分布の平均ドリフト成分 [m/s]。 法線速度分布の標準偏差 [m/s]。

real(kind=dp), intent(out) :: vn(:)
real(kind=dp), intent(in), optional :: vmin_normal

法線速度の下限 [m/s](省略時は 0)。

real(kind=dp), intent(in), optional :: sigma_cutoff