To enhance the rate of heat transfer in phase change materials (PCM), high conductivity porous materials have been widely used recently as a promising method. This study introduces a novel approach for improving melting of PCM by incorporating uniform Joule heat generation with the porous structure compared to central heat generation. Different cases based on the heater-in foam configuration under the same heat generation rate are numerically verified and compared with the case of using the central heating element, which the heat transfer in the domain enhances by the porous medium. The effects of pore density and rate of heat generation are explored using the thermal non-equilibrium model to better deal with the interstitial heat transfer between the internal heat-generated-in-foam and the PCM. For the case with the central heating element, the effects of heater dimensions as well as the rate of heat generation are also investigated. The results show that the uniform heat generation from the porous structure can substantially reduce the melting time. Applying 100 kW/m3 for the rate of heat generation reduces the melting time by 21% compared with the best case of the localised heater. Meanwhile, applying higher pore-density foam does not bring any significant effect due to the uniform distribution of the heat generation. The results also show a small effect of localized heater size on the melting time with the same rate of heat generation density from the porous structure. However, for an identical volumetric heat source power of the localised heater, the rate of heat generation per volume is more effective compared with the heating element size due to the presence of the porous medium.