rundke_ITER_Scen4_C3PO_f5_N2_dN0p2

PURPOSE ^

Script for running LUKE

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Script for running LUKE

 This script is automatically generated by irunluke_jd.
 by J. Decker (joan.decker@cea.fr) and Y. Peysson (yves.peysson@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Script for running LUKE
0002 %
0003 % This script is automatically generated by irunluke_jd.
0004 % by J. Decker (joan.decker@cea.fr) and Y. Peysson (yves.peysson@cea.fr)
0005 %
0006 clear all
0007 clear mex
0008 clear functions
0009 close all
0010 warning('off','all')
0011 pause(1)
0012 %
0013 % remote computing parameters
0014 %
0015 remnum = 0;% remote profile number. Use 0 for local sequential calculations
0016 remtimout = 0;% timeout for remote calculations, in minutes. Use (0) to return later and check results by running this script again
0017 rempause = 1;% pause between job checks (in minutes) (only for remtimout > 0)
0018 remdebugmode = 0;% debug mode (0) off (1) on
0019 remclean = 2;% clean job files/folders : both on remote and local (2), only on remote (1) or not at all (0)
0020 %
0021 % distributed computing parameters
0022 %
0023 mdce_mode_coll_dke_jd = 0;% mdce mode for wave_solver_yp : (0) none (1) jobs (2) dcluke (3) parfor (-remnum) remote on profile remnum
0024 mdce_mode_eecoll_dke_yp = 0;% mdce mode for wave_solver_yp : (0) none (1) jobs (2) dcluke (3) parfor (-remnum) remote on profile remnum
0025 mdce_mode_rfdiff_dke_jd = 0;% mdce mode for rfdiff_dke_jd  : (0) none (1) jobs (2) dcluke (3) parfor (-remnum) remote on profile remnum
0026 mdce_mode_wave_solver_yp = 0;% mdce mode for wave_solver_yp : (0) none (1) jobs (2) dcluke (3) parfor (-remnum) remote on profile remnum
0027 mdce_mode_main_C3PO_jd = 0;% mdce mode for main_C3PO_jd : (0) none (1) jobs (2) dcluke (3) parfor (-remnum) remote on profile remnum
0028 %
0029 % backup & save options
0030 %
0031 opt.save = 1;% (1): save LUKE_RESULTS or return error (0): return results or error
0032 opt.fields = NaN;% selected fields in returned lukestructs. Use NaN for all fields
0033 opt.backup = 0;% (1) save fluctuation time steps (0) do not save
0034 opt.waves = 0;% (1) save waves at each time step (0) do not save
0035 %
0036 % *********************** Specify LUKE structures *****************************
0037 %
0038 locid_simul = '';%Simulation ID
0039 path_simul = '';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0040 %
0041 id_dkepath = '';%For all paths used by DKE solver
0042 path_dkepath = '';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0043 %
0044 id_equil = 'ITER_Scen4';%For plasma equilibrium
0045 path_equil = 'EQUIL/';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0046 %
0047 id_dkeparam = 'LH_RT';%For DKE code parameters
0048 path_dkeparam = '';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0049 %
0050 id_rtparam = 'LH';%For C3PO code parameters
0051 path_rtparam = '';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0052 %
0053 id_dkedisplay = 'NO_DISPLAY';%For output code display
0054 path_dkedisplay = '';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0055 %
0056 %************************************************************************************************************************************
0057 %
0058 % LAUNCH parameters
0059 %
0060 launch.id = 'f5_N2_dN0.2';
0061 launch.type = 'LH';
0062 launch.omega_rf = 2*pi*5e9;
0063 launch.bPlhtot = [14,6]*1e6;
0064 launch.bNpar0 = [-2,4];
0065 launch.bdNpar0 = [0.2,0.8];
0066 launch.rZ0 = [0.15,1.15];
0067 launch.m0 = 0;
0068 launch.phi0 = 0;
0069 launch.LFS = 1;
0070 %
0071 %************************************************************************************************************************************
0072 %
0073 % SPECIFIC C3PO PARAMETERS
0074 %
0075 %   C3PO Equilibrium parameters
0076 %
0077 fitparam.method = 'spline';%nearest,spline,pchip,cubic
0078 fitparam.nharm = 32;%default value has since been changed to 64
0079 %
0080 %     C3PO ray-tracing parameters
0081 %
0082 rayparam.colldamp = 0;%non-resonant collisional damping -> (1) actived (default), (0) not activated
0083 %
0084 %   C3PO Wave parameters
0085 %
0086 waveparam.dsmin = 0;%minimum size for ray fragments
0087 %
0088 %   C3PO Display parameters
0089 %
0090 C3POdisplay = struct;
0091 %
0092 %     C3PO computing parameters
0093 %
0094 C3POparam.clustermode.main_C3PO_jd.scheduler.mode = mdce_mode_main_C3PO_jd;%MatLab distributed computing environment disabled (0), enabled with the dedicated toolbox (1), enabled with a private method (2) for the function coll_dke_jd.m (MDC toolbox must be installed for option 1)
0095 %
0096 %************************************************************************************************************************************
0097 %
0098 [dkepath,equil,dkeparam,rtparam,dkedisplay] = load_structures_yp('dkepath',id_dkepath,path_dkepath,'equil',id_equil,path_equil,'dkeparam',id_dkeparam,path_dkeparam,'rtparam',id_rtparam,path_rtparam,'dkedisplay',id_dkedisplay,path_dkedisplay);
0099 %
0100 %************************************************************************************************************************************
0101 %
0102 dkeparam.clustermode.coll_dke_jd.scheduler.mode = mdce_mode_coll_dke_jd;%MatLab distributed computing environment disabled (0), enabled with the dedicated toolbox (1), enabled with a private method (2) for the function coll_dke_jd.m (MDC toolbox must be installed for option 1)
0103 dkeparam.clustermode.eecoll_dke_yp.scheduler.mode = mdce_mode_eecoll_dke_yp;%MatLab distributed computing environment disabled (0), enabled with the dedicated toolbox (1), enabled with a private method (2) for the function coll_dke_jd.m (MDC toolbox must be installed for option 1)
0104 dkeparam.clustermode.wave_solver_yp.scheduler.mode = mdce_mode_wave_solver_yp;%MatLab distributed computing environment disabled (0), enabled with the dedicated toolbox (1), enabled with a private method (2) for the function coll_dke_jd.m (MDC toolbox must be installed for option 1)
0105 dkeparam.clustermode.rfdiff_dke_jd.scheduler.mode = mdce_mode_rfdiff_dke_jd;%MatLab distributed computing environment disabled (0), enabled with the dedicated toolbox (1), enabled with a private method (2) for the function coll_dke_jd.m (MDC toolbox must be installed for option 1)
0106 %
0107 % wavestruct
0108 %
0109 fitparam = conc_struct_jd(rtparam.fitparam,fitparam);
0110 rayparam = conc_struct_jd(rtparam.rayparam,rayparam);
0111 waveparam = conc_struct_jd(rtparam.waveparam,waveparam);
0112 C3POdisplay = conc_struct_jd(rtparam.C3POdisplay,C3POdisplay);
0113 C3POparam = conc_struct_jd(rtparam.C3POparam,C3POparam);
0114 %
0115 wavestruct.wavesolver = 'C3PO';
0116 wavestruct.launch = launch;
0117 wavestruct.id = [wavestruct.wavesolver,'_',wavestruct.launch.id];
0118 wavestruct.fitequilparam = fitparam;
0119 wavestruct.rayparam = rayparam;
0120 wavestruct.waveparam = waveparam;
0121 wavestruct.raydisplay = C3POdisplay;
0122 wavestruct.C3POparam = C3POparam;
0123 %
0124 wavestructs = {wavestruct};
0125 %
0126 %************************************************************************************************************************************
0127 %
0128 simul.id = make_luke_simulid_jd(equil,'','','','',wavestructs,locid_simul);
0129 simul.path = path_simul;
0130 %
0131 %************************************************************************************************************************************
0132 %
0133 lukestruct.simul = simul;
0134 lukestruct.equil = equil;
0135 lukestruct.dkeparam = dkeparam;
0136 lukestruct.dkedisplay = dkedisplay;
0137 lukestruct.wavestructs = wavestructs;
0138 lukestruct.opt = opt;
0139 %
0140 dkepath.remnum = remnum;
0141 dkepath.remtimout = remtimout;
0142 dkepath.rempause = rempause;
0143 dkepath.debugmode = remdebugmode;
0144 dkepath.clean = remclean;
0145 %
0146 lukestructs = run_lukert({lukestruct},dkepath);
0147 %
0148 %************************************************************************************************************************************
0149 %
0150 % ---------------------------------------------- Save batch results ----------------------------------------------
0151 %
0152 % Note : if opt.save = 0, results or jobs are saved in file LUKE_BATCH_...
0153 %
0154 % To process and save individual LUKE_RESULTS files, use :
0155 % >> completed_jobs = load_batch_jd('LUKE_BATCH_....mat')
0156 %
0157 % If not all jobs are completed, use again with :
0158 % >> completed_jobs = load_batch_jd('LUKE_BATCH_....mat',completed_jobs)
0159 %
0160 if opt.save == 0,
0161     save_batch_jd(lukestructs,dkepath,simul.id)
0162 end
0163 %
0164 % process results if available
0165 %
0166 if remnum == 0 || remtimout > 0,% results are returned
0167     opt.ir_display = 0;
0168     opt.rho = 'g';
0169     opt.peakmode = 0;
0170     opt.peak = 'n';
0171     opt.wave = 'n';
0172     opt.spec = 0;
0173     opt.diaryname = ['res_',lukestructs{1}.simul.id,'.log'];
0174     %
0175     proc_luke_jd(lukestructs{1}.output,opt);
0176 end
0177

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