A stirling engine can generate heat from electricity, such as those used in MicroCHP, you can burn wood, produce heat, and generate electricity from that heat. You could do the same with a pile of sand.
You just need to pipe liquid through the sand, and a supply of cooler water.
You just need to pipe liquid through the sand, and a supply of cooler water.