  A number of double coronal X-ray sources have been observed during solar
flares by RHESSI, where the two sources reside at different sides of the
inferred reconnection site. However, where and how are these X-ray-emitting
electrons accelerated remains unclear. Here we present the first model of the
double coronal hard X-ray (HXR) sources, where electrons are accelerated by a
pair of termination shocks driven by bi-directional fast reconnection outflows.
We model the acceleration and transport of electrons in the flare region by
numerically solving the Parker transport equation using velocity and magnetic
fields from the macroscopic magnetohydrodynamic simulation of a flux rope
eruption. We show that electrons can be efficiently accelerated by the
termination shocks and high-energy electrons mainly concentrate around the two
shocks. The synthetic HXR emission images display two distinct sources
extending to $>$100 keV below and above the reconnection region, with the upper
source much fainter than the lower one. The HXR energy spectra of the two
coronal sources show similar spectral slopes, consistent with the observations.
Our simulation results suggest that the flare termination shock can be a
promising particle acceleration mechanism in explaining the double-source
nonthermal emissions in solar flares.
