Skip to content

calc_fluxexp.m

Basic Information

  USAGE:   fluxexp = calc_fluxexp(eq, r, z)
           [fluxexp, r2, d2] = calc_fluxexp(eq, r, z, d)

  PURPOSE: Calculate flux expansion at points r,z for equilibrium eq

  INPUTS: eq, TokSys description of an equilibrium containing fields:
              rg, zg = grid coordinates
              psizr = flux at points rg, zg
              rbbbs, zbbbs, nbbbs = nbbbs plasma boundary coordinates
              psibry = boundary flux
          r,z, coordinates of points where flux expansion is calculated
          d, distance in outboard midplane to outside boundary (default 0)

  OUTPUTS: fluxexp, if d==0,flux expansion = abs(pr)./sqrt(yr.^2+yz.^2)
    where pr = d(psi)/dR at maximum major radius for the boundary
    and sqrt(yr.^2+yz.^2) is magnitude of flux gradient at points r,z
    if d > 0, fluxexp = D/d, where D is perpendicular distance from r,z
    to point r2, z2 with same flux difference as distance d in midplane

Dependencies