ETS  \$Id: Doxyfile 2162 2020-02-26 14:16:09Z g2dpc $
 All Classes Files Functions Variables Pages
neo_helena.f90
Go to the documentation of this file.
1 subroutine neo_helena(fcirc, te, ti, zzne, z, f, q, r, eps, zdne, dte, &
2  dti, znue, znui, sigspitz, signeo, zjbt, hjbt)
3 !-----------------------------------------------------------------------
4 ! formula for neoclassical quantities from Phys. Plasmas 6 (1999) 2834.
5 ! te, ti given in electron Volt, density im m^-3
6 !-----------------------------------------------------------------------
7 !TODO: check validity of this subroutine (results differ from Samuli's
8 ! original but may actually be correct)
9 
10  use itm_types
11 
12  implicit none
13 
14  real(r8), intent(in) :: fcirc
15  real(r8), intent(in) :: zzne, zdne
16  real(r8), intent(in) :: z, q, r, f, eps
17  real(r8), intent(in) :: te, ti, dte, dti
18 
19  real(r8), intent(out) :: znue, znui
20  real(r8), intent(out) :: sigspitz, signeo
21  real(r8), intent(out) :: zjbt, hjbt
22 
23  real(r8) :: ft, rpe, znz
24  real(r8) :: zne, zni, zdni, dni
25  real(r8) :: zle, zli
26  real(r8) :: f33tef, f31tef, f32tefe, f32tefi, f32ee, f32ei, f34tef
27  real(r8) :: x, y
28  real(r8) :: zl31, zl32, zl34
29  real(r8) :: a0, anu, p
30  real(r8) :: xx, dx, alfai, etai
31  real(r8) :: a1, a2e, a2i
32  real(r8) :: hl31, hl32
33 
34  ft = 1._r8 - fcirc
35 
36  zne = zzne * 1e19_r8
37  zni = zne / z
38  zdni = zdne / z
39  dni = zdni * 1e19_r8
40 
41  rpe = te / (ti + te)
42 
43  zle = 31.3_r8 - log(sqrt(zne) / te)
44  zli = 30.0_r8 - log(z**3 * sqrt(zni) / ti**1.5_r8)
45 
46 
47  znue = 6.921e-18_r8 * q * r * zne * z * zle / (te**2 * eps**1.5_r8)
48  znui = 4.90e-18_r8 * q * r * zni * z**4 * zli / (ti**2 * eps**1.5_r8)
49 
50  f33tef = ft / (1._r8 + (0.55_r8 - 0.1_r8 * ft) * sqrt(znue) &
51  + 0.45_r8 * (1._r8 - ft) * znue / z**1.5_r8)
52 
53  znz = 0.58_r8 + 0.74_r8 / (0.76_r8 + z)
54 
55  sigspitz = 1.9012e4_r8 * te**1.5_r8 / (z * znz * zle)
56 
57  x = f33tef
58  signeo = 1._r8 - (1._r8 + 0.36_r8 / z) * x + 0.59_r8 / z * x &
59  * x - 0.23_r8 / z * x**3
60  signeo = signeo * sigspitz
61 
62  f31tef = ft / (1._r8 + (1._r8 - 0.1_r8 * ft) * sqrt(znue) &
63  + 0.5_r8 * (1._r8 - ft) * znue / z)
64 
65  x = f31tef
66  zl31 = (1._r8 + 1.4_r8 / (z + 1._r8)) * x - 1.9_r8 / (z &
67  + 1._r8) * x * x + 0.3_r8 / (z + 1._r8) * x**3 + 0.2_r8 &
68  / (z + 1._r8) * x**4
69 
70  f32tefe = ft / (1._r8 + 0.26_r8 * (1._r8 - ft) * sqrt(znue) &
71  + 0.18_r8 * (1._r8 - 0.37_r8 * ft) * znue / sqrt(z))
72 
73  f32tefi = ft / (1._r8 + (1._r8 + 0.6_r8 * ft) * sqrt(znue) &
74  + 0.85_r8 * (1._r8 - 0.37_r8 * ft) * znue * (1._r8 + z))
75 
76  x = f32tefe
77  f32ee = (0.05_r8 + 0.62_r8 * z) / (z * (1._r8 + 0.44_r8 * z)) &
78  * (x - x**4) + 1._r8 / (1._r8 + 0.22_r8 * z) * (x**2 - x**4 &
79  - 1.2_r8 * (x**3 - x**4)) + 1.2_r8 / (1._r8 + 0.5_r8 * z) &
80  * x**4
81 
82  y = f32tefi
83  f32ei = -(0.56_r8 + 1.93_r8 * z) / (z * (1._r8 + 0.44_r8 * z)) &
84  * (y - y**4) + 4.95_r8 / (1._r8 + 2.48_r8 * z) * (y**2 - y**4 &
85  - 0.55_r8 * (y**3 - y**4)) - 1.2_r8 / (1._r8 + 0.5_r8 * z) &
86  * y**4
87 
88  zl32 = f32ee + f32ei
89 
90  f34tef = ft / (1._r8 + (1._r8 - 0.1_r8 * ft) * sqrt(znue) &
91  + 0.5_r8 * (1._r8 - 0.5_r8 * ft) * znue / z)
92 
93  a0 = -1.17_r8 * (1._r8 - ft) / (1._r8 - 0.22_r8 * ft &
94  - 0.19_r8 * ft * ft)
95 
96 !----------------------------- sign in front of 0.315 changed !!!
97 
98  anu = ((a0 + 0.25_r8 * (1._r8 - ft * ft) * sqrt(znui)) / (1._r8 &
99  + 0.5_r8 * sqrt(znui)) + 0.315_r8 * znui**2 * ft**6) / (1._r8 &
100  + 0.15_r8 * znui**2 * ft**6)
101 
102  x = f34tef
103  zl34 = (1._r8 + 1.4_r8 / (z + 1._r8)) * x - 1.9_r8 / (z &
104  + 1._r8) * x * x + 0.3_r8 / (z + 1._r8) * x**3 + 0.2_r8 &
105  / (z + 1._r8) * x**4
106 
107  p = (zni * ti + zne * te) * 1.602e-19_r8
108  zjbt = -f * p * (zl31 * dni / zni + rpe * (zl31 + zl32) * dte &
109  / te + (1._r8 - rpe) * (1._r8 + zl34 / zl31 * anu) * zl31 * dti / ti)
110 
111 !------------------------------ Hirshman formula at low collisionality
112  xx = (1._r8 - fcirc) / fcirc
113 
114  dx = 1.414_r8 * z + z * z + xx * (0.754_r8 + 2.657_r8 * z &
115  + 2._r8 * z * z) + xx * xx * (0.348_r8 + 1.243_r8 * z + z * z)
116 
117  alfai = -1.172_r8 / (1._r8 + 0.462_r8 * xx)
118 
119  if (dni /= 0._r8) then
120  etai = (dte / te) / (dni / zni)
121  else
122  etai = 1.e10_r8
123  end if
124 
125  a1 = (dni * (te + ti) + zni * (dte + dti)) * 1.6022e-19_r8
126 
127  a2e = etai / (1._r8 + etai) * z / (z + 1._r8) * a1
128  a2i = a2e
129 
130  hl31 = f * xx * (0.754_r8 + 2.210_r8 * z + z * z + xx &
131  * (0.348_r8 + 1.243_r8 * z + z * z)) / dx
132 
133  hl32 = -f * xx * (0.884_r8 + 2.074_r8 * z) / dx
134 
135  hjbt = -hl31 * (a1 + alfai / z * a2i) - hl32 * a2e
136 
137  return
138 end subroutine neo_helena
subroutine neo_helena(fcirc, te, ti, zzne, z, f, q, r, eps, zdne, dte, dti, znue, znui, sigspitz, signeo, zjbt, hjbt)
Definition: neo_helena.f90:1
real(r8) function p(a, x, xr, xs, yr, ys, psi, psir, F_dia)