effphase_class.f90
Go to the documentation of this file.
1
!> @file effphase_class.f90
2
!!
3
!! The error file code for this file is ***W15***.
4
!! @brief Module \ref effphase_class for calculating effective phase space integral
5
!!
6
7
!>
8
!! Calculate the effective phase space integral needed for the log(ft)
9
!! weak rates.
10
!!
11
!! Ref [1] <a href="http://adsabs.harvard.edu/abs/2001ADNDT..79....1L">
12
!! Langanke and Martinez-Pinedo</a>, ADNDT 79, 1-46(2001)
13
!!
14
!! @author Christian Winteler
15
!! @date 28.07.2009
16
!! @uses QUADPACK routines
17
#include "macros.h"
18
module
effphase_class
19
20
use
parameter_class
21
22
implicit none
23
24
real
(
r_kind
) ::
me_temp
!< me [MeV]/kT [MeV]
25
real
(
r_kind
) ::
chem_me
!< chem [MeV]/me [MeV]
26
real
(
r_kind
) ::
qval_me
!< Q [MeV]/me [MeV]
27
28
!
29
! Public fields and methods of the module (nothing is private)
30
!
31
public
:: &
32
effphase
33
34
contains
35
36
subroutine
effphase
(temp,chem,qec,phaseint)
37
implicit none
38
39
real
(
r_kind
),
intent(in)
:: temp
!< temperature in 10^9 K
40
real
(
r_kind
),
intent(in)
:: chem
!< chemical potential in MeV. including electron rest mass
41
real
(
r_kind
),
intent(in)
:: qec
!< Q-value for electron capture [MeV]
42
real
(
r_kind
),
intent(out)
:: phaseint
!< phase space integral
43
44
real
(
r_kind
) ::
xeffc
45
!---- NAG variables
46
real
(
r_kind
) :: emin
! finite limit of integration range
47
integer
:: inf
! infinite limit (-1 -> (-inf,bound], +1 -> [bound, +inf)
48
parameter(inf = 1)
! 2 -> (-inf,+inf))
49
real
(
r_kind
) :: epsabs
! absolute accuracy required
50
real
(
r_kind
) :: epsrel
! rel. accuracy required
51
parameter(epsabs = 0.0d0, epsrel = 1.0d-10)
52
real
(
r_kind
) :: abserr
! estimate of absolute error |I-Result|
53
integer
:: lw,liw
! lw: #of subintervals rec.:(800-2000), liw: lw/4
54
parameter(lw=1000,liw=lw/4)
55
!real(r_kind), dimension(lw) :: w
56
!integer, dimension(liw) :: iw
57
integer
:: ifail
58
integer
:: ierr, neval
59
external
xeffc
60
61
me_temp
=
unit
%mass_e / (temp*1.d9*
unit
%k_MeV)
! mec^2 in units of kT
62
chem_me
= chem /
unit
%mass_e
! chemical potential in units of mec^2
63
qval_me
= qec /
unit
%mass_e
! Q value in units of mec^2
64
65
ifail = -1
66
67
emin = max(-
qval_me
,1.d0)
!lower limit of integral ([1] Eq.16)
68
69
70
!---- Integration routines section: at the moment the use of 1) or 5) is recommended!
71
72
!> 1) NAG routine
73
!call d01amf(xeffc,emin,inf,epsabs,epsrel,phaseint,abserr,w,lw,iw,liw,ifail)
74
75
!> 2) pure Gauss-Legendre (simple, untested)
76
!!call semiint(xeffc,emin,phaseint)
77
78
!> 3) QUADPACK routine (pulic domain)
79
call
qagi
(
xeffc
, emin, inf, epsabs, epsrel, phaseint, abserr, neval, ierr)
80
!if(ierr == 5) then
81
!write(*,*) "Warning: Integrand is too small, switched to (large) finite integration range."
82
!write(*,*) ierr, "Phaseint: ", phaseint, ", number of evaluations: ", neval, ", abserr: ", abserr
83
!call qags (xeffc, emin, 10.d4, epsabs, epsrel, phaseint, abserr, neval, ierr)
84
!write(*,*) ierr, "Phaseint: ", phaseint, ", number of evaluations: ", neval, ", abserr: ", abserr
85
!write(*,*) qval_me,emin, me_temp, chem_me
86
!endif
87
88
return
89
90
end subroutine
effphase
91
92
end module
effphase_class
93
94
!> The integrand in effective psi, eq.[16] of Langanke & Pinedo (2001)
95
real(r_kind)
function
xeffc
(w)
96
use
effphase_class
97
implicit none
98
99
real
(
r_kind
),
intent(in)
:: w
!< total (kinetic+rest mass) energy of e-/e+
100
real
(
r_kind
) :: fd_dist
! Fermi-Dirac Distribution
101
real
(
r_kind
) :: fd_expo
! exponent in the fd_dist
102
103
fd_expo =
me_temp
*(w -
chem_me
)
! Exponent of [1] Eq(11) where Ee = w*me*c^2
104
if
(fd_expo < 36.d0)
then
105
fd_dist =1.d0/(1.d0+dexp(fd_expo))
106
else
if
(fd_expo < 708.d0)
then
107
fd_dist = dexp(-fd_expo)
108
else
109
fd_dist = 0.d0
110
end if
111
112
xeffc
= (w**2)*((
qval_me
+ w)**2)*fd_dist
! [1] Eq.16 with Snu = 0
113
return
114
115
end function
xeffc
effphase_class::chem_me
real(r_kind) chem_me
chem [MeV]/me [MeV]
Definition:
effphase_class.f90:25
effphase_class::qval_me
real(r_kind) qval_me
Q [MeV]/me [MeV].
Definition:
effphase_class.f90:26
xeffc
real(r_kind) function xeffc(w)
The integrand in effective psi, eq.[16] of Langanke & Pinedo (2001)
Definition:
effphase_class.f90:96
qagi
subroutine qagi(f, bound, inf, epsabs, epsrel, result, abserr, neval, ier)
Definition:
quadpack_module.f90:684
effphase_class::effphase
subroutine, public effphase(temp, chem, qec, phaseint)
Definition:
effphase_class.f90:37
effphase_class::me_temp
real(r_kind) me_temp
me [MeV]/kT [MeV]
Definition:
effphase_class.f90:24
effphase_class
Calculate the effective phase space integral needed for the log(ft) weak rates.
Definition:
effphase_class.f90:18
parameter_class::unit
type(unit_type), public unit
constants and unit conversion factors
Definition:
parameter_class.f90:54
r_kind
#define r_kind
Definition:
macros.h:46
parameter_class
Contains all runtime parameters as well as phys and math constants.
Definition:
parameter_class.f90:24
src
effphase_class.f90