Skip to content

findlcfs.m

Basic Information

  USAGE:  >> [psilc,isclosed] = findlcfs(rg,zg,xlim,ylim,psig)

  PURPOSE: Function to find last closed flux surface inside limiter on grid

  INPUTS:
    rg,zg = grid geometry
    xlim,ylim = limiter R,Z
    psig = flux matrix on zg,rg grid (nz x nr)

  OUTPUTS:
    psilc = flux on LCFS (if found; otherwise last surface found)
    isclosed = flag to identify if psilc corr to closed surface

  RESTRICTIONS:

  METHOD:
    If fails to find closed contour, psilc = max of flux on limiter

Dependencies