internal_inductance_yp

PURPOSE ^

LUKE - calculation of the internal inductance for a given current density profile (cylindrical toroidal MHD equilibrium)

SYNOPSIS ^

function [li] = internal_inductance_yp(rho,currprof)

DESCRIPTION ^

 LUKE - calculation of the internal inductance for a given current density profile (cylindrical toroidal MHD equilibrium)

 Calculation of the internal inductance for a given current density profile (cylindrical toroidal MHD equilibrium)

 INPUT

    - rho: normalized minor radius
    - currprof: current density profile on rho grid (may not be normalized)

 OUTPUT: 

    - li: normalized internal inductance li

 by Yves Peysson (CEA-DRFC, yves.peysson@cea.fr) and Joan Decker (CRPP-EPFL, joan.decker@epfl.ch)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [li] = internal_inductance_yp(rho,currprof)
0002 % LUKE - calculation of the internal inductance for a given current density profile (cylindrical toroidal MHD equilibrium)
0003 %
0004 % Calculation of the internal inductance for a given current density profile (cylindrical toroidal MHD equilibrium)
0005 %
0006 % INPUT
0007 %
0008 %    - rho: normalized minor radius
0009 %    - currprof: current density profile on rho grid (may not be normalized)
0010 %
0011 % OUTPUT:
0012 %
0013 %    - li: normalized internal inductance li
0014 %
0015 % by Yves Peysson (CEA-DRFC, yves.peysson@cea.fr) and Joan Decker (CRPP-EPFL, joan.decker@epfl.ch)
0016 %
0017 drho = gradient(rho);
0018 norm_curr = trapz(currprof.*rho.*drho);
0019 %
0020 currprofn = currprof/norm_curr;%normalisation
0021 %
0022 rho(1) = eps;
0023 %
0024 li = 2*trapz(trapz(triu((ones(length(rho),1)*(currprofn.*rho.*drho))')).^2.*drho./rho);
0025 %

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.