7.2 Automated Flux Rope Detection
7.2.1 Algorithm
To detect flux ropes in a sequence of daily snapshots from our global simulation, we have de- veloped the following 3-stage procedure:
1. Point Testing
Test individual points on the numerical grid for the characteristic “flux rope” structure of sign changes in the vertical magnetic pressure and tension forces, as described in Section 7.1.
2. Clustering
Use a hierarchical clustering algorithm (Johnson, 1967) to associate neighbouring points which form part of the same flux rope structure.
3. Time Correlation
Identify which ropes are new, and which were present on the previous day. This is done by (1) finding pairs of ropes which overlap on consecutive days, then (2) merging chains of ropes which overlap over multiple days.
Writing the vertical components of the Lorentz force as
P =−ˆz· ∇ 1 2B 2 , T = ˆz·(B· ∇)B, (7.2)
the condition for a “flux rope” structure at a point(x, y, z)is
P(x, y, z−1)<0, P(x, y, z+ 1)>0, T(x, y, z−1)>0, T(x, y, z+ 1)<0. (7.3) In practice it has been found necessary to restrict the selection with a threshold value of±5(in code units of force). An example of the points selected by this procedure is shown in Figure7.3(a), for day 202. The selected points are shown by blue asterisks, projected on the solar surface. The grid of points tested extends over allx andy, and from z = 1to z = 21in height, the latter to save computational effort. In addition, the resolution of this grid is 3 times coarser than the
7.2 Automated Flux Rope Detection 153
Figure 7.3: Automatic detection of flux rope “points” and clustering into separate ropes, illustrated for day 202 of run A2. Panel (a) shows points selected from their Lorentz force structure, projected on the solar surface where white shading denotes positive radial field and grey shading negative. Panel (b) shows 3D field lines traced using the flux rope points as startpoints (as usual grey shading shows radial surface field and coloured lines are field lines: yellow/orange for open field and blue for closed). The image is centred at longitude 220◦. Panel (c) shows the flux rope structures found by the clustering algorithm; each flux rope is colour-coded and numbered. The clustering algorithm itself is illustrated in panel (d).
computational grid, again to reduce computational effort, particularly in the clustering and time correlation stages. Using the selected points as start-points for field line tracing, we obtain the field lines shown in Figure7.3(b). A number of flux ropes are visible, including a large one around the north polar crown1. We also see that some spurious structures have been selected, such as single field lines or unsheared arcades. In order to concentrate the sample on twisted flux ropes, we
1
7.2 Automated Flux Rope Detection 154
have implemented the extra condition of a sufficiently strong parallel current at each point tested, requiring that
jk ≡ |j·B|
B2 >5. (7.4)
The basic clustering idea is simple, and is sketched in Figure7.3(d). Starting with each point as an individual entity, the closest two points are grouped together, and the process is repeated until the shortest inter-group distance is above some thresholddmin. The value of this parameter is set to 6, after experiment and visual comparison with the field line structure. The clustering algorithm is described in detail in AppendixC, SectionC.1. After running the clustering algorithm, any groups with fewer thannminpoints are removed, as these tend to be spurious structures. Experiment has given an optimum value ofnmin= 8. The results of clustering for day 202 of run A2 are shown in Figure7.3(c), where each final group has been colour coded. After excluding groups with fewer than 8 points we find 31 flux ropes, of varying sizes.
Finally we consider the time correlation procedure. The algorithm is described in AppendixC, SectionC.2. Since flux ropes can merge or fragment there will always be an arbitrariness to this tracking process. We assume that two flux ropes on consecutive days are the same structure if they have at least one overlapping point in thexandydirections. We do not require overlap in thez
direction so as to allow for vertical motion (lift-off). The results of time correlation over a 2-day correlation period are shown in Figure 7.4 for days 202 and 203 of simulation run A2. Panels (a) and (b) show the flux ropes identified by the clustering algorithm on each day independently, with independent numbering on each day. Panels (c) and (d) show the merged structures and new numbering resulting from the time correlation algorithm. The 29 resulting flux ropes are mostly present over both days; only rope 24 vanishes on day 203 and ropes 28 and 29 appear. We can see several cases where multiple initial flux ropes have been merged into a single structure by the time correlation procedure. For example, rope 16 on day 202 (Figure7.4a) has split into two sections on day 203, labelled 21 and 22 in Figure7.4(b). Because both ropes 21 and 22 overlap the earlier rope 16, they are all merged together by the time correlation to give a single rope 15 in Figures 7.4(c) and (d).