Direct numerical method to solve radiation trapping problems with a Doppler broadening mechanism for partial frequency redistribution