<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Numerical simulation of the ion focusing process in a dust impact time of flight mass spectrometer</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">I</forename><forename type="middle">V</forename><surname>Piyakov</surname></persName>
							<affiliation key="aff1">
								<orgName type="institution">Samara National Research University</orgName>
								<address>
									<addrLine>Moskovskoe Shosse 34А</addrLine>
									<postCode>443086</postCode>
									<settlement>Samara</settlement>
									<country key="RU">Russia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">D</forename><forename type="middle">V</forename><surname>Rodin</surname></persName>
							<affiliation key="aff1">
								<orgName type="institution">Samara National Research University</orgName>
								<address>
									<addrLine>Moskovskoe Shosse 34А</addrLine>
									<postCode>443086</postCode>
									<settlement>Samara</settlement>
									<country key="RU">Russia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">M</forename><forename type="middle">A</forename><surname>Rodina</surname></persName>
							<affiliation key="aff1">
								<orgName type="institution">Samara National Research University</orgName>
								<address>
									<addrLine>Moskovskoe Shosse 34А</addrLine>
									<postCode>443086</postCode>
									<settlement>Samara</settlement>
									<country key="RU">Russia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">A</forename><forename type="middle">M</forename><surname>Telegin</surname></persName>
							<affiliation key="aff1">
								<orgName type="institution">Samara National Research University</orgName>
								<address>
									<addrLine>Moskovskoe Shosse 34А</addrLine>
									<postCode>443086</postCode>
									<settlement>Samara</settlement>
									<country key="RU">Russia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff0">
								<orgName type="department">IV International Conference on &quot;Information Technology and Nanotechnology&quot; (ITNT</orgName>
								<address>
									<postCode>2018</postCode>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Numerical simulation of the ion focusing process in a dust impact time of flight mass spectrometer</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">AFC4BD317DD00EE9E263FADDC0FB3D36</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-23T20:24+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>The article presents the description of a design of dust-impact time of flight massspectrometer. A method for calculating the trajectory of a charged particle on a triangular grid is considered. The implementation of the calculation algorithm for the personal computer, the GPU accelerator and the supercomputer is described. The main differences in implementations, comparison of performance and accuracy of calculation are given. The advantages and disadvantages of each implementation are considered.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Property analysis of the micrometeoroid and debris particles in-situ is impossible without the use of appropriate recording equipment. Thus, for the analysis of the chemical composition of particles, dustimpact time-of-flight mass spectrometers are used. The advantage of this type of analyzers is high speed, the ability to register single events, small size and power consumption. A unique feature of dust-impact time-of-flight mass spectrometers is ionization by a high-velocity collision of a particlestriker and target, which occurs randomly at an arbitrary point of the target. An increase in the probability of ionization in this way is achieved by increasing the active area of the target, which leads to the need for additional spatial focusing of the ions obtained using parabolic reflectors or electrostatic reflectors with a special form of electric field. The plasma produced as a result of a highvelocity collision has a high energy spread, which necessitates the use of electrostatic ion mirrors that provide a temporary focusing of ion packets.</p><p>The principle of operation of time-of-flight devices is based on measuring the time of flight of particles with the known energy value from the ion source to the receiver. In an ideal case, the time of flight depends only on the mass of the ion. The development of real devices is based on the determination of design parameters that ensure maximum independence of the time of flight from the place of collision to the ion receiver from the ion initial energy. For this purpose, a one-dimensional field structure <ref type="bibr">[1]</ref> is calculated that provides the required temporal focusing and the requirements for design elements are developed by numerical simulation. It allows to form field structure close to the desired in the maximum volume of the device structure. Verification of each of the design options is carried out by simulating the trajectories of model ion packets, with the subsequent calculation of the resolving power. In this paper we consider the software that implements a massively parallel algorithm for calculating particle trajectories on a triangular grid, which provides the possibility of modeling curvilinear structural elements.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Formulation of the problem</head><p>The structure diagram of the device under consideration is shown in Figure <ref type="figure" target="#fig_0">1</ref>. A detailed description of the device is given in <ref type="bibr">[2]</ref>. The device works as follows. When the particle strikes the target, the particle substance is ionized, accelerated by an electric field and enters the ion mirror, bounded by grids 4, 5, 6, where it is reflected and, passing back through the target (by this moment the accelerating potential is turned off), flies through the fieldless space between the meshes 1 and 8, when ion packet is reflected in a parabolic reflector and enters the receiver input 10, an ion pulse is formed at its output 11.</p><p>A special feature of the reflector is the shape of a paraboloid with a focus in the ion receiver. This facilitates additional spatial focusing of ion beams. Thus, the loss of ions decreases, leading to increase of the device sensitivity. The energy focusing of ions is performed by the ion mirror.</p><p>The main parameters of the time-of-flight mass spectrometer are its resolving power and sensitivity. At the same time, their values depend on many factors:</p><p>-design parameters of a time-of-flight mass spectrometer; -the energy spread of ions formed as a result of high-velocity collision; -direction of the initial ion velocity vectors; -coordinate of the particle impact on the target; -chemical composition of particles To determine the influence of these factors on the characteristics we are interested in, we need to calculate the trajectories of ions in the device path. For this purpose, for the given mass spectrometer structure, the following parameters are specified: the distances between the grids and the accelerating potential, the target and ring dimensions, the curvature of the parabolic reflector, the diameter of the central target hole, the parameters of the field-setting rings. The grid with the distribution of electrostatic potential inside the device path that is used on the stage of modelling the operation of the device is preliminary calculated.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">The calculation algorithm</head><p>Numerical simulation of the motion of charged particles can be implemented both with the use of a grid of field values obtained by the method of finite differences, and with the use of nodal values obtained by the finite element method. The advantage of the first method is the clarity, simplicity of implementation of the cell search functions and cubic interpolation, ease of mesh joining when calculating in several areas. However, an essential disadvantage of this type of grids is the impossibility of locating nodes on curvilinear surfaces. The finite element method allows you to divide arbitrary regions into separate elements (in certain cases, triangles), which allows to create an exact reconstruction of the shape of the regions of interest. At the same time, the use of finite element grids requires the implementation of additional functions, for example, the search for the triangle to which the point belongs, as well as the more complex than in the finite difference method data structures for storing grid information, which is a graph with a description of nodes and triangles.</p><p>Based on the data on the interaction coordinates and velocity, an ion packet with a known value of the energy spread is formed <ref type="bibr">[3]</ref>. For each ion in the ion packet with a given time step, the increment of coordinates is calculated. After each iteration, a check is made for impact with the structural element, escape and detection. Times of flights of the detected ions are conserved. To estimate the design characteristics for each mass, it is required to calculate the number of ions, to estimate the collection coefficient, the mean time of flight, the standard deviation and the resolution of the instrument on two sigma level.</p><p>Step by step algorithm of the program on a triangular grid can be described as follows.</p><p>1. Download the data about the calculated grid with the field from the file. 2. File parsing -linking nodes, triangles, regions and field values.</p><p>3. Creating a Mesh object with a description of the relationships between nodes and triangles. 4. Formation of a model ion packet, starting from the given coordinates and the speed of interaction.</p><p>5. Finding the current triangle for each ion. 6. Interpolation of the field at the location of each ion. 7. Calculation of the displacement of each ion in time dt. 8. Checking the location of the ion in the current triangle. 9. Recursive search for a new triangle. 10. Check for escape / detection -return to point 6.</p><p>In general, the implementation structure is similar to the one described in <ref type="bibr">[4]</ref>. So in step 4 the Box-Muller algorithm is similarly used for the formation of a packet with a Maxwellian velocity distribution. The ion displacement can also be calculated by the trapezoidal rule or by the Runge-Kutta method. The difference between this implementation is the use of the bilinear interpolation method for a triangular grid and the need to check whether the coordinates of the particle belong to the current triangle. Both problems are solved using the known approaches with small modifications. To accelerate the interpolation operation, each instance of the triangle class stores the previously calculated interpolation coefficients s1, t1, s2, t2, s3, t3, A, coeff and to speed up the search for a new triangle to which the particle coordinates belong. The same instance stores references to neighbouring triangles, which allows to replace the search for all grid triangles by a recursive search from the current triangle.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Features of the algorithm implementation for calculating the trajectories for CPU, GPU, HPC</head><p>The implementation for the CPU is written in C# and contains four main classes for implementing trajectory calculation. The Point class is used to store graph nodes, contains the node index, coordinate information, field values, and the number of triangles to which this node belongs. The Triangle class contains the index of the triangle, three references to the nodes-vertices of this triangle, information about the domain to which the triangle belongs, three references to adjacent triangles, pre-calculated coefficients for interpolation, and methods for bilinear interpolation of the field and the search for a new triangle when the point doesn't belong to the current triangle. The Mesh class contains arrays of nodes and triangles, as well as the methods for finding the nearest point, triangle, reading and writing files. The Particle class contains information about the mass and charge of a particle, its speed, coordinates, the current triangle, and also a method that implements an iterative calculation of the trajectory on a triangular grid. The use of a graphic accelerator imposes severe restrictions on the implementation of software, leading to the need, if possible, to represent all information in the form of arrays. Thus, the implementation for the GPU contains the following arrays: triangleNeighbours, trianglePoints -arrays of vector format uint4 for storing information about neighbouring triangles and triangle vertices. Arrays s1_t1, s2_t2, s3_t3, A_coeff of vector format double2 are used for storing information about the coefficients for interpolating the field. Arrays pointsCoordinates and pointsFields of vector format double2 contain information about grid nodes. Arrays particlesCoordinates and particlesSpeeds vector format double2 are used for storing information about the coordinates and velocities of particles. An array of particlesTimes of double1 format is used for storing the current time of the particle. An array of particlesTriangles of the uint1 format contains the index of the current triangle of the particle. The index in the array is used to refer to nodes, triangles, and particles instead of explicit indexes. These arrays are created in the host memory and populated with data from the CPU implementation, after those arrays are created in the GPU memory and data from the host arrays is copied to the GPU. Then, the texture and surface links are bound to the GPU arrays, which allows using the operations of texture samples that implement hardware caching. It should be noted that linking texture references to arrays of vector double types is impossible, so when copying data from the CPU to the GPU, a bit conversion of one double number to a pair of int numbers takes place. After the texture sample, a reverse bit conversion occurs. Implementation for the supercomputer Sergey Korolev differs both from the version for the PC, and from the version for the GPU. Since this implementation is written for the MPICC compiler, and the version of the C language that does not support OOP is used. The data about triangles and their interrelationships and the relations with nodes are stored in triangleNeighbours, trianglePoints of int format, data on coefficients for interpolation in triangleCoeff array, double format , the coordinates of the nodes and field values in them -in the pointsCoordinatesAndFields array of the double format, the particle data in the particles array of the double format. This implementation does not require additional type conversions when accessing memory, all arrays also lack the index of nodes, triangles and particles, instead of them an index in the array is used. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Results of calculation and performance comparison</head><p>To visualize the modelling process and evaluate the performance of the design, a visualization module was written to depict the movement of ion packets in the volume of the structure. Figure <ref type="figure" target="#fig_4">5</ref> shows several combined frames, the focusing of ion packets over time is clearly visible -two masses are well separated at the receiver plane. The results of modelling the construction of a time-of-flight mass spectrometer with a linear ion mirror and a parabolic reflector are presented in Figures <ref type="figure" target="#fig_6">6 and 7</ref>. Calculations were made for 16382 particles without taking into account the transparency coefficients of the grids and the target.  Comparison of implementations for a personal computer, accelerator GPU and supercomputer was performed for a different number of particles. The comparison did not reveal any differences in the accuracy of calculations, which is generally explained by the fact that all calculation modules are implemented using variables of the double type. HPC implementation was launched on four processors.</p><p>The results of measurements of the execution time of 10,000 iterations are given in Table <ref type="table" target="#tab_0">1</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">Conclusion</head><p>Using the above mentioned software, the authors simulated various designs of the dust-mass spectrometer. Simulation of a design with a linear mirror and a parabolic reflector showed a relatively low resolving power of about 250-300 units regardless of the energy spread and the collision coordinates. However, for a combination of factors, such as the achieved resolution, ion collection coefficient, ease of adjustment, this design is more preferable than others. Thus, the ion collection coefficient drops sharply in designs with a flat reflector. In constructions with a nonlinear ion mirror, it is not possible to achieve independence of the resolving power from the collision coordinate.</p><p>The presented software provides the possibility of modelling structures with axial symmetry, containing curvilinear electrodes and non-uniform electric fields. In addition to modelling point single-shot sources, such as laser or high-speed impact ion sources, it is also possible to simulate the trajectories of charged particles in various instruments forming ion fluxes, such as gas mass spectrometers with continuous ionization or gas-discharge sources of off-electrode plasma <ref type="bibr">[4,</ref><ref type="bibr">5]</ref>.</p><p>In contrast to using rectangular meshes <ref type="bibr">[6,</ref><ref type="bibr">7]</ref>, the implementation of the accelerator for the GPU (2,880 cores per 1020 MHz) did not show a significant increase in performance, which is explained by a higher number of branches, during the execution of the algorithm that implements the calculation on a triangular grid. However, even such a modest increase in the speed of execution can be useful in solving design optimization problems that require multiple tracing of ion packets, with a total number of estimated passes reaching several tens of thousands, and a total execution time of several days or weeks.</p><p>The implementation for HPC, proved to be more efficient with the same number of processors, which can be explained by greater memory performance of the binary code produced by the MPICC compiler. Due to the fact that this task is parallel to the initial data, performance can be increased by increasing the number of compute nodes.  </p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 .</head><label>1</label><figDesc>Figure 1. Dust-impact mass spectrometer with a parabolic reflector (2 -target; 3accelerating grid; 4retarding grid, grounded; 5, 6 -mesh of the ion mirror, 1 -grounded grid; 7, 8 -parabolic reflector, 10, 11 -ion receiver; 9 -receiver casing, grounded).</figDesc><graphic coords="2,72.40,99.25,248.62,150.60" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 2 .</head><label>2</label><figDesc>Figure 2. Class structure for storing information about the calculated grid, PC implementation in C#.</figDesc><graphic coords="3,72.40,591.91,265.00,170.48" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 3 .</head><label>3</label><figDesc>Figure 3. The structure of arrays for storing information about the calculated grid, GPU implementation in the CUDA language.</figDesc><graphic coords="4,72.40,339.58,270.82,109.44" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 4 .</head><label>4</label><figDesc>Figure 4. Structure of arrays for storing information about the calculated grid, HPC implementation in C language.</figDesc><graphic coords="4,72.40,575.47,263.80,90.08" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Figure 5 .</head><label>5</label><figDesc>Figure 5. Visualization of the trace of ion packets. A packet of two masses is formed at point 1, accelerates and flies into the ion mirror 2, reflects and flies back to the target 3, flies through the target, part of the ions settles on the receiver shell 4, is reflected in the parabolic reflector 5 and flies into the receiver 6.</figDesc><graphic coords="5,129.10,99.25,169.10,155.89" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Figure 6 .</head><label>6</label><figDesc>Figure 6. Dependence of the resolving power of the instrument on the collision coordinate and the energy spread.</figDesc><graphic coords="5,78.17,305.10,197.25,126.00" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_6"><head>Figure 7 .</head><label>7</label><figDesc>Figure 7. Dependence of the number of received ions on the collision coordinate and energy spread.</figDesc><graphic coords="5,309.95,305.10,212.97,126.40" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_7"><head></head><label></label><figDesc>Semkin N D, Piyakov I V, Rodin D V and Pomel'nikov R A 2012 Analytical method for computing the electrostatic field distribution in the deflector of the time-of-flight mass spectrometer Technical Physics. The Russian Journal of Applied Physics 57(10) 1400-1405 DOI: 10.1134/S106378421200192 [2] Semkin N D, Piyakov I V, Rodin D V and Pomelnikov R A 2012 An onboard dust-and-dust mass spectrometer for studying the elemental composition of micrometeoroids Nauchnoe priborostroenie 22(3) 13-20 [3] Hornung K, Malama Y G and Kestenboim K S 2000 Impact vaporization and ionization of cosmic dust particles Astrophysics and Space Science 274(1-2) 355-363 [4] Podlipnov V V, Kolpakov V A and Kazanskiy N L 2016 Etching of silicon dioxide in off electrode plasma using a chrome mask Computer Optics 40(6) 830-836 DOI: 10.18287/2412-6179-2016-40-6-830-836 [5] Kazanskiy N L, Kolpakov V A and Podlipnov V V 2014 Gas discharge devices generating the directed fluxes of off-electrode plasma Vacuum 101 291-297 [6] Piyakov A V, Rodin D V, Rodina M A andTelegin A M 2017 Numerical simulation of motion of dust particles in an accelerator path CEUR Workshop Proceedings 1902 55-61 [7] Semkin N D, Rodin D V and Piyakov I V 2013 A method of calculating the potentials of the field-setting elements of a nonlinear ion mirror Nauchnoe priborostroenie 23(3) 69-75</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1 .</head><label>1</label><figDesc>Results of measuring the execution time of 10,000 trajectory iterations for implementation on PC, GPU, HPC.</figDesc><table><row><cell></cell><cell>PC parallel.</cell><cell>PC</cell><cell>GPU</cell><cell>GPU</cell><cell>HPC</cell></row><row><cell></cell><cell>(4CPU,</cell><cell>Single</cell><cell>Host calls</cell><cell>Device</cell><cell>Sergey</cell></row><row><cell></cell><cell>8 threads)</cell><cell>thread</cell><cell></cell><cell>calls</cell><cell>Korolev</cell></row><row><cell>16384</cell><cell>7с</cell><cell>24с</cell><cell>6с</cell><cell>6с</cell><cell>6с</cell></row><row><cell>65536</cell><cell>29с</cell><cell>1м 34с</cell><cell>23с</cell><cell>23с</cell><cell>18с</cell></row><row><cell>262144</cell><cell>1м 53с</cell><cell>6м 19с</cell><cell>1м29с</cell><cell>1м29с</cell><cell>1м19с</cell></row></table></figure>
		</body>
		<back>
			<div type="references">

				<listBibl/>
			</div>
		</back>
	</text>
</TEI>
