make_rayinit_RFP

PURPOSE ^

script make_rayinit_MST_400ka

SYNOPSIS ^

function [] = make_rayinit_RFP

DESCRIPTION ^

 script make_rayinit_MST_400ka

 Creates rayinit structure 

 WARNING: the definitions used in the DKE code, and here crucial for HXR calculations are the following
         1) the toroidal frame (R,Z,phi) is direct (phi is positive clockwise when the tokamak is seen from the top)
         2) the poloidal frame (r,theta,phi) is direct
         3) (psi,s,phi) must be direct : if Ip.phi > 0, then B.theta > 0 and psi > 0, and s.theta > 0 (s as the same direction of theta)
         4) the sign of psi is the sign of Ip.phi
 With the definitions above, if Ip is positive, psi is turned outward, Btheta is counterclockwise poloidally, and s too. The Ampere theorem is OK !


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


 WARNING: for simulations, the relative direction of the plasma current
 to the toroidal magnetic field must be specified, as well as if the RF
 wave is driving co or counter current.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [] = make_rayinit_RFP
0002 % script make_rayinit_MST_400ka
0003 %
0004 % Creates rayinit structure
0005 %
0006 % WARNING: the definitions used in the DKE code, and here crucial for HXR calculations are the following
0007 %         1) the toroidal frame (R,Z,phi) is direct (phi is positive clockwise when the tokamak is seen from the top)
0008 %         2) the poloidal frame (r,theta,phi) is direct
0009 %         3) (psi,s,phi) must be direct : if Ip.phi > 0, then B.theta > 0 and psi > 0, and s.theta > 0 (s as the same direction of theta)
0010 %         4) the sign of psi is the sign of Ip.phi
0011 % With the definitions above, if Ip is positive, psi is turned outward, Btheta is counterclockwise poloidally, and s too. The Ampere theorem is OK !
0012 %
0013 %
0014 % by Y. Peysson (DRFC/DSM/CEA) <yves.peysson@cea.fr> and J. Decker (DRFC/DSM/CEA) <joan.decker@cea.fr>
0015 %
0016 %
0017 % WARNING: for simulations, the relative direction of the plasma current
0018 % to the toroidal magnetic field must be specified, as well as if the RF
0019 % wave is driving co or counter current.
0020 %
0021 close all
0022 %
0023 % Path parameters
0024 %
0025 id_dkepath = '';%For all paths used by DKE solver
0026 path_dkepath = '';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0027 %
0028 % Equilibrium parameters
0029 %
0030 id_equil = 'RFP';%For plasma equilibrium
0031 path_equil = '../EQUIL/';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0032 %
0033 id_rayinit = 'LH';
0034 %
0035 launch.type = 'LH';%wave type
0036 launch.omega_rf = [0.8]*2*pi*1e9;%wave angular frequency (rad/s) [1,1] (same frequency)
0037 %
0038 % Initial ray conditions (horizontal dimension represents different beams, vertical dimension
0039 % represents different poloidal locations)
0040 %
0041 launch.bPlhtot = [1]*1e6;%initial power in the ray (W) (main lobe) [1,n_lobe]
0042 launch.bNpar0 = [10];%Initial Npar value (main lobe) [1,n_lobe]
0043 launch.bdNpar0 = [3];%ray spectral width for Fokker-Planck calculations [1,n_lobe]
0044 launch.rZ0 = [0];%vertical launching positions [1,m_pol]
0045 %
0046 launch.n0 = 0;%initial toroidal mode number [1,1]
0047 launch.phi0 = 0;%toroidal angle position [1,1]
0048 launch.LFS = -1;% (-1) high field side launching, (1) low field side launching [1,1]
0049 %
0050 %==========================================================================
0051 %
0052 %
0053 % Load structures
0054 %
0055 [equil,dkepath] = load_structures_yp('equil',id_equil,path_equil,'dkepath',id_dkepath,path_dkepath);
0056 %
0057 launch.i_ref = length(equil.psi_apRp) - 1;%Initial radial position index [1,1]
0058 %
0059 % Ray initial characteristics
0060 %
0061 rayinit = main_rayinit_launch_jd(equil,launch);
0062 %
0063 save_str = ['RAYINIT_',id_equil,'_',id_rayinit,'.mat'];
0064 eval(['save ',save_str,' rayinit']);

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