Phase change heat storage technology is an essential method for balancing supply and demand in solar energy heat utilization. In this study, a numerical model of the phase change heat storage process is built to explore the impact of non-constant rotation, with and without metal foam. Subsequently, an investigation into the influence of metal foam pore density and porosity on heat storage performance is conducted, with a focus on Taguchi design for statistical analysis. The research delves into the effects of foam parameters on heat storage rate, temperature response, heat storage time, and heat storage properties. Findings reveal significant resolidification in the melting process of this thermal storage structure without metal foam, due to periodic rotation speed hindrance in transferring heat to the outside. Taguchi design results underscore the greater influence of porosity on the melting time and average heat storage rate compared to pore density. Specifically, a reduction in melting time by 62.21 % and 30.49 %, and an increase in average heat storage rate by 237.56 % and 51.19 % is observed when pore density and porosity are 40 PPI and 0.97, compared with the ones with porosities of 0.99 and 0.98, demonstrating minimal impact on total heat absorption.