bem_boundary Module

シミュレーションボックス境界(流出/反射/面内再配置反射/周期)を適用するモジュール。


Uses

  • module~~bem_boundary~~UsesGraph module~bem_boundary bem_boundary ieee_arithmetic ieee_arithmetic module~bem_boundary->ieee_arithmetic module~bem_kinds bem_kinds module~bem_boundary->module~bem_kinds module~bem_status_codes bem_status_codes module~bem_boundary->module~bem_status_codes module~bem_types bem_types module~bem_boundary->module~bem_types iso_fortran_env iso_fortran_env 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

Used by

  • module~~bem_boundary~~UsedByGraph module~bem_boundary bem_boundary module~bem_particle_stepper bem_particle_stepper module~bem_particle_stepper->module~bem_boundary module~bem_photoelectron_injection bem_photoelectron_injection module~bem_photoelectron_injection->module~bem_boundary module~bem_injection bem_injection module~bem_injection->module~bem_photoelectron_injection module~bem_simulator bem_simulator module~bem_simulator->module~bem_particle_stepper module~bem_app_config_runtime bem_app_config_runtime module~bem_simulator->module~bem_app_config_runtime module~bem_app_config bem_app_config module~bem_simulator->module~bem_app_config module~bem_simulator_particles bem_simulator_particles module~bem_simulator_particles->module~bem_particle_stepper module~bem_simulator_particles->module~bem_photoelectron_injection 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_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_simulator module~bem_simulator_io->module~bem_app_config_runtime module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_simulator module~bem_simulator_loop->module~bem_app_config_runtime module~bem_zhao_outflow_refresh bem_zhao_outflow_refresh module~bem_simulator_loop->module~bem_zhao_outflow_refresh module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator program~main main program~main->module~bem_simulator program~main->module~bem_app_config 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_app_config->module~bem_app_config_runtime module~bem_zhao_outflow_refresh->module~bem_app_config

Derived Types

type, public ::  boundary_event_type

Components

Type Visibility Attributes Name Initial
logical, public :: has_event = .false.
real(kind=dp), public :: fraction = 0.0_dp
integer(kind=i32), public :: face_mask = 0_i32
integer(kind=i32), public :: face_bc(6) = -1_i32

Subroutines

public subroutine find_first_boundary_event(cfg, x0, x1, event, status)

閉じたbox内の始点から候補終点へ向かう線分について、最初のbox面交差を返す。

Arguments

Type IntentOptional Attributes Name
class(particle_domain_config), intent(in) :: cfg
real(kind=dp), intent(in) :: x0(3)
real(kind=dp), intent(in) :: x1(3)
type(boundary_event_type), intent(out) :: event
integer(kind=i32), intent(out) :: status

public subroutine apply_escape_reflect_periodic_event(cfg, event, x, v, alive, escaped, status, redistribution_uniform, face_bc)

最初のbox eventへescape/reflect/redistributed-reflect/periodicを軸順序に依存せず適用する。 face_bc を渡すと、box 設定の代わりにその face 別境界条件を event と照合する(外部障壁で一面を反射に 置き換える場合など)。省略時は cfg の bc_low/bc_high。

Arguments

Type IntentOptional Attributes Name
class(particle_domain_config), intent(in) :: cfg
type(boundary_event_type), intent(in) :: event
real(kind=dp), intent(inout) :: x(3)
real(kind=dp), intent(inout) :: v(3)
logical, intent(inout) :: alive
logical, intent(out) :: escaped
integer(kind=i32), intent(out) :: status
real(kind=dp), intent(in), optional :: redistribution_uniform(3)
integer(kind=i32), intent(in), optional :: face_bc(6)

public subroutine apply_ray_box_boundary(cfg, x, dir, alive)

photo raycast の ray が box 面を越えた点に反射・周期境界を適用する。粒子の境界処理は event API (find_first_boundary_event / apply_escape_reflect_periodic_event)が担い、これは ray 専用。 ray は面内再配置の乱数を持たないので、流出面と再配置反射の面では ray を止める(alive=.false.)。 box が無効なら何もせず、幅 0 の軸があれば ray を止める。

Arguments

Type IntentOptional Attributes Name
class(particle_domain_config), intent(in) :: cfg
real(kind=dp), intent(inout) :: x(3)
real(kind=dp), intent(inout) :: dir(3)
logical, intent(inout) :: alive