--- title: GRAY user manual author: - D. Farina[^1] - L. Figini[^1] - A. Mariani[^1] - M. Guerini Rocco[^2] date: 'November 30, 2012. Updated: November 30, 2021' lang: en-GB language: english # Bibliography link-citations: true citation-style: res/style.csl reference-section-title: Bibliography references: - id: gray title: 'A quasi-optical beam-tracing code for electron cyclotron absorption and current drive: GRAY' author: - family: Farina given: D. container-title: Fusion Science and Technology doi: 10.13182/fst07-a1494 issue: 2 issued: 2007-08 page: 154-160 publisher: Informa UK Limited type: article-journal volume: 52 - id: gaussian-beam title: 'Gaussian light beams with general astigmatism' author: - family: Arnaud given: J. A. - family: Kogelnik given: H. container-title: Applied Optics doi: 10.1364/ao.8.001687 issue: 8 issued: 1969-08 page: 1687 publisher: The Optical Society type: article-journal volume: 8 - id: cocos title: 'Tokamak coordinate conventions: COCOS' author: - family: Sauter given: O. - family: Medvedev given: S.Yu. container-title: Computer Physics Communications doi: 10.1016/j.cpc.2012.09.010 issue: 2 issued: 2013-02 page: 293-302 publisher: Elsevier BV type: article-journal volume: 184 - id: marushchenko title: 'Current drive calculations with an advanced adjoint approach' author: - family: Marushchenko given: N. B. - family: Beidler given: C. D. - family: Maassberg given: H. container-title: Fusion Science and Technology doi: 10.13182/fst55-180 issue: 2 issued: 2009-02 page: 180-187 publisher: Informa UK Limited type: article-journal volume: 55 - id: dispersion title: 'Relativistic dispersion relation of electron cyclotron waves' author: - family: Farina given: Daniela container-title: Fusion Science and Technology doi: 10.13182/fst08-a1660 issue: 1 issued: 2008-01 page: 130-138 publisher: Informa UK Limited type: article-journal volume: 53 - id: angles title: ??? author: - family: Zvonkov given: A. - family: Gribov given: Y. - family: Bindslev given: H. issued: 2003-3-5, 2003-4-5 # Font mainfont: Libertinus Serif mathfont: Libertinus Math monofont: Fira Mono # PDF output options classoptions: - a4paper - 14pt geometry: - top=2cm - bottom=2cm # HTML output options css: res/style.css # pandoc-crossref options linkReferences: true tableEqns: true ... [^1]: Istituto per la Scienza e Tecnologia dei Plasmi, Consiglio Nazionale delle Ricerche Via R. Cozzi, 53 - 20125 Milano, Italy [^2]: Università degli Studi di Milano-Bicocca, Piazza dell'Ateneo Nuovo, 1 - 20126, Milano # Introduction The beam tracing code GRAY performs the computation of the quasi-optical propagation of a Gaussian beam of electron cyclotron waves in a general tokamak equilibrium, and of the power absorption and driven current [@gray]. The propagation of a general astigmatic Gaussian beam is described within the framework of the complex eikonal approach in terms of a set of "extended" rays that allow for diffraction effects. The absorbed power and the driven current density are computed along each ray solving the fully relativistic dispersion relation for electron cyclotron wave and by means of the neoclassical response function for the current. The aim of the present note is to document the current version of the GRAY code, by describing the main code features and listing the inputs and outputs. To this goal in [@sec:physics] the main equations and models used in the GRAY code to compute Gaussian beam propagation, absorption and current drive are summarized shortly. In [@sec:io-files], the details on the code inputs and outputs are presented.