Optimising systems with wood pellet boilers or stoves using simulations requires realistic computer models. The objective of this work was to develop and verify a mathematical model for wood pellet boilers and stoves for use in system simulations with the dynamic simulation programme TRNSYS, calculating both the energy balance and the CO-emissions (carbon monoxide emissions). Laboratory measurements have been carried out and a mathematical two-node model was developed and implemented as a TRNSYS component. Parameters were identified and the model has been compared with measurements. The model shows in general good agreement with measured data, however there are details that could be improved. This involves improved modelling of the dynamic response for boilers with large water volumes and improved modelling of the air factor and the CO-emissions, especially during start and stop conditions. Further improved methodology and accuracy for measuring and parameter identification is recommended.