• Thermal energy storage is studied in a cubic cavity having phase change materials. • A rotating cylinder is added for mixed convection heat transfer. • Mixed convection is better than the natural one for thermal storage units. • High angular speed in the clockwise direction improves the melting process. • A wavy wall with one undulation is sufficient for good performance. In this manuscript, phase change material (PCM), as a thermal energy storage medium, is considered within a 3D wavy cubic enclosure to investigate the effect of free and mixed convection heat transfer on the PCM melting process. Rotating cylinders also are located in the middle of the enclosure to study the effect of their angular velocity in different conditions. Governing equations are solved by Galerkin Finite Element Method (GFEM) and were confirmed by previous studies. As main outcomes, results with enhanced angular velocity, the average temperature, and entropy generation were significantly decreased. Results showed that as the melting process is helpful for thermal energy storage systems, it is recommended by this study to have a rotating cylinder inside the PCM domain and the undulation number of the hot surfaces not to exceed one. It was shown that the cylinder rotation of −5 rad/s enhances the melting process speed by about 88% compared to the stationary cylinder, and about 186% of melting enhancement can be obtained for the undulation number of 1 instead of 4.