This function sets - and possibly modifies - LUKE parameters when called from METIS by J. Decker and J.-F. Artaud, 02/02/2011
0001 function lukeparam = make_lukeparam_metis2luke(cons,option,auto_mode) 0002 % 0003 % This function sets - and possibly modifies - LUKE parameters when called 0004 % from METIS 0005 % 0006 % by J. Decker and J.-F. Artaud, 02/02/2011 0007 % 0008 0009 % 0010 % LUKE base parameters 0011 % 0012 dkeparam = load_structures_yp('dkeparam','LH_RT','');% LH type parameters 0013 dkeparam = rmfield(dkeparam,'n_rf_list');%determined from waves 0014 % 0015 % LUKE equilibrium parameters 0016 % 0017 equilparam.nbpx = 101;% number of points in interpolated radial grid (enter 0 if no interpolation) 0018 equilparam.mode = 'standard';% interpolation mode : linear in "standard" (xli), "sqrt(psi)", or "psi" 0019 equilparam.expo = option.morphing;% exposant de la fonction de morphing 0020 equilparam.comp = false;%control of equilibrium moments reconstructed from LUKE 0021 if isfield(option,'luke_helena'), 0022 equilparam.helena = option.luke_helena; 0023 else 0024 equilparam.helena = 0; 0025 end 0026 if isfield(option,'bsigne'), 0027 equilparam.bsigne = option.bsigne; 0028 else 0029 equilparam.bsigne = 1; 0030 end 0031 % 0032 % LUKE LH parameters 0033 % 0034 lhparam.freqlh = option.freqlh;% wave frequency (GHz) [1,1] 0035 lhparam.plh = cons.plh;% wave power (W) [1,1] 0036 lhparam.npar0 = option.npar0;% wave initial index of refraction [1,1] 0037 % 0038 lhparam.mode = 1;% LUKE LH mode : (0) simple v1, v2, D model, (1) C3PO with ideal antenna, (2) C3PO with prescribed antenna 0039 lhparam.plhmin = 1e4;%minimum power level to use wave in LUKE 0040 % 0041 lhparam.directivity = 0.7;% spectrum directivity [1,1] 0042 lhparam.lob = true;% include opposite lobe [1,1] boolean 0043 lhparam.dnpar0 = 0.2;%initial spectral width [1,1] 0044 lhparam.z0 = 0;%initial vertical positions [1,nz] 0045 lhparam.m0 = 0;%initial poloidal mode number [1,1] 0046 lhparam.phi0 = 0;%toroidal angle position [1,1] 0047 lhparam.i_ref = -1;%Initial radial position index [1,1] 0048 lhparam.LFS = 1;% (-1) high field side launching, (1) low field side launching [1,1] 0049 lhparam.mmode = -1;% (-1) for slow wave, (1) for fast wave 0050 lhparam.a_sdNpar = 0;% spectral broadening factor [1,1] 0051 lhparam.nparp = 0;% initial spectral upshift [1,1] 0052 % 0053 % LUKE EC parameters 0054 % 0055 ecparam.freqec = -1;% wave frequency (GHz) [1,1] (if negative integer = harmonic number, determined from torangle, xec and polec) 0056 ecparam.alpha_L = NaN;% Toroidal launching angle (degrees) [1,1] (if NaN, determined from freqec, xec and polec, or 30° if freqec=NaN) 0057 % 0058 ecparam.pec = cons.pecrh;% wave power (W) [1,1] 0059 ecparam.xec = cons.xece;% radial location of ECRH deposition 0060 ecparam.polec = option.angle_ece;%poloidal location of ECRH deposition, (degrees) (if NaN, determined from freqec, xec and torangle) 0061 % 0062 ecparam.pabs = 1.5;%momentum at absorption (for Doppler shift) 0063 % 0064 ecparam.mode = 1;% LUKE LH mode : (1) C3PO with ideal launcher, (2) C3PO with prescribed launcher 0065 ecparam.pecmin = 1e4;%minimum power level to use wave in LUKE 0066 % 0067 ecparam.dnpar0 = 0.05;%initial spectral width [1,1] 0068 ecparam.phi0 = 0;%toroidal angle launching position [1,1] 0069 ecparam.mmode = -1;% (-1) for O mode (1) for X mode 0070 ecparam.ns = 1000; 0071 ecparam.method = 'spline'; 0072 % 0073 % LUKE radial transport parameters 0074 % 0075 transpfaste.id = 'ES_0'; 0076 % 0077 transpfaste.Dr0 = 0;%Core radial diffusion coefficient (m^2/s) 0078 transpfaste.Dr_model = 0;%Radial diffusion type: (0) no vpar dependence, (1) magnetic turbulence model (vpar/vth), 0079 transpfaste.pDr = 0;%Coefficient for the Dr radial profile 0080 transpfaste.Vr0 = 0;%Core radial pinch coefficient (m/s) 0081 transpfaste.Vr_model = 0;%Radial pinch type: (0) no vpar dependence, (1) magnetic turbulence model (vpar/vth), 0082 transpfaste.pVr = 0;%Coefficient for the Vr radial profile 0083 transpfaste.vparmin = 3.5;%Lower limit of the parallel velocity dependence of the radial diffusion and pinch (vth_ref or vth) 0084 transpfaste.norm_ref = 1;%Normalization procedure for the lower limit of radial transport parallel velocity dependence: (0) from local values Te and ne, (1) from reference values Te_ref and ne_ref 0085 % 0086 if isfield(option,'luke_mode'), 0087 lukeparam.luke_mode = option.luke_mode;% (0) run LUKE, (1) run LUKE then save output (2) save input then exit 0088 else 0089 lukeparam.luke_mode = 0;% (0) run LUKE, (1) run LUKE then save output (2) save input then exit 0090 end 0091 lukeparam.batch_mode = 1;% (0) run LUKE in interactive mode, (1) run LUKE in batch mode 0092 % 0093 lukeparam.display_mode = 0; 0094 lukeparam.rho_display = 0.5; 0095 % 0096 lukeparam.dkeparam = dkeparam; 0097 lukeparam.equilparam = equilparam; 0098 lukeparam.lhparam = lhparam; 0099 lukeparam.ecparam = ecparam; 0100 lukeparam.transpfaste = transpfaste; 0101 % 0102 if ~auto_mode, 0103 % lukeparam = imod_struct_jd(lukeparam,'lukeparam',1,1); 0104 end 0105 % 0106 0107 0108 0109 0110 0111 0112