Uranus and Neptune (U&N) have highly different intrinsic heat fluxes. Here, the principles behind a new computer code for calculating numerical structure and evolution models of planets are presented, and with this program the thermal evolution of U&N is investigated using up-to-date equation of state data. Particularly, it is shown that the assumption of a thermal boundary layer in the planet's envelope, trapping part of its heat in the deep interior, impacts the planet's cooling drastically and thus allows for an explanation of U&N's heat fluxes within the same framework.<eng>