Understanding the thermo-mechanical behaviour of thermal piles in sand