  We follow the longterm evolution of the dynamic ejecta of neutron star
mergers for up to 100 years and over a density range of roughly 40 orders of
magnitude. We include the nuclear energy input from the freshly synthesized,
radioactively decaying nuclei in our simulations and study its effects on the
remnant dynamics. Although the nuclear heating substantially alters the
longterm evolution, we find that running nuclear networks over purely
hydrodynamic simulations (i.e. without heating) yields actually acceptable
nucleosynthesis results. The main dynamic effect of the radioactive heating is
to quickly smooth out inhomogeneities in the initial mass distribution,
subsequently the evolution proceeds self-similarly and after 100 years the
remnant still carries the memory of the initial binary mass ratio. We also
explore the nucleosynthetic yields for two mass ejection channels. The dynamic
ejecta very robustly produce "strong" r-process elements with $A > 130$ with a
pattern that is essentially independent of the details of the merging system.
From a simple model we find that neutrino-driven winds yield "weak" r-process
contributions with $50 < A < 130$ whose abundance patterns vary substantially
between different merger cases. This is because their electron fraction, set by
the ratio of neutrino luminosities, varies considerably from case to case. Such
winds do not produce any $^{56}{\rm Ni}$, but a range of radioactive isotopes
that are long-lived enough to produce a second, radioactively powered
electromagnetic transient in addition to the "macronova" from the dynamic
ejecta. While our wind model is very simple, it nevertheless demonstrates the
potential of such neutrino-driven winds for electromagnetic transients and it
motivates further, more detailed neutrino-hydrodynamic studies. The properties
of the mentioned transients are discussed in more detail in a companion paper.
