! !This file contains namelist input for the GENRAY ray tracing code. !GENRAY will read it as a file called genray.dat. Units are mixed. !This file genray.dat is read before genray.in (alternative namelist ! input file in MKSA system units). ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !NOTE: Some compilers have (somewhat random) problems with the "!" ! comment characters WITHIN the namelist sections. Have had ! problems with gfortran, and perhaps other compilers. ! The namelist "!" capability is not part of the f90 specification. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! !Normalization constants: !------------------------------------------------------------------------- !/genr/ namelist !------------------------------------------------------------------------- ! mnemonic, is the run designator...to help keep track of runs. ! It is used for naming the ray data output files: ! mnemonic.txt and mnemonic.nc ! (Ray data o/p also depends on rayop nmlst variable.) ! mnemonic is character*128, default="genray" ! rayop, Specifies which of mnemonic.txt and mnemonic.nc files ! are to be output: ! "both", "text", "netcdf", or "none". ! rayop is character*8, default="both". ! [Previous (related) iout3d nml no longer has functionality.] ! dielectric_op="enabled", adds output of the 9 complex dielectric tensor ! elements to .nc ray data file. ! "disabled", omit such data from the .nc data file. ! dielectric_op is character*8, default="disabled" !------------------------------------------------------------------------- !Normalization constants: ! r0x [meter] characteristic length, can be used as scale factor ! b0 [Tesla] characteristic magnetic field, can be used as scale factor !------------------------------------------------------------------------- !Parameters for output files !-------------------------------------------------------------------------- ! outdat*20 name of output file ! stat*3 status of output file !-------------------------------------------------------------------------- ! partner = 'disabled' to use input profiles from genray.dat or genray.in ! = 'genray_profs_in.nc' to use plasma profile data from the netCDF ! file: genray_profs_in.nc created by transport code ! or otherwise; ! and to output power and current profiles on transport ! code radial grid to file: genray_profs_out.nc ! and genray_profs_out.txt (text file). ! = 'genray_profs_in.txt' to use plasma profile data from the text ! file: genray_profs_in.txt created by transport code ! or otherwise; ! and to output power and current profiles on transport ! code radial grid to file: genray_profs_out.nc ! and genray_profs_out.txt (text file). ! = 'genray_profs_out.nc' to use only genray.in plasma profiles ! [such as in coupling to Plasma State], but output ! genray_profs_out.nc. !------------------------------------------------------------------------ &genr mnemonic="genray" rayop="both" dielectric_op="enabled" r0x=1.0d0 b0=1.0d0 outdat='zrn.dat' stat='new' partner="disabled" &end !-------------------------------------------------------------------------- !/tokamak/ !------------------------------------------------------------------------- !Tokamak !-------------------------------------------------------------------------- ! eqdskin=Name (character*128) of eqdsk equilibrium input file ! "equilib.dat" (default) !-------------------------------------------------------------------------- ! Type of the (normalized) radial coordinates ! indexrho [1 - sqrt(area), 2 - sqrt(torflux), 3 - sqrt(volume), ! 4 - sqrt(psi-psimag), 5 - (psi-psimag), ! 6 - (r_max(psi)-rmin(psi))/(r_max(psi_lim)-rmin(psi_lim)) !-------------------------------------------------------------------------- ! ipsi=1 calculation of contours psi(z,r)=const ! =0 -read in these contours from psi.bin file !-------------------------------------------------------------------------- ! ionetwo=1-calculation power and current radial ! profiles, to the file onetwo.bin ! 0 - no calculations) !-------------------------------------------------------------------------- ! ieffic choice of formula for the current drive efficiency ! =1 asymptotic simple formula (homogeneous, nonrelativistic) ! =2 asymptotic formula (East-Karney ) ! =3 Curba (Ron Cohen) subroutine (high vel approx, sq-well-B) ! =4 Lin_Liu (TorGA_curgap subroutine) ! =5 using ADJ function for n_harmonic=0 case (e.g., LH wave) ! plus Stix fluxes. It works for i_adj=1 case only. ! =6 using ADJ function for all n_harmonics general case ! plus Stix fluxes. It works for i_adj=1 case only. !-------------------------------------------------------------------------- ! psifactr (it should be 0 < psifactr =<1, psifactr ~1) ! is the parameter for the creation of the limiter points using ! the closed flux surface: psilim=psimag+(psilim-psimag)*psifactr ! psifactr is a parameter (it must be .le.1) to avoid ! problems with the psi function near the separatrix. !-------------------------------------------------------------------------- !deltripl is the relative amplitude of the ripple field at the ! last flux surface (at rho=1) ! !nloop is number of toroidal field coils ! !i_ripple is the index to choose the ripple model ! bripl_phi(z,r,phi)=(dF/dphi)/r=cos(N_loop*phi)*g(r,z)*N_loop/r ! bripl_z(z,r,phi) =(dF/dz) =sin(N_loop*phi)*(dg/dz) ! bripl_r(z,r,phi) =(dF/dr) =sin(N_loop*phi)*(dg/dr) ! models for function g: ! =1 the ripple model approximating the DIII-D field ! g=beqd*reqd*deltripl*(r/rmax)**N_loop/N_loop ! beqd is the toroidal magnetic field at reqd (Tl) ! reqd is the nominal major radius of the torus. ! rmax is the max major radius at the last closed flux surface ! r is the major radius ! =2 the ripple model using modified Bessel function I_0 ! g=beqd*reqd*deltripl*I_0(N_loop*rho(z,r))/(N_loop*I_(N_loop)) !-------------------------------------------------------------------------- ! NR is the number of bin boundaries in the small radius direction ! for the calculation of the power and current drive radial profiles. ! Power and current is tabulated at (NR-1) bin centers. !-------------------------------------------------------------------------- ! n_wall is a number of wall points ! if n_wall= 0 then ! no wall to be used, no reflection from the wall ! ! if n_wall>0 then ! "wall coordinates" are r_wall[1:n_wall], z_wall[1:n_wall], ! and reflect rays from straight line segments between ! the given points. Count the number of coord pairs. ! The coords must begin and end at the same physical ! point. ! Units are meters. ! It should be (n_wall .le. n_wall_a) ! n_wall_a is a maximal value of n_wall, It is set in param.i file. ! ! NOTE: the reflection model is not entirely physically correct ! in that the calculation of reflection is the same as is used ! at the the plasma LCFS which assumes the magnetic field lies ! in a flux surface. At the wall, the magnetic field may not ! lie tangent to the wall surface. A better model would keep the ! refractive index component of the wave in the plane of ! the vacuum chamber constant, and reverse the component ! perpendicular to the wall. This could modify nparallel. ! ! ! max_limiters is a number of limiters ! if max_limiters=0 then ! no limiter to be used, no reflection from the limiter ! if max_limiters>0 the the code will read limiters positions ! ! to reflect the ray from the ! chamber wall consisting of the wall coordinates and ! those limiter coordinates to the plasma side of the ! wall. ! It should be (n_limiter .le. n_limiter_a) ! n_limiter_a is a maximal value of n_limiter. ! It is set in param.i file ! ! r_wall(n_wall),z_wall(n_wall) wall coordinates [m] ! For each limiter with number 'i=1:max_limiters' limiter coordinates [m] ! will be set to the arrays ! r_limiter(n_limiter(i),max_limiters), ! z_limiter(n_limiter(i),max_limiters) ! ! phi_limiter(1:2,1:max_limiters) toroidal angles [degrees] of the limiter ! boundaries ! 0 =< phi_limiter(1,i) 1 !----------------------------------------------------------------------- ! ! ioxm_n_npar - ! =0 (as default)ioxm_n_par will not be used, ! the wave mode will be calculated using ioxm parameter ! ! (=+1 or =-1) sign before square root in dispersion relation ! delta**2*f~*N**4+delta*g~*N**2+w~=0 ! which gives N**2=N**2(N_parallel) ! ! f~=delta*eps_per ! ! g~=delta**2*N_par**2(eps_par-eps_per)+ ! delta**2(g**2-eps_per**2-eps_per*eps_par) ! ! w~=delta**3*N_par**2(-eps_per*eps_par+eps_per**2-g**2)+ ! delta**3*eps_par(eps_per**2-g**2) ! ! root=(-g+ioxm_n_npar*sqrt(g**2-4f*w))/2g ! ! f=f~, g=g~/delta, w=w~/delta**2 ! delta=1-y_e for ib=1 ! delta=1-y_i for ib= > 1 ! !------------------------------------------------------------------------- ! ireflm -max number of reflections =1 for EC !------------------------------------------------------------------------- ! no_reflection !=1 switch off the artificial reflection from ! !the last closed flux surface. Gives natural reflection ! !from a density gradient outside the LCFS. ! !Not controlled by ireflm. ! !=0 (default) switch on the artificial reflection from ! !the last closed flux surface. !------------------------------------------------------------------------- ! jwave (0 - LH wave, -1 AW, 1 - EC wave) wave harmonic, used in calc. ! of current drive efficiency (see ieffic). ! ------------------------------------------------- ! istart if start point outside the plasma=1 else=2 or 3. ! if istart=1 use namelist &eccone below, =2 use &grill ! if istart=3 it use &grill and the additional calculations in dinit ! to launch the ECR ray inside the plasma in the O_X mode ! conversion point (rhoconv,theta), Theta is a poloidal angle (degree) ! for mode conversion point. It is given in dinit.f !-------------------------------------------------------------------------- ! delpwrmn - Minimum power in each ray, as a fraction of ! starting power in the ray, after which ray is stopped. !-------------------------------------------------------------------------- ! ibw=0 it is not the direct launch of the Bernstein waves ! =1 the direct launch of electron Bernstein wave from dhot tensor ! The last case works only for istart=2 and grill_lh conditions !-------------------------------------------------------------------------- ! i_vgr_ini =+1 the wave is directed into the plasma (in the initial point) ! =-1 the wave is directed out the plasma (in the initial point !--------------------------------------------------------------------------- ! poldist_mx [meter] is the maximal poloidal distance along the ray ! default=1.d+5 !--------------------------------------------------------------------------- ! i_look_roots=0 !do not plot D(N_perp) and do not calculate all ! !hot roots ! =1 !plot D(N_perp) and calculate all ! !hot roots, but do not calculate the ray ! =2 !calculate hot root, use the root with number k_root ! !as the initial ray condition and calculate a ray !---------------------------------------------------------------------- ! cnperp_plot_min,cnperp_plot_max !max and min Nperp to plot D(Nperp) ! n_nperp_plot, !number of Nperp points to plot D(Nperp) !------------------------------------------------------------------------- ! N_perp_root_max !max value of n_perp to ! !find hot roots ! n_points_root !number of N_perp mesh points ! !to find hot plasma roots !------------------------------------------------------------------------- ! k_hot_root is the number of the hot plasma root ! N_perp_root_ar(k_hot_root) ! which will be used for ray initial condition ! It works for i_look_roots=2 case only !------------------------------------------------------------------------- ! i_rho_find_hot_nperp_roots=1 find the small radius rho_ini ! rho_ini > rho_min_find_hot_nperp_roots ! at the vector rho^ where ! hot plasma dispersion function D_hot(nper)=0 ! has one,two or three roots. ! The vector rho^ is starting at the edge point ! (r_edge,z_edge,phi_edge),and directed to the ! magnetic axis O(xma,yma,phi_edge) ! Write roots and polarization to find_hot_roots.dat !i_rho_find_hot_nperp_roots=0 do not find roots ! ! rho_step_find_hot_nperp_roots is the small radius step to find the hot ! plasma dispersion relation D_hot(N_perp)=0 ! roots ! ! rho_min_find_hot_nperp_roots is the minimal rho !----------------------------------------------------------------------- ! For istart=1 case only ! shift_rho_geom ! It shifts the initial point of the ray from the plasma ! bounday (LCFS) inside the plasma. ! The ray initial coordinates at the LCFS are (r,z) ! and the geometrical radius of this initial point ! (the distance from the magnetic axis) is ! rho_geom=sqrt((r_xma)**2+(z-yma)**2) ! ! The initial point will be shifted inside the plasma ! rho_geom_shifted==rho_geom*shift_rho_geom ! So,the shifted initial coordinates are ! r_shifted=xma + (r-xma)*shift_rho_geom ! z_shifted=yma + (z-xma)*shift_rho_geom ! ! By default shift_rho_geom=1.0d - 1.d-7 ! ! The PURPOSE is to shift the starting point to ! to higher density, so that the O- and X-modes ! are sufficiently separated to start the ray in the ! correct mode. This may be necessary for some ! hot plasma or fully relativistic EC cases. !----------------------------------------------------------------------- &wave frqncy=45.0d+0 !GHZ ioxm=+1 ioxm_n_npar=0 ireflm=1 jwave=+1 istart=1 delpwrmn=1.d-16 ibw=0 i_vgr_ini=+1 poldist_mx=1.d+5 !&wave frqncy=60.00d-3 !GHZ ioxm=-1 ireflm=3 jwave=1 istart=2 delpwrmn=1.d-2 ibw=0 i_vgr_ini=+1 poldist_mx=1.d+5 ![meter] ioxm_n_npar=0 i_look_roots=0 cnperp_plot_min=0.d0 cnperp_plot_max=5.d0 n_nperp_plot=50 cN_perp_root_max=5.d0 n_points_root=50 k_hot_root=1 i_rho_find_hot_nperp_roots=0 rho_step_find_hot_nperp_roots=1.d-2 rho_min_find_hot_nperp_roots=0.9d0 no_reflection=0 shift_rho_geom=1.d0 !&end !--------------------------------------------------------------------- !/scatnper/ !------------------------------------------------------------------------- !N_perpendicular scattering !------------------------------------------------------------------------- ! iscat it is the switch for the n_perp scattering ! iscat=1 the scattering switched on, ! =0 the scattering switched off !------------------------------------------------- ! rhoscat(1:nscat_n) small radii for the scattering location ! The parameter nscat_n should be given in the param.i file ! ! The scattering of the polar angle deltheta will be ! deltheta=dsqrt(2.d0*scatd)*ranorm(fseed) ! scatd(0) the mean square scattering angle (radians**2) ! for the plasma boundary reflection points ! ! scatd(1:nscat_n) the mean square scattering angles (radians**2) ! for the interior plasma boundary points !------------------------------------------------------------------- &scatnper iscat=0 scatd= 0.01, 0., 0., 0., 0., 0., 0., 0., 0., 0.01, 0.01 rhoscat= 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.95, 0.97 &end !/dispers/ !Dispersion relation !------------------------------------------------------------------------- ! ib<=nbulk cyclotron resonance sort(=1 for ecr) ! the number in (1-y(ib)) for the multiplication of the ! dispersion relation to delete the singularity ! ------------------------------------------------- ! id gives form of the dispersion relation ! =1 AN**4+BN**2+C=0 ! =2 N**2=(-B+ioxm*Sqrt(B**2-4AC))/2A; ! =3 Appleton-Hartree; ! =4 electron relativistic plasma from Hermitian Mazzucato code ! =5 electron relativistic plasma from total Mazzucato code ! =6 hot non-relativistic plasma, Hermitian, Forest calc ! =7 electron relativistic plasma from Shkarofsky code ! =8 Ono dispersion for fast waves ! =9 hot non-relativistic plasma, full tensor [Bernstein-Friedland] ! =10 Westerhof-Tokman dispersion with Mazzucato ! relativistic electron dielectric tensor ! Self-consistent absorption obtained with iabsorp=1. ! =11 Eric Nelson-Melby relativistic tensor ! Dispersion function = Re(Det) [Good for |n_par|.lt.1] ! calculated using Isaac Weiss' method ! =12 Westerhof-Tokman dispersion with ! Eric Nelson-Melby dielectric tensor ! Self-consistent absorption obtained with iabsorp=12. ! =13 Westerhof-Tokman dispersion with ! hot non-relativistic plasma, full tensor ! Self-consistent absorption obtained with iabsorp=4. ! =14 Abhay Ram's dielectric tensor, using the Trubnikov integral ! =15 Westerhof-Tokman dispersion with ! Abhay Ram's dielectric tensor ! Self-consistent absorption obtained with iabsorp=12. ! **** NOTE: see notes around irkmeth if using id=11,12,14 or 15 ***** ! **** NOTE: irkmeth=1 SHOULD BE used for id=14 !--------------------------------------------------------- ! For use with Abhay Ram's dispersion relation (id=14 or id=15) parameters to ! control the integration routine for the Trubnikov integral. ! ! relres offers 4 choices for the resolution to use for the relativistic ! dispersion relation using the Trubnikov integral: ! relres=1 low resolution, errabs0=1.d-4, errrel0=1.d-4, navg=3, diff_err=0.1 ! =2 medium res., errabs0=1.d-5, errrel0=1.d-5, navg=12, diff_err=1.d-3 ! =3 high res., errabs0=1.d-6, errrel0=1.d-6, navg=25, diff_err=1.d-6 ! =4 user-defined res., set the following parameters manually. ! default: relres=2 ! ! The Trubnikov one-dimensional (complex) integral is performed by splitting ! up a region from 0 to 1.d8 into 10^6 pieces, and each piece is integrated ! using the SLATEC adaptive quadrature routine dqag. errabs0 and errrel0 are ! the absolute and relative error tolerances passed directly to dqaq. ! Then the adjacent pieces are compared (it is an oscillatory integrand) ! and using navg number of pieces, when the average difference between them ! are less then diff_err, the integration is presumed finished (Thus it may ! finish long before the upper limit of 1.d8). ! ! errabs0 - absolute error for dqag integration routine ! errrel0 - relative error for dqag integration routine ! navg - number of adjacent integration intervals to use in comparison ! diff_err - error tolerance using navg pieces, when the average difference ! is less than diff_err, then the integration is done. ! ! To decide when one should use the low, medium, or high resolution ! integration, here are some suggestions based on the behavior of the ! Trubnikov integrand: The integrand converges more slowly, and hence ! the resolutions should be set higher, for low electron temperature, ! low (i.e. near zero) magnitude of n_parallel, and for low (near or ! below the fundamental cyclotron frequency) frequency. ! Examples: n_parallel = -0.05, Te=400 eV, omega/omega_ce=0.4 to 1.2, ! it was necessary to use errabs0=1.d-5,errrel0=1.d-5,navg=20,diff_err=1.d-5 ! to be completely converged. By changing Te to 4000 eV, it was sufficient ! to use 1.d-4,1.d-4,15 and 1.d-4. ! An easy case: n_parallel=0.3, Te=7 keV, omega/omega_ce=2.4 to 2.7, ! complete convergence already at errabs0=1.d-4,errrel0=1.d-4,navg=2, ! diff_err=0.5 ! An intermediate case: n_parallel=0.1, omega/omega_ce=1.0, Te=300 eV ! errabs0=1.d-5,errrel0=1.d-5,navg=12,diff_err=1.d-3 was OK. ! *** NOTE: Sometimes with too small n_parallel, the Trubnikov method does ! not work well (id=14 or 15). Instead, use the Weiss method (id=11 or 12), ! which works well for small n_parallel (but does not work for n_parallel>1). !------------------------------------------------ ! For Mazzucato plasma dispersion tensor: ! iherm =1 hermitian dielectric tensor, 2-full !------------------------------------------------------------------------ !Absorption: !iabsorp -choice of Imag(N_perp) (N_perp is the perpendicular refractive index) !------------------------------------------------------------------------- ! iabsorp=1 for EC waves with Mazzucato solver (ki/kr<<1) ! =2 for LH waves ! =3 for FW waves, Chiu et al themal corr., NF 1989, with corrections. ! At this time, this is only iabsorp value which provides power ! profiles to individual ions (via powden_s/powtot_s). ! Other models below (9, 91, 92, could be added). ! =4 for all frequencies with Forest code (ki/kr<<1) ! This is further specified by choise of i_im_nperp, see below. ! =5 for EC and EBW waves from Shkarofsky code ! =6 for EC and BW anti-hermitian part relativistic tensor+ ! hermitian_part (Forest code) ! Uses n_relt_harm,n_relt_harm1. ! =7 for EC wave case. The complex electric field calculations ! using Cold plasma tensor + antihermitian relativistic tensor ! ---EC relativistic absorption ! dielectric tensor=hermitian part(cold plasma)+ ! anti-hermitian part(full relativistic) ! Uses n_relt_harm,n_relt_harm1. ! =8 for id=10,12,13 and Westerhof-Tokman dispersion ! function [Projection method from real part of ! eigenvalue.] Integration is with respect to distance. ! =9 The absorption is calculated for hot dispersion ! using the formula from Stix book p.74 (17,18,21) ! Im(k_perp)= 0.5*Power_abs/(P^+T^) ! It uses hot plasma dielectric tensor. ! It calculates hot plasma dielectric tensor reps() and ! electric field polarization (cex,cey,cez) using this ! hot plasma tensor. See CompX report CompX-2005-1, ! as applied to FW in DIII-D (agrees well with iabsorp=3). ! =91 FW absorption is calculated by ! subroutine absorpfw_pinsker_1 ! using formula: ! formula from using formula: ! 1) for ion absorption from ! R.i.Pinsker,M.Porkolab ! e-mail: pinsker@fusion.gat.com ! 05/02/11 ! 2) for electron absorption from ! S.C.Chiu,V.S.Chan,R.W.Harvey,M.Porkolab ! Theory of fast wave current drive for tokamak ! plasma,Nuclear fusion,1989,vol.29,No.12, p.2175-2186 ! ! electric field polarization will be for the cold plasma dielectric tensor ! ! =92 FW absorption is calculated by ! subroutine absorpfw_pinsker_2 using formula: ! for electron and ion absorption from ! R.i.Pinsker,M.Porkolab ! e-mail: pinsker@fusion.gat.com ! 05/02/11 ! ! electric field polarization will be for the cold plasma dielectric tensor ! ! =10 The absorption is calculated for relativistic tensor ! (A.Ram) ! using the formula from Stix book p.74 (17,18,21) ! Im(k_perp)= 0.5*Power_abs/(P^+T^) ! It uses relativistic dielectric tensor. ! It calculates relativistic dielectric tensor reps() and ! electric field polarization (cex,cey,cez) using this ! tensor. ! =11 The absorption Im(N_perpendicular) is calculated ! for the relativistic dispersion function Determinant=0. ! The dispersion function uses the full Abhay Ram dielectric ! tensor (with the Trubnikov integral). ! The projection method is used to find Im(N_perpendicular). ! That is, Im(N_perp)=-Im(D)/(dD/dRe(N_perp)), evaluated ! at give Real(N_perp) with Im(N_perp)=0. ! The real part Real(n_perp) is obtained from the trajectory ! solution for the given id value. ! Then complex n_perp is used with full dielectric tensor ! to get the polarizations. Good for arbitrary id value, ! like other iabsorp calcs. ! =12 (For id = 11,12,14, or 15.) ! Find Im(N_perpendicular) by finding the exact solution to ! Det(Complex n_perp)=0. This returns Im(N_perp), like the ! projection method described above, but is more accurate, ! especially when Im(N_perp)/Re(N_perp) is not negligible. ! Uses Muller algorithm to solve for the complex root in ! the complex plane. See mullerfun2.f. ! For id.eq.11.or.id.eq.12, uses Eric Nelson-Melby tensor. ! For id.eq.14.or.id.eq.15, uses Abhay Ram tensor. !------------------------------------------------------------------------ !iabsorp_ql =0 do not use QL flux for absorption calculations ! =1 to use QL flux for electron absorption calculations ! In this case QL flux will be calculated for harmonics ! numbers nharm in the following interval: ! n_harm_adj_min =< nharm =< n_harm_adj_max ! n_harm_adj_min number of minimal and maximal harmonics ! n_harm_adj_max for power and CD calculations ! Electric field polarization will be calculated according to ! the value of the index: iabsorp ! Energy flux "fluxn" will be calculated according to ! the value of the index: iflux !------------------------------------------------------------------------ ! To switch off ion absorption ! ion_absorption ='enabled' to add ion absorption (by default) ! It works at iabsorp=3,9,91,92 ! ='disabled' do not add ion absorption !------------------------------------------------------------------------- ! iabsorp_collisional =0 no additional collisional absorption ! =1 collisional absorption using formula ! Im(N)=dabs(nu_ei/(gr_perp))*clight/omega) ! [For LH, there is separate coll absorption included, ! not switched by this flag and always on.] ! coll_mult =1.d0(default), multiplies above coll absorp expression !-------------------------------------------------------------------------- ! The change of the dispersion relation and absorption ! near the gyro-frequency points !------------------------------------------------- ! iswitch=1 To use the change of the dispersion relation and ! absorption ! =0 Do not use the change of the dispersion relation and ! absorption ! del_y If the difference |1-nY(jy)|1 ! i_salphal(3)=1 !for iabsorp=3 or =9 cases ! i_salphal(4)=1 ! i_salphal(5)=1 refl_loss=0.0d0 ion_absorption ='enabled' &end !/numercl/ !------------------------------------------------------------------------ !Numerical method !------------------------------------------------------------------------- ! irkmeth (0-constant 1-variable step 5 order,2- variable step in RK 4 order) ! irkmeth=0: Poloidal distance of output is at intervals .ge.prmt6. ! Checks time step for passing outside plasma and reflects. ! irkmeth=1: Only poloidal distance for control of output point (prmt6, ! i_output has no effect). Output at distance.ge.prmt6, ! i.e, the first code step beyond prmt6 distance. ! No control for being outside the plasma and reducing ! the step. Correction method specified by icorrect is ! operative. ! Time or length for integration according to i_geom_optic. ! *** NOTE: irkmeth=1 may not work well with fully relativistic dispersion ! relations (id=11,12,14,15), unless prmt4 is quite small (e.g. 2.0d-6) *** ! irkmeth=2: Most developed method of ray equation integration. ! Time or space step in the of the equations ! (according to setting of i_geom_optic) is controlled ! so that output is at intervals prmt6 (meters). ! As ray approaches the plasma edge, it is reflected ! at the last closed flux surface. ! *** NOTE: irkmeth=2 works best for fully relativistic dispersion ! relations (id=11,12,14,15). An example of what prmt parameters work ! well for relativistic EBW and irkmeth=2: ! prmt1=0.000d+00 ! prmt2=9.999d+05 ! prmt3=1.000d-04 ! prmt4=5.000d-04 ! prmt6=1.0d-03 !-------------------------------------------------------------------------- ! ndim1 (number of used ray tracing equations) ! it should be ndim1=6 for isolv=1 ! ndim1=5 for isolv=2 ! isolv=1 correction,=2 expl. solution ! ! At isolv=1 the code solves 6 ray-tracing equations ! and can use the Hamiltonian correction if icorrect=1 ! ! At isolv=2 the code solves the system which consists of ! 1) five chosen equations from the system of six ray ! tracing equations ! 2) and the dispersion relation ! The case isolve=2 was checked for not all dispersion relations ! (specified by id). ! ------------------------------------------------- ! idif=1 analytic differentiation, =2 numerical ! ------------------------------------------------- ! nrelt Maximum number of ray elements per ray. ! Must be .le. nrelta (a parameter) !-------------------------------------------------------------------------- ! ------------------------------------------------- ! Runge-Kutta method parameters ! ------------------------------------------------- ! prmt1=tau initial= prmt(1) ! prmt2=tau final=prmt(2) ! prmt3=initial tau step=prmt(3) non-dimensional ! prmt4=required accuracy=prmt(4) ! prmt6=hprint=prmt(6) [meter] poloidal or total distance for results output ! prmt9 accuracy of Hamiltonian in the Runge-Kutta subroutine at irkmeth=2 ! it will reduce Runge-Kutta time step if dabs(ham).ge.eps_ham) ! =1.d15 by default(for so big value the comparison ! of the hamiltonian (hamilt=1 is a number of plasma components ! It should be nbulk.le.nbulka ! nbulka is a maximal number of plasma components ! nbulka is a parameter which is set in param.i file !---------------------------------------------------- ! izeff =0 zeff will be calculated using the given ions; ! electron density will be calculated using ions; ! =1 zeff, electron density and ion densities with(i), i=2,nbulk-2 ! are given, ! ion densities(i) i=nbulk and i= nbulk-1 will be calculated ! using Zeff, electron density and ion's densities(i), i=2,nbulk-2. ! In this case it should be nbulk.ge.3 ! =2 zeff, electron and ion (if nbulk>1) densities are given, ! and zeff is not recalculated from the plasma components; ! =3 Use eqdsk pres (pressure). Let temperature T_E=T_i ! pres=dens1(k,1)*temp1(k,1)+ ! Sum(i=2,nbulk)(dens1(k,i)*temp1(k,i) ! In this case we will calculate Zeff(rho), ! dens_electron(rho) and T_e(rho)=T_i(rho) ! =4 Use eqdsk pres (pressure), the given temperature ! profiles T_i(rho) (i=1,nbulk) and the given Z_eff(rho). ! pres=dens1(k,1)*temp1(k,1)+ ! Sum(i=2,nbulk)(dens1(k,i)*temp1(k,i) ! In this case we will calculate dense(1)(rho), ! dense(nbulk)(rho) and dense(nbulk-1)(rho) ! For nbulk=1, sets zeff=1 and ne=p/(2*Te), accounting for ! ion pressure equal to electron pressure. (Can adjust ! this with den_scale(1).) ! For nbulk=2, sets zeff=charge(2), and accounts for separate ! ion and electron pressures according to specified temperatures. ! ----------------------------------------------------- ! idens (0 - analytic, 1 - spline) representation of ! the density, temperature and zeff radial profiles ! ----------------------------------------------------- ! temp_scale(nbulka),den_scale(nbulka) are the parameters to multiply ! the given temperature and density profiles ! ----------------------------------------------------- ! ndens is the number of points for the input radial density and ! temperature profiles !------------------------------------------------------ ! nonuniform_profile_mesh= 'enabled' use nonuniform small radius mesh for input ! spline profiles (works for idens=1 only) ! = 'disabled' do not use nonuniform mesh (default) !-------------------------------------------------------- &plasma ndens=21 nbulk=1 izeff=2 idens=1 temp_scale(1)=1.d0 den_scale(1)=1.d0 nonuniform_profile_mesh='disabled' &end !/species/ ! plasma component charges charge(i)=mod(charge(i)/charge_electron) ! ----------------------------------------------------- ! charge(1) =1 electrons ! charge(i) i=1,nbulk charge(i+1) must be ge.charge(i) ! charge(i) i=1,nbulk ! ----------------------------------------------------- ! plasma component mass dmas(i)=Mass(i)/Mass_electron ! ----------------------------------------------------- ! dmas(1) 1 electrons ! dmas(i) i=1,nbulk ! ----------------------------------------------------- &species charge(1)=1.d0 charge(2)=1.d0 charge(3)=6.d0 dmas(1)=1.d0 dmas(2)=3674.d0 dmas(3)=22044.d0 &end !/varden/ ! the density variation ! ----------------------------------------------------- ! var0 is an amplitude of the density variation (del_n_0) ! as a fraction of the given density ! (see Manual, 3.37...) ! denm is the number of the poloidal mode in the density variation(l_theta) ! denn is the number of the toroidal mode in the density variation(l_phi) ! an is the radial localization of the variation (rho_0) ! sigman is the parameter that characterizes the radial thickness ! of the density fluctuation ! ----------------------------------------------------- &varden var0=0.d0 denm=1.d0 denn=15.d0 an=0.5d0 sigman=0.1d0 &end !/denprof/ ! ----------------------------------------------------- !Analytic radial profiles (idens=0). Splines (idens=1). !dense(i)=(dense0(i)-denseb(i))*(1-rho**rn1de(i))**rn2de(i)+denseb(i) !----------------------------------------------------- ! if(izeff.eq.0) then ! zeff will be calculated using the given ions; ! nbulk1=nbulk ! if(zeff.eq.1 ) then ! zeff, the electron density and ion densities with(i) with i=2,nbulk-2 ! are given, ! Ions components with i=nbulk and i= nbulk-1 will be ! calculated will be calculated using Zeff, the electron density and ! ion's densities(i) with i=2,nbulk-2. ! In this case it should be nbulk.ge.3 ! ! if (nbulk.eq.1) nbulk1=1 ! if (nbulk.eq.2) then ! nbulk1=2 ! endif ! if (nbulk.gt.2) nbulk1=nbulk-2 ! endif ! ----------------------------------------------------- ! dense0(i) central density in 10**19 meter**(-3) i=1,nbulk1 ! ----------------------------------------------------- ! denseb(i) edge density in 10**19 meter**(-3) i=1,nbulk1 ! ----------------------------------------------------- ! rn1de(i) i=1,nbulk1 ! ----------------------------------------------------- ! rn2de(i) i=1,nbulk1 ! ----------------------------------------------------- &denprof dense0(1)=3.575d+0 denseb(1)=1.22d+0 rn1de(1)=3.2d+0 rn2de(1)=1.2d+0 &end !/tpopprof/ ! Ratio tpop=T_perp/T_parallel ! tpop(i)=(tp0(i)-tpb(i))*(1-rho**rn1tp(i))**rn2tp(i)+tpb(i) ! ----------------------------------------------------- ! tp0(i) = central T_perp/T_parallel i=1,nbulk ! ----------------------------------------------------- ! tpb(i) =ateb(i) boundary T_perp/T_parallel i=1,nbulk ! ----------------------------------------------------- ! rn1tp(i) i=1,nbulk ! ----------------------------------------------------- ! rn2tp(i) i=1,nbulk ! ----------------------------------------------------- &tpopprof tp0(1)=1.0d0 tpb(1)=1.0d0 rn1tp(1)=2.0d0 rn2tp(1)=1.0d0 &end !/vflprof/ ! drift velocity || B (meter/sec) ! vflow(i)=(vfl0(i)-vflb(i))*(1-rho**rn1vfl(i))**rn2vfl(i)+vflb(i) ! ----------------------------------------------------- ! vfl0(i) [meter/sec] central vflow i=1,nbulk ! ----------------------------------------------------- ! vflb(i) [meter/sec] boundary vflow i=1,nbulk ! ----------------------------------------------------- ! rn1vfl(i) i=1,nbulk ! ----------------------------------------------------- ! rn2vf(i) i=1,nbulk ! ----------------------------------------------------- &vflprof vfl0(1)=0.0d+0 vflb(1)=0.0d+0 rn1vfl(1)=2.d0 rn2vfl(1)=1.0d0 &end !/zprof/ ! ----------------------------------------------------- ! zeff=(zeff0-zeffb)*(1-rho**rn1zeff)**rn2zeff+zeffb ! ----------------------------------------------------- ! zeff0 central Z_eff ! zeffb boundary Z_eff ! rn1zeff zeff=(zeff0-zeffb)* ! rn2zeff (1-rho**rn1zeff)**rn2zeff+zeffb !----------------------------------------------------- &zprof zeff0=1.50d0 zeffb=1.50d0 rn1zeff=2.d0 rn2zeff=1.d0 &end !/tprof/ ! Average temperature tempe=(T_parallel+2*T_perp)/3 ! tempe(i)=(te0(i)-teb(i))*(1-rho**rn1te(i))**rn2te(i)+teb(i) ! ----------------------------------------------------- ! te0(i) =at0(i) [KeV] central temperature i=1,nbulk ! ----------------------------------------------------- ! teb(i) =ateb(i) [KeV] boundary temperature i=1,nbulk ! ----------------------------------------------------- ! rn1te(i) i=1,nbulk ! ----------------------------------------------------- ! rn2te(i) i=1,nbulk ! ----------------------------------------------------- &tprof ate0(1)=1.555d0 ateb(1)=0.063d0 rn1te(1)=1.4d0 rn2te(1)=1.6d0 &end !/grill/ !------------------LH/EBW-Starting-inside-plasma----------------------- ! Grill conditions for istart=2 (start point inside the plasma) !---------------------------------------------------------------------- ! i_n_poloidal =1 The input parameter is N_parallel(from grill). ! (by default =1) N_phi,N_theta are calculated from given N_parallel ! N_rho=N_perpendicular(N_parallel) is determined ! from the dispersion relation. It is directed ! along +,- gradient(psi) ! ! i_n_poloidal =2 The input parameters: N_parallel(from grill) ! and n_theta_pol. By default N_theta=0. ! N_perpendicular(N_parallel) is determined ! from the dispersion relation. ! N_phi is calculated from N_parallel and N_theta ! N_rho is calculated form N_perpendicular, N_parallel ! and N_theta. ! It is directed along +,- gradient(psi) ! ! i_n_poloidal=3 The given variables: N_parallel and the angle ! 01 only. !c =4 it uses eqdsk pres (pressure), zeff,ions densities !c for i=2,... nbulk-2 (nbulk>2) and T_e(rho),T_i(rho) !c pres=dens1(k,1)*temp1(k,1)+ !c Sum(i=2,nbulk)(dens1(k,i)*temp1(k,i) !c In this case we will calculate dens_electron(rho) and !c ion densities for i=nbulk and i=nbulk-1) ! nbulk1=nbulk ! else !c (izeff=1 or izeff=4) ion densities(i) with i= nbulk and i=(nbulk-1) will !c be calculated using given !c Zeff, the electron density and ion's densities(i), i=2,nbulk-2; ! if (nbulk.le.2) nbulk1=nbulk ! if (nbulk.eq.2) then ! write(*,*)'nbulk=2, Zeff must be equal charge(2)' ! write(*,*)'Please check it or use the option izeff=0' ! stop ! endif ! if (nbulk.gt.2) nbulk1=nbulk-2 ! endif !izeff ! ! The case nbulk=1 is used often for ECR and EBW cases. ! In these cases only the electron component is essential. ! ! For nbulk=1 and izeff=2 case only the electron density ! is used in dispersion relation.In this case Z_effective ! is used for current drive efficiency calculations. !------------------------------------------------------------------------ ! dens1(ndens,nbulk) (10**13/cm**3) !------------------------------------------------------------------------ ! If ((izeff.eq.0).or.(izeff.eq.3)) then the electron density ! will be calculated from the charge neutrality. ! In that case we can set the arbitrary values for the electron density ! dens1(k,1), k=1:ndens and should set nbulk1-1 ion densities: ! dens1(k,i), k=1:ndens, i=2:nbulk1. ! A constant radial step is assumed, ! The first line (k=1, i=1:nbulk1) dens1(1,i) is for rho=0 ! The last line (k=ndens, i=1:nbulk1) dens1(ndens,i) is for rho=1 ! The example for izeff=0, ndens=5, nbulk=3, nbulka=4 ! nbulk is a number of plasma species ! nbulka is a maximal number of plasma species. ! nbulka is set in param.i file. ! It should be nbulka.ge.nbulk ! ! column: 1 2 nbulk ! electron ion ion ! ! prof= 0., 1.2, 1.3, ! 0., 2.2, 2.3, ! 0., 3.2, 3.3, ! 0., 4.2, 4.3, ! 0., 5.2, 5.3, ! ! prof in [10**13/cm**3)] ! !For izeff=1 case we should set the profiles of the electron density and !ion densities(i) with i=1,nbulk-2 !The columns of ion densities(i) with i=nbulk-1 and i=nbulk should be !fill in by arbitrary numbers (they can be zeros). ! !The example for izeff=1, ndens=5, nbulk=4, nbulka=5 ! nbulk is a number of plasma species ! nbulka is a maximal number of plasma species. ! nbulka is set in param.i file. ! It should be nbulka.ge.nbulk ! ! !colomn: 1 nbulk-2 nbulk-1 nbulk ! electron ion ion ion ! ! prof= 1.1, 1.0, 0.0, 0.0, ! 0.9, 0.85, 0.0, 0.0, ! 0.6, 0.55, 0.0, 0.0, ! 0.4, 0.32, 0.0, 0.0, ! 0.2, 0.15, 0.0, 0.0, ! ! ------------------------------------------------------------------------ ! Here array prof(nbulk,ndens) was used for convenience in namelist. ! dens1(k,i)=prof(i,k) k=1:ndens, i=1:nbulk ! ------------------------------------------------------------------------ ! If (izeff.ne.0) and (izeff.ne.3) then we should set the electron density ! dens1(k,1) and ion densities dens1(k,i) i=2:nbulk1 !------------------------------------------------------------------------ ! prof in [10**13/cm**3)] &dentab prof = 4.2000000, 4.1400000, 4.0500000, 3.9500000, 3.8900000, 3.8100000, 3.7400000, 3.6700000, 3.6100000, 3.5500000, 3.4900000, 3.3500000, 3.1900000, 3.0100000, 2.7600000, 2.4500000, 2.1400000, 1.8500000, 1.5100000, 1.2500000, 0.8500000, &end !/dentab_nonuniform_line/ at non-uniform grid ! for nonuniform_profile_mesh='enabled' !-------------------------------------------------------------------------- ! density profiles at arbitrary nonuniform radial mesh ! given in row form (idens=1): dens1(ndens,nbulk), ! i.e., density profile as rows of values, for each species, 1:nbulk. ! namelist /dentab_nonuniform_line/nj_tab,prof_2d,radii_2d ! ! integer nj_tab(nbulka): i=1,nbulk1 nj_tab(i) is the number of grid points ! for 'i' specie density ! It should be nj_tab(i).le.ndensa ! ! real*8 prof_2d(ndensa,nbulka) : density profiles ! ! real*8 radii_2d(ndensa,nbulka): small radius meshes used for density profiles !-------------------------------------------------------------------------- ! ndensa (a parameter in param.i) is max number of points in the ! small radius direction. ! nbulka (a parameter in param.i) is a maximal number of plasma components. ! Input of profiles is set up so spline profiles can be input in tables ! of size specified through namelist variables ndens and nbulk. ! ! nbulk1 is a number of densities. ! nbulk1 depends on nbulk and izeff model (nbulk1.le. nbulk) ! See description of /dentab/ namelist ! nbulk (variable) is number of plasma components must be: nbulk.le.ncompa ! (first component is for electrons) ! nbulk1 is number of densities components which should be given ! nbulk1 was calculated in dinit_mr subroutine , ! The fragment of dinit_mr is given here to understand the ! nbulk1 value !-------------------------------------------------------------------- !c calculation of nbulk1 ! if(((izeff.eq.0).or.(izeff.eq.2)).or.(izeff.eq.3)) then !c izeff=0, zeff will be calculated using the given ions; !c electron density will be calculated using ion's densities; !c =1 ion densities nbulk and nbulk-1 will be calculated using !c Zeff, electon density and ion's densities(i), i=2,nbulk-1; !c izeff=2, zeff will not coincide with the plasma components !c =3 it uses eqdsk pres (pressure) and ions densities_i !c for i=2,... nbulk !c Let temperature T_E=T_i !c pres=dens1(k,1)*temp1(k,1)+ !c Sum(i=2,nbulk)(dens1(k,i)*temp1(k,i) !c In this case we will calculate Zeff(rho), !c dens_electron(rho) and T_e(rho)=T_i(rho) !c =4 it uses eqdsk pres (pressure), zeff,ions densities !c for i=2,... nbulk-2 (nbulk>2) and T_e(rho),T_i(rho) !c pres=dens1(k,1)*temp1(k,1)+ !c Sum(i=2,nbulk)(dens1(k,i)*temp1(k,i) !c In this case we will calculate dens_electron(rho) and !c ion densities for i=nbulk and i=nbulk-1) ! nbulk1=nbulk ! else !c izeff=1, zeff is given, the ions component will be calculated ! if (nbulk.eq.1) nbulk1=1 ! if (nbulk.eq.2) then ! write(*,*)'nbulk=2 Zeff must be equal charge(2) control it' ! write(*,!)'use the option izeff=0' ! nbulk1=2 ! stop ! endif ! if (nbulk.gt.2) nbulk1=nbulk-2 ! endif !izeff !------------------------------------------------------------------------ ! densities given in prof_2d are in (10**13/cm**3) !--------------------------------------------------------------------------- ! If ((izeff.eq.0).or.(izeff.eq.3)) then the electron density ! will be calculated from the charge neutrality. ! In that case we can set the arbitrary values for the electron density !------------------------------------------------------------------------ !Example for nbulk1=3 !--------------------------------------------------------------------------- ! prof_2d in (10**13/cm**3) &dentab_nonuniform_line nj_tab(1)=3 nj_tab(2)=5 nj_tab(3)=7 prof_2d(1,1)= 1.d0, 0.5d0, 0.001d0, prof_2d(1,2)= 1.d0, 0.7d0, 0.5d0, 0.25d0, 0.001d0, prof_2d(1,3)= 1.d0, 0.9d0, 0.7d0, 0.5d0, 0.25d0, 0.12d0, 0.001d0, radii_2d(1,1)=0.d0, 0.5d0, 1.d0, radii_2d(1,2)=0.d0, 0.2d0, 0.5d0, 0.7d0, 1.d0, radii_2d(1,2)=0.d0, 0.2d0, 0.3d0, 0.5d0, 0.7d0, 0.9.d0, 1.d0 &end !/temtab/ at uniform grid rho(i)=(i-1)/(ndens-1) i=1,...,ndens ! for nonuniform_profile_mesh='disabled' !-------------------------------------------------------------------------- ! temperature profiles (table data, case: idens=1) temp1(ndens,nbulk) ! Average temperature temp1=(T_parallel+2*T_perp)/3 !-------------------------------------------------------------------------- ! It this namelist we must set electron temp1(ndens,1) and all ion ! species temp1(ndens,i) temperature (keV) {i=2:nbulk} ! Constant radial step is assumed. ! The first line (k=1, i=1:nbulk) temp1(1,i) is for rho=0 ! The last line (k=ndens, i=1:nbulk) temp1(ndens,i) is for rho=1 ! The example for ndens=5, nbulk=3, nbulka=4 ! ! electron-1 ion-2 ion-nbulk ! prof= 0., 1.2, 1.3, ! 0., 2.2, 2.3, ! 0., 3.2, 3.3, ! 0., 4.2, 4.3, ! 0., 5.2, 5.3, ! ! In all cases temtab should have nbulk columns with the temperature ! profiles for all nbulk plasma components. ! ------------------------------------------------------------------------ ! Here array prof(nbulk,ndens) was used for convenience in namelist. ! temp1(k,i)=prof(i,k) k=1:ndens, i=1:nbulk ! ------------------------------------------------------------------------ ! prof in [KeV] &temtab prof = 1.3000000, 1.3000000, 1.2700000, 1.2400000, 1.2200000, 1.1300000, 1.0500000, 0.9700000, 0.8700000, 0.7900000, 0.7300000, 0.6800000, 0.6100000, 0.5300000, 0.4500000, 0.3700000, 0.3000000, 0.2300000, 0.1600000, 0.1000000, 0.0400000, &end !/temtab_nonuniform_line/ at non-uniform grid ! for nonuniform_profile_mesh='enabled' !-------------------------------------------------------------------------- ! temperature profiles at arbitrary nonuniform radial mesh ! given in line form (idens=1): temp1(ndens,nbulk) ! namelist /temtab_nonuniform_line/nj_tab,prof_2d,radii_2d ! ! integer nj_tab(nbulka): i=1,nbulk nj_tab(i) is the number of grid points ! for 'i' specie temperature ! It should be nj_tab(i).le.ndensa ! ! real*8 prof_2d(ndensa,nbulka) : temperature profiles ! ! real*8 radii_2d(ndensa,nbulka): small radius meshes used for temperature profiles !-------------------------------------------------------------------------- ! ndensa (a parameter in param.i) is max number of points in the ! small radius direction. ! nbulka (a parameter in param.i) is a maximal number of plasma components. ! Input of profiles is set up so spline profiles can be input in tables ! of size specified through namelist variables ndens and nbulk. ! !--------------------------------------------------------------------------- ! temperature (keV) will be in prof_2d !------------------------------------------------------ ! Example for nbulk=3 !--------------------------------------------------------------------------- ! prof_2d in [KeV] &temtab_nonuniform_line nj_tab(1)=3 nj_tab(2)=5 nj_tab(3)=7 prof_2d(1,1)= 1.d0, 0.5d0, 0.001d0, prof_2d(1,2)= 1.d0, 0.7d0, 0.5d0, 0.25d0, 0.001d0, prof_2d(1,3)= 1.d0, 0.9d0, 0.7d0, 0.5d0, 0.25d0, 0.12d0, 0.001d0, radii_2d(1,1)=0.d0, 0.5d0, 1.d0, radii_2d(1,2)=0.d0, 0.2d0, 0.5d0, 0.7d0, 1.d0, radii_2d(1,2)=0.d0, 0.2d0, 0.3d0, 0.5d0, 0.7d0, 0.9d0, 1.d0 &end !/tpoptab/ at uniform grid rho(i)=(i-1)/(ndens-1) i=1,...,ndens ! for nonuniform_profile_mesh='disabled' !-------------------------------------------------------------------------- ! Tpop=T_perp/T_parallel profiles (table data, case: idens=1) ! tpop1(ndens,nbulk) !-------------------------------------------------------------------------- ! It this namelist we must set electron tpop1(ndens,1) and all ion ! species tpop1(ndens,i) {i=2:nbulk} ! Constant radial step is assumed. ! The first line (k=1, i=1:nbulk) tpop1(1,i) is for rho=0 ! The last line (k=ndens, i=1:nbulk) tpop1(ndens,i) is for rho=1 ! The example for ndens=5, nbulk=3, nbulka=4 ! ! electron-1 ion-2 ion-nbulk ! prof= 1., 1.2, 1.3, ! 1., 1.2, 2.3, ! 1., 1.2, 3.3, ! 1., 4.2, 4.3, ! 1., 5.2, 5.3, ! ! In all cases tpoptab should has nbulk columns with Tpop ! profiles for all nbulk plasma components. ! ------------------------------------------------------------------------ ! Here array prof(nbulk,ndens) was used for convenience in namelist. ! tpop1(k,i)=prof(i,k) k=1:ndens, i=1:nbulk ! ------------------------------------------------------------------------ ! prof non-dimensional &tpoptab prof= 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, &end !--------------------------------------------------------------------------- !/tpoptab_nonuniform_line/ at non-uniform grid ! for nonuniform_profile_mesh='enabled' !-------------------------------------------------------------------------- ! Tpop=T_perp/T_parallel profiles !----------------------------------------------------------------------- ! tpop profiles at arbitrary nonuniform radial mesh ! given in line form (idens=1): tpop1(ndens,nbulk) ! namelist /tpoptab_nonuniform_line/nj_tab,prof_2d,radii_2d ! ! integer nj_tab(nbulka): i=1,nbulk nj_tab(i) is the number of grid points ! for 'i' specie temperature ! It should be nj_tab(i).le.ndensa ! ! real*8 prof_2d(ndensa,nbulka) : tpop profiles ! ! real*8 radii_2d(ndensa,nbulka): small radius meshes used for tpop profiles !-------------------------------------------------------------------------- ! It this namelist we must set electron tpop1(ndens,1) and all ion ! species tpop1(ndens,i) {i=2:nbulk} ! ! The first line (k=1, i=1:nbulk) tpop1(1,i) is for rho=0 ! The last line (k=ndens, i=1:nbulk) tpop1(ndens,i) is for rho=1 !--------------------------------------------------------------------------- !Example for nbulk=3 !--------------------------------------------------------------------------- !prof_2d non-dimensional &tpoptab_nonuniform_line nj_tab(1)=3 nj_tab(2)=5 nj_tab(3)=7 prof_2d(1,1)=1.d0, 1.d0, 1.d0, prof_2d(1,2)=1.d0, 1.d0, 1.d0, 1.d0, 1.d0, prof_2d(1,3)=1.d0, 1.d0, 1.d0, 1.d0, 1.d0, 1.d0, 1.d0, radii_2d(1,1)=0.d0, 0.5d0, 1.d0, radii_2d(1,2)=0.d0, 0.2d0, 0.5d0, 0.7d0, 1.d0, radii_2d(1,2)=0.d0, 0.2d0, 0.3d0, 0.5d0, 0.7d0, 0.9d0, 1.d0 &end !/vflowtab/ at uniform grid rho(i)=(i-1)/(ndens-1) i=1,...,ndens ! for nonuniform_profile_mesh='disabled' !-------------------------------------------------------------------------- ! vflow profiles (table data, case: idens=1) ! vdflow1(ndens,nbulk) is the drift velocity || B [m/sec] !-------------------------------------------------------------------------- ! It this namelist we must set drift velocity for electrons vflow1(ndens,1) | and all ion species vflow1(ndens,i) {i=2:nbulk} ! Constant radial step is assumed. ! The first line (k=1, i=1:nbulk) vflow1(1,i) is for rho=0 ! The last line (k=ndens, i=1:nbulk) vflow1(ndens,i) is for rho=1 ! The example for ndens=5, nbulk=3, nbulka=4 ! ! electron-1 ion-2 ion-nbulk ! prof= 1., 1.2, 1.3, ! 1., 1.2, 2.3, ! 1., 1.2, 3.3, ! 1., 4.2, 4.3, ! 1., 5.2, 5.3, ! ! In all cases vflowtab should has nbulk columns with vflow ! profiles for all nbulk plasma components. ! ------------------------------------------------------------------------ ! Here array prof(nbulk,ndens) was used for convenience in namelist. ! vflow1(k,i)=prof(i,k) k=1:ndens, i=1:nbulk ! ------------------------------------------------------------------------ ! prof in [meter/sec] &vflowtab prof= 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, &end !/vflowtab_nonuniform_line/ at non-uniform grid ! for nonuniform_profile_mesh='enabled' !-------------------------------------------------------------------------- ! vflow profiles at arbitrary nonuniform radial mesh ! given in line form (idens=1): vflow11(ndens,nbulk) ! namelist /vflowtab_nonuniform_line/nj_tab,prof_2d,radii_2d ! ! integer nj_tab(nbulka): i=1,nbulk nj_tab(i) is the number of grid points ! for 'i' specie vflow ! It should be nj_tab(i).le.ndensa ! ! real*8 prof_2d(ndensa,nbulka) : vflow profiles ! ! real*8 radii_2d(ndensa,nbulka): small radius meshes used for vflow profiles !-------------------------------------------------------------------------- ! The first line (k=1, i=1:nbulk) vflow1(1,i) is for rho=0 ! The last line (k=ndens, i=1:nbulk) vflow1(ndens,i) is for rho=1 !--------------------------------------------------------------------------- ! vflow is the drift velocity parallel magnetic field B [meter/sec] !------------------------------------------------------------------- ! prof_2d in [meter/sec] &vflowtab_nonuniform_line nj_tab(1)=3 nj_tab(2)=5 nj_tab(3)=7 prof_2d(1,1)=0.d0, 0.d0, 0.d0, prof_2d(1,2)=0.d0, 0.d0, 0.d0, 0.d0, 0.d0, prof_2d(1,3)=0.d0, 0.d0, 0.d0, 0.d0, 0.d0, 1.d0, 1.d0, radii_2d(1,1)=0.d0, 0.5d0, 1.d0, radii_2d(1,2)=0.d0, 0.2d0, 0.5d0, 0.7d0, 1.d0, radii_2d(1,2)=0.d0, 0.2d0, 0.3d0, 0.5d0, 0.7d0, 0.9d0, 1.d0 &end !/zeftab/ at uniform grid rho(i)=(i-1)/(ndens-1) i=1,...,ndens ! for nonuniform_profile_mesh='disabled' !-------------------------------------------------------------------------- ! Zeff profiles (table data, case: idens=1) zeff1(ndens) !-------------------------------------------------------------------------- ! It this namelist we must set zeff1(ndens) ! Constant radial step is assumed. ! The first value zeff1(1) is for rho=0 ! The last value zeff2(ndens) is for rho=1 ! The example for ndens=5 ! zeff1= 1., 1., 1., 1. 1. !-------------------------------------------------------------------------- &zeftab zeff1=21*1.5 &end !/zeftab_nonuniform_line/ at non-uniform grid ! for nonuniform_profile_mesh='enabled' !-------------------------------------------------------------------------- ! zeff profile at arbitrary nonuniform radial mesh ! given in line form (idens=1): zeff1(ndens,1) ! namelist /temtab_nonuniform_line/nj_tab,prof_2d,radii_2d ! ! integer nj_tab(1): i=1,nbulk nj_tab(1) is the number of grid points ! for zeff ! It should be nj_tab(1).le.ndensa ! ! real*8 prof_2d(ndensa,1) : zeff profile ! ! real*8 radii_2d(ndensa,1): small radius meshes used for zeff profile !----------------------------------------------------------------------- ! It this namelist we must set zeff1(ndens) ! The first value zeff1(1) is for rho=0 ! The last value zeff1(ndens) is for rho=1 ! In the input namelist zeftab_nonuniform_line the second dimension ! is equal to 1. --------------------------------------------------------------------------- !Example at 3 radial points !nj_tab(1)=3 !prof_2d(1,1)= 1.d0, 1.d0, 1.d0, !radii_2d(1,1)=0.d0, 0.5d0, 1.d0, !------------------------------------------------------------------------ &zeftab_nonuniform_line nj_tab(1)=3 prof_2d(1,1)= 1.d0, 1.d0, 1.d0, radii_2d(1,1)=0.d0, 0.5d0, 1.d0, &end !/read_diskf/ ! i_diskf=0 usage analytic Maxwellian electron distribution ! i_diskf=1 read in the file diskf ! i_diskf=2 read in the file netcdfnm.nc ! ! i_diskf=3 analytic calculation of the non-Maxwellian distribution: ! f(p,theta,rho)=ne(rho)*[(1-rtail-rhot-rbeam)*f_max(T(rho)) ! +rtail*f_tail+rhot*f_hot+rbeam*f_beam] ! i_diskf=4 analytic +3D spline calculation of continuous non-Maxwellian ! distribution with three temperatures in three energy ranges. ! Uses 3D spline calculation of distributions on a grid. ! i_diskf=5 Fully analytic velocity space +1D spline vs radois for ! density calculation of continuous non-Maxwellian distribution ! with three temperatures in three energy ranges. ! Generally, much faster than i_diskf=4 approach. !------------------------------------------------------ ! the data for analytic non-Maxwellian electron distribution ! ! jx - the number of used normalized momentum/ mesh points ! lrz - the number of used radial mesh points ! iym - the number of used pitch-angle mesh points ! (here the same at each radius) ! ngen - the number of plasma species (here we use only electron specie with ! the number of specie k=1) ! jxa,iya,lrza,ngena ! the max values for jx,iym,lrz,ngen set in param.i ! rtem0 - ratio tem0/electron_temperature(rho=0) ! tem0 is the max energy for the momentum normalization (KeV) !-----tail parameters (i_diskf=3) ! f_tail=H(rho,rt1,rt2)*f_rel_Maxw(ttail), ! H(x,x1,x2) is the box function. H=1 for x1tol_emis*i_0 ! nharm1=< nharm =. ! wallr is the wall reflection coefficient, {0=< wallr =<1} ! ! i_rrind chooses the subroutine to calculate N_ray (default =0) ! i_rrind=0 N_ray=N ! i_rrind =1 from cold electron plasma using rrind ! i-rrind =2 from hot non-relativistic dispersion relation !-------------------------------------------------- ! i_r_2nd_harm=1 to calculate the major radius of the EC 2nd harmonic ! =0 do not calculate (default =0) ! (to use drawemfr.in file i_r_2nd_harm=1) ! (to use drawemf1.in file i_r_2nd_harm=0) !--------------------------------------------------- ! i_emission_spectrum =0 do not calculate emission spectrums ! 1 calculate emission spectrums ! jx_kin The number of kinetic energy grid points ! for emission spectrum. ! max_kin_energy_kev [KeV] maximal kinetic energy of the grid ! for emission spectra. !--------------------------------------------------- &emission i_emission=0 tol_emis=5.0d-3 nharm1=1 nharm2=1 nfreq=5 freq00=0.585d0 freq01=0.885d0 wallr=0.9d0 i_rrind=1 i_r_2nd_harm=0 i_emission_spectrum =0 jx_kin=100 max_kin_energy_kev=200.d0 &end !/ox/ !------------------------------------------------------------------------ !namelist related to calculation of EC cone vertex coordinates !for the optimal OX mode conversion (details on this calculation !will be given in the Genray manual) !------------------------------------------------------------------------ ! i_ox =0 /default/ do not use these calculations. ! =1 calculations of the optimal EC cone vertex for OX conversion. ! The optimal direction will give optimal N_parallel ! in OX conversion point at Xe=1. ! In this case should have istart=1. Wave frequency is from ! frqncy in &wave namelist section. ! Optimal launch angles are output to ECcone_optimal.dat. ! =2 launch the ray using EC cone vertex coordinates calculations ! and using OX transmission procedure. !------------------------------------------------------------------------ ! theta_bot(icone) < theta_top(icone) [degree] ! are the poloidal angle boundaries (degree) at ! Xe=1 surface. They are used in genray.f to find the optimal ray ! direction at the given EC cone vertex icone=1,...,ncone !------------------------------------------------------------------------ ! i_ox_poloidal_max is the maximal number of the poloidal angles used ! in the bisection method. This method calculates the ! the poloidal angle theta_pol of the point M at the ! flux surface Xe(rho=1) : M(poloidal_angle,rho). ! The ray launched from M to the plasma edge will ! go to the EC cone vertex. !------------------------------------------------------------------------ ! eps_antenna is the accuracy with which the ray launched from the ! flux surface Xe(rho)=1 at the given poloidal angle ! reaches the given cone vertex (i_ox=1). ! This accuracy is calculated using the distance of ! the vertex radial coordinate from the specified: ! antenna position, ! sqrt((rst_ox-rst)**2+(zst_ox-zst)**2)< eps_antenna ! (meters) !------------------------------------------------------------------------ !eps_xe The parameter which sets the vicinity ! of the O-mode cutoff surface. ! If xe < (1-eps_xe) then this subroutine will ! creates the ray jump in small radius direction ! and find the X mode. ! eps_xe=1.d-2 is seted as default in dinit.f !------------------------------------------------------------------------ &ox i_ox=2 theta_bot(1)=0.0d0 theta_top(1)=30.d0 theta_bot(2)=0.0d0 theta_top(2)=30.d0 i_ox_poloidal_max=20 eps_antenna=1.d-4 eps_xe=1.d-2 &end !------------------------------------------------------------------------ !/adj_nml/ !------------------------------------------------------------------------ ! INTEGER ! i_adj =1 to use adj calculations ! =0 do not use adj_calculastions ! npsi0 is a number of radial points ! nthp0 is a number of polidal points for the integration ! along b filed line ! nmax_chi is the number of grid points in u_0 direction (for adj mesh) ! imax_chi is the number of grid points in pitch angle ! lmax_chi is the maximal order of Legendre harmonic used. ! lmax_chi=0 corresponds to collision with a stationary Maxwellian. ! Usually lmax_chi=21, or at least 3. ! tmax is the maximal number of time steps ! ! n_harm_adj_min Number of minimal and maximal cyclotron harmonics ! n_harm_adj_max for power and CD calculations ! It should be: n_harm_adj_min.le.n_harm_adj_max ! n_relt_intgr_adj Number of points for Power and CD integration ! in p_perp direction along resonce curve ! REAL*8 ! t is the temperature in units of m*u_n**2 ! If you want velocities normalized to sqrt(T/m), set t=1. ! ze is the electron charge state. It is usually =1, ! but for Lorentz limit, ion charge Zi ==> infinity, ! set ze=0 and zi=1 ! umax is the maximal value of u_0. ! The grid is spaced between 0 and umax. ! dt is time step in adj solver, usually =1 ! alpha is a weighting factor in the time stepping algorithm. ! =0 for explicit algorithm ! rho_ governs the treatment of the boundary at u=umax ! for rho_=1 the second derivative from the adjoint function chi ! d^2(chi)/dx^**2(at u=umax)=0 ! for rho_=0 the first derivative =0 ! aerrmx is some error for subadj ! rerrmx is some error for subadj ! epsi_adj the accuracy used in integration by adaptive Simpson ! Works at i_resonance_curve_integration_method_adj=4 case only !------------------------------------------------------------------------ ! choose the integration method for power and CD calulations ! i_resonance_curve_integration_method_adj=1 !rectangle integration ! !over angle, ! !for ellipse case only ! i_resonance_curve_integration_method_adj=2 !rectangle formula, ! !p_perp0 integration ! !elliptic or hyperbolic case ! i_resonance_curve_integration_method_adj=3 !trapezoidal formula, ! !p_perp0 integration ! !elliptic or hyperbolic case ! i_resonance_curve_integration_method_adj=4 !adaptive Simpson integration ! !p_perp0 integration ! !elliptic or hyperbolic case ! ! i_resonance_curve_integration_method_adj is used ! to choose the numerical integration method for ! power and CD calculation. ! !------------------------------------------------------------------------ ! i_calculate_or_read_adj_function =1 calculate chi function ! and save in file adjout. ! =0 read chi function from ! the file adjout. ! Since the adjoint function chi only depends on the plasma equilibrium, ! if it doesn't change then the same adj function can be used for ! all wave modes and frequencies. !------------------------------------------------------------------------ ! i_chi_interpolation to choose interpolation method ! for derivatives from chi function ! =1 using spline [default value] ! [has given problem near t-p bndry] ! =2 linear interpolation ! of numerical derivatives !------------------------------------------------------------------------ &adj_nml i_adj=0 npsi0=10 !=< npsi0a nthp0=1000 !=< nthp0_a nmax_chi=400 imax_chi=200 lmax_chi=3 tmax=300 t=1.d0 ze=1.d0 umax=10.d0 dt=1.d0 alpha=0.55d0 rho_= 1 aerrmx=1.d-5 rerrmx=2.d-6 n_harm_adj_min=0 n_harm_adj_max=1 n_relt_intgr_adj=200 i_resonance_curve_integration_method_adj=4 epsi_adj=1.d-5 !works for i_resonance_curve_integration_method_adj=4 case only i_calculate_or_read_adj_function=1 i_chi_interpolation=1 &end !------------------------------------------------------------- !/edge_prof_nml/ to set density profile outside LCFS ! integer ! &i_edge_dens_anal, ! =0 to use sigmedgn=constant ! ! =1 the analytic formula for sigmedgn(theta_pol) ! ! =2 table data for sigmedgn(theta_pol) ! [default = 0] !------------------------------------------------------------------------- ! For the temperature outside LCFS (rho>1) at no_reflection=1 ! the code will use following formula at all i_edge_dens_anal values: ! ! temperature(i,rho)=temperature(i,rho=1)*exp(-(rho-1)/sigmedgt) ! ! Here ! i is a number of plasma specie i=1,..,nbulk, ! sigmedgt=const is normalized to the plasma radius. ! By default ! sigmedgt=0.02 ! ! For densities outside LCFS (rho>1) at no_reflection=1 the code will use ! different formula according to i_edge_dens_anal value. !....................................................................... ! At i_edge_dens_anal=1 the code will use following formula ! ! density(i,rho)=density(i,rho=1)*exp(-(rho-1)/sigmedgn) ! Here ! i is a number of plasma specie i=1,..,nbulk, ! sigmedgn=const is normalized to the plasma radius. ! By default ! sigmedgn=0.02 !........................................................................ ! At i_edge_dens_anal=1 the code will use following formula ! ! density(i,rho,theta_pol)=density(i,rho=1)*exp(-(rho-1)/sigma_edge_n(theta_pol)) ! ! The function sigma_edg_n(theta_pol) is normalized to the plasma radius. ! ! sigma_edge_n(theta_pol_radian)=sigma_edgen_0+ ! +del1*exp1(theta_pol_radian)+del2*exp2(theta_pol_radian) ! ! exp1(theta_pol_radian)=exp(-((theta_pol_radian-theta_pol_edge_1_radian)/ ! sigma_theta_pol_edge_1_radian)**2) ! exp2(theta_pol_radian)=exp(-((theta_pol_radian-theta_pol_edge_2_radian)/ ! sigma_theta_pol_edge_2_radian)**2) ! del1=sigma_edgen_1-sigma_edgen_0 ! del2=sigma_edgen_2-sigma_edgen_0 ! ! Input angles in the namelist should be set in degree. ! ! So, sigma_edge_n is equal to ! 1) =sigma_edgen_0 at poloidal angles which are far from given poloidal angles ! theta_pol_edge_1 and theta_pol_edge_2 ! 2) =sigma_edgen_1 poloidal angles near theta_pol_edge_1 ! 3) =sigma_edgen_2 poloidal angles near theta_pol_edge_2 !......................................................................... ! At i_edge_dens_anal=2 the code will use following formula ! ! density(i,rho,theta_pol)=density(i,rho=1)*exp(-(rho-1)/sigma_edge_n(theta_pol)) ! ! The function sigma_edg_n(theta_pol) is normalized to the plasma radius. ! sigma_edg_n(theta_pol) is a spilne approximation at the given tables: ! ! theta_pol_edge_dens_ar_degree(1:n_pol_edge_dens) poloidal mesh ! ! sigmedgn_ar(1:n_pol_edge_dens) normalized to small radius and ! set in poloidal mesh points !------------------------------------------------------------------------ ! Minimal values of density and temperature outside LCFS ! ! dens_min_edge !minimum edge density ! !10**13/cm**3 for all plasma species ! !Applies for all i_edge_dens_anal values ! temp_min_edge, !minimal edge temperature ! ![KeV] for all plasma species ! ! Outside LCFS the code uses dens_min_edge to sets ! 1) the minimal electron density equal to "dens_min_edge" ! 2) for ions the minimal ion temperature will be different for each ion ! specie i=2,,....,nbulk to create the plasma charge equal to Z_eff ! at LCFS (rho=1) ! dens_min(i)=dens_min_edge*ratio(i) ! Here ratio(i)=ion density(i,rho=1)/electron density(rho=1) ! is the ratio of the ion density(i) at rho=1 ! to the electron density at rho=1 ! !------------------------------------------------------------------------- ! Data to set ! &n_pol_edge_dens ! number of poloidal points (integer) of ! ! the poloidal mesh for i_edge_dens_anal=2! ! ! theta_pol_edge_dens_ar_degree, !poloidal angle mesh [0=