-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbeams_mfp.for
92 lines (76 loc) · 2.23 KB
/
beams_mfp.for
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
c/////////////////////////////////////////////////////////////////////////
c/
c/ NAME
c/ Beams_mfp
c/
c/ DESCRIPTION
c/ This subroutine calculates the inverse mean free path of
c/ hydrogenic neutrals in a plasma using the beam stopping cross
c/ section parametrization by C. Boley (Nucl. Fusion 29, 2125, 1989)
c/ Version 0.00, John Mandrekas, GIT, 06-25-91
c/ Updated fits (SIGFIT91), 03/27/92
c/
c/ PARAMETERS
c/ None
c/
c/ RETURNS
c/ Nothing
c/
c/////////////////////////////////////////////////////////////////////////
subroutine Beams_mfp
implicit none
include 'nbparams.inc'
include 'BeamsLoc.inc'
include 'nbplasma.inc'
real sig_olson
c/ Local variable declarations:
c/ ---------------------------
integer i, ie, iz, izq
real te, dene, eb_amu, sig, sigzol, zq
c/ Get ready to call the subroutine SIGFIT:
do i = 1, nrho
te = elecTemp(i)
dene = 1.0e14*elecDensity(i)
if (ihe4.ne.0) then
denz(1) = 1.0e14*dni(i,ihe4)
else
denz(1) = 0.0
endif
if (icarb.ne.0) then
denz(2) = 1.0e14*dni(i,icarb)
else
denz(2) = 0.0
endif
if (ioxy.ne.0) then
denz(3) = 1.0e14*dni(i,ioxy)
else
denz(3) = 0.0
endif
if (iFe.ne.0) then
denz(4) = 1.0e14*dni(i,iFe)
else
denz(4) = 0.0
endif
c/ Calculate inverse mean free path for each energy group if required:
c/ For the impurity species NOT included in Boley's routine,
c/ calculate stopping cross section using Olson's formula and
c/ add to the total inverse mean free path:
do ie = 1, 3
if (fbpwr(ie,ibeam).ne.0.0) then
eb_amu = ebkev/(ie*ab)
call sigfit (eb_amu, dene, te, denz, sig)
omfp(i,ie,ibeam) = 1.0e16 * elecDensity(i) * sig
if (inonb.NE.0) then
sigzol = 0.0
do iz = 1, inonb
izq = nonbindx(iz)
zq = znum(izq)
sigzol = sigzol + dni(i,izq)*sig_olson(eb_amu,zq)
enddo
omfp(i,ie,ibeam) = omfp(i,ie,ibeam) + 1.0e16*sigzol
endif
endif
enddo ! End of DO loop over energy components
enddo ! End of DO loop over radial points
return
end