Thermal energy storage (TES) units are needed to balance the incompatibility between energy supplies and demand in concentrated solar power plants. However, low thermal conductivity of phase change materials limits the efficiency of TES. In this paper, gradient metal foams with graded morphologies are proposed to be implemented into the PCM and numerical simulations are done to investigate their performance. A 2D axisymmetric simulation was conducted to study the characteristics of the charging process in a shell-and-tube latent heat thermal energy storage unit. Open-cell metal foams with various porosities ranging from 0.65 to 0.94 were stacked up in the axial direction of simulation module, forming a porous layer with graded porosities arranged in PCM domain. The impact of gradient porosity and the location of porous metal foam on total entropy generation and charging time of TES were studied. Central composite design was implemented to study the effects of metal foam gradient porosity on the total entropy generation and charging time. Moreover, in pursuit of detecting the optimum structure, results were illustrated in response surface plots. Comparing the optimum structure to the structure with constant porosity of 0.7225, indicates 3.35% and 7.96% improvement in charging time and total entropy generation, respectively.