MREfun.m
USAGE: dwdt = MREfun(eq2d,w,j_eccd,fwhm_eccd,misalignment,toroidal_angle)
PURPOSE: Calculate dw/dt from Modified Rutherford Equation
INPUTS: eq2d, structure with 2-D equilibrium inputs:
q, safety factor at NTM-resonant surface (e.g. 2/1 or 3/2)
dqdR, dq/dR at q-surface
delta_prime0, delta_prime at q-surface before ECCD is applied
tau_R, resistive time at q-surface [sec]
j_tot, total current density at q-surface
j_boot, bootstrap current density at q-surface
wmarg, marginal island size (2*ion banana width)
Rqmin, minimum major radius of q-surface
Rqmax, maximum major radius of q-surface
w, full width of NTM
j_eccd, peak ECCD density (Gaussian profile)
fwhm_eccd, Full Width at Half Maximum of ECCD
misalignment, offset between ECCD peak and q-surface (default 0)
toroidal_angle, toroidal angle where ECCD is deposited from 0=O to 180=X,
if omitted an average dw/dt is calculated for continuous ECCD on rotating NTM
if == 'O' then O-point modulation with 50 duty cycle is used
if == 'X' then X-point modulation with 50 duty cycle is used
j_tot, j_boot, j_eccd must all be same units (j_tot=1 is an example)
All lengths including 1/delta_prime0 and 1/dqdR in same units [m]
Inputs can be any mix of *one* size [n1,n2] and size [1,1]
eq2d must be size [1,1] but its fields can be size [n1,n2] or [1,1]
OUTPUTS: dw/dt, rate of change of island width [m/s]
METHOD: MRE from Nucl Fusion 49, (2009) 045005, Prospects for..
Dependencies