In the present study, a one-dimensional numerical model for pulsating heat pipes (PHPs) is presented. The balance equations of mass, momentum, and energy were solved for liquid slugs, vapor plugs and also for liquid films, along with the heat conduction equation for the tube wall. The spatial and temporal variations of the liquid-film thickness were directly simulated, and the film was allowed to dry out when the local thickness decreased to the roughness height of the tube wall. The numerical results showed good agreement with the experimental data, not only for a vertical PHP but also for horizontal and inclined PHPs with various different parameters, including number of turns, working fluid, filling ratio, and operating temperature. Furthermore, the effect of the dynamics of the liquid film on flow behavior and heat transfer was examined numerically. It was confirmed that the oscillating motion of the fluid inside a horizontal PHP cannot be completely predicted when the film dynamics are ignored. For a vertical PHP, on the other hand, circulating motion was predicted regardless of the film dynamics, and the role of the film dynamics on the prediction of thermal performance was not significant. The present model is considered the first to predict the thermal performance of a horizontal PHP without introducing any fitting parameters.