We present a theoretical framework to study open charm production in relativistic heavy-ion collisions. The coupling strength between the charm quarks and the QGP constituents, quantified by the spatial diffusion coefficient $2\pi TD_{s}$, is obtained by performing a phenomenological fit analysis to the lattice QCD calculations, resulting in $2\pi TD_{s}=const.$ (\textbf{Model-A}) and $2\pi TD_{s}=1.3 + (T/T_{c})^2$ (\textbf{Model-B}). We find that the relative azimuthal distribution of the initially back-to-back generated $c\bar{c}$ pairs presents a broadening behaviour, which is more pronounced for $c\bar{c}$ pairs with small initial $p_{\rm T}$, and when the Model-B approach is adopted. The competition between the initial drag and the subsequent collective effects tends to restrict the time dependence of charm quark $R_{\rm AA}$. Concerning the theoretical uncertainty on final D-meson nuclear modification, the nuclear shadowing and pp baseline components are dominat at high and low $p_{\rm T}$ ($p_{\rm T}\lesssim3~{\rm GeV/{\it c}}$), respectively. The measured D-meson $R_{\rm AA}(p_{\rm T})$ favors Model-A assumption for the diffusion coefficient both at RHIC and LHC, while their $v_{2}(p_{\rm T})$ prefer Model-B at moderate $p_{\rm T}$. These results confirm the necessity to consider the temperature- and/or momentum-dependence of $2\pi TD_{s}$ to describe well the D-meson $R_{\rm AA}$ and $v_{\rm 2}$ simultaneously.
Comment: 17 pages, 18 figures; Accepted by Phys. Rev. C