0001
0002
0003
0004
0005
0006 clear all
0007 close all
0008
0009
0010
0011 basestr ='ITER';
0012
0013 signs.Ip = 1;
0014 signs.Bt = 1;
0015
0016
0017
0018 id_dkepath = '';
0019 path_dkepath = '';
0020
0021 [dkepath] = load_structures_yp('dkepath',id_dkepath,path_dkepath);
0022
0023
0024
0025 id_equil = 'Scen4';
0026 source_path = 'Source_files/';
0027
0028 eqdsk_file = [id_equil,'.efit'];
0029 eqdsk_path = source_path;
0030
0031 profname = [eqdsk_path,id_equil,'.prof'];
0032 type = 0.2;
0033 Zeff = NaN;
0034
0035 display_mode = 0;
0036 p_opt = -1;
0037 dispname = 'ITER Scenario 4';
0038 savename = 'ITER_Scen4';
0039
0040
0041
0042 opt.sfac = 10;
0043 opt.axenforce = true;
0044
0045
0046
0047 [equil_magnetic,mrho,mspsin,mspsinT,mp_magnetic] = equil_magnetic_EFIT_jd([eqdsk_path,eqdsk_file],display_mode,p_opt,dispname,savename,opt);
0048 equil_prof = equil_prof_jd(profname,type,mrho,mspsin,mspsinT,display_mode,p_opt,dispname,savename,Zeff);
0049
0050
0051
0052 if signs.Ip*equil_magnetic.psi_apRp(end) < 0,
0053 equil_magnetic.psi_apRp = -equil_magnetic.psi_apRp;
0054 equil_magnetic.ptBx = -equil_magnetic.ptBx;
0055 equil_magnetic.ptBy = -equil_magnetic.ptBy;
0056 end
0057
0058 if signs.Bt*equil_magnetic.ptBPHI(1,1) < 0,
0059 equil_magnetic.ptBPHI = -equil_magnetic.ptBPHI;
0060 end
0061
0062 equil = conc_struct_jd(equil_magnetic,equil_prof);
0063
0064 equil.signs = signs;
0065 equil.id = [basestr,'_',id_equil];
0066
0067 savestr = ['EQUIL_',equil.id];
0068 save(savestr,'equil');
0069 disp(['equilibrium saved in file ',savestr,'.'])