Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params |
SUBROUTINE initialize_Hollmann_params(params)
TYPE(KORC_PARAMS), INTENT(IN) :: params
CHARACTER(MAX_STRING_LENGTH) :: filename
CHARACTER(MAX_STRING_LENGTH) :: current_direction
REAL(rp) :: E,sigma_E,Eo
REAL(rp) :: Zeff,sigma_Z
REAL(rp) :: max_pitch_angle
REAL(rp) :: min_pitch_angle
REAL(rp) :: max_energy
REAL(rp) :: min_energy
REAL(rp) :: Bo
REAL(rp) :: lambda
REAL(rp) :: A_fact
h_params%filename = TRIM(filename_Hollmann)
h_params%rho_ind = rho_ind
h_params%E = E_Hollmann
h_params%Eo = Eo_Hollmann
h_params%sigma_E = sigma_E_Hollmann
h_params%Zeff = Zeff_Hollmann
h_params%sigma_Z = sigma_Z_Hollmann
h_params%max_pitch_angle = max_pitch_angle_Hollmann
h_params%min_pitch_angle = min_pitch_angle_Hollmann
h_params%gam_min_from_col = gam_min_from_col
if(.not.h_params%gam_min_from_col) then
h_params%min_sampling_energy = min_energy_Hollmann*C_E ! In Joules
h_params%min_sampling_g = 1.0_rp + h_params%min_sampling_energy/ &
(C_ME*C_C**2)
else
h_params%min_sampling_g = params%gam_min
endif
h_params%max_sampling_energy = max_energy_Hollmann*C_E ! In Joules.
h_params%max_sampling_g = 1.0_rp + h_params%max_sampling_energy/ &
(C_ME*C_C**2)
!write(6,*) 'init:sampling',h_params%min_sampling_g,h_params%max_sampling_g
call load_data_from_hdf5(params)
! loads h_params%E_axis 1D energy range, h_params%fRE_E
! energy distribution as a function of h_params%E_axis,
! and h_params%fRE_pitch pitch angle distribution as a
! function of h_params%E_axis
if (ALLOCATED(h_params%rho_axis)) then
ALLOCATE(h_params%g(h_params%NE))
else
ALLOCATE(h_params%g(h_params%N))
endif
h_params%g = 1.0_rp + h_params%E_axis/(C_ME*C_C**2)
! 1D range of gamma based on energy range from Hollmann input file
if (ALLOCATED(h_params%rho_axis)) then
#ifdef PSPLINE
call initialize_Hollmann_interpolant(params,h_params%Nrho, &
h_params%NE,h_params%rho_axis,h_params%g,h_params%fRE_E_2D, &
h_params%fRE_pitch_2D)
#endif
endif
h_params%max_g = MAXVAL(h_params%g)
h_params%min_g = MINVAL(h_params%g)
!write(6,*) 'init:range',h_params%min_g,h_params%max_g
h_params%current_direction = TRIM(current_direction_Hollmann)
h_params%Bo = Bo_Hollmann
h_params%lambda = lambda_Hollmann
h_params%A_fact = A_fact_Hollmann
END SUBROUTINE initialize_Hollmann_params