Skip to content

calc_ndecay.m

Basic Information

  SYNTAX:  ndecay = calc_ndecay(psivac,rg,zg,r0,z0,rdec,zdec);

  PURPOSE:  Calculate decay index at point (or vector of points) from
        vacuum flux on grid.

  INPUTS:
    psivac = flux on grid (either vector or nz x nr array) (Wb)
    rg = grid radial position vector [m]
    zg = grid vertical position vector [m]
       r0 = radial position of reference point for Bz0 (scalar) [m]
       z0 = vertical position of reference point for Bz0 (scalar) [m]
    rdec = radial position(s) to calc decay index at (scalar/vector) [m]
    zdec = vertical position(s) to calc decay index at (scalar/vector) [m]

  OUTPUTS:
    ndecay = decay index (indices if rdec, zdec are vectors)

  RESTRICTIONS:
       r0,z0 must be scalar. rdec,zdec can be vectors.
    If only r0,z0 are  given (no rdec,zdec), will use that point as
    both Bz0 reference and location to calculate ndecay. But if
    rdec,zdec are given as well, r0,z0 will be location of Bz0 reference,
    and rdec,zdec will be location(s) at which to calc ndecay.

  METHOD:
    see rzrig.m, calc_decind_victor.m

Dependencies