A Mesoscale-Microscale approach for the energy analysis of buildings