OPEN Source - https://github.com/EDlougach/BTR
The BTR-code (Beam TRansport code) was developed for ITER injectors design before 1995. It is used for the design of both ITER heating (HNB) and diagnostic (DNB) neutral beams and allows to take into account the detailed NB structure and the injector geometry with realistic gas and fields distributions.
Briefly, BTR calculates the power and power density maps in the NB injectors’ beamlines and beam ducts by interception of the neutral beam and charged particles (residuals and/or re-ionized beam particles) taking various possible descriptions of the optical characteristics of the beam. The electric and magnetic field distributions, as well as gas density profiles, can be calculated within BTR (e.g. 2D potential field in RID), defined directly, or imported from external text files (in tabular form).
BTR simulates in particular:
the accelerated beam structure and optical parameters, which can be described in regular form (via direct input) or irregular (from external input file);
the neutralization of the accelerated beam with a “known” neutralization efficiency (no gas), or using the input gas density profile to know the actual neutralization efficiency and region;
the neutral beam tracing in the beamline till the Tokamak First Wall;
the re-ionization of the neutral beam in the Duct using the input gas profile;
the ionization of the neutral beam in Tokamak using the input plasma profile;
the charged particles (accelerated, residual or re-ionized) tracing in the input electric and magnetic fields using the traditional big-particles model;
the interception of the neutral beam and charged particles by the beamline components, calculating the power density maps and peak power densities on them;
power density beam cross-sections at different positions along the beamline axis;
shine-through power density map on the Tokamak First Wall.
BTR is Win-application, created by means of MS Visual C++. At present the size of executable is about 1 MB. It still runs under Windows 95, 98, NT, 2000, XP, Vista, 7. There is no hard limit for problem size. The only restriction is the memory of the computer.
BTR comes with its own all-inclusive interactive shell (standard Windows User Interface, UI). It allows a flexible direct input of NBI geometry and model parameters of beam tracing, also it displays the results (load maps) in plots and tables. Beam tracing and conversions are visualized during the calculation, and the images of power maps can be stored in TEXT or BMP format.