Skip to content

calc_x.m

Basic Information

  USAGE: [xresp,x,bresp,b,xtarget] = calc_x(xtarget,tok_data_struct,resp,eq,idoplot)

  PURPOSE: Find x-points and responses thereof *in vicinity of* specified target points
           and also return Br, Bz and their responses *at* specified target points.

  INPUTS: xtarget: specification on the form [r z] where r and z are column vectors
                   of approximate or target x-point locations.
                   If xtarget is empty, the default is bottom and top of boundary.
  tok_data_struct: toksys description of tokamak
             resp: (optional) the output from a response model (gspert or rzrig)
               eq: equilibrium structure
          idoplot: flag to plot limiter, boundary, xtarget points and x-points

  OUTPUTS: xresp: response structure with fields:
                  drxdis: rx response to conductors [m/A]
                  dzxdis: zx response to conductors [m/A]
                  drxdip,*dli,*dbetap, etc: exogenous responses
               x: the x-points on form [rx zx] found near xtarget points
           bresp: response structure with fields:
                  dbrdis: br response at points xtarget to conductors [T/A]
                  dbzdis: bz response at points xtarget to conductors [T/A]
                  dbrdip,*dli,*dbetap, etc: exogenous responses
               b: The fields at xtarget points on the form [br bz]
         xtarget: Target location for x-points (same as input if input is not empty)

Dependencies