20 type (type_equilibrium
),
intent(inout) :: equilibrium
22 real(r8),
intent(in) :: xaxis
26 real(r8),
dimension(nr) :: psi_new, fdf_new
27 real(r8),
dimension(3) :: abltg
30 if (verbosity > 1)
write(iu6, *)
"updating FF' based on <j_tor> and p'"
36 fdf_new(i) = mu0 * (equilibrium%profiles_1d%jphi(i) &
38 r_major) * equilibrium%eqgeometry%geom_axis%r * twopi &
39 * equilibrium%profiles_1d%pprime(i)) &
41 one_over_r) * equilibrium%eqgeometry%geom_axis%r / twopi
45 equilibrium%profiles_1d%ffprime = fdf_new
50 fdf_new = mu0 * equilibrium%profiles_1d%pprime &
51 + equilibrium%profiles_1d%ffprime &
52 / equilibrium%eqgeometry%geom_axis%r**2
54 fdf_new = equilibrium%profiles_1d%ffprime
58 fdf_new = fdf_new / fdf_new(1)
61 psi_new = equilibrium%profiles_1d%psi / equilibrium%profiles_1d%psi(nr)
65 call
spline(nr, psi_new, fdf_new, 0._r8, 0._r8, 2, fdf_spline)
67 fdf(i) =
spwert(nr, psivec(i), fdf_spline, psi_new, abltg, 0)
subroutine allocate_spline_coefficients(spline, n)
subroutine spline(N, X, Y, ALFA, BETA, TYP, A, B, C, D)
REAL *8 function spwert(N, XWERT, A, B, C, D, X, ABLTG)
subroutine update_fdf(equilibrium, xaxis)
real(r8) function, public flux_surface_average(i, xaxis, a, F_dia, type, func)
subroutine deallocate_spline_coefficients(spline)
real(r8) function one_over_r(a, x, xr, xs, yr, ys, psi, psir, F_dia)
real(r8) function r_major(a, x, xr, xs, yr, ys, psi, psir, F_dia)