  Solar flares and coronal mass ejections are interrelated phenomena that
together are known as solar eruptive events. These are the main drivers of
space weather and understanding their origins is a primary goal of
Heliophysics. In this white paper, we advocate for the allocation of sufficient
resources to bring together experts in observations and modeling to construct
and test next generation data-driven models of solar eruptive events. We
identify the key components necessary for constructing comprehensive end-to-end
models including global scale 3D MHD resolving magnetic field evolution and
reconnection, small scale simulations of particle acceleration in reconnection
exhausts, kinetic scale transport of flare-accelerated particles into the lower
solar atmosphere, and the radiative and hydrodynamics responses of the solar
atmosphere to flare heating. Using this modeling framework, long-standing
questions regarding how solar eruptive events release energy, accelerate
particles, and heat plasma can be explored.
  To address open questions in solar flare physics, we recommend that NASA and
NSF provide sufficient research and analysis funds to bring together a large
body of researchers and numerical tools to tackle the end-to-end modeling
framework that we outline. Current dedicated theory and modeling funding
programs are relatively small scale and infrequent; funding agencies must
recognize that modern space physics demands the use of both observations and
modeling to make rapid progress.
