シミュレーション設定・統計・メッシュ・粒子・衝突情報の主要データ型を定義する。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=i32), | public, | parameter | :: | bc_open | = | 0_i32 | |
| integer(kind=i32), | public, | parameter | :: | bc_reflect | = | 1_i32 | |
| integer(kind=i32), | public, | parameter | :: | bc_periodic | = | 2_i32 |
時間刻み・収束判定・バッチ回数・外部磁場など実行制御パラメータを保持する。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | public | :: | dt | = | 1.0d-12 | ||
| integer(kind=i32), | public | :: | rng_seed | = | 12345_i32 | ||
| integer(kind=i32), | public | :: | batch_count | = | 1_i32 | ||
| real(kind=dp), | public | :: | batch_duration | = | 0.0d0 | ||
| logical, | public | :: | has_batch_duration | = | .false. | ||
| real(kind=dp), | public | :: | batch_duration_step | = | 0.0d0 | ||
| logical, | public | :: | has_batch_duration_step | = | .false. | ||
| integer(kind=i32), | public | :: | max_step | = | 100 | ||
| real(kind=dp), | public | :: | tol_rel | = | 1.0d-4 | ||
| real(kind=dp), | public | :: | q_floor | = | 1.0d-30 | ||
| real(kind=dp), | public | :: | softening | = | 1.0d-4 | ||
| character(len=16), | public | :: | field_solver | = | 'auto' | ||
| character(len=16), | public | :: | field_bc_mode | = | 'free' | ||
| integer(kind=i32), | public | :: | field_periodic_image_layers | = | 1_i32 | ||
| character(len=16), | public | :: | field_periodic_far_correction | = | 'auto' | ||
| real(kind=dp), | public | :: | field_periodic_ewald_alpha | = | 0.0d0 | ||
| integer(kind=i32), | public | :: | field_periodic_ewald_layers | = | 4_i32 | ||
| real(kind=dp), | public | :: | tree_theta | = | 0.5d0 | ||
| logical, | public | :: | has_tree_theta | = | .false. | ||
| integer(kind=i32), | public | :: | tree_leaf_max | = | 16_i32 | ||
| logical, | public | :: | has_tree_leaf_max | = | .false. | ||
| integer(kind=i32), | public | :: | tree_min_nelem | = | 256_i32 | ||
| real(kind=dp), | public | :: | b0(3) | = | 0.0d0 | ||
| character(len=32), | public | :: | reservoir_potential_model | = | 'none' | ||
| real(kind=dp), | public | :: | phi_infty | = | 0.0d0 | ||
| integer(kind=i32), | public | :: | injection_face_phi_grid_n | = | 3_i32 | ||
| integer(kind=i32), | public | :: | raycast_max_bounce | = | 16_i32 | ||
| character(len=32), | public | :: | sheath_injection_model | = | 'none' | ||
| real(kind=dp), | public | :: | sheath_alpha_deg | = | 60.0d0 | ||
| real(kind=dp), | public | :: | sheath_photoelectron_ref_density_cm3 | = | 64.0d0 | ||
| real(kind=dp), | public | :: | sheath_reference_coordinate | = | 0.0d0 | ||
| logical, | public | :: | has_sheath_reference_coordinate | = | .false. | ||
| character(len=16), | public | :: | sheath_electron_drift_mode | = | 'normal' | ||
| character(len=16), | public | :: | sheath_ion_drift_mode | = | 'normal' | ||
| logical, | public | :: | use_box | = | .false. | ||
| real(kind=dp), | public | :: | box_min(3) | = | [-1.0d0, -1.0d0, -1.0d0] | ||
| real(kind=dp), | public | :: | box_max(3) | = | [1.0d0, 1.0d0, 1.0d0] | ||
| integer(kind=i32), | public | :: | bc_low(3) | = | [bc_open, bc_open, bc_open] | ||
| integer(kind=i32), | public | :: | bc_high(3) | = | [bc_open, bc_open, bc_open] |
処理済み粒子数、吸着/脱出数、バッチ数、最終相対変化量を集計する統計型。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=i64), | public | :: | processed_particles | = | 0_i64 | ||
| integer(kind=i64), | public | :: | absorbed | = | 0_i64 | ||
| integer(kind=i64), | public | :: | escaped | = | 0_i64 | ||
| integer(kind=i64), | public | :: | escaped_boundary | = | 0_i64 | ||
| integer(kind=i64), | public | :: | survived_max_step | = | 0_i64 | ||
| integer(kind=i32), | public | :: | batches | = | 0 | ||
| real(kind=dp), | public | :: | last_rel_change | = | -1.0d0 |
種ごとのマクロ粒子端数を保持し、再開時にも注入期待値を保つ。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | public, | allocatable | :: | macro_residual(:) |
三角形頂点と前計算幾何量、要素電荷を保持する境界要素メッシュ型。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=i32), | public | :: | nelem | = | 0 | ||
| real(kind=dp), | public, | allocatable | :: | v0(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | v1(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | v2(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | centers(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | center_x(:) | |||
| real(kind=dp), | public, | allocatable | :: | center_y(:) | |||
| real(kind=dp), | public, | allocatable | :: | center_z(:) | |||
| real(kind=dp), | public, | allocatable | :: | normals(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | bb_min(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | bb_max(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | h_elem(:) | |||
| real(kind=dp), | public, | allocatable | :: | q_elem(:) | |||
| integer(kind=i32), | public, | allocatable | :: | elem_mesh_id(:) | |||
| real(kind=dp), | public | :: | grid_bb_min(3) | = | 0.0d0 | ||
| real(kind=dp), | public | :: | grid_bb_max(3) | = | 0.0d0 | ||
| integer(kind=i32), | public | :: | grid_ncell(3) | = | 1_i32 | ||
| real(kind=dp), | public | :: | grid_inv_cell(3) | = | 1.0d0 | ||
| integer(kind=i32), | public, | allocatable | :: | grid_cell_start(:) | |||
| integer(kind=i32), | public, | allocatable | :: | grid_cell_elem(:) | |||
| logical, | public | :: | use_collision_grid | = | .false. | ||
| logical, | public | :: | periodic2_collision_ready | = | .false. |
粒子の位置・速度・物性値・生存フラグをSoA形式で保持する型。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=i32), | public | :: | n | = | 0 | ||
| real(kind=dp), | public, | allocatable | :: | x(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | v(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | q(:) | |||
| real(kind=dp), | public, | allocatable | :: | m(:) | |||
| real(kind=dp), | public, | allocatable | :: | w(:) | |||
| logical, | public, | allocatable | :: | alive(:) |
衝突有無、命中要素番号、線分パラメータ、交点座標を返す衝突結果型。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | has_hit | = | .false. | ||
| integer(kind=i32), | public | :: | elem_idx | = | -1 | ||
| real(kind=dp), | public | :: | t | = | 0.0d0 | ||
| real(kind=dp), | public | :: | pos(3) | = | 0.0d0 | ||
| integer(kind=i32), | public | :: | image_shift(2) | = | 0_i32 | ||
| real(kind=dp), | public | :: | pos_wrapped(3) | = | 0.0d0 |