ETS  \$Id: Doxyfile 2162 2020-02-26 14:16:09Z g2dpc $
All Classes Files Functions Variables Pages
phys_profiles.f90
Go to the documentation of this file.
2 
3  use itm_types
4  use mod_dat, only : verbosity
5  use mod_helena_io, only : iu6
6 
7  implicit none
8 
9  contains
10 
11 !--------------------------------------------------------------------------
12 
13  function j_phi(flux) result(f_j_phi)
14 !--------------------------------------------------------------------------
15 ! current density versus flux (has to be normalized to 1 on axis)
16 !--------------------------------------------------------------------------
17 
18  use mod_profiles
19  use helena_spline
20 
21  implicit none
22 
23  real(r8) :: flux
24  real(r8) :: f_j_phi
25 
26  real(r8), dimension(3) :: ablt
27 
28  if (flux > 1._r8) then
29  if (verbosity > 0) &
30  write(iu6, *) 'Warning: normalized flux > 1 ! Should not occur.'
31  flux = 1._r8
32  end if
33 
34  f_j_phi = spwert(npts, flux, j_spline, psivec, ablt, 0)
35 
36  end function j_phi
37 
38 !===========================================================================
39 
40 end module phys_profiles
subroutine flux(psitok, rk, zk, nk)
Definition: EQ1_m.f:786
REAL *8 function spwert(N, XWERT, A, B, C, D, X, ABLTG)
Definition: solution6.f90:155
real(r8) function j_phi(flux)