ES_ebw_disp_jd

PURPOSE ^

SYNOPSIS ^

function [xNperp,xepol_pmz,xphi_xyz,xalphaphi_lin_nr,xalphaphi_lin_wr,xalphaphi_lin_fr,xepol_xyz,xepol_pyk,xphi_pmz,xphi_pyk]= ES_ebw_disp_jd(xNpar,omega_rf,xTe,xne,xB,xNperp_in,opt_calc,opt_disp,nmax)

DESCRIPTION ^

 This function solves the dispersion relation and the wave equation
 in the linear electrostatic plasma model. It calculates the perpendicular index of
 refraction and the polarization as a function of the wave
 frequency and the parallel index of refraction. 

 This function is vai

 - (x,y,z): We assume that the magnetic field is in the z direction and the 
           perpendicular index of refraction in the x direction. 
 - (p,m,z): p and m refer to the left hand and right hand rotating fields 
           respectively.
 - (p,y,k): p and y are the transverse components of the polarization, with 
           respect to the wave vector. k is the longitudinal component.

   INPUTS: 

       - xNpar: parallel index of refraction [1,nx]       
       - omega_rf: wave frequency (rad/s) [1,nx] 
       - xTe: electron temperature (keV) [1,nx]
       - xne: electron density (m-3) [1,nx]
       - xB: magnetic field amplitude [1,nx]
       - xNperp_in: perpendicular index of refraction (initial guess) [1,nx]
       - opt_calc: option for dispersion calculation (default : 1)
       - opt_disp: option for dispersion model (default : 2)
       - nmax: maximum harmonic number (default:50) 

   OUTPUTS:

       - Nperp: perpendicular index of refraction [1,1]
       - e_xyz: polarization vector in the (x,y,z) coordinates [3,1]
       - e_pmz: polarization vector in the (p,m,z) coordinates [3,1] 
       - e_pyk: polarization vector in the (p,y,k) coordinates [3,1]  
       - X: kinetic plasma susceptibility tensor elements [3,3]
       - X_s: kinetic plasma susceptibility tensor elements for species s [3,3,1+i]
       - X_sn: kinetic plasma susceptibility tensor elements for species s and harmonic n [3,3,1+i,N]

 by Joan Decker <joan.decker@cea.fr> (CEA/DRFC) and  Yves Peysson <yves.peysson@cea.fr> (CEA/DRFC)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [xNperp,xepol_pmz,xphi_xyz,xalphaphi_lin_nr,...
0002         xalphaphi_lin_wr,xalphaphi_lin_fr,xepol_xyz,xepol_pyk,xphi_pmz,xphi_pyk]...
0003     = ES_ebw_disp_jd(xNpar,omega_rf,xTe,xne,xB,xNperp_in,opt_calc,opt_disp,nmax)
0004 %
0005 % This function solves the dispersion relation and the wave equation
0006 % in the linear electrostatic plasma model. It calculates the perpendicular index of
0007 % refraction and the polarization as a function of the wave
0008 % frequency and the parallel index of refraction.
0009 %
0010 % This function is vai
0011 %
0012 % - (x,y,z): We assume that the magnetic field is in the z direction and the
0013 %           perpendicular index of refraction in the x direction.
0014 % - (p,m,z): p and m refer to the left hand and right hand rotating fields
0015 %           respectively.
0016 % - (p,y,k): p and y are the transverse components of the polarization, with
0017 %           respect to the wave vector. k is the longitudinal component.
0018 %
0019 %   INPUTS:
0020 %
0021 %       - xNpar: parallel index of refraction [1,nx]
0022 %       - omega_rf: wave frequency (rad/s) [1,nx]
0023 %       - xTe: electron temperature (keV) [1,nx]
0024 %       - xne: electron density (m-3) [1,nx]
0025 %       - xB: magnetic field amplitude [1,nx]
0026 %       - xNperp_in: perpendicular index of refraction (initial guess) [1,nx]
0027 %       - opt_calc: option for dispersion calculation (default : 1)
0028 %       - opt_disp: option for dispersion model (default : 2)
0029 %       - nmax: maximum harmonic number (default:50)
0030 %
0031 %   OUTPUTS:
0032 %
0033 %       - Nperp: perpendicular index of refraction [1,1]
0034 %       - e_xyz: polarization vector in the (x,y,z) coordinates [3,1]
0035 %       - e_pmz: polarization vector in the (p,m,z) coordinates [3,1]
0036 %       - e_pyk: polarization vector in the (p,y,k) coordinates [3,1]
0037 %       - X: kinetic plasma susceptibility tensor elements [3,3]
0038 %       - X_s: kinetic plasma susceptibility tensor elements for species s [3,3,1+i]
0039 %       - X_sn: kinetic plasma susceptibility tensor elements for species s and harmonic n [3,3,1+i,N]
0040 %
0041 % by Joan Decker <joan.decker@cea.fr> (CEA/DRFC) and  Yves Peysson <yves.peysson@cea.fr> (CEA/DRFC)
0042 %
0043 if nargin < 9
0044     nmax = 50;
0045 end
0046 if nargin < 8
0047     opt_disp = 0;
0048 end
0049 if nargin < 7
0050     opt_calc = 1;
0051 end
0052 if nargin < 6
0053     error('An initial guess must be provided')
0054 end
0055 %
0056 [qe,me,mp,mn,e0,mu0,re,mc2] = pc_dke_yp;
0057 %
0058 xa = xne.*qe.^2/e0./me/omega_rf^2;
0059 xb = qe*xB./me/omega_rf;
0060 xbeta = sqrt(xTe/mc2);
0061 %
0062 if opt_calc,
0063     [mask,xNperp,xepol_pmz,xphi_xyz,xalphaphi_lin_nr,...
0064         xalphaphi_lin_wr,xalphaphi_lin_fr,xepol_xyz,xepol_pyk,xphi_pmz,xphi_pyk] = ...
0065     disp_ES_ebw_jd(xa,1./xb,xbeta,xNpar,xNperp_in,opt_disp,nmax);
0066 else
0067     if nargout > 3
0068         [mask,xNperp,xepol_pmz,xphi_xyz,xalphaphi_lin_nr,...
0069             xalphaphi_lin_wr,xalphaphi_lin_fr,xepol_xyz,xepol_pyk,xphi_pmz,xphi_pyk] = ...
0070         proc_ES_ebw_jd(xa,1./xb,xbeta,xNpar,xNperp_in,opt_disp,nmax);
0071     else
0072         [mask,xNperp,xepol_pmz,xphi_xyz] = ...
0073         proc_ES_ebw_jd(xa,1./xb,xbeta,xNpar,xNperp_in,opt_disp,nmax);
0074     end
0075 end
0076 %

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