COSMOS v7.655  COSMOSv7655
(AirShowerMC)
kexpot.f
Go to the documentation of this file.
1 ! ***************************************************************
2 ! *
3 ! * kexpot: compute excitation potential ep (in eV)
4 ! * consisting of n different atoms.
5 ! *
6 ! * see P.R B vol3 (1971)3681 sternheimer.
7 ! *
8 ! ***************************** tested 87.09.19 *****************
9 !
10 ! /usage/ call kexpot(za, aa, rela, n, zi, ai, ep)
11 !
12 ! Example for C3H8
13 ! parameter (n=2)
14 ! real*8 aa(n), za(n), rela(n), zi, zi, ep
15 ! data aa/1., 12./, za/1., 6./, rela/8., 3./
16 ! call kexpot(za, aa, rela, n, zi, ai, ep)
17 ! write(*,*) ' ep=', ep
18 ! end
19 !
20  subroutine kexpot(za, aa, rela, n, zi, ai, ep)
21  implicit none
22  integer n
23  real*8 za(n) ! input. za(i) is the charge of the i-th atom
24  real*8 aa(n) ! input. aa(i) the mass # of i-th atom
25  real*8 rela(n) ! input. rela(i) the relative number of i-th atom
26  real*8 zi ! output. weighted sum of za
27  real*8 ai ! output. weighted sum of aa
28  real*8 ep ! output. Excitention potential in eV
29 
30 !
31  integer i
32  real*8 sumli, expi
33 
34  ai = 0.
35  zi = 0.
36  do i = 1, n
37  ai = ai + aa(i)*rela(i)
38  zi = zi + za(i)*rela(i)
39  enddo
40 !
41  sumli=0.
42  do i=1, n
43  if(za(i) .eq. 1) then
44  expi=18.7
45  elseif(za(i) .lt. 13.) then
46  expi=13.*za(i)
47  else
48  expi=za(i) *( 9.76 + 58.8*za(i)**(-1.19))
49  endif
50  sumli=sumli + za(i)*rela(i)/zi * log(expi)
51  enddo
52  ep=exp(sumli)
53  end
subroutine kexpot(za, aa, rela, n, zi, ai, ep)
Definition: kexpot.f:21