LA-UR-25-31121 Approved for public release; distribution is unlimited. Z ∞ [2] (14) γ s ′ ′2 ′ ′ + (2γ j0[2]02 − 8j0[3]022 ) 2 ′ fb,0 (s )ds s s γ γ s′2 Z s    ⊥ 8πΓab 1 ′ 1 1 ′ 4 1 ′ Dab = j − + 2 j0[2]02 +fb,0 (s′ )ds′ j cnb 0 2 0[1]2 s2 γ s γ′ γ 2 s2 0[3]022 Z ∞  ′2 [2] (15) s′2 1    ′ 1γ 1 4 1 s ′ ′ + j − + j + j γ ′ fb,0 (s )ds u 2 γ 2 0[1]2 s2 s′2 γ 2 0[2]02 γ 2 s2 0[3]022 γ Where s = u/c. The functions jl[1]a (u/c) are recursively defined in the following way: jl[1]a (u/c) = p −l− 1 πc/2uPa− 1 2 (γ), where P is the associated Legendre function of the first kind. In the case of the 2 isotropic background, we only need the l = 0 functions, which are defined in [2]. In particular, we assume a Maxwell-Jüttner background distribution, nb mb fb (u) = exp (−zb γ) (16) 4πckT K2 (zb ) The integrals in Equations 14 and 15we need to numerically compute in order to calculate the scattering. The existing code uses the approximation from Papp, which is obtained by taking Los Alamos National Laboratory Page 2-2 Background the high zb limit, and then asymptotically matching the solutions for non-relativistic and ultra- relativistic particles [6]:       2  v v − q 2 q 2 n ln Λab  erf vth − √2π vvth e vth ∥ Dab ≈ a b 2      (17) 2πϵ0  2v 3 2  vth   2      v v − qa2 qb2 n ln Λab   v  erf vth − √2π v vth e vth  v v 2  ⊥ th Dab ≈ erf − +  (18) 2πϵ20 v 2 vth c2  v   2 vth q 2kT where vth is the thermal velocity of the background, mb . 2.2 Romberg Integration In order to compute the integrals in the previous section, we employ Romberg integration, a numer- ical integration method based off of Richardson extrapolation [8, 7]. Suppose we want to compute some quantity, x∗ , and let ϕ denote our numerical approximation of it, with mesh parameter h. We can Taylor expand the approximation in h, around h = 0 1 ϕ(h) = ϕ(0) + hϕ′ (0) + h2 ϕ′′ (h2 ) + ... (19) 2 We know that ϕ(0) = x∗ , so we rewrite this as ϕ(h) = x∗ + hc1 + h2 c2 + ... (20) which illustrates that the approximation error is O(h). By defining ψ(h) = 2ϕ(h/2) − ϕ(h), we can see that ψ(h) approximates x∗ to O(h2 ), since the linear error terms cancel. By repeatedly applying this trick, we can recursively drive down the error term per layer. Explicitly, the recursion is R(j, 0) = ϕ(h/2j ) (21) 4k R(j, k − 1) − R(j − 1, k − 1) R(j, k) = (22) 4k − 1 Note that only the R(j, 0) computations involve actually performing the numerical integration; the further columns are simple arithmetic based on R(j, 0) and the prior rows of the table. To actually compute R(j, 0), we employ the trapezoidal approximation. The trapezoidal rule for N sub intervals is Z b N −1   X h f (t)dt ≈ f (xi ) + f (xi+1 ) , xi = a + ih (23) a 2 i=0   h = f (x0 ) + 2f (x1 ) + 2f (x2 ) + ... + 2f (xN −1 ) + f (xN ) (24) 2 Los Alamos National Laboratory Page 2-3 Background Level k of the Romberg integration has 2k sub-intervals. Then, the new trapezoidal estimate is −1 2X k hk   R(k, 0) = f (a) + f (b) + hk f (a + ihk ) (25) 2 i=1 k −1 2X 1 = R(k − 1, 0) + hk f (a + ihk ) 2 i=1 i odd In particular, we note that for the integrals that we are evaluating in this work, it is the function evaluations f that incur the highest computational cost in constructing the Romberg table. There- fore, using the form for R(k, 0) in the second line is considerably faster, since we roughly halve the number of function evaluations as compared to the naive scheme of computing each R(k, 0) independently. 2.2.1 Richardson Extrapolation with Simpson’s Rule Simpson’s rule is a higher-order integration rule that uses a quadratic interpolation between points to achieve lower error. The composite Simpson’s rule, which divides the integration domain into n subintervals can be written as follows:     Z b n n h X X  f (x)dx = f (a) + f (b) +4 f (a + ih) +2 f (a + ih) (26)   a 3 | {z }  i=1,i odd i=1,i even  Aj | {z } | {z }  Bj Cj where again, h is the mesh parameter. Simpson’s rule has error O(h4 ), and so the first three error terms of the Taylor expansion in Richardson extrapolation vanish. Thus, the recurrence relation becomes R(j, 0) = ϕ(h/2j ) (27) 16k R(j, k − 1) − R(j − 1, k − 1) R(j, k) = (28) 16k − 1 It turns out that similar to the Romberg integration case, we can accelerate the computation of the R(j, 0) column by realizing that Aj+1 = Aj , and Cj+1 = Cj + Bj . Then, we need only compute the function values at the new odd points (Bj+1 ). 2.3 Application For the purposes of this section, we convert back to momentum, p. In order to apply the diffusion coefficients from equations 14 and 15 to our electron beam scattering problem, we need to solve for the electron’s change in momenta. This is done by taking a random value, r, sampled from a normal distribution and scaling it by the standard deviation of this distribution, σ, for both the parallel and perpendicular components respectively. ∆p∥ = r|| σ∥ (29) Los Alamos National Laboratory Page 2-4 Background ∆p⊥ = r⊥ σ⊥ (30) In order to compute the standard deviations, we start by rewriting it in the following form. s d⟨(∆p∥ )2 ⟩ σ∥ = ∆t (31) dt r d⟨(∆p⊥ )2 ⟩ σ⊥ = ∆t (32) dt And thus the change in momentum can be written in terms of the time derivative of the variance: s d⟨(∆p∥ )2 ⟩ ∆p∥ = r∥ ∆t (33) dt r d⟨(∆p⊥ )2 ⟩ ∆p⊥ = r⊥ ∆t (34) dt To determine the time derivative of the variance, we use the formulation from Hinton, rewritten in terms of momentum [4]. d ⟨(∆p∥ )2 ⟩ = eˆs · Dab · eˆs (35) dt d ⟨(∆p⊥ )2 ⟩ = eˆθ · Dab · eˆθ + eˆϕ · Dab · eˆϕ (36) dt In the case of an isotropic background, the θ and ϕ components are identical, so the expressions reduce to d ⟨(∆p∥ )2 ⟩ = eˆs · Dab · eˆs = Dab ss (37) dt d ⟨(∆p⊥ )2 ⟩ = 2(eˆθ · Dab · eˆθ ) = 2Dabθθ (38) dt ss and D θθ are given by Eqs. 14 and 15, which we then numerically integrate to obtain the Dab ab changes in momenta. Los Alamos National Laboratory Page 2-5 3 Results To validate our Romberg integration scheme we first applied it to compute the scalar potentials used to express the collision operator given by Braams and Karney [2]. These potentials were chosen as a starting test because their integrands have a similar form to those in our diffusion tensors and they were numerically integrated by Markham, providing an easy point of comparison [5]. As shown in Fig. 3-1, our results closely match those calculated previously. Figure 3-1: Combined figure showing our potentials (top) and visual comparisons (bottom) from Markham [5]. In the bottom row, red is the integration as performed by Mathematica, while the blue points are the results of Romberg integration of the potential equations in the NIMROD code. To illustrate the regimes in which the Papp model fails, we plot the diffusion coefficients for different values of s in Fig. 3-2. We make the following observations. At low zb and low to mid s, the Papp operator significantly underestimates the diffusion coefficients. High values of zb mask the error, in that the Papp operator very closely approximates the Braams-Karney diffusion tensor at high-zb for all values of s. For both low and high zb , the Papp approximation for the parallel component of the diffusion tensor overestimates the true value in the ultra-relativistic limit. This is easier to see in the low-zb case as the magnitudes are larger, however the structure of this overestimation remains constant. These deviations in the low zb , non/semi-relativistic regime produce measurable differences in scattering behavior. In Fig. 3-3, we plot the results of simulating two such scenarios. In both cases, the electron beam from the Papp operator based simulation experiences more scattering in the vertical direction as compared to the Braams-Karney based simulation, but experiences far less perpendicular scattering. This reflects the overestimation of the parallel component of the diffusion tensor shown in 3-2. We note here that many applications of interest are in the high-zb regime, and thus see far less of this error. A scenario which LANL is concerned about in which numerical integration of the Braams-Karney operator produces significant differences from Papp is the case of electron beam interaction with multiple targets, illustrated in Fig. 3-4. Electron scattering in heavy metal targets produces x-rays which are used for x-ray diagnostics of materials. In this case it is important to model the beam accurately as the electrons will reach the second target and heat it well before the x-rays arrive. This heating can have significant impacts on the way the x-rays travel through the target and thus how they are used for diagnostics. To model this effect, we simulate a high energy (19.8 MeV) electron Los Alamos National Laboratory Page 3-1 Results Braams-Karney vs. Papp: zb = 10.0 Braams-Karney vs. Papp: zb = 1.0 × 107 ⊥ k ⊥ k Dee , Diff. Tensor Perp. Dee, Diff. Tensor Parallel Dee , Diff. Tensor Perp. Dee, Diff. Tensor Parallel −19 10−19 10 Papp Papp Papp Papp 3 × 10−21 Braams-Karney Braams-Karney Braams-Karney Braams-Karney 10−20 2 × 10−21 10−27 Dee Dee ⊥ Dee Dee ⊥ k k −20 10 10−21 10−21 10−28 10−21 10−22 0 5 10 0 5 10 0 5 10 0 5 10 p/mc p/mc p/mc p/mc k ⊥ Pct. Difference, Dee k Pct. Difference, Dee ⊥ Pct. Difference, Dee Pct. Difference, Dee ×10−5 200 200 0.0004 1.5 150 150 Difference Difference Difference Difference 0.0003 1.0 100 100 0.0002 50 50 0.5 0.0001 0 0 0.0000 0.0 0 5 10 0 5 10 0 5 10 0 5 10 p/mc p/mc p/mc p/mc Figure 3-2: Diffusion coefficients as a function of momentum and zb . (a) 0.1 MeV beam into 30M K hydrogen. (b) 0.6 MeV beam into 10M K hydrogen. Figure 3-3: Scattering into hydrogen. Blue is Braams-Karney, red is Papp, magenta is overlap beam interacting with a room temperature (298 K), iron target and scattering, before colliding with a second target. In this case, the first target slows the electron beam enough that the transmitted electrons approach the semi-relativistic regime, and thus the difference between the two models grows. For our integration model to be viable as a part of the larger LSH code, it needs to balance accuracy and computational efficiency. To test this we timed our approach against the existing, Papp scheme. As seen in Figure 3-5, our model, whether with Simpson’s rule or the trapezoidal rule, is orders of magnitude slower due to the high number of Richardson extrapolations required. Despite this, its performance remains within a usable range for a number of applications. Since our model is an optional user input, users can decide whether to employ it based on the specific needs of their simulation. For scenarios involving ultra-relativistic beams or low temperature targets, the computational cost of Romberg may not be worth it. However, cases where temperature or beam energy drift into the regimes where Papp is inaccurate, our model may be preferable. We also note that there are a number of potential methods for speeding up our model. For example, one way to improve performance would be to use a non-classical quadrature method. We currently employ Romberg integration as it allows us to refine the integration to arbi- Los Alamos National Laboratory Page 3-2 Results Figure 3-4: Electron scattering off of two iron targets showing the scattering differences between Braams-Karney (blue) and Papp (red). Run with a 19.8 MeV beam at room temperature (298 K). trary precision, but other methods may provide faster convergence. With regards to non-classical quadrature, the integrands can be very sharply peaked, leading to cases where Romberg integration struggles; adaptive quadrature or similar techniques may enable faster convergence with less compu- tational overhead. Non-classical quadrature relies on an appropriate choice of weight function; since most of the terms of the integrands are functions of associated Legendre polynomials, we expect that non-classical methods may be able to provide efficiency benefits for those integrals. Los Alamos National Laboratory Page 3-3 Results Time Complexity of Braams-Karney vs. Papp Runtime Ratio BK Runtime / Papp Runtime 1200 Standard Romberg 103 Simpsons Rule 1000 Time (sec) 800 102 600 Standard Romberg 400 101 Simpsons Rule 200 Papp Model 0 103 104 105 106 107 103 104 105 106 107 Target Temperature (Kelvin) Target Temperature (Kelvin) Figure 3-5: Figures showing the speed of our Romberg integration model (Braams-Karney) vs. the existing, Papp model. Run on a single, iron target, 19.8 MeV beam, simulation. Los Alamos National Laboratory Page 3-4 4 Conclusion In this work, we demonstrate a numerical scheme for computing the diffusion coefficients of the Beliaev-Budker operator, to model relativistic electron scattering. We show that our model repro- duces known results from both NIMROD and Mathematica when calculating the scalar potentials used to derive the diffusion tensors. These potentials have a very similar form to the final distribu- tion function and thus are a good benchmark for our integration scheme. We also show that our method is higher fidelity and more general than the existing Papp operator based scheme in the LANL LSH code of interest in high temperature regimes. We found that our model produces significant differences from the existing approximation in high temperature. This is due to our model being self-consistent and consistent with relativistic theory. At low temperature, this difference is suppressed, as the Papp model is formed by taking the high-zb limit. While our model is significantly slower than the existing one, it is within a usable range for many applications. These applications include simulations at high temperature or with multiple targets where the precise scattering profile from the first target can have effects on the heating profile of the latter targets. However, for simulations involving low temperature targets, or ultra-relativistic beams, the slower speed of Romberg may not be worth it. Since our model is an optional user input, users can decide whether this slower speed for higher accuracy trade off is worth it for their specific needs. We also note that there are many potential avenues to explore for speeding up our method including non-classical quadrature method, for faster convergence. In the future, we also aim to include self-interaction effects. In the current model, the electrons in the beam do not interact with each other. Electron beam self-interaction can result in beam defocusing or instabilities that may be important to model. Los Alamos National Laboratory Page 4-1 References [1] S T Beliaev and G I Budker. “THE RELATIVISTIC KINETIC EQUATION”. In: Soviet Phys. (Doklady) Vol: 1 (Mar. 1956). url: https://www.osti.gov/biblio/4309072. [2] Bastiaan J. Braams and Charles F. F. Karney. “Conductivity of a relativistic plasma”. In: Physics of Fluids B: Plasma Physics 1.7 (July 1989), pp. 1355–1368. issn: 0899-8221. doi: 10.1063/1.858966. url: http://dx.doi.org/10.1063/1.858966. [3] Bastiaan J. Braams and Charles F. F. Karney. “Differential form of the collision integral for a relativistic plasma”. In: Physical Review Letters 59.16 (Oct. 1987), pp. 1817–1820. issn: 0031-9007. doi: 10 . 1103 / physrevlett . 59 . 1817. url: http : / / dx . doi . org / 10 . 1103 / PhysRevLett.59.1817. [4] F.L. Hinton. Collisional transport in plasma. Vol. 1. North-Holland., 1983, p. 147–197. [5] Tyler Markham. “Relativistic, Continuum Drift-Kinetic Capability in the NIMROD Plasma Fluid Code”. All Graduate Theses and Dissertations, Spring 1920 to Summer 2023. 8683. Ph.D. dissertation. Utah State University, 2022. url: https://digitalcommons.usu.edu/ etd/8683. [6] G. Papp et al. “Runaway electron drift orbits in magnetostatic perturbed fields”. In: Nuclear Fusion 51.4 (Mar. 2011), p. 043004. doi: 10.1088/0029-5515/51/4/043004. url: https: //dx.doi.org/10.1088/0029-5515/51/4/043004. [7] Lewis Fry Richardson. “IX. The approximate arithmetical solution by finite differences of phys- ical problems involving differential equations, with an application to the stresses in a masonry dam”. In: Philosophical Transactions of the Royal Society of London. Series A, containing papers of a mathematical or physical character 210.459-470 (1911), pp. 307–357. [8] Werner Romberg. “Vereinfachte numerische integration”. In: Norske Vid. Selsk. Forh. 28 (1955), pp. 30–36. [9] M. Sherlock. “A Monte-Carlo method for coulomb collisions in hybrid plasma models”. In: Journal of Computational Physics 227.4 (2008), pp. 2286–2292. issn: 0021-9991. doi: https: / / doi . org / 10 . 1016 / j . jcp . 2007 . 11 . 037. url: https : / / www . sciencedirect . com / science/article/pii/S0021999107005359. [10] G. A. Westenskow et al. The Mechanical Design for the Darht-II Downstream Beam Transport Line. 2000. arXiv: physics/0008059 [physics.acc-ph]. url: https://arxiv.org/abs/ physics/0008059. Los Alamos National Laboratory Page R-1