make_wavelaunchs_cronos_ec

PURPOSE ^

SYNOPSIS ^

function [launchs] = make_wavelaunchs_cronos_ec(equil,par,cons)

DESCRIPTION ^

 Create the structure launch for EC waves for LUKE in CRONOS

 by J. Decker <joan.decker@cea.fr> (CEA-DRFC) and Y.Peysson <yves.peysson@cea.fr> (CEA-DRFC)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [launchs] = make_wavelaunchs_cronos_ec(equil,par,cons)
0002 %
0003 % Create the structure launch for EC waves for LUKE in CRONOS
0004 %
0005 % by J. Decker <joan.decker@cea.fr> (CEA-DRFC) and Y.Peysson <yves.peysson@cea.fr> (CEA-DRFC)
0006 %
0007 if isempty(cons),
0008     launchs = cell(0,1);
0009     return
0010 end
0011 if sum(cons) == 0
0012     launchs = cell(0,1);
0013     return
0014 end
0015 %
0016 si = sign(equil.psi_apRp(end));%sign of Iphi
0017 %
0018 if isfield(par,'freq_ghz')
0019   nw = length(par.freq_ghz);%number of EC beams
0020 else
0021   nw = [];
0022 end
0023 %
0024 % parameters for free space ray propagation towards first closed FS
0025 %
0026 ns = 1000;
0027 method = 'cubic';
0028 %
0029 % one launch for each beam
0030 %
0031 dNpar0 = 0.05;%!!!!!! for now. calculation as a function of gaussian beam properties under way.
0032 %
0033 for iw = 1:nw,
0034     %
0035     launch.id = num2str(iw);
0036     launch.type = 'EC';
0037     launch.omega_rf = par.freq_ghz(iw)*2*pi*1e9;
0038     launch.ns = ns;
0039     launch.method = method;
0040     %
0041     launch.yP_L = abs(cons(iw));
0042     launch.yR_L = par.rant(iw);
0043     launch.yZ_L = par.zant(iw);
0044     launch.yphi_L = 0;
0045     %
0046     if par.angle_var(iw) == 1,
0047         %
0048         angle_mul  = angle(cons(iw));
0049         angle_tor = fix(abs(angle_mul) .* 1e7) .* 1e-4 - 360;
0050         angle_pol = (abs(angle_mul) .* 1e7 - fix(abs(angle_mul) .* 1e7)) .* 1e3 - 360;
0051         %
0052     else
0053         %
0054         angle_pol = par.angle_pol(iw);
0055         angle_tor = par.angle_tor(iw);
0056         %
0057     end
0058     %
0059     angle_tor_t = atand(tand(angle_tor)/cosd(angle_pol)) + 180*sign(angle_tor)*(abs(angle_pol) > 90);
0060     angle_pol_t = asind(cosd(angle_tor)*sind(angle_pol));
0061     %
0062     launch.yalpha_L = pi - si*angle_tor_t*pi/180;% angle_tor>0 for co-current
0063     if launch.yalpha_L > pi,
0064         launch.yalpha_L = launch.yalpha_L -2*pi;
0065     end
0066     %
0067     launch.ybeta_L = pi/2 - angle_pol_t*pi/180;
0068     %
0069     launch.mmode = -1^(par.modpolar(iw) == 2);%(1) for X mode
0070     launch.dNpar0 = dNpar0;
0071     launch.a_sdNpar = 0.0;%NO Spectral broadening for EC WAVES
0072     %
0073     launchs{iw} = launch;
0074 end
0075 %

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.