Thermal transients in buildings: development and validation of a numerical model