Optimisation of a latent heat storage system containing a salt hydrate