  We study the scattering of the light-flavor pseudoscalar mesons ($\pi, K, \eta$) off the ground-state charmed mesons ($D,D_s$) within chiral effective field theory. The recent lattice simulation results on various scattering lengths and the finite-volume spectra both in the moving and center-of-mass frames, most of which are obtained at unphysical meson masses, are used to constrain the free parameters in our theory. Explicit formulas to include the $S$- and $P$-wave mixing to determine the finite-volume energy levels are provided. After a successful reproduction of the lattice data, we perform a chiral extrapolation to predict the quantities with physical meson masses, including phase shifts, inelasticities, resonance pole positions and the corresponding residues from the scattering of the light pseudoscalar and charmed mesons. 
Towards a precise determination of the scattering amplitudes of the   charmed and light-flavor pseudoscalar mesons