make_fluct_JETliketest

PURPOSE ^

SYNOPSIS ^

function [] = make_fluct_JETliketest

DESCRIPTION ^

 Parameters for testing the effect 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
0002 %
0003 % Parameters for testing the effect 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_ne1ne3';%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','ne'};%Type of fluctuations or modulations ('ne': electron density, 'B': magnetic field) {1,nfluct_types}
0024 fluctuations.naequilp.fluct.model = [1,3];%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) -> 2-D Gaussian drift-wave like model local (rho,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.3,0.1];%Maximum value of the relative fluctuations variance at the poloidal angle theta = 0 [1,nfluct_types]
0033 fluctuations.naequilp.fluct.sigmar_hwhm = [0.2,0.3];%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,1];%Radial location where the relative fluctuations variance peaks at the poloidal angle theta = 0 [1,nfluct_types]
0035 fluctuations.naequilp.fluct.polmode = [0.2,1];%HFS/LFS relative fluctuations variance ratio. No poloidal dependency corresponds to 1 [1,nfluct_types]
0036 %
0037 fluctuations.naequilp.fluct.epsi_rho = [0.02,0.03];%
0038 fluctuations.naequilp.fluct.epsi_theta = [0.02,0.03];%theta direction is perp direction for models 3 & 4
0039 fluctuations.naequilp.fluct.epsi_phi = [0.02,0.03];%useless for models 3 & 4
0040 %
0041 fluctuations.naequilp.fluct.lmin = [1,1];%
0042 fluctuations.naequilp.fluct.mmin = [1,1];%for perp direction for models 3 & 4
0043 fluctuations.naequilp.fluct.nmin = [1,1];%useless for models 3 & 4
0044 %
0045 fluctuations.naequilp.fluct.lmax = [10,20];%
0046 fluctuations.naequilp.fluct.mmax = [30,40];%for perp direction for models 3 & 4
0047 fluctuations.naequilp.fluct.nmax = [20,25];%useless for models 3 & 4
0048 %
0049 % Magnetic field fluctuations
0050 %
0051 %struct_B.type = 'B';%Type of fluctuations or modulations [1,1]
0052 %struct_B.model = [1,1];%Statistical Bperp fluctuation model (>= 1) : [1,nfluct_types]
0053                         %    - (1) -> 3-D Gaussian model (rho,theta,phi), relative epsi values (benchmark of C3PO)
0054                         %    - (2) -> 3-D Gaussian model (rho,theta,phi), absolute epsi values (m)
0055                         %    - (3) -> 2-D Gaussian drift-wave like model global (rho,theta), absolute epsi values (m)
0056                         %    - (4) -> 2-D Gaussian drift-wave like model local (rho,theta), absolute epsi values (m)
0057 %struct_B.sigmar_max = [5e-3,1e-4];%Maximum value of the relative Bperp fluctuations variance at the poloidal angle theta = 0 [1,nfluct_types]
0058 %struct_B.sigmar_hwhm = [0.3,0.2];%Radial half width at half maximum of the relative Bperp fluctuations variance at the poloidal angle theta = 0 [1,nfluct_types]
0059 %struct_B.sigmar_rho = [0,1];%Radial location where the relative Bperp fluctuations variance peaks at the poloidal angle theta = 0 [1,nfluct_types]
0060 %struct_B.polmode = [1,0.3];%HFS/LFS relative Bperp fluctuations variance ratio. No poloidal dependency corresponds to 1 [1,nfluct_types]
0061 %
0062 %struct_B.epsi_prho = [0.2,1];%
0063 %struct_B.epsi_theta = [0.2,1];%
0064 %struct_B.epsi_phi = [0.2,1];%
0065 %
0066 %struct_B.n_rho = [10,20];%
0067 %struct_B.n_theta = [30,40];%
0068 %struct_B.n_phi = [20,25];%
0069 %
0070 %struct_B.kperpc = [300,200];%Inverse of the correlation length of Bperp fluctuations perpendicular to the magnetic field (ap^(-1) unit) [1,nfluct_types]
0071 %struct_B.kperpref = [0,0];%Bperp fluctuations reference perpendicular wave vector with respect to the local magnetic field direction (ap^(-1) unit) [1,nfluct_types]
0072 %struct_B.raperp = [0.01,0.01];%Minimum relative amplitude considered in the Fourier series expansion [1,nfluct_types]
0073 %struct_B.nkperp = [300,200];%Number of points for describing the kperp power spectrum (odd number) [1,nfluct_types]
0074 %
0075 %  Magnetic field ripple
0076 %
0077 id_ripple = '';%'rippletest';%Name of the machine
0078 %
0079 % -------------------------------------------------------------------------
0080 %
0081 % Load structures
0082 %
0083 if exist('id_ripple') && ~isempty(id_ripple),
0084     if ~isempty(id_ripple),
0085         [equil,ripple] = load_structures_yp('equil',id_equil,path_equil,'ripple',id_ripple,'');
0086         fluctuations.naequilp.ripple = ripple;
0087     else
0088         [equil] = load_structures_yp('equil',id_equil,path_equil);
0089     end
0090 else
0091     [equil] = load_structures_yp('equil',id_equil,path_equil);  
0092 end
0093 %
0094 [fluct] = fluctstruct_yp(equil,id_fluct,fluctuations);
0095 %
0096 % Data saving
0097 %
0098 if isempty(id_fluct),
0099     save_str = ['FLUCT_',id_equil,'.mat'];
0100 else
0101     save_str = ['FLUCT_',id_equil,'_',id_fluct,'.mat'];
0102 end
0103 eval(['save ',save_str,' fluct']);
0104 %
0105 info_dke_yp(2,'Fluctuations structure saved');
0106 %
0107 % load('../EQUIL/EQUILV_JETliketest.mat');
0108 %
0109 % [fluct] = fluctphase_yp(fluct,0);%Mersenne-Twitter pseudorandom generator -> 0, Matlab rand (reset by clock) -> 1
0110 % [fluct_fit] = fitfluct_yp(fluct,1,'spline');
0111 % testfitfluct_yp(equil_fit,fluct,fluct_fit,0.8);
0112

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