bem_photoelectron_injection Module

光線追跡による光電子放出位置と速度のsampling。


Uses

  • module~~bem_photoelectron_injection~~UsesGraph module~bem_photoelectron_injection bem_photoelectron_injection module~bem_boundary bem_boundary module~bem_photoelectron_injection->module~bem_boundary module~bem_collision bem_collision module~bem_photoelectron_injection->module~bem_collision module~bem_constants bem_constants module~bem_photoelectron_injection->module~bem_constants module~bem_counter_rng bem_counter_rng module~bem_photoelectron_injection->module~bem_counter_rng module~bem_injection_flux bem_injection_flux module~bem_photoelectron_injection->module~bem_injection_flux module~bem_injection_geometry bem_injection_geometry module~bem_photoelectron_injection->module~bem_injection_geometry module~bem_injection_random bem_injection_random module~bem_photoelectron_injection->module~bem_injection_random module~bem_kinds bem_kinds module~bem_photoelectron_injection->module~bem_kinds module~bem_status_codes bem_status_codes module~bem_photoelectron_injection->module~bem_status_codes module~bem_string_utils bem_string_utils module~bem_photoelectron_injection->module~bem_string_utils module~bem_types bem_types module~bem_photoelectron_injection->module~bem_types module~bem_boundary->module~bem_kinds module~bem_boundary->module~bem_status_codes module~bem_boundary->module~bem_types ieee_arithmetic ieee_arithmetic module~bem_boundary->ieee_arithmetic module~bem_collision->module~bem_kinds module~bem_collision->module~bem_status_codes module~bem_collision->module~bem_string_utils module~bem_collision->module~bem_types module~bem_collision->ieee_arithmetic iso_fortran_env iso_fortran_env module~bem_collision->iso_fortran_env module~bem_constants->module~bem_kinds module~bem_counter_rng->module~bem_kinds iso_c_binding iso_c_binding module~bem_counter_rng->iso_c_binding m_pcg64_bind m_pcg64_bind module~bem_counter_rng->m_pcg64_bind module~bem_injection_flux->module~bem_constants module~bem_injection_flux->module~bem_counter_rng module~bem_injection_flux->module~bem_injection_geometry module~bem_injection_flux->module~bem_injection_random module~bem_injection_flux->module~bem_kinds module~bem_injection_flux->ieee_arithmetic module~bem_injection_geometry->module~bem_kinds module~bem_injection_geometry->module~bem_string_utils module~bem_injection_random->module~bem_constants module~bem_injection_random->module~bem_counter_rng module~bem_injection_random->module~bem_kinds module~bem_random_stream bem_random_stream module~bem_injection_random->module~bem_random_stream module~bem_kinds->iso_fortran_env module~bem_status_codes->module~bem_kinds module~bem_types->module~bem_kinds module~bem_outflow_spectrum bem_outflow_spectrum module~bem_types->module~bem_outflow_spectrum module~bem_outflow_spectrum->module~bem_kinds sheath_model sheath_model module~bem_outflow_spectrum->sheath_model module~bem_random_stream->module~bem_counter_rng module~bem_random_stream->module~bem_kinds module~bem_random_stream->iso_c_binding module~bem_random_stream->m_pcg64_bind

Used by

  • module~~bem_photoelectron_injection~~UsedByGraph module~bem_photoelectron_injection bem_photoelectron_injection module~bem_injection bem_injection module~bem_injection->module~bem_photoelectron_injection module~bem_simulator_particles bem_simulator_particles module~bem_simulator_particles->module~bem_photoelectron_injection module~bem_simulator bem_simulator module~bem_simulator_particles->module~bem_simulator 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_slots bem_app_config_particle_runtime_slots module~bem_app_config_particle_runtime_slots->module~bem_injection module~bem_app_config_particle_runtime_slots->module~bem_app_config_particle_runtime 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 bem_app_config_runtime module~bem_app_config_runtime->module~bem_app_config_particle_runtime module~bem_app_config bem_app_config module~bem_app_config->module~bem_app_config_runtime module~bem_simulator->module~bem_app_config_runtime module~bem_simulator->module~bem_app_config 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_simulator module~bem_zhao_outflow_refresh bem_zhao_outflow_refresh module~bem_simulator_loop->module~bem_zhao_outflow_refresh module~bem_simulator_charge bem_simulator_charge module~bem_simulator_charge->module~bem_simulator module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator module~bem_zhao_outflow_refresh->module~bem_app_config program~main main program~main->module~bem_app_config program~main->module~bem_simulator

Functions

public pure function photo_ray_macro_weight(inject_face, pos_low, pos_high, ray_direction, emit_current_density_a_m2, q_particle, batch_duration, total_rays) result(w_hit)

1 本の光線で放出されるマクロ粒子の重み(全 rank 合計 total_rays 本で放出電流を分担する)。

Arguments

Type IntentOptional Attributes Name
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) :: ray_direction(3)
real(kind=dp), intent(in) :: emit_current_density_a_m2
real(kind=dp), intent(in) :: q_particle
real(kind=dp), intent(in) :: batch_duration
integer(kind=i32), intent(in) :: total_rays

Return Value real(kind=dp)


Subroutines

public subroutine cast_photo_ray(mesh, sim, ray_start, launch_dir, use_periodic2_mode, hit_pos, hit_normal, hit_elem, emitted, collision_status, bounce_count)

面上の点 ray_start から launch_dir へ光線を飛ばし、box 境界の反射を経て最初に当たる panel を返す。

Arguments

Type IntentOptional Attributes Name
type(mesh_type), intent(in) :: mesh
class(photo_raycast_config), intent(in) :: sim
real(kind=dp), intent(in) :: ray_start(3)
real(kind=dp), intent(in) :: launch_dir(3)
logical, intent(in) :: use_periodic2_mode
real(kind=dp), intent(out) :: hit_pos(3)
real(kind=dp), intent(out) :: hit_normal(3)
integer(kind=i32), intent(out) :: hit_elem
logical, intent(out) :: emitted

要素に当たったとき .true.。

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

衝突照会の status(collision_query_ok 以外なら未完了)。

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

衝突照会の status(collision_query_ok 以外なら未完了)。 未完了時の bounce index。

public subroutine sample_photo_ray_slot(mesh, sim, inject_face, pos_low, pos_high, ray_direction, m_particle, temperature_k, normal_drift_speed, w_hit, rng_seed, ray_counter, velocity_counter, x, v, w, emit_elem, emitted, collision_status, bounce_count, vmin_normal)

1 本の光線を counter-based 乱数で発射し、当たれば光電子を 1 つ返す。 面内の発射位置は ray_counter の draw 1, 2、放出速度は velocity_counter で決まるので、どの rank・thread が 同じ slot を生成しても同じ粒子になる。

Arguments

Type IntentOptional Attributes Name
type(mesh_type), intent(in) :: mesh
class(photo_raycast_config), intent(in) :: sim
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) :: ray_direction(3)
real(kind=dp), intent(in) :: m_particle
real(kind=dp), intent(in) :: temperature_k
real(kind=dp), intent(in) :: normal_drift_speed
real(kind=dp), intent(in) :: w_hit
integer(kind=i32), intent(in) :: rng_seed
integer(kind=i64), intent(in) :: ray_counter(:)
integer(kind=i64), intent(in) :: velocity_counter(:)
real(kind=dp), intent(out) :: x(3)
real(kind=dp), intent(out) :: v(3)
real(kind=dp), intent(out) :: w
integer(kind=i32), intent(out) :: emit_elem
logical, intent(out) :: emitted
integer(kind=i32), intent(out) :: collision_status
integer(kind=i32), intent(out) :: bounce_count
real(kind=dp), intent(in), optional :: vmin_normal

public pure subroutine canonicalize_periodic_emission_position(sim, position)

法線offset後の周期軸をprimary cellのstrict interiorへ戻す。

Arguments

Type IntentOptional Attributes Name
class(photo_raycast_config), intent(in) :: sim
real(kind=dp), intent(inout) :: position(3)

public subroutine build_tangent_basis(normal, tangent1, tangent2)

面法線ベクトルから接線2軸を構築する。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: normal(3)
real(kind=dp), intent(out) :: tangent1(3)
real(kind=dp), intent(out) :: tangent2(3)

public subroutine sample_photo_emission_velocity(sigma, normal_drift_speed, normal, tangent1, tangent2, vel, vmin_normal, rng_seed, rng_counter)

光電子放出速度を局所法線座標でサンプルする。

Arguments

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

熱速度標準偏差 [m/s]。

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

熱速度標準偏差 [m/s]。 放出法線方向のシフト速度 [m/s]。

real(kind=dp), intent(in) :: normal(3)
real(kind=dp), intent(in) :: tangent1(3)
real(kind=dp), intent(in) :: tangent2(3)
real(kind=dp), intent(out) :: vel(3)
real(kind=dp), intent(in), optional :: vmin_normal

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

integer(kind=i32), intent(in) :: rng_seed

counter-based 乱数の seed。

integer(kind=i64), intent(in) :: rng_counter(:)