Journal of ELECTRICAL ENGINEERING, VOL. 56, NO. 1-2, 2005, 26–30 BCalc ––– A COMPUTER PROGRAM FOR PROCESSING THE CYCLOTRON MAGNETIC STRUCTURE MEASUREMENT DATA Jozef Franko* — Georgij G. Gulbekian* — Ivan A. Ivanenko* — Jozef Ken´ ıˇ z** — Stanislav Kr´ alik** — M´ arius Pavloviˇ c*** BCalc is an original computer program to process data from the measurements of cyclotron magnetic structures. It allows to analyze and visualize the measured data as well as to calculate some analytical quantities related to particle dynamics in isochronous cyclotrons. The program has been developed and written in the Flerov Laboratory of Nuclear Reactions (FLNR) of the Joint Institute for Nuclear Research in Dubna (JINR). The basic features of the program, its capabilities as well as examples of utilization are presented in the paper. Keywords: cyclotron, isochronous cyclotron, cyclotron magnetic structure, magnetic field measurement, magnetic field forming 1 INTRODUCTION Design of the magnetic structure is one of the crucial parts of the cyclotron design. Its goal is to provide the required magnetic field distribution in the active area of the cyclotron. In the case of isochronous cyclotrons, the relative inaccuracy of the real magnetic field distribution should be about 0.05 %, inaccuracy of forming the aver- age isochronous field as well as the required inaccuracy of the simulated field distribution is as low as 0.01%. There are several methods of designing and forming the cyclotron magnetic structures, which may be com- bined complementarily. The first method is based on sim- ulations of the magnetic field distribution with the aid of dedicated computer codes like POISSON [1], OPERA [2], KOMPOT [3] etc . However, even in this case, experimen- tal work is necessary. Prior to simulations, the B-H-curve is measured on samples of materials used in the cyclotron magnetic circuit. The second method is based on measur- ing the magnetic field distribution on prototypes or down- scaled models, evaluation and extrapolation of measured data and making corrections to the magnetic structure by shimming of sectors and a proper design of correction coils. Measurements of the magnetic structure usually pro- vide a large amount of data that should be processed effectively and repeatedly as part of the optimizing itera- tion procedure. A dedicated computer code BCalc devel- oped for this particular purpose is described in the paper. BCalc allows to process and visualize the measured data as well as to calculate some quantities related to particle dynamics in cyclotrons. 2 DESCRIPTION OF THE BCalc CODE 2.1 Historical root, hardware and software re- quirements The first version of a program developed to assist the field forming at the U400M JINR cyclotron was written in FORTRAN by E.L. Ivanov from Bulgaria [4,5]. Later on, the code was essentially rewritten in PASCAL and com- piled in DELPHI by I.A. Ivanenko [6,7]. It was enriched by additional graphical and mathematical routines like 3D-plots and harmonic analysis reaching its current ver- sion described in this paper. It has successfully been ap- plied to investigate magnetic structures of the cyclotrons that are presently being designed at JINR [8]. BCalc runs under MS-Windows operating system. The minimum required monitor resolution is 800 × 600. It is recommended to use at least a Pentium II processor and 64 MB operating memory in order to display the 3D-plots within a reasonable time. It is also necessary to install the OpenGL graphical library. 2.2 Data-processing tools The input data to be processed by BCalc are provided in a specific MAP-file that contains values of the vertical component of the magnetic flux density, B z , as a function of spatial co-ordinates. A cylindrical co-ordinate system is used. Radial axis r coincides with the machine radius, vertical axis z is perpendicular to the median plane of the cyclotron, and azimuthal axis θ is positive for the anticlockwise motion of particles in the machine. The centre of the co-ordinate system coincides with the centre *Flerov Laboratory of Nuclear Reactions, Joint Institute for Nuclear Research, 141980, Dubna, Moscow Region, Russia **Flerov Laboratory of Nuclear Reactions, Joint Institute for Nuclear Research, 141980, Dubna, Moscow Region, Russia, on leave from the Slovak University of Technology ***Department of Nuclear Physics and Technology, Faculty of Electrical Engineering and Information Technology, Slovak University of Technology, Ilkoviˇ cova 3, SK-812 19 Bratislava, Slovakia, E-mail: marius.pavlovic@stuba.sk ISSN 1335-3632 c 2005 FEI STU