  Magnetic free energy powers solar flares and coronal mass ejections (CMEs),
and the buildup of magnetic helicity might play a role in the development of
unstable structures that subsequently erupt. To better understand the roles of
energy and helicity in large flares and eruptions, we have characterized the
evolution of magnetic energy and helicity associated with 21 X-class flares
from 2010 to 2017. Our sample includes both confined and eruptive events, with
6 and 15 in each category, respectively. Using HMI vector magnetic field
observations from several hours before to several hours after each event, we
employ (a) the Differential Affine Velocity Estimator for Vector Magnetograms
(DAVE4VM) to determine the photospheric fluxes of energy and helicity, and (b)
non-linear force-free field (NLFFF) extrapolations to estimate the coronal
content of energy and helicity in source-region fields. Using Superposed Epoch
analysis (SPE), we find, on average: (1) decreases in both magnetic energy and
helicity, in both photospheric fluxes and coronal content, that persist for a
few hours after eruptions, but no clear changes, notably in relative helicity,
for confined events; (2) significant increases in the twist of photospheric
fields in eruptive events, with twist uncertainties too large in confined
events to constrain twist changes (and lower overall twist in confined events);
and (3) on longer time scales (event time +12 hours), replenishment of free
magnetic energy and helicity content to near pre-event levels for eruptive
events. For eruptive events, magnetic helicity and free energy in coronal
models clearly decrease after flares, with the amounts of decrease proportional
to each region's pre-flare content.
