光線追跡による光電子放出位置と速度のsampling。
1 本の光線で放出されるマクロ粒子の重み(全 rank 合計 total_rays 本で放出電流を分担する)。
| Type | Intent | Optional | 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 |
面上の点 ray_start から launch_dir へ光線を飛ばし、box 境界の反射を経て最初に当たる panel を返す。
| Type | Intent | Optional | 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 |
要素に当たったとき |
||
| integer(kind=i32), | intent(out) | :: | collision_status |
衝突照会の status( |
||
| integer(kind=i32), | intent(out) | :: | bounce_count |
衝突照会の status( |
1 本の光線を counter-based 乱数で発射し、当たれば光電子を 1 つ返す。
面内の発射位置は ray_counter の draw 1, 2、放出速度は velocity_counter で決まるので、どの rank・thread が
同じ slot を生成しても同じ粒子になる。
| Type | Intent | Optional | 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 |
法線offset後の周期軸をprimary cellのstrict interiorへ戻す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(photo_raycast_config), | intent(in) | :: | sim | |||
| real(kind=dp), | intent(inout) | :: | position(3) |
面法線ベクトルから接線2軸を構築する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | normal(3) | |||
| real(kind=dp), | intent(out) | :: | tangent1(3) | |||
| real(kind=dp), | intent(out) | :: | tangent2(3) |
光電子放出速度を局所法線座標でサンプルする。
| Type | Intent | Optional | 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(:) |