EAST_ALOHA_scenario_4dot60GHz

PURPOSE ^

ALOHA scenario example

SYNOPSIS ^

function scenario = scenario_example

DESCRIPTION ^

 ALOHA scenario example
 VERSION : 1.5 (20/09/2011)
 
 This file is a function which create an ALOHA scenario.

 All the parameters needed by ALOHA to make a run are stored inside
 this file, except the antenna description. All the parameters are detailled below.
 
 This function returns a matlab stucture "scenario" which contains all the parameters
 used in ALOHA. This structure is used an input argument of the "aloha_scenario"
 functiion. Once its calculation done, ALOHA returns a similar structure "scenrio"
 which contains the results in addition (in the field scenario.results). 

 
  INPUT: none
  
  OUPUT: 
   - scenario <structure>: ALOHA scenario
 
 AUTHOR:JH

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function scenario = scenario_example 
0002 % ALOHA scenario example
0003 % VERSION : 1.5 (20/09/2011)
0004 %
0005 % This file is a function which create an ALOHA scenario.
0006 %
0007 % All the parameters needed by ALOHA to make a run are stored inside
0008 % this file, except the antenna description. All the parameters are detailled below.
0009 %
0010 % This function returns a matlab stucture "scenario" which contains all the parameters
0011 % used in ALOHA. This structure is used an input argument of the "aloha_scenario"
0012 % functiion. Once its calculation done, ALOHA returns a similar structure "scenrio"
0013 % which contains the results in addition (in the field scenario.results).
0014 %
0015 %
0016 %  INPUT: none
0017 %
0018 %  OUPUT:
0019 %   - scenario <structure>: ALOHA scenario
0020 %
0021 % AUTHOR:JH
0022 
0023 % ##################################################################
0024 %  RESULTS SAVING
0025 % ##################################################################
0026 % Automatic saving of the scenario (once calculated) ?
0027 options.bool_save = false;
0028 % matlab result filename
0029 % (avoid spaces if possible)
0030 options.scenario_filename = ''; 
0031 % Commentaire sur le scenario
0032 options.comment = [''];
0033 
0034 % ==================================================================
0035 %  ANTENNA DESCRIPTION
0036 % ==================================================================
0037 
0038 %% #####################
0039 % antenna architecture:
0040 %  'antenne_C2', 'antenne_C3', 'antenne_C4' ...
0041 %  Ces valeurs correspondent aux noms des fichiers disponibles dans
0042 %  le dossier 'achitecture_antenne'.
0043 %
0044 antenna.architecture = 'EAST_antenna_4dot60GHz';      
0045 
0046 %% #####################
0047 % Antenna excitation
0048 %
0049 
0050 % source frequency [Hz]
0051 %
0052 antenna.freq = 4.6e9;
0053 
0054 % Use Tore Supra data ? true/false
0055 %
0056 % - true : on dispose de mesures reelles
0057 % - false : on utilise les valeurs predefinies (dans aloha_antenna_excitation)
0058 %
0059 options.bool_mesure = false;    
0060 
0061 % Use a predefenite excitation (true)
0062 % or a user excitation (false) [only if bool_mesure = false]
0063 options.bool_homeMadeExcitation = true;
0064 
0065 % User-made excitation.
0066 % [only if bool_homeMadeExcitation = true & bool_mesure = false]
0067 %
0068 % Warning : the length of the array must be correct
0069 % in respect to the number of module of your antenna !
0070 % help aloha_antenna_excitation for some examples
0071 antenna.a_ampl = sqrt(100e3)*ones(6,1);
0072 antenna.a_phase = -90*(pi/180)*(0:5)';
0073 
0074 
0075 % [bool_mesure=true only]
0076 % Quel queusot doit-on utiliser pour fournir les informations d'excitation des antennes ?
0077 % Which Tore Supra port should we use for feeding antenna input ?
0078 %
0079 % 'Q6A' [C2 before 2009, C3 after] ou 'Q6B' [C3 before 2009, C4 after]
0080 options.TSport = 'Q6B';   
0081 
0082 % [bool_mesure=true only]
0083 % numero du choc Tore Supra
0084 % Tore Supra pulse number
0085 options.choc = 45155; 
0086 
0087 % [bool_mesure=true only]
0088 % Temps debut et fin de lecture [s].
0089 % Les valeurs mesurees sont moyennees entre ces deux valeurs.
0090 % Start and stop times for averaging experimental data [s]
0091 options.tps_1 = 7; % s
0092 options.tps_2 = 8; % s
0093 
0094 
0095 
0096 % ==================================================================
0097 %   PLASMA DESCRIPTION
0098 % ==================================================================
0099 %% #####################
0100 % Modele d'ALOHA : '1D' ou '2D'
0101 options.version_code = '1D';
0102 
0103 %% #####################
0104 % Nombre de modes utilise pour decrire le champ dans les guides
0105 % (Modele electromagnetique 1D)
0106 %
0107 Nmh = 1;    % nbre de modes TE
0108 Nme = 2;    % nbre de modes TM
0109 
0110 %% #####################
0111 % Plasma model
0112 %
0113 %  --------- 1D (TEM/TM modes, slow wave only) ------------
0114 % version_plasma_1D = 3: 1 linear profile
0115 % version_plasma_1D = 6: 2 linear profiles + eventually a vacuum gap
0116 version_plasma_1D = 6;
0117 
0118 % --------- 2D (TE/TM modes, slow and fast waves) ------------
0119 % FORTRAN 90 version
0120 % version_plasma_2D = 1 : 1 gradient, FEM admittance
0121 %
0122 %
0123 % FORTRAN 77 versions [obsolete]
0124 % version_plasma_2D = 10 : 1 gradient. analytical admittance
0125 % version_plasma_2D = 20 : 1 gradient, FEM admittance
0126 % version_plasma_2D = 60 : 2 gradients, FEM admittance
0127 version_plasma_2D = 1;
0128 
0129 %% #####################
0130 % Should we use the same density profile for each rows of waveguides ?
0131 % [1D Plasma model ONLY]
0132 %
0133 % true  : each row has same density profile
0134 %       => ne0 and lambdas are scalar values. e.g. : ne0 = 0.2e18
0135 % false : each row has a distinct density profile
0136 %       => ne0 and lambdas are array. e.g. : ne0 = [0.2,0.4,0.2]*1e18
0137 % NB : the array length should be equal to the number of waveguide rows
0138 %
0139 options.bool_lignes_identiques = true;     
0140  
0141 %% #####################
0142 % Initial electron density of the first plasma layer [m^-3]
0143 %
0144 % Densite electronique minimale devant l'antenne (x=0). [m^-3]
0145 % Rappels :
0146 %  - densite de coupure 3.7GHz sur TS : 1.71e17 m^-3
0147 % Examples:
0148 plasma.ne0 = 1e18;
0149 
0150 
0151 %% #####################
0152 % Scrape-off length (lambda_n) of the first plasma layer [m]
0153 %
0154 % reminder: lambda_n = ne/grad_ne
0155 %
0156 % longueur de decroissance
0157 % pour la premiere couche de plasma en partant de l'antenne. [m]
0158 %
0159 % Example :
0160 plasma.lambda_n(1) = 2e-2; 
0161 
0162 
0163 %% #####################
0164 % Width of the first plasma layer [version_plasma_1D=6 only]. [m]
0165 %
0166 % Epaisseur de la premiere couche de plasma [version=6 only]. [m]
0167 %
0168 % Example : 2e-3 (2mm)
0169 plasma.d_couche = 2e-3;   
0170 
0171 %% #####################
0172 % Scrape-off length of the second plasma layer [m]
0173 %
0174 % longueur de decroissance
0175 % pour la deuxieme couche de plasma (version_plasma_1D=6). [m]
0176 %
0177 % Exemple :
0178 plasma.lambda_n(2) = 2e-2+plasma.d_couche; 
0179  
0180 
0181 
0182 %% #####################
0183 % Vacuum gap width between the antenna [m] (version_plasma_1D=6)
0184 % and the first layer of the plasma [m]
0185 %
0186 % Epaisseur de vide entre l'antenne et le plasma [m]
0187 plasma.d_vide = 0;
0188 %  plasma.d_vide = [0;0;0]*1e-3; % if bool_lignes_identiques = false
0189 
0190 %% ####################
0191 %  Intensite du champ magnetique devant l'antenne. [T]
0192 % [version_plasma_2D only]
0193 options.B0 = 2.95;        
0194 
0195 %% #####################
0196 % 2D or 3D normalization choice
0197 %
0198 % In SWAN, the waveguides were described as parallel plate waveguides (2D).
0199 % In ALOHA-1D, the waveguides are parallel plate waveguides (2D)
0200 % In ALOHA-2D, the waveguides are rectangular waveguides (3D).
0201 %
0202 % In order to be able to compare the Electric field amplitudes given
0203 % between ALOHA-1D and ALOHA-2D, one must renormalize the ALOHA-1D results
0204 % and to take into account the height of the waveguide ("a" parameter).
0205 %
0206 % Moreover, if one want to compare the scattering parameters given
0207 % by ALOHA-1D/2D and SWAN, the scattering parameters reference impedance is
0208 % not the same between the two codes. So a impedance renormalization if necessary.
0209 % (in SWAN, the ref impedance is the vaccuum impedance, while it is the rectangular
0210 % waveguide impedance in ALOHA)
0211 %
0212 % type_swan_aloha = 0:
0213 %  - SWAN reference impedance in S-parameters (parallel plate wg, TEM+TM mode)
0214 %  - Electric field does not depends of the height of the waveguide ("a")
0215 %    ALOHA-1D E-field should be of the same order than a 2D full wave simulation
0216 %
0217 % type_swan_aloha = 1: (default)
0218 %  - ALOHA reference impedance in S-parameters (rectangular waveguide, TE+TM modes)
0219 %  - Electric field depends of the waveguide height ("a").
0220 %    ALOHA-1D or ALOHA-2D E-field should be of the same order.
0221 options.type_swan_aloha = 1;
0222 
0223 
0224 % ==================================================================
0225 %   ALOHA options (true/false)
0226 % ==================================================================
0227 % display electronic density profile
0228 options.bool_display_density_profile = false;
0229 
0230 % N_parallel spectrum
0231 options.bool_compute_spectrum = true; % compute n// spectrum
0232 options.bool_display_spectrum = false; % display n// spectrum
0233 
0234 % Directivity
0235 % NB : The spectrum is needed to compute the directivity !
0236 options.bool_compute_directivity = true;
0237 options.bool_display_directivity = false;   
0238     
0239 % directivity definition :
0240 %  * definition_directivite=1 :
0241 %        D = (1/P)*int{nz=[+1,+inf]}(dP)
0242 %   This is the most usual definition : ratio of the positive part of the spectrum
0243 %   over total power. This results may be considered in percents.
0244 %
0245 %  * definition_directivite=2 :
0246 %       D = delta_cd = (1-R)*nz0^2/P*( int{nz=+1,+inf}(dP) - int{nz=-inf,-1}(dP))
0247 %  This is the 'weighted directivity' as defined in [Litaudon & Moreau, Nucl Fusion 30 (1990), 471]
0248 %  This directivity definition is based on the Fish current drive efficiency of the LH waves.
0249 %  It is a quantitative measure, based on the CD efficiency which decrease as 1/n//^2,
0250 %  and of the quality of the launched spectrum with regard to an ideal Dirac spectrum,
0251 %  centered on n//0.
0252 %
0253 %   * definition_directivite=3 :
0254 %       D = (1/P)*int{+1,+inf}(dP/nz^2);
0255 options.definition_directivite = 1; 
0256 
0257 % Compute and display the Efield in the waveguides at the mouth of the antenna
0258 options.bool_compute_total_field = false;       
0259 options.bool_display_total_field = false;
0260 
0261 % Compute and display the Efield inside the few mm of the plasma
0262 % The domain of calculation (a rectangle in front of the waveguides)
0263 % should be defined in the parameters below.
0264 options.bool_compute_plasma_field = false;
0265 options.bool_display_plasma_field = false;
0266 
0267 
0268 
0269 
0270 
0271 %  ==================================================================
0272 %  ==================================================================
0273 %  ==================================================================
0274 %
0275 %  DO NOT EDIT AFTER THIS LINE
0276 %  (unless you know what you are doing ! :)
0277 %
0278 %  ==================================================================
0279 %  ==================================================================
0280 %  ==================================================================
0281 
0282 % #####################
0283 % path to the main root of the ALOHA code
0284 if exist('aloha_utils_getRootPath') == 0
0285     disp('!!!! ERROR : the ALOHA functions are not registered into the MATLAB PATH !!!!');
0286     error('Please correct the previous error before restarting ALOHA. See INSTALL.m');
0287 else
0288     options.aloha_path = aloha_utils_getRootPath;
0289 end
0290 
0291 % #####################
0292 %  Debug mode option
0293 %  If true, display more informations.
0294 %
0295 options.bool_debug = false;
0296 
0297 % #####################
0298 % Plasma edge properties
0299 %
0300 % plasma electronic density model
0301 if options.version_code == '1D'
0302     plasma.version = version_plasma_1D;
0303 elseif options.version_code == '2D'
0304     plasma.version = version_plasma_2D;
0305 else 
0306     error('Bad defined variables : ''version_code''');
0307 end
0308 
0309 % gradient de la premiere couche de plasma
0310 plasma.dne(:,1) = plasma.ne0./plasma.lambda_n(:,1);   
0311 % gradient de densite couche ne2 [version=6 only]
0312 plasma.dne(:,2) = (1+plasma.d_couche./plasma.lambda_n(:,1)).*plasma.ne0./plasma.lambda_n(:,2);
0313 
0314 % EM modes
0315 options.modes = [Nmh, Nme]; 
0316 
0317 % #####################
0318 % Retrieve antenna excitation
0319 %
0320 % It depends on the choice the user made:
0321 %  - use a predefinite excitation
0322 %  - or use Tore Supra data
0323 %
0324 if (options.bool_mesure)
0325     [antenna.a_ampl, antenna.a_phase] = ...
0326         aloha_antenna_excitation(options.choc, options.tps_1, options.tps_2, options.TSport);
0327 else
0328     if not(options.bool_homeMadeExcitation) % predefinite excitation
0329         [antenna.a_ampl, antenna.a_phase] = ...
0330             aloha_antenna_excitation(antenna.architecture);
0331     end
0332 end
0333 
0334 
0335 
0336 
0337 %  %%%%%%%%%%%
0338 %  % Affiche le profile du plasma de bord.
0339 %  %
0340 %  % TODO
0341 %  if bool_display_density_profile
0342 %      switch(version)
0343 %          case 3
0344 %              figure; aloha_plotDensityProfile(ne0, lambda_n0);
0345 %          case 6
0346 %              figure; aloha_plotDensityProfile(ne0, lambda_n0, d_couche, lambda_n1);
0347 %      end
0348 %
0349 %      if bool_debug
0350 %          disp('Appuyez sur une touche pour continuer');
0351 %          pause
0352 %      end
0353 %  end
0354 
0355 % #####################
0356 % spectre computing parameters
0357 %
0358 % WARNING : depending of these parameter values,
0359 % aloha 2D may crash (seg fault). If it occurs,
0360 % increase the dnz or dny values or decrease nz_min/max, ny_min/max !
0361 % TODO : aloha 2D spectrum/nz,ny memory bug
0362 options.nz_min = -20;   % depart en nz
0363 options.nz_max = 20;        % arrivee en nz
0364 options.dnz = 0.01;     % pas en nz
0365 
0366 options.ny_min = -2;    % depart en ny
0367 options.ny_max = 2;     % arrivee en ny
0368 options.dny = 0.1;        % pas en ny
0369 
0370 % NB JH 01/2009 : compatibilite avec code 2D
0371 options.nbre_ny=(options.ny_max-options.ny_min)/options.dny;
0372 options.nbre_nz=(options.nz_max-options.nz_min)/options.dnz;  
0373 
0374 % ##################### TODO
0375 % trace du chp dans le plasma
0376 % (pour les versions 3 et 6)
0377 %
0378 options.z_coord_min = -0.015;       % coordonnees dans le plasma
0379 options.z_coord_max = 0.075;
0380 options.nbre_z_coord = 60;
0381 options.x_coord_max = 0.05;
0382 options.nbre_x_coord = 8;
0383 
0384 options.pas_nz_fig_plasma = 0.1;    % description du chp spatial e partir de la description spectrale
0385                         %     !! => periodisation du chp suivant z Tz=lambda/pas_nz
0386 options.fig_Ez_ou_EzHy = 1;     % description chp Ez ou vecteur de poynthing S = Ez.Hy* :  = 1 Ez  / = 0 Ez.Hy*
0387 options.lig_fig_plasma = 1;     % numero de la ligne
0388 
0389 %%%%%%%%%%%%%%%%%%%%%%%% making void structures in order to avoid bugs later in filling the structure...
0390 results.S_plasma = [];
0391 antenna_lh.setup = [];
0392 
0393 % #####################
0394 %  Creation du scenario
0395 %
0396 scenario = aloha_setfield([], plasma, antenna, options, results); 
0397 
0398 % Load the antenna structure into the scenario
0399 %
0400 % NB : in previous version of ALOHA, this was made inside the aloha_scenario function.
0401 % However, in order to allow batch on antenna's dimension, the antenne dimensions have
0402 % been inserted into the scenario : this must be done before aloha_scenario, thus here.
0403 scenario = aloha_setAntenna(scenario, antenna.architecture);

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