
SULI Internship Spring 2024 5
FIG. 6. Relative energy conservation for simulations with varying
damping strengths, damping profiles, refinement width, and absorb-
ing conditions.
ing strength of 40 with a quadratic damping profile, and the
visual presence of numerical artifacts in the current and mag-
netic fields, we chose a cubic damping profile with a modest
damping strength of 4 for further optimization.
3. Accuracy Improvement with MR
With our insight about the parameters and damping chal-
lenges with MR discussed in Section V A 2, here we present
the improvements in simulation accuracy seen from apply-
ing MR to a series of parent grids with increasing coarse-
ness. These uniform (no MR) standards are denoted coarse2,
coarse4, and coarse8 run and they will be compared with our
baseline run, a uniform simulation of the maximum resolu-
tion considered in our study. In our study coarseN refers to
the coarsening factor in comparison with baseline (so coarse2
has half the cells of baseline per dimension). This allows for
proximity to the baseline to be the metric for accuracy across
analyses.
To demonstrate the trade-offs in accuracy with perfor-
mance, we apply mesh refinement to coarse2,coarse4, and
coarse8 such that the resolution of the fine patch is equal
to that of baseline. These MR runs are called coarse2 RR2,
coarse4 RR4, and coarse8 RR8 respectively, where RRX refers
to a refinement ratio of Xin each dimensions.
a. The Effect of Parent Grid Resolution To demonstrate
the effect of the coarseness of the parent grid on simulation
accuracy, we first hold the total number of particles constant.
We establish uniform standards for the Jyfield in the early
(∼0−2000ωc
−1), middle (∼2000 −4000ωc
−1), and late
(∼4000 −8000ωc
−1) reconnection stages in Fig. 7, where
decreasing grid resolution leads to intense artifacts in the early
and mid-reconnection stages of coarse8 before visually re-
turning to intensities comparable with baseline and coarse4.
The application of MR to coarse2,coarse4, and coarse8
shows visual improvement for Jy(relative to baseline) for all
cases, though we only show the coarse8 and coarse8 RR8
comparison in Fig. 8.
The corresponding analyses for energy conversion and con-
servation are seen in Figs. 9 & 10, where MR shows signifi-
cant improvements for coarse4 and coarse8, but poor perfor-
mance for coarse2.
The effect of MR on particle spectra for the uniform stan-
dards is seen in Fig. 11. In line with the Jyinspection and
energy analysis, most notable is the degree to which coarse8
RR8 improves upon coarse8.
b. Effect of Upstream Particle Density While the pre-
ceding section established the effect of coarsened parent grids
on simulation accuracy, particle density, a primary source of
the computational cost of a PIC simulation, remained con-
stant, greatly limiting the computational benefits of applying
MR to a course parent grid such at coarse8. Therefore a fur-
ther investigation of the limitations on accuracy when decreas-
ing particle density was needed.
Starting with a comparison of baseline,coarse8, and
coarse8 RR8(here labeled 64x64 RP64), Fig. 12 shows the
effect of decreasing particle density outside of the refinement
region on the particle spectra. As expected, decreasing parti-
cle density leads to greater deviations from the baseline, but
primarily this affects the low γregions towards the end of re-
connection.
B. OpenPMD frontend
a. Data IO First the frontend was restored to the func-
tionality of the legacy frontend without updating grids or pro-
viding access to mesh-refinement data.
1. Incorporating Mesh Refinement Capabilities
After the implementation discussed in Section IV B, grids
at multiple levels of refinement are now available for parallel
post-processing workflows and other low-level data inspec-
tion. Grid objects now have a functional level attribute and
accurately reflect the grids used during runtime for ADIOS2
data. Using data generated from the WarpX ‘plasma mirror’
example with MR, Listing V B 1 shows how to generate Fig.
13, verifying grid agreement between WarpX and yt.
import yt
import num p y as np
gro up se ri es = yt . load ( "/ h ome / hjones / D eskt op /
warpx _sim s / diag_bp / o pe np md_ 00 016 0 .bp ")
sl c = y t . S li ce Pl o t ( ds , ’ z ’, ( ’openPMD’,’ B_y ’) ,
center = [ 0.00004 , 0.00004 ,0])
slc . s et _w id th ((0.000045 , ’ m ’) ,(0.000045 , ’m ’ ))
slc . s et _l og (( ’openPMD’,’B_y ’) , l in th re sh = 0. 9 e2 )
slc . a nn ot at e_ gri ds ()