In this paper, a mathematical model is developed for the simulation of encapsulated phase change material as a thermal energy storage tank. The model is modified for the TRNSYS software to enable researchers for investigating the performance of a latent heat energy store system integrated with solar energy systems and buildings. The model is validated against experimental and numerical studies and the error is found to be less than 2% and 10% for 1-D and 2-D models, respectively. The new component is applied for solar energy storage and it is concluded that it effectively follows the variation of solar irradiation. The application of a PCM tank for daily energy storage reduces the cooling and heating loads by 22.5% and 18%, respectively. The energy-saving with seasonal cooling storage using a PCM tank is about 7% of the total energy consumption.