A temporal multiscale hybridization method is presented that carefully couples coarse scale gyrokinetic models with exact charged particle solution trajectories (that is, with full phase information) in a magnetic field. The approach is based on the careful approximation of a sum, generally employed for time-parallel (TP) computing applications. While the hybridization method presented is highly parallelizable, a computational efficiency gain is seen from considering serial computations only. A complete numerical method is only presented for the aforementioned charged particle application, however, the general approach depicted likely has relevance to a wide swath of challenging multiscale/multiphysics problems. Additionally, the approach has obvious relevance to TP computing applications (such as variable selection on which to perform TP calculations and fine scale sampling strategies).
*Distribution A―Approved for public release; distribution unlimited; PA: 16460.
For the modeling of many physical systems, the most detailed and accurate means of simulation may be too computationally expensive, and alternatitve approaches, which provide a less accurate and less detailed solution at a much lower computational cost have been developed. Such model pairs are many, and include fluid equations as an approximation to kinetic equations (such as the Vlasov equation) [
Hybridization methods assume that a means of achieving a coarse approximation already exists and aim to use both this coarse approximation and the fine solution, in a more substantial way than multiscale methods, to accurately model both the micro and macro scales. Ideally, the multiscale hybridization should achieve a level of accuracy that is not possible from the coarse model alone at a lower computational cost than what is possible using the fine scale model. Much of the effort in hybridization has been on schemes that switch between coarse and fine propagators in different parts of the space-time domain with a focus on proper interface conditions [
In the simplest hybridization case, the coarse and fine propagators act on data that is either the same or trivial to convert. But, for many important cases, there is a nontrival scale difference between the coarse and fine propagators. The hybridization is then referred to as multiscale [
Time-parallel methods are designed to produce an accurate solution by mixing coarse and fine propagators, but for this type of an approach, it is generally taken as a given that the total computational cost will be higher than simply running the fine scale solution. A “wall clock” speed up is achieved only through parallel computing. The most common type of TP method is the so called Parareal [
The method presented here aligns with the goals of a hybridization; there is no parallel computing. But, the reason that TP methods are mentioned in this Section and in more detail in Section 1.4 is that the numerical methods employed to generate the proposed hybridization draw heavily from them. The base equation that is transitioned into a multiscale context is not Parareal, as in [
In general terms, the basic ingredients needed for a multiscale method are 1) the selection of a fine propagator, F , which advances fine scale, or microscale, variables u, 2), the selection of a coarse propagator C , which advances the coarse, or macroscale, variable U, 3) the selection of a compression operator, Q, to convert data to the macroscale, 4) and the selection of a reconstruction operator, R, which converts data to the microscale [
U = Q ( u ) ≡ Q u u = R ( u ) ≡ R U (1)
The brackets are often not written for simplicity [
For the current purposes, attention is restricted to differential equations (DEs) of the general form:
d u d t = f ( u ) (2)
where u : ℝ → ℝ D f and f : ℝ D f → ℝ D f . This equation is typically solved sequentially by repeatedly applying a fine propagator F :
u ( t − s ) = F ( u ( s ) , t , s ) ≡ F [ t , s ] ( u ( s ) ) ≡ F [ t , s ] ( u ) (3)
for t > s . While the notation of Equation (3) is not standard for serial propagators, the TP equations in Sections 1.4, 1.5, and 1.6 can be written more succinctly in this way. Analogous to Equation (3), on the coarse scale, we have
U ( t − s ) = C ( U ( s ) , t , s ) ≡ C [ t , s ] ( U ( s ) ) ≡ C [ t , s ] ( U ) (4)
It is assumed that the coarse propagator of Equation (4) attempts to model the same general physics as the fine propagator of Equation (3) but with only an approximation of the coarse scale variables. The additional microscale information can be inferred from the macroscale variables and coarse propagator, though it generally cannot be determined with sufficient accuracy. While inaccurate microscale information may not be of interest for multiscale methods, it may be still be accurate enough that it can be corrected using a TP approach [
U * ( t ) = Q * ( u ( t ) ) ≡ Q * u ( t ) u ( t ) = R * ( U * ( t ) , u ( 0 ) ) ≡ R * U * ( t ) (5)
It is these modified versions of U, Q, and R that are considered for the remainder of the manuscript. While playing a similar role as the standard general operators employed for multiscale methods, they ensure that microscale information is not lost, and with the inclusion of a TP equation approximation defined through Sections 1.4, 1.5, and 1.6, allow for an accurate modeling of both the macroscale and the microscale.
The degree to which a coarse propagator is appropriate for a given physical simulation can be characterized by considering a coarse propagator suitability function, h ( u ( t ) ) , where 0 ≤ h ( u ( t ) ) , and C and F are taken to be equivalent when h ( u ( t ) ) ≡ 0 , and disagree to a larger extent as h increases. A simple type of hybrid solution can then be defined by the multiscale propagator, H S W , which switches between C and F based on the value of h:
H S W [ t + d t , t ] ( u ( t ) ) = ( C [ t + d t , t ] ( Q * ( ifneeded ) ) F [ t + d t , t ] ( R * ( ifneeded ) ) if h < ϵ if h > ϵ (6)
for ϵ > 0 . It is implausible in the general case to wait until the physical approximations associated with C are exactly met ( h ≡ 0 ) as the coarse propagator would then likely never be used. A basic consistency criterion for implementing Equation (6) would be to require a set of choices, written succinctly as Ω ≡ { C , F , Q * , R * } , to satisfy the following:
Ω M S ( { C , F , Q * , R * } : Q R = I ) (7)
A better criteria for { C , F , Q * , R * } is the set Ω H :
Ω H ( { C , F , Q * , R * } : lim d t → 0 R * C [ T , t + d t ] Q * F [ t + d t , t ] R * C [ t ,0 ] Q * ( u ( 0 ) ) − R * C [ T , t + d t ] C [ t + d t , t ] C [ t ,0 ] Q * = 0 ) (8)
Essentially, the above criterion for this set states that when propagating the coarse variables U, switching to the fine scale and propagating for a negligible amount of time should have a negligible effect on the final solution. Approaches to satisfying this condition, or one like it, have been developed for hybridization schemes [
The simple switching hybrid propagator, H S W , attempts to use the low cost propagator C if it will be sufficiently accurate and the higher cost propagator F otherwise. Determing the error of C relative to F directly by evaluating the two types of propagators would negate any computational speed up from this approach, and hence h, which is assumed to be a relatively low cost computation, is used as replacement. In addition to the the sensitivity of H S W on h, another limitation of this type of hybridization is that it relies only on local in time evalutions of the error, i.e. no attempt is made to approximate how an error from the selection of C will affect the solution at the end time.
TP methods are a means of solving differential equations at a lower “wall clock” time by parallelizing computations in the time domain. They have been applied to surprisingly complicated physics such as plasma turbulence [
A straightforward characterization of the local in time error of u with respect to a DE of the form in Equation (2), is given by:
φ f ( u ( t ) ) = d u d t − f ( u ) φ c ( u ( t ) ) = d u d t − c ( u ) (9)
where c and f are similar but not equal. For simplicity, in this section, all equations are written only in terms of the fine variables u. The following Section 1.5 describes the modifications necessary for the multiscale case.
A simple functional, that is always non-negative and 0 when u satisfies Equation (2), is given by:
Φ [ u ] = 1 2 ∫ 0 T φ f ( u ( t ) ) ⋅ φ f ( u ( t ) ) d t (10)
where the dot product within the integral is taken over the dimension of u, at every t. The L 2 inner product is:
〈 h ( t ) , k ( t ) 〉 L 2 = ∫ 0 T h ( t ) ⋅ k ( t ) d t (11)
and the L 2 gradient is given explicitly as [
∇ L 2 Φ ( u ) = ( d φ f d u ) T φ f (12)
This gradient can be used to solve a DE in parallel, though the use of other functional gradients produces superior results [
〈 h ( t ) , k ( t ) 〉 C D E = ∫ 0 T ( d h d t − d c d u h ) ⋅ ( d k d t − d c d u k ) d t (13)
A formula for the CDE functional gradient is found from comparing the CDE norm and L 2 norm.
〈 ∇ C D E Φ ( u ) , h 〉 C D E = 〈 ∇ L 2 Φ ( u ) , h 〉 L 2 (14)
A weak form solution of the CDE functional gradient, holding for every h ( t ) , is then given by:
∫ 0 T ( d φ c d u ) ∇ C D E Φ ( u ) ⋅ d φ c d u h d t = ∫ 0 T φ f ⋅ d φ f d u h d t (15)
The finite element method is a natural choice for optimization problems [
∇ C D E Φ ( u ) = ( d φ c d u ) − 1 ( d φ c d u ) − T ( d φ f d u ) T φ f (16)
Allowing for the solution to be written in terms of a coarse propagator, G ( u ) (where G ( u ) = R * C Q * ( u ) , where C is defined to be a function of the coarse variables U, as in Equation (4)), we have:
∇ C D E Φ ( u ) = ∫ 0 t d G d u [ t , s ] ( d u d s − f ( s ) ) d s + ∫ 0 t ∫ s t d G d u [ t , r ] ( d c d u | r − d f d u | r ) d G d u [ r , s ] ( d u d s − f ( s ) ) d r d s (17)
Computation of the CDE gradient can be thought of as a type of propagator itself, as the value is only dependent on computations at previous times, though it is one that need not be computed serially. The functional Φ is locally maximally increased, with respect to the CDE inner product, by advancing the solution u in the direction of the above gradient. Reversing the direction of this propagation and updating u can produce a maximum decrease of the functional Φ . The gradient descent equation, which contains an additional variable γ , such that u ( t , γ ) should approach the fine solution as γ is increased, is given by:
d u d γ = ∫ 0 t d G d u [ t , s ] ( f ( s ) − d u d s ) d s + ∫ 0 t ∫ s t d G d u [ t , r ] ( d f d u | r − d c d u | r ) d G d u [ r , s ] ( f ( s ) − d u d s ) d r d s (18)
With the propagators taken over discrete steps of size dt, a solution update, δ u , can then be written, for integers r , s , and t , with r = r d t , s = s d t , and t = t d t as:
δ u t = ∑ s = 0 s = t − 1 d G d u [ t d t , ( s + 1 ) d t ] ( F [ ( s + 1 ) d t , s d t ] ( u s ) − u s + 1 ) + ∑ s = 0 s = t − 1 ∑ r = s r = t − 1 d G d u [ t d t , ( t + 1 ) d t ] ( d F d u [ ( r + 1 ) d t , r d t ] − d G d u [ ( r + 1 ) d t , r d t ] ) d G d u [ t d t , ( s + 1 ) d t ] ( F [ ( s + 1 ) d t , s d t ] ( u s ) − u s + 1 ) (19)
The first part of Equation (19), looks at independent, local differences between the current solution u, and the behavior of the fine propagator F , and propagates these differences forward in time using the coarse propagator derivative with respect to u. The second part of the equation goes one step further, looking at the differences of the fine propagator derivative and coarse propagator derivative. The second term can significantly add the TP scheme accuracy, [
Using only the first part of Equation (19) along with the additional approximation that the coarse propagator derivative is computed as:
d G d u ϵ ≈ G ( u + ϵ ) − G ( u ) (20)
leads to the following:
H T P [ T d t ,0 ] ( u ( 0 ) ) = G [ T d t ,0 ] ( u ( 0 ) ) + ∑ t = 0 t = T − 1 G ˜ [ T d t , ( t + 1 ) d t ] F [ ( t + 1 ) d t , t d t ] G [ t d t ,0 ] ( u ( 0 ) ) − ∑ t = 0 t = T − 1 G ˜ [ T d t , ( t + 1 ) d t ] G [ ( t + 1 ) d t , t d t ] G [ t d t ,0 ] ( u ( 0 ) ) (21)
where the coarse propagator G ˜ need not be the same as G . Convergence can be achieved even when G is replaced with a generic operator like a Sobolev Gradient [
The standard Parareal equation, denoted P , [
P [ t + d t , 0 ] ( u ( 0 ) ) = G [ t + d t , t ] P [ t , 0 ] ( u ( 0 ) ) + G [ t + d t , t ] F [ t , 0 ] ( u ( 0 ) ) − G [ t + d t , 0 ] ( u ( 0 ) ) (22)
Both Equations ((21) and (22)) produce similar accuracy in practice, but Equation (22) is more common as it requires fewer applications of the coarse propagator. We refer to [
Time-Parallel methods that try to incorporate multiscale features generally focus on modifications to Equation (22). A Parareal method that incorporates compression and reconstruction operators into the Parareal equation is presented in [
The serialization of Equation (22) is seen as having an acceptable cost for TP applications due to the lower computational cost of C relative to F . However, the serialization that is present does not make it immediately clear how to construct an approximation of Equation (22) that does not apply F on the entire time domain. In contrast, Equation (21) is simply a sum which can be approximated by a vast and well established number of approaches.
With known modified compression and reconstruction operators, Q * and R * , respectively, Equation (21) can be altered to account for the fact that propagator C only acts on the modified macroscale variables ( G ( u ) = R * C Q * ( u ) ).
H T P A ℝ [ T d t ,0 ] ( u ( 0 ) ) = R * C [ T d t ,0 ] Q * ( u ( 0 ) ) + ∑ t = 0 t = T − 1 R * C ˜ [ T d t , ( t + 1 ) d t ] Q * F [ ( t + 1 ) d t , t d t ] R * C [ t d t ,0 ] Q * ( u ( 0 ) ) − ∑ t = 0 t = T − 1 R * C ˜ [ T d t , ( t + 1 ) d t ] C [ ( t + 1 ) d t , t d t ] C [ t d t ,0 ] Q * ( u ( 0 ) ) (23)
An alternative formulation to Equation (23), which performs the summations with respect to the modified macroscale variables, is given by:
H T P A [ T d t ,0 ] ( u ( 0 ) ) = R * ( C [ T d t ,0 ] + ∑ t = 0 t = T − 1 C ˜ [ T d t , ( t + 1 ) d t ] Q * F [ ( t + 1 ) d t , t d t ] R * C [ t d t ,0 ] − ∑ t = 0 t = T − 1 C ˜ [ T d t , ( t + 1 ) d t ] C [ ( t + 1 ) d t , t d t ] C [ t d t ,0 ] ) Q * ( u ( 0 ) ) (24)
Equations ((23) and (24)) are only different when Q * and R * are nonlinear, which is the case for the specific application described in Section 1.7 and many problems of interest. Equation (24) is seen as somewhat preferable, and is the equation implemented for the application given in Sections 1.7 and 2, as the summations are performed in a natural coordinate system for describing the coarse solution, though not the fine. With the modified coarse variables, an approximation that does not run F on the entire time domain is constructed more easily and kinetic energy is inherently preserved as discussed in Sections 1.6 and 2.5.
While Equation (24) can offer a considerable improvement in accuracy relative to the simple switching hybridization of Equation (6), on the negative side, the operators Q * and R * are applied many more times in Equation (24) than Equation (6) which necessitates even more care in their selection. Ideally, the choice for { C , F , Q * , R * } should be in the set:
Ω T P ( C , F , Q , R : Equation ( 24 ) isconvergentasd t → 0, T → ∞ ) (25)
Ω T P ⊂ Ω H ⊂ Ω M S (26)
The summand of Equation (24) can be written succinctly with the denotation D ( t ) :
D ( t ) = C ˜ [ T d t , ( t + 1 ) d t ] Q * F [ ( t + 1 ) d t , t d t ] R * C [ t d t ,0 ] − C ˜ [ T d t , ( t + 1 ) d t ] C [ ( t + 1 ) d t , t d t ] C [ t d t ,0 ] (27)
We consider a summand interpolation function I that approximates D ( t ) at an arbitrary t ∈ [ 0, T d t ] . For integers j = 0,1, ⋯ , J and a mapping τ ( j ) from these integers to the time domain, an approximation of Equation (24) is:
H T P A [ T d t ,0 ] ( u ( 0 ) ) = R * ( C [ T d t ,0 ] + ∑ t = 0 t = T − 1 I ( D ( τ ( 0 ) ) , D ( τ ( 1 ) ) , ⋯ , D ( τ ( J ) ) , t ) ) Q * ( u ( 0 ) ) (28)
A considerable computational speed up is achieved if I is constructed from functions whose summation is known analytically or can otherwise be easily obtained. A polynomial interpolation function is a standard choice, but is inadequate to describe the complexity of D ( t ) . From Equation (27), it is apparent that the value of D ( t ) is determined from how the propagator F differs from the propagator C over a single step of size dt and where these evaluations take place. While it is assumed that there is no easy way to characterize the fine propagator, the location where F is applied is determined solely by the coarse propagator. Hence, the coarse propagator can inform how the interpolation should be constructed. Section 2 details how this is done along with specific computational strategies including approximation of the sum by an integral and substitution of variables.
A few attempts have been made to bypass performing TP computations over the whole domain, such as the formulation presented in [
The remaining sections of the manuscript focus on a careful implementation of Equations ((27) and (28)) for the specific application of modeling charged particle trajectories in a magnetic field. The final section of the introduction below, Section 1.7, defines the specific fine propagator F , and coarse propagator C that will be used. Section 2.1 gives the modified reconstruction operator, R * and Section 2.2 the modified compression operator Q * . Sections 2.3, 2.4, and 2.5 provide details on how the interpolation and summation of Equation (28) are performed.
Lastly, it is noted that the circumstances under which a stable and accurate solution can be achieved for this general type of approach are a bit more complicated than for standard numerical methods which can be analyzed under the condition that d t → 0 . But from the derivation of Equations ((27) and (28)), it can be seen that reasonable results should be expected if both of the following are true: 1) A pure TP method, with no approximation, can reduce the solution error after one iteration (see [
The position and velocity of a charged particle, u = ( x , v ) = ( x 1 , x 2 , x 3 , v 1 , v 2 , v 3 ) ∈ ℝ 3 × ℝ 3 , in a magnetic field is:
d u d t = d d t [ x ( t ) v ( t ) ] = [ v ( t ) q m ( v ( t ) ) × b ( x ( t ) ) ] (29)
where, q and m are constants and b ( x ) : ℝ 3 → ℝ 3 is the magnetic field. This ODEs will be highly oscillatory, even in the simple case of a constant magnetic field.
Explicit methods for solving Equation (29) have stability and accuracy limitations that generally restrict the time step size to less than one period of an oscillation [
The exponential propagator, L E X P , is the exact solution to Equation (29) for the special case when the magnetic field is constant, b ( x ( t ) ) = b 0 and the ODE is linear. The scheme can be applied to non-linear magnetic fields by simply recomputing b at each time step. The helical trajectory of this scheme can be described simply by calculating the guiding center:
x − x c = 1 | b 0 | ( b ^ 0 × v ) (30)
and an orthonormal coordinate system e = ( e 1 , e 2 , e 3 ) defined by the magnetic field:
e 1 = v − ( v ⋅ b ^ 0 ) b ^ 0 | v − ( v ⋅ b ^ 0 ) b ^ 0 | e 2 = e 1 × e 3 e 3 = b ^ 0 (31)
In polar coordinates P ( x c , e , u ) = u P = ( x p , x θ , x z , v p , v θ , v z ) , where the drift direction, e 3 is aligned with polar direction, z, ( v z = v ⋅ e 3 ), this propagator is then simply:
L E X P [ t , 0 ] ( u P ) = ( x p , | b 0 | t + x θ , x z + t v z , v p , | b 0 | t + v θ , v p ) (32)
One approach to creating a propagator for Cartesian variables ( x , v ) ∈ ℝ 3 × ℝ 3 , as delineated in [
d x c d t = v z b ^ 0 d v z d t = 0 (33)
The robustness of the exponential propagator, L E X P , is dependent on the degree of non-linearity present in the magnetic field, in contrast to more standard propagators like the leapfrog scheme, F , whose stability and accuracy is mostly dependent on the time step size, which will be limited even in the case of a constant magnetic field. Higher fidelity models for when the magnetic field is non-linear, though models that still neglect the fine scale features of the true rapidly oscillating particle trajectories, i.e. gyrokinetic models, can be employed for more accurate propagation of the coarse scale solution.
Gyrokinetics generally refers to a means of solving for a charged particle’s trajectory in a magnetic field that neglects the precise modeling of the particle’s rapid orbits, and hence, avoids the time step size limitations of a direct implementation of Equation (29). Rather than modeling the true particle position x ( t ) , only the guiding center, x c ( t ) is solved for. As the guiding center does not oscillate in the magnetic field in the way that an actual particle would, the time step size limitations are alleviated. This approach is particularly suitable when the magnetic field is strong and nearly constant, and the gyro radius, x p , is small. The coarse propagator suitability function, h, is given by [
h ( u ( t ) ) ≡ x p | b ^ ( x c ) T d b ( x c ) d x b ^ ( x c ) | | b ( x c ) | (34)
A gyrokinetic approximation is suitable for small values of h. A gyrokinetic model in terms of the guiding center, x c , and the drift velocity v z , and the phase angle, is given by [
d x c d t = v z b ^ ( x c ) + v z 2 q m | b ( x c ) | [ b ^ ( x c ) × d B ^ ( x c ) d x b ^ ( x c ) ] d v z d t = − 1 2 v r 2 − v z 2 | b ( x c ) | b ^ ( x c ) T d b ( x c ) d x b ^ ( x c ) (35)
That Equation (35) only approximates Equation (29) is most apparent from the fact that the b calculations are made non-locally, at x c rather than at the true particle location x. This is indicative of the need for a sampling of the fine propagation at the true solution location for improved accuracy. It is also noted that additional well established terms can be added to this ODE including time variation in the EM field and additional applied forces [
The propagator that solves the DE of Equation (35) is referred to as the coarse propagator, C , and it does not suffer from the fine scale limitations described in Section 1.7.2. A standard high order time stepping scheme (RK4) is implemented for propagating the macroscale variables U = ( x c , v z ) .
As described in Section 1, the fine scale variables, u = ( x , v ) ∈ ℝ 3 × ℝ 3 , are simply the particle position and velocity in three dimensional space, and the coarse scale variables are U = ( x c , v z ) , that is, the three position coordinates of the guiding center and the drift velocity. In order to facilitate the transition between u and U, auxiliary variables of the coarse scale are defined that are derived from U. Importantly, these auxiliary variables should not affect the propagation of U, as this could potentially introduce fine scale effects and adversely affect the capability for C to propagate with large time scales.
For a static magnetic field, the kinetic energy, ξ , is simply:
ξ = | v ( t ) | 2 = | v ( 0 ) | 2 ≡ v r 2 = v z 2 + v p 2 (36)
where v p is the radial velocity,
v p = v r 2 − v z 2 (37)
The phase angle v θ , can be approximated from the radial acceleration implied in Equation (35) (with the assumption that the second derivative in time of x p is much smaller than v p , which is consistent with Equation (34)):
d v θ d t = v ω = q m | b ( x c ) | (38)
The modified macroscale variables can then be defined as U * = ( x c , v z , v θ ) . Though phase information is now included, v θ is very easily off by half a rotation or more and reliable information about the phase can only be achieved by incorporating adjustments from the fine propagation.
The remaining auxiliary variables are given by the polar variables, and can be calculated on the fly only when a reconstruction is needed:
x θ = v θ − 1 2 b ^ ( x c ) T d b ( x c ) d x b ^ ( x c ) x ω = d x θ d t x p = v p x ω x z = 0 (39)
Computation of these auxiliary variables need not be performed until a reconstruction is needed. When a reconstruction is called for, these polar coordinates need to be paired with a coordinate system (as well as a guiding center, but this is propagated as a part of C ). Unlike the case of the linear propagator described in Section 1.7.3, the coordinate system cannot be considered fixed and is written as e ( t ) = ( e 1 ( t ) , e 2 ( t ) , e 3 ( t ) ) . While e 3 ( t ) = b ^ ( x c ( t ) ) , can be computed on the fly, e 1 ( t ) and e 2 ( t ) rely on v ∈ ℝ 3 , which, after the gyrokinetic propagation, is no longer known. A solution is to remember the coordinate system at its last known time (assumed to be t = 0 ) and merge it to what is known about the coordinate system at the current time, which is e 3 ( t ) . This is achieved by rotation matrix M, which rotates the other two coordinates based on the rotation of b ^ :
e i ( t ) = M ( b ^ ( x c ( 0 ) ) , b ^ ( x c ( t ) ) ) e i ( 0 ) (40)
With the guiding center, x c , the orthonormal coordinate system, e ( t ) , and polar coordinate variables, u p , established, the conversion to real coordinates is then simply achieved by an inverse polar transform P − 1 :
u = R * ( U * , e ( 0 ) , ξ ( 0 ) ) = P − 1 ( x c ( t ) , e ( t ) , u P ( t ) ) (41)
If the guiding center only needed to be found a single time, a reasonable choice would be to use Equation (30). However, a guiding center exactly consistent with polar coordinates of Equations (37)-(39) is given by:
( 0 , 0 , 0 ) = G ( x c ) ≡ ( x c − x ) + x ω − 1 cos ( x θ − v θ ) b ^ ( x c ( t ) ) × v + x ω − 1 sin ( x θ − v θ ) ( v − v z b ^ ( x c ( t ) ) ) (42)
All of the computations are based on magnetic field evaluations at x c , which is known to the coarse propagator, to allow for a seamless transition between coarse and fine scales. While x c does need to be solved for, via Newton’s Method, a very good initial guess is given by Equation (30), which can also be differentiated in place of Equation (42).
The compression operator is then simply:
U * = Q * ( u ) = ( x c , v z , v θ ) = ( G − 1 ( ( 0 , 0 , 0 ) , v θ ) , v ⋅ b ^ ( x c ) ) (43)
A simpler compression than the one given by Equations ((43) and (42)) results in error accumulation from just the variable transformations which can degrade the accuracy of the overall time-parallel approximation hybrid approach.
The summand of Equation (27) oscillates nonlinearly in time. In order to allow for a simple interpolation of the summand, a substitution is drawn upon from the coarse solution geometry:
d d v θ = C v ω − 1 d d t (44)
This substitution is inserted directly into the coarse and fine propagators. This makes the non-linear oscillations of the integrand linear, and allows for interpolation of the summand, radially around the guiding center and along its length, by standard techniques. The substitution is derived from the initial coarse propagator and fixed for all computations, allowing for the TP approximation to still compute adjustments related to the phase angle.
A coarse solution is used as an initial guess on which the TP approximation improves. In order to allow the TP summand to be easily and accurately evaluated at any θ , a spline (cubic Hermite) representation of the initial coarse solution is constructed.
S ( θ ) ≈ C [ θ , 0 ] ( U * ( 0 ) ) (45)
A splines interpolation was chosen for its robustness and ease of implementation [
In order to keep the integration as simple as possible, the TP sum is approximated from 0 to θ max = H + 4 5 , where H is an even number. Points of TP summand are to be evaluated at the 15 locations given by θ = g π 4 + H π h where g ∈ { 0 , 1 , 2 , 3 , 4 } and h ∈ { 0,1,2 } .
D ( g , h ) = C ˜ [ θ max , θ + d θ ] Q F [ θ + d θ , θ ] R S θ − C ˜ [ θ max , θ ] S ( θ ) (46)
Inceasing the number of points in the temporal domain where D is evaluated should increase the accuracy of subsequent interpolation. The number of points is chosen to be as small as possible while still large enough as to not add significant error to the overall method.
This evaluation is the most computationally intensive part of the algorithm, consisting of 15 compressions, fine propagations, and expansions and 30 coarse propagations. Two propagations of C ˜ can likely be replaced with a single propagation of the derivative of C ˜ with respect to U * , [
The basis χ ( g , h , θ ) , is composed of second order polynomial and sinusoidal components.
χ ( g 1 , h 1 , θ ) χ ( g 2 , h 2 , θ ) = ( 1 0 if g 1 = g 2 and h 1 = h 2 if g 1 ≠ g 2 or h 1 ≠ h 2 (47)
The time parallel approximation is then given by:
H T P A [ θ max , 0 ] ( u ( 0 ) ) = R * ( S ( θ max ) + ∑ g = 0 g = 4 ∑ h = 0 h = 2 ∫ θ χ ( g , h , θ ) D ( g , h ) ) Q * (48)
While an analytical sum of χ is possible, an integral which approximates the sum with sufficient accuracy is less intensive computationally. The overall algorithm for obtaining H T P A is summarized in Algorithm 1.
The first simulation is of a charged particle, trapped in a magnetic mirror, given by:
b ( x 1 ) = − 2 C x 1 x 3 3 a 4 b ( x 2 ) = − 2 C x 2 x 3 3 a 4 b ( x 3 ) = C ( 1 − x 3 4 a 4 ) (49)
The other example is of a charge particle near a magnetic dipole (a common type of magnetic field in nature) with fixed magnetic moment vector m,
b ( x ) = μ 0 4 π ( 3 x ( x ⋅ m ) | x | 5 − m | x | 3 ) (50)
Particle trajectories for these examples are shown in
For the simple switching hybrid propagator, H S W , the parameter ϵ was varied from ϵ = 0 , where only the fine propagator is run, to ϵ = K , where K is sufficiently large to ensure all coarse propagation, to generate different accuracy/ efficiency tradeoffs. We also considered a slight variant of the simple switching hybrid method that adjusted the time step size to ensure that a coarse propagation was performed over an integer number of rotations ( H S W v a r d t ). This was done to present the best possible results as some of the error accumulated over one rotation cancels out when a rotation is complete. For the other methods, the time step size was varied. The accuracy was compared against a highly accurate “silver standard” solution and scaled based on the change in the silver standard solution over the course of the simulation. Additionally,
The coarse gyrokinetic propagator ( C , the blue line in
with modified compression and reconstruction operators, which receives and returns microscale variables u = ( x , v ) ∈ ℝ 3 × ℝ 3 , achieved moderate accuracy at a low computational cost, but possessed a hard limit on its accuracy regardless of the time step size/computational cost. As discussed in Section 1.7.4, the guiding center model does not resolve the fine scale features of the true rotating particle and does not converge to a solution of Equation (29).
This magnetic mirror simulation seems, at least at first glance, very suitable to a
simple switching hybrid implementation ( H S W , green line in
The simple switching hybrid propagator produced “oscillations” as seen in
In both examples, the hybridization by TP sum approximation ( H T P A , purple
line in
Overcoming the incongruities present between two computational models of different scales to develop an efficient temporal multiscale hybridization is a challenging problem. But a means to accomplish this was presented, for the specific case of modeling particle trajectories in a magnetic field, by borrowing a key equation from time-parallel computing methods and encompassing it in a suitable multiscale framework. A primary limitation of this approach is the great care that is required when converting between the microscale and macroscale variables to ensure that the error resulting from this conversion is sufficiently small. An additional limitation is that the solution must be stored at a few previous time points, rather than only the current time, though the number of time locations at which the solution must be found is greatly reduced from what is needed in pure TP applications. But the improvement in performance, in terms of both accuracy and computational cost, in comparison to more established multiscale hybridization methods, such as switching back and forth between fine and coarse scale propagators based on the suitability of a coarse model, is substantial. The proposed approach is capable of generating a particle trajectory with accuracy on par with the fine propagator at a computational cost more akin to the pure coarse propagation.
Future work will hopefully extend the general multiscale hybridization approach described here to more challenging areas of study. While the TP sum approximation performs as expected for the charged particle trajectory examples presented, each type of hybridization problem has its own unique challenges, and the generality of this approach remains to be seen. In particular, this approach requires more stringent conditions for the compression and reconstruction operators than typical hybrid approaches, as well as a means of transforming the TP sum to something computationally tractable, akin to the substitution of the time variable presented here. These additional development steps may be justified for other multiscale/multiphysics problems in order to achieve quality results on par with those presented here.
Air Force Office of Scientific Research Grant Number 17RQCOR463.
Lederman, C. and Bilyeu, D. (2018) An Approximate Time-Parallel Method for the Fast and Accurate Computation of Particle Trajectories in a Magnetic Field. Journal of Applied Mathematics and Physics, 6, 498-519. https://doi.org/10.4236/jamp.2018.63046