This paper presents a calculation of the neutron cross-sections in solid materials (used in practical neutron sources) with a large coherent scattering contribution. In particular, the dynamic structure function S(Q, ω) of polycrystalline ortho-D2 is evaluated using a Monte-Carlo calculation that performs an average over scattering angles relative to crystal axes in random orientations. This method uses an analytical dispersion function with force constants derived from neutron scattering data of single crystal D2 in the framework of an axially symmetric force tensor. The resulting two dimensional map of S(Q, ω) captures details of the phonon branches as well as the molecular rotations, that can be compared directly to data from inelastic neutron scattering on polycrystalline D2. This high resolution information is used to calculate the absolute cross-sections of production and upscattering loss of ultracold neutron (UCN). The resulting scattering cross-sections are significantly different, especially for UCN upscattering, from the previous predictions using the approach centered on the incoherent approximation.