Benchmarking a high-order particle-in-cell code for the simulation of a gyrotron traveling-wave tube

In recent years, several high-order methods have been proposed for the simulation of Maxwell’s equations. Discontinuous Galerkin (DG) schemes are a combination of an element local finite element formulation in which the solution is represented by a polynomial and a finite volume method which couples adjacent cells over the cells surfaces. This results in a highly parallelizable scheme which offers excellent dissipation-dispersion properties. Consequently, a high-order DG scheme has been applied within a particle-in-cell solver [1], replacing the standard Yee scheme. This development has been continued, leading to a three-dimensional full-wave particle-in-cell solver named PICLas, which has been benchmarked against a 30 GHz gyrotron operating in a TE2,3 mode [2]. In contrast to finite difference methods, which use equidistant grids and a second order boundary approximation, PICLas uses body-fitted, curvilinear unstructured hexahedral meshes of arbitrary polynomial order. A crucial step to simulate complex geometries, like the considered gyro-TWT [3, 4], is a high quality mesh. A typical DG grid consists of coarse elements when highorder elements are used. By increasing the polynomial degree, less than one DG element per wavelength may be required for an accurate solution. This is especially challenging for the considered gyro-TWT, because its diameter approximates the wavelength. In order to represent the geometry, several elements in radial direction may be required, thus restricting the DG scheme to a lower order. We describe the utilized mesh and report preliminary results for which a homogeneous guiding magnetic field has been used.


Introduction
In recent years, several high-order methods have been proposed for the simulation of Maxwell's equations.Discontinuous Galerkin (DG) schemes are a combination of an element local finite element formulation in which the solution is represented by a polynomial and a finite volume method which couples adjacent cells over the cells surfaces.This results in a highly parallelizable scheme which offers excellent dissipation-dispersion properties.Consequently, a high-order DG scheme has been applied within a particle-in-cell solver [1], replacing the standard Yee scheme.This development has been continued, leading to a three-dimensional full-wave particle-in-cell solver named PICLas, which has been benchmarked against a 30 GHz gyrotron operating in a TE 2,3 mode [2].In contrast to finite difference methods, which use equidistant grids and a second order boundary approximation, PICLas uses body-fitted, curvilinear unstructured hexahedral meshes of arbitrary polynomial order.A crucial step to simulate complex geometries, like the considered gyro-TWT [3,4], is a high quality mesh.A typical DG grid consists of coarse elements when highorder elements are used.By increasing the polynomial degree, less than one DG element per wavelength may be required for an accurate solution.This is especially challenging for the considered gyro-TWT, because its diameter approximates the wavelength.In order to represent the geometry, several elements in radial direction may be required, thus restricting the DG scheme to a lower order.We describe the utilized mesh and report preliminary results for which a homogeneous guiding magnetic field has been used.

Mesh Generation
The outer radius of the corrugation of the gyro-TWT [3] is given by r(z,φ)=r 0 + r ̃ cos(mφ-2π/d z), (1) with r 0 = 4 mm being the mean radius, r ̃ = 0.74 mm the amplitude, m = 3 the azimuthal number and d = 9.2 mm the axial periodic length.The corrugations are 15d long and the transition from the corrugation to two circular waveguides consists of two linear ramps of length 2d.Additionally, perfectly matched layers (PML) [2] are added at the output with a length of d.
We use our open-source mesh generator HOPR [5] to generate body-fitted, non-equidistant curved meshes of fifth order.A quality condition like the scaled Jacobian has to be fulfilled [6].The scaled Jacobian is the smallest Jacobian of an element divided by its largest Jacobian.A value of unity indicates a cubical element and for smaller values the mesh quality decreases.A negative value indicates an invalid element.The computational grid-lines are twisted to follow the helical structure and to improve the scaled Jacobians.A picture of the mesh is shown in Fig. 1.The most inner elements are cubical.The adjacent elements are curved to blend linearly from a circle to the three-fold corrugation.

Simulation Results
The simulations are conducted with our in-house PIC code PICLas.In contrast to the setup reported in [3] we simulate a simplified amplifier setup consisting of perfectly electric conducting boundaries and a homogeneous and constant guiding magnetic field.The solution is represented by a sixth order polynomial in 6336 elements.Additionally, we apply a complex frequency-shift PML at the end of the geometry with ζ = 350•10 9 and α = 35•10 9 .The TE 1,1 mode is inserted at the input plane (z = 0 mm) with a power of 2 kW.The electrons are inserted with a beam current of 10 A, an energy of 70 keV and a pitch factor of 1.2.The particle weight is chosen to 10 7 , resulting in about 15000 particles within the domain.A decreased particle weight of 10 6 leads to similar results, signifying that the value of 10 7 is sufficient.
We observe a high dependency regarding the simulation parameters, guiding magnetic field, beam current and voltage.The highest output power is encountered for B z = 0.67 T. This corresponds to an output power of 100 kW and an amplification of ~17 dB.In the literature, a magnetic field of B z = 0.663 T for maximum amplification of 17 dB has been found [3].Using this guiding magnetic field, we found an amplification of ~15.6 dB.
In order to save computational resources, we considered a non-conforming mesh with reduced resolution away from the particles location.The resulting mesh consists of 3556 elements (reduction ≈ 50%) and no reduction in solution quality is observed.
Fig. 3 depicts the instantaneous field and particle distribution of the upper half of the gyro-TWT.The E y -field is shown in the x-z-plane.Additionally, for each particle its Lorentz factor is shown.Inside of the corrugations, a strong bunching of the particles to the TE-mode is observed.Finally, a dynamic mode decomposition (DMD) [7] of the simulation results (conform mesh) is performed in a post-processing step.The DMD gives the growth and decay rates ω r of the most dominant eigenvalues ω i .Additionally, no a priori knowledge of the encountered modes is required.In Fig. 4 the results of the DMD is shown for 1200 snapshots with a sampling step of Δt = 10 -14 starting at 40 ns.The Euclidean norm of the eigenvalues is color coded, red indicating the highest amplitude.The signals at 1 and 4 are damped and match a frequency of 21.2 GHz and 42.1 GHz, a TE 1,1 and TE 0,1 mode inside the corrugations, respectively.The second and third peaks are found at 34.9 and 34.5 GHz correspond to a TE 1,2 and TE 1,1 mode.

Summary
We present the first simulations of a gyro-TWT by a DG based PIC scheme with a body-fitted mesh.A high sensitivity of the operational parameters were encountered for all simulations.Here, we find a maximum amplification of the input signal by 17 dB for a constant guiding magnetic field of B z = 0.67 T. By switching to a non-conforming mesh, we could reproduce the results by saving 50% of the elements.This research was supported by the DFG grants MU 1319/21-2, SFB7163 B08 and joint RSF-DFG 16-42-01078-Je 711/1-1.The authors thanks the HLRS Stuttgart for granting the computational resources.

Fig. 1 .
Fig. 1.The picture depicts geometry and is scaled in axial direction.The slice depicts the grid lines in the x-y plane in the center of the corrugations Fig. 2 depicts the smallest found scaled Jacobians of the considered mesh in the range between 0.25 and 0.4.The small values indicate strong deformation of the elements.The lowest values are found at the inflection point of the corrugations between adjacent periods and at the interface between the cubical and curvilinear elements.In these regions, however, the scaled Jacobians are still sufficient to ensure a high quality solution.

Fig. 2 .
Fig. 2. The body-fitted mesh of the simulated gyro-TWT.The scaled Jacobians are depicted in the range between 0.25 and 0.4

Fig. 3 .
Fig. 3. Instantaneous electric field and particle distribution.Especially, a strong bunching of the particles within the corrugations is observed

Fig. 4 .
Fig. 4. Frequencies ω i and growth rate found in a DMD.The signals with strongest amplitude are 1-4, while 2-4 are close to the inserted TE-mode at 35 GHz.Please note, that the color and size of the dots depend on the Euclidean norm