@brief Subroutine that reads from the input file the parameters of the Gamma distribution @f$f_\Gamma(x,\kappa,\theta) = \frac{1}{\Gamma(\kappa) \theta^\kappa}x^{\kappa-1}\exp{\left(-x/\theta\right)}@f$.
@param[in] params Core KORC simulation parameters. @param max_energy Maximum energy of sampled @f$f_\Gamma(x,\kappa,\theta)@f$ in MeV. @param min_energy Minimum energy of sampled @f$f_\Gamma(x,\kappa,\theta)@f$ in MeV. @param k Shape factor @f$\kappa@f$. @param t Scale factor @f$\theta@f$.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(KORC_PARAMS), | intent(in) | :: | params |
SUBROUTINE initialize_gamma_params(params)
TYPE(KORC_PARAMS), INTENT(IN) :: params
REAL(rp) :: max_energy
REAL(rp) :: min_energy
REAL(rp) :: k
REAL(rp) :: t
!NAMELIST /EnergyGammaPDF/ max_energy,min_energy,k,t
!open(unit=default_unit_open,file=TRIM(params%path_to_inputs),status='OLD',form='formatted')
!read(default_unit_open,nml=EnergyGammaPDF)
!close(default_unit_open)
gamma_pdf_params%min_energy = min_energy_gamma*C_E ! In Joules
gamma_pdf_params%max_energy = max_energy_gamma*C_E ! In Joules
gamma_pdf_params%k = k_gamma
gamma_pdf_params%t = t_gamma
gamma_pdf_params%max_p = SQRT((gamma_pdf_params%max_energy/(C_ME*C_C**2))**2 - 1.0_rp) ! In units of mc
gamma_pdf_params%min_p = SQRT((gamma_pdf_params%min_energy/(C_ME*C_C**2))**2 - 1.0_rp) ! In units of mc
END SUBROUTINE initialize_gamma_params