Commun. Comput. Phys., 10 (2011), pp. 716-741. A Code that Simulates Fast-Ion D_alpha and Neutral Particle Measurements W. W. Heidbrink 1*, D. Liu 2, Y. Luo 3, E. Ruskov 1, B. Geiger 41 Department of Physics and Astronomy, University of California, Irvine, California, CA 92697, USA. 2 Department of Physics and Astronomy, University of California, Irvine, California, CA 92697, USA; and Department of Physics, University of Wisconsin-Madison, Madison, WI 53706, USA. 3 Department of Physics and Astronomy, University of California, Irvine, California, CA 92697, USA; and Tri Alpha Energy Corporation, 27211 Burbank, Foothill Ranch, CA 92610, USA. 4 Max-Planck Institute fur Plasmaphysik, Garching, Germany. Received 19 August 2010; Accepted (in revised version) 8 February 2011 Available online 1 June 2011 doi:10.4208/cicp.190810.080211a Abstract A code that models signals produced by charge-exchange reactions between fast ions and injected neutral beams in tokamak plasmas is described. With the fast-ion distribution function as input, the code predicts the efflux to a neutral particle analyzer (NPA) diagnostic and the photon radiance of Balmer-alpha light to a fast-ion $D_\alpha$ (FIDA) diagnostic. Reactions with both the primary injected neutrals and with the cloud of secondary "halo" neutrals that surround the beam are treated. Accurate calculation of the fraction of neutrals that occupy excited atomic states (the collisional-radiative transition equations) is an important element of the code. Comparison with TRANSP output and other tests verify the solutions. Judicious selection of grid size and other parameters facilitate efficient solutions. The output of the code has been validated by FIDA measurements on DIII-D but further tests are warranted. Notice: Undefined variable: ams in /var/www/html/issue/abstract/readabs.php on line 163 PACS: 52.55.Pi, 52.65.Pp, 52.70.Kz Key words: Fast ions. *Corresponding author. Email: Bill.Heidbrink@uci.edu (W. W. Heidbrink), dliu29@wisc.edu (D. Liu), yluo@trialphaenergy.com (Y. Luo), eruskov@uci.edu (E. Ruskov), bgeiger@ipp.mpg.de (B. Geiger)