make_fluct_JETliketest_noripple

PURPOSE ^

SYNOPSIS ^

function [] = make_fluct_JETliketest_norippple

DESCRIPTION ^

 Parameters for testing the effect of fluctuations on ray trajectories

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [] = make_fluct_JETliketest_norippple
0002 %
0003 % Parameters for testing the effect of fluctuations on ray trajectories
0004 %
0005 % by Y. Peysson (DRFC/DSM/CEA) <yves.peysson@cea.fr> and J. Decker (DRFC/DSM/CEA) <joan.decker@cea.fr>
0006 %
0007 close all
0008 %
0009 id_fluct = 'noripple';%Plasma fluctuations identifier
0010 %
0011 % Path parameters
0012 %
0013 id_dkepath = '';%For all paths used by DKE solver
0014 path_dkepath = '';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0015 %
0016 % Equilibrium parameters
0017 %
0018 id_equil = 'JETliketest';%For plasma equilibrium
0019 path_equil = '../EQUIL/';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0020 %
0021 % Non axisymmetric perturbation of the toroidal MHD equilibrium for any rf waves
0022 %
0023 fluctuations.naequilp.fluct.type = {'ne'};%Type of fluctuations or modulations ('ne': electron density, 'B': magnetic field) {1,nfluct_types}
0024 fluctuations.naequilp.fluct.model = [1];%Statistical ne fluctuation model (>= 1) : [1,nfluct_types]
0025                         %    - (1) -> 3-D Gaussian model (rho,theta,phi), relative epsi values (benchmark of C3PO)
0026                         %    - (2) -> 3-D Gaussian model (rho,theta,phi), absolute epsi values (m)
0027                         %    - (3) -> 2-D Gaussian drift-wave like model global (rho,curtheta), absolute epsi values (m)
0028                         %    - (4) -> 1-D Gaussian drift-wave like model local (curtheta), absolute epsi values (m)
0029                         %    - (5) -> 1-D Gaussian drift-wave like model local (cn,cm), absolute epsi values (m)
0030                         %    - (6) -> 2-D Gaussian drift-wave like model local (rho,cn,cm), absolute epsi values (m)
0031                         %    - (7) -> *** NOT IMPLEMENTED *** 2-D Gaussian drift-wave like model local (rho,lperp), absolute epsi values (m)
0032 fluctuations.naequilp.fluct.sigmar_max = [0.7];%Maximum value of the relative fluctuations variance at the poloidal angle theta = 0 [1,nfluct_types]
0033 fluctuations.naequilp.fluct.sigmar_hwhm = [0.1];%Radial half width at half maximum of the relative fluctuations variance at the poloidal angle theta = 0 [1,nfluct_types]
0034 fluctuations.naequilp.fluct.sigmar_rho = [1];%Radial location where the relative fluctuations variance peaks at the poloidal angle theta = 0 [1,nfluct_types]
0035 fluctuations.naequilp.fluct.polmode = [0.0];%HFS/LFS relative fluctuations variance ratio. No poloidal dependency corresponds to 1 [1,nfluct_types]
0036 %
0037 fluctuations.naequilp.fluct.epsi_rho = [0.01];%
0038 fluctuations.naequilp.fluct.epsi_theta = [0.01];%theta direction is perp direction for models 3 & 4
0039 fluctuations.naequilp.fluct.epsi_phi = [0.2];%useless for models 3 & 4
0040 %
0041 fluctuations.naequilp.fluct.lmin = [1];%
0042 fluctuations.naequilp.fluct.mmin = [1];%for perp direction for models 3 & 4
0043 fluctuations.naequilp.fluct.nmin = [1];%useless for models 3 & 4
0044 %
0045 fluctuations.naequilp.fluct.lmax = [50];%
0046 fluctuations.naequilp.fluct.mmax = [50];%for perp direction for models 3 & 4
0047 fluctuations.naequilp.fluct.nmax = [5];%useless for models 3 & 4%
0048 %
0049 % Perturbation of the launched npar for the LH wave only (simulate possible diffraction of the LH wave in the SOL by edge density fluctuations)
0050 %
0051 fluctuations.npar0_lh.fluct.dtn = Inf;%Gaussian time correlation model, edge_dtn = 2.14*t_correlation (if edge_dtn is Inf, no fluctuations)
0052 fluctuations.npar0_lh.fluct.hwhm_npar = 0.1;%Gaussian distribution (if hwhm is NaN or empty, no fluctuations)
0053 %
0054 % -------------------------------------------------------------------------
0055 %
0056 % Load structures
0057 %
0058 if exist('id_ripple'),
0059     if ~isempty(id_ripple),
0060         [equil,ripple] = load_structures_yp('equil',id_equil,path_equil,'ripple',id_ripple,'');
0061         fluctuations.naequilp.ripple = ripple;
0062     else
0063         [equil] = load_structures_yp('equil',id_equil,path_equil);
0064     end
0065 else
0066     [equil] = load_structures_yp('equil',id_equil,path_equil);  
0067 end
0068 %
0069 [fluct] = fluctstruct_yp(equil,id_fluct,fluctuations);
0070 %
0071 % Data saving
0072 %
0073 if isempty(id_fluct),
0074     save_str = ['FLUCT_',id_equil,'.mat'];
0075 else
0076     save_str = ['FLUCT_',id_equil,'_',id_fluct,'.mat'];
0077 end
0078 eval(['save ',save_str,' fluct']);
0079 %
0080 info_dke_yp(2,'Fluctuations structure saved');
0081 %
0082 % load('../EQUIL/EQUILV_JETliketest.mat');
0083 %
0084 % [fluct] = fluctphase_yp(fluct,0);%Mersenne-Twitter pseudorandom generator -> 0, Matlab rand (reset by clock) -> 1
0085 % [fluct_fit] = fitfluct_yp(fluct);
0086 % testfitfluct_yp(equil_fit,fluct,fluct_fit,0.8);
0087 
0088

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