58 REAL (R8) :: g2(geometry%nrho)
67 REAL (R8) :: tzi, mzi, nzi
71 INTEGER :: te_bnd_type
72 INTEGER :: ti_bnd_type(
profiles%nion)
73 INTEGER :: vtor_bnd_type(
profiles%nion)
106 REAL (R8),
PARAMETER :: me = itm_me*1e3_r8
107 REAL (R8),
PARAMETER :: mp = itm_mp*1e3_r8
108 REAL (R8),
PARAMETER :: e = itm_qe*3e9_r8
110 REAL (R8),
PARAMETER :: ct = itm_ev*1e7_r8
111 REAL (R8),
PARAMETER :: cn = 1.e-6_r8
112 REAL (R8),
PARAMETER :: cs = 9.e9_r8
113 REAL (R8),
PARAMETER :: cm = 1.e-3_r8
129 ion_loop1:
DO iion = 1,nion
130 ti_bnd_type(iion) =
profiles%TI_BND_TYPE(iion)
131 vtor_bnd_type(iion)=
profiles%VTOR_BND_TYPE(iion)
137 rho_loop1:
DO irho =1,nrho
138 g2(irho) = geometry%G2(irho)
143 ion_loop2:
DO iion = 1,nion
144 ti(irho,iion) =
profiles%TI(irho,iion)
145 ni(irho,iion) =
profiles%NI(irho,iion)
146 vtor(irho,iion) =
profiles%VTOR(irho,iion)
150 if (te(irho).ne.te(irho))
write(*,*)
'Warning te is nan ', irho
154 IF(te(irho).GE.1.e1_r8) clog = 24.e0_r8 - 1.15e0_r8*log10(ne(irho)*cn) + 2.30e0_r8*log10(te(irho))
155 IF(te(irho).LT.1.e1_r8) clog = 23.e0_r8 - 1.15e0_r8*log10(ne(irho)*cn) + 3.45e0_r8*log10(te(irho))
159 tau_e(irho) = (sqrt(2.d0*me)*(te(irho))**1.5) / 1.8d-19 / (ne(irho)*cn) / clog
163 sigma(irho) = 1.96e0_r8 * e**2 *ne(irho)*cn * tau_e(irho) /me /cs
170 rho_loop2:
DO irho = 1,nrho
176 ion_loop3:
DO iion = 1,nion
177 vei(irho,iion) = 0.e0_r8
178 qei(irho,iion) = 0.e0_r8
179 vzi(irho,iion) = 0.e0_r8
180 qzi(irho,iion) = 0.e0_r8
181 uzi(irho,iion) = 0.e0_r8
182 wzi(irho,iion) = 0.e0_r8
184 if (ti(irho,iion).ne.ti(irho,iion))
write(*,*)
'warning, ti is nan', irho, iion
188 IF(te(irho).GE.10.*zion(iion)**2)
THEN
189 clog = 24.e0_r8 - 1.15e0_r8*log10(ne(irho)*cn) + 2.30e0_r8*log10(te(irho))
190 ELSE IF(te(irho).LT.10.*zion(iion)**2)
THEN
191 clog = 23.e0_r8 - 1.15e0_r8*log10(ne(irho)*cn) + 3.45e0_r8*log10(te(irho))
193 WRITE(*,*)
'Should not get here!'
194 WRITE(*,*) irho, te(irho)
200 tau_ei(irho,iion) = (te(irho)*mp*aion(iion) + ti(irho,iion)*me)**1.5 / 1.8d-19 &
201 / (sqrt(aion(iion)*me*mp)) / (ni(irho,iion)*cn) / zion(iion)**2 / clog
205 vei(irho,iion) = 0.e0_r8
208 IF (tau_ei(irho,iion).GT.0.e0_r8) &
210 vei(irho,iion) = ne(irho) / tau_ei(irho,iion)
211 qei(irho,iion) = vei(irho,iion) * te(irho)
215 vie(irho) = vie(irho) + vei(irho,iion)
216 qie(irho) = qie(irho) + vei(irho,iion) * ti(irho,iion)
221 ion_loop4:
DO iz = 1,nion
223 viz(irho,iion,iz) = 0.e0_r8
227 mzi = mp * aion(iion)*aion(iz) / (aion(iz)+aion(iion))
230 clog = 23.0d0 - log( zion(iion)*zion(iz) * (aion(iion)+aion(iz)) / (aion(iion)*ti(irho,iz)+aion(iz)*ti(irho,iion))) &
231 - log( sqrt(ni(irho,iion)*cn*zion(iion)**2./ti(irho,iion) + ni(irho,iz)*cn*zion(iz)**2./ti(irho,iz)) )
235 tau_zi(irho,iz) = (ti(irho,iion)*mp*aion(iz) + ti(irho,iz)*mp*aion(iion))**1.5 / 1.8d-19 &
236 / (sqrt(aion(iion)*mp*aion(iz)*mp)) / (ni(irho,iion)*cn)/zion(iion)**2/zion(iz)**2 / clog
242 viz(irho,iion,iz) = 0.e0_r8
243 wiz(irho,iion,iz) = 0.e0_r8
246 IF (tau_zi(irho,iz).GT.0.e0_r8) &
247 viz(irho,iion,iz) = ni(irho,iz) / tau_zi(irho,iz)
250 IF (tau_zi(irho,iz).GT.0.e0_r8) &
251 wiz(irho,iion,iz) = ni(irho,iz) / tau_zi(irho,iz) * mp*aion(iz)*cm * g2(irho)
255 vzi(irho,iion) = vzi(irho,iion) + viz(irho,iion,iz)
256 qzi(irho,iion) = qzi(irho,iion) + viz(irho,iion,iz) * ti(irho,iz)
257 wzi(irho,iion) = wzi(irho,iion) + wiz(irho,iion,iz)
258 uzi(irho,iion) = uzi(irho,iion) + wiz(irho,iion,iz) * vtor(irho,iz)
265 collisions%VII(irho,iion,iz) = viz(irho,iion,iz)
266 collisions%WII(irho,iion,iz) = wiz(irho,iion,iz)
270 collisions%VEI(irho,iion) = vei(irho,iion)
271 collisions%QEI(irho,iion) = qei(irho,iion)
272 collisions%VZI(irho,iion) = vzi(irho,iion)
273 collisions%QZI(irho,iion) = qzi(irho,iion)
274 collisions%WZI(irho,iion) = wzi(irho,iion)
275 collisions%UZI(irho,iion) = uzi(irho,iion)
279 collisions%SIGMA(irho) = sigma(irho)
280 collisions%VIE(irho) = vie(irho)
281 collisions%QIE(irho) = qie(irho)
subroutine profiles(p0, rbphi, dp0, drbphi, a)
This routine calculates the collision frquencies and various exchange terms determined by collisions...
subroutine plasma_collisions(GEOMETRY, PROFILES, COLLISIONS, ifail)
The module declares types of variables used in ETS (transport code)