放出元要素の局所障壁からPE escape重み係数を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mesh_type), | intent(in) | :: | mesh | |||
| type(sim_config), | intent(in) | :: | sim | |||
| type(particle_species_spec), | intent(in) | :: | spec | |||
| integer(kind=i32), | intent(in) | :: | elem_idx |
real(dp) function photo_escape_weight_factor(mesh, sim, spec, elem_idx) result(factor) type(mesh_type), intent(in) :: mesh type(sim_config), intent(in) :: sim type(particle_species_spec), intent(in) :: spec integer(i32), intent(in) :: elem_idx real(dp) :: barrier_v, thermal_energy_j, arg select case (trim(lower_ascii(spec%photo_escape_model))) case ('none') factor = 1.0d0 return case ('boltzmann_cutoff') barrier_v = max(element_potential_without_self(mesh, elem_idx, sim%softening) - sim%phi_infty, 0.0d0) if (barrier_v <= 0.0d0) then factor = 1.0d0 return end if thermal_energy_j = k_boltzmann*species_temperature_k(spec) if (thermal_energy_j <= 0.0d0) then factor = 0.0d0 return end if arg = abs(spec%q_particle)*barrier_v/thermal_energy_j if (.not. ieee_is_finite(arg)) then error stop 'photo_escape_model produced a non-finite Boltzmann argument.' end if if (arg >= 700.0d0) then factor = 0.0d0 else factor = exp(-arg) end if case default error stop 'Unknown photo_escape_model in runtime.' end select end function photo_escape_weight_factor