Simulation of a thermal battery using Phoenics