XKN: a Semi-analytic Framework for the Modelling of Kilonovae
After GW170817, kilonovae have become of great interest for the astronomical, astrophysics and nuclear physics communities, due to their potential in revealing key information on the compact binary merger from which they emerge, such as the fate of the central remnant or the composition of the expelled material. Therefore, the landscape of models employed for their analysis is rapidly evolving, with multiple approaches being used for different purposes. In this paper, we present xkn, a semi-analytic framework which predicts and interprets the bolometric luminosity and the broadband light curves of such transients. xkn models the merger ejecta structure accounting for different ejecta components and non-spherical geometries. In addition to light curve models from the literature based on time scale and random-walk arguments, it implements a new model, xkn-diff, which is grounded on a solution of the radiative transfer equation for homologously expanding material. In order to characterize the variety of the ejecta conditions, it employs time and composition dependent heating rates, thermalization efficiencies and opacities. We compare xkn light curves with reference radiative transfer calculations, and we find that xkn-diff significantly improves over previous semi-analytic prescriptions. We view xkn as an ideal tool for extensive parameter estimation data analysis applications.