The propagation of solitary waves in a constant water depth is investigated. The Dirichlet boundary condition and an internal mass source are utilized, respectively, to generate the desired solitary waves. Various solitary wave theories are applied to the numerical model. The goal is to generate stable and accurate solitary waves. Accuracy is evaluated in terms of the relative error of the wave height between the input signal and the generated wave and stability is evaluated in terms of the distance required to stabilize the waves. The attenuation of solitary waves propagating over a significant travel distance due to the viscous effect is then studied experimentally and numerically. The results reveal that the use of the first-order solitary wave solution with the Dirichlet boundary condition is surprisingly good while the use of the ninth-order solitary wave solution with the internal mass source provides the best performance. It is conjectured that in the numerical implementation, the use of internal wavemaker acquires less theoretical information of solitary wave properties than that of the Dirichlet boundary condition such that the former approach demands a higher-order solitary wave solution to generate accurate and stable waves.