Phase-Transition Thermal Charging of a Channel-Shape Thermal Energy Storage Unit: Taguchi Optimization Approach and Copper Foam Inserts

Thermal energy storage is a technique that has the potential to contribute to future energy grids to reduce fluctuations in supply from renewable energy sources. The principle of energy storage is to drive an endothermic phase change when excess energy is available and to allow the phase change to reverse and release heat when energy demand exceeds supply. Unwanted charge leakage and low heat transfer rates can limit the effectiveness of the units, but both of these problems can be mitigated by incorporating a metal foam into the design of the storage unit. This study demonstrates the benefits of adding copper foam into a thermal energy storage unit based on capric acid enhanced by copper nanoparticles. The volume fraction of nanoparticles and the location and porosity of the foam were optimized using the Taguchi approach to minimize the charge leakage expected from simulations. Placing the foam layer at the bottom of the unit with the maximum possible height and minimum porosity led to the lowest charge time. The optimum concentration of nanoparticles was found to be 4 vol.%, while the maximu possible concentration was 6 vol.%. The use of an optimized design of the enclosure and the optimum fraction of nanoparticles led to a predicted charging time for the unit that was approximately 58% shorter than that of the worst design. A sensitivity analysis shows that the height of the foam layer and its porosity are the dominant variables, and the location of the porous layer and volume fraction of nanoparticles are of secondary importance. Therefore, a well-designed location and size of a metal foam layer could be used to improve the charging speed of thermal energy storage units significantly. In such designs, the porosity and the placement-location of the foam should be considered more strongly than other factors.


Introduction
The storage of heat energy in a material by inducing a phase change, and the resulting heat transfer mechanisms, are the subject of much current research and development [1]. This subject is of great interest in many engineering and industrial applications, such as buildings, solar collectors, power generation, and automotive applications [2][3][4]. Phase Change Materials (PCMs) can store/release a large amount of thermal energy when they undergo a phase change [5]. However, the rate of heat transfer in typical PCMs is limited by poor thermal conductivity [6]. Many researchers attempt to improve the heat transfer in PCMs by improving the geometrical design of the vessels in which the PCM is contained [7], adding fins [8] to increase the surface area available for heat transfer, adding nanoparticles to the PCM to produce nano-enhanced PCMs (NePCMs) [6,9], and embedding PCMs in thermal conductive metal foams [10].
Heat transfer to and from the environment during the phase change requires conjugate heat transfer in the enclosure walls and inside the PCM itself. Many PCMs undergo melting as their phase change in energy storage units: melting due to the influx of heat when excess energy is available, and solidifying to release heat when energy is extracted. Therefore, there is natural convection in molten regions of the PCM. A numerical study of conjugate heat transfer in a square enclosure filled with water that contained alumina nanoparticles, heated by a triangular region in one corner, found that the average Nusselt number in the system was directly proportional to the volumetric fraction of the nanoparticles and inversely proportional to the size of the triangular heat source [11]. This implies that convection becomes more important as the fraction of nanoparticles increases. The same authors have also explored the convective heat transfer of a similar fluid that was nonhomogeneous in a similar square enclosure with a central square region acting as a heat source/sink [12]. Their findings indicated that at low Rayleigh numbers, where laminar flow dominates, increasing the volume fraction of the nanoparticles and the size of the heating region directly resulted in increasing the Nusselt number and so enhanced the convective heat transfer, while the same changes gave adverse effects on convection at high Rayleigh numbers. A further study on a similar fluid and enclosure, with heat added in one corner and extracted at the opposite corner, was carried out [13]. There was a solid region in the center. The results showed that the ratio of thermal conductivities in the wall and the fluid and solid block size are the most significant factors for heat transfer optimization. This implies that both the geometry and nanoparticle fraction can be optimized to maximize the performance of thermal energy storage units.
Zhou et al. [14] employed a machine learning approach and simplified the complicated energy storage process. Thus, a neural network could predict the energy storage behavior of the storage unit. Such a neural network model was used to design a hybrid energy system, including photovoltaic cooling and radiation cooling. Tang et al. [15] utilized the Taguchi method and optimized the thicknesses of the PCM layer to control nighttime cooling and daytime heat accumulation properly. The overall exergy was enhanced by 2.6% using the Taguchi method. The various novel optimization algorithms have been used to optimize the PCM-integrated systems is discussed in [16][17][18]. Moreover, the machine learning approaches have also contributed to modeling such systems [19,20] and have been reviewed in [21,22].
The introduction of fins in a cylindrical thermal energy storage system was shown to reduce the time to solidify the PCM by up to 30%, as well as reducing melting time [23]. Gürtürk & Kok [24] succeeded in reducing the melting time by 65% by adding fins designed using numerical modeling and validated with experiments. They found that if fins are too large, they impede convection and slow cooling. Corrugated fins have been shown to reduce solidification time in a cylindrical system, but only because the total surface area increases-the heat transfer per unit area is lower [25]. However, "triangular" fins (actually branches that have a triangular cross-section) running along the length of a cylindrical thermal energy storage unit reduce the solidification time by 38%, compared to a rectangular fin [7]. In a rectangular system, it has been shown that increasing the length of fins gives a higher heat transfer coefficient than increasing the number of fins [26]. Fins oriented horizontally disrupt convection, which is why vertical fins are much more common in the literature. Angled fins are also possible, and when two fins are used, the fastest heat transfer occurs when the fins were aligned at 45 • to the horizontal. With three fins, the optimum angle is 60 • [8]. Conversely, with Y-shaped fins, the angle and length of the branches and the overall length of the fin are inversely proportional to both the average temperature and the total energy of the system. When considering the shape of the fins and NePCMs, triangular fins with the long edge at the bottom of the thermal energy storage unit improve the melting rate [12].
Some studies have also analyzed the effects of combining fins and nanoparticles of different shapes. One such study found that for a system with fins that formed a "snowflake", discharge time could be reduced by 15% by adding 4 vol.% platelet-shaped nanoparticles [14]. Another study showed that changing the length of the fin had the most significant effect when the nanoparticles were spherical, reducing melting time by 27% within the range of length studied, but that the fastest solidification occurred for platelet-shaped particles [27].
Introducing porous media in the enclosure of a thermal energy storage unit can considerably enhance the heat transfer rates. For example, making the walls of the enclosure porous and corrugated makes the heat transfer rate sensitive to the tilting of the enclosure [28]. The same study also showed that including two different types of nanoparticles increased the heat transfer rate, compared to a single type of nanoparticle. Increasing corrugation in a porous cavity also increases the strength of the NePCM [17]. A porous cavity also accelerates convection when heating is non-uniform [18]. However, if the nanoparticles are magnetic, an applied magnetic field can suppress convection [29]. Convection and heat transfer can also be increased by increasing the permeability of the PCM [30].
Incorporating metal foam into the PCM enhances the heat transfer. In one study, a metal foam increased the heat transfer by a factor of four at the expense of reducing the storage capacity by 13% due to the high value of pore density [31]. Wang et al. [32] experimentally studied the charging and discharging process of thermal storage systems containing copper foam and PCM. Mohammed et al. [33] investigated the melting heat transfer in a metal foam with heat generation. Since the heat was generated inside the porous structure, the melting time could be reduced by 21% compared to a localized heater.
However, carefully designed fins have been shown to be as efficient as introducing metal foam in the system [34]. Melting time is also shown to be proportional to the porosity of an added foam but inversely proportional to the fraction of the enclosure that is filled with foam [35,36].
The addition of metal foam stimulated the melting process and resulted in decreasing the surface temperature of 47% for a PCM that was encapsulated in microscopic particles [37] and 38% for NePCM [38]. The reduction of the temperature was inversely proportional to the porosity. A combination of NePCM and metal foam was able to reduce the melting time by 90% [29] and the solidification time by 96% [30].
One study compared the effects of nanoparticles and metal foam directly. The addition of nanoparticles contributed 1.2% to melting time; the addition of metal foam reduced the melting time by 41.2% [39]. The marginal effects of nanoparticles can also be attributed to a reduction in both the convective and conductive heat transfer within the PCM [40]. A study that compared the influence of the foam porosity, the nanoparticle volume fraction, the Hartmann number of the PCM, and its Rayleigh number found that porosity was the dominant parameter [33].
The literature review shows that in each of the geometric designs of a PCM enclosure, the presence of each of the metal foams and nanoparticles can notably improve the heat transfer and response time of a thermal system. Using each of the nanoparticles or a porous matrix reduces an enclosure's energy storage capacity and suppresses convection but may boost conduction. The present study aims to analyze the potential advantages of optimizing the design of a thermal energy storage unit in the presence of both nanoparticles and metal foams for the first time. An optimum design will highlight the true advantage of utilizing metal foams and nanoparticles for heat transfer in thermal energy storage units.

Model Description
A schematic demonstration of a latent heat thermal energy storage unit consisting of both clear and porous zones is provided in Figure 1. The porous zone comprises a copper foam with a porosity of ε filled by a nano-enhanced phase change material (NePCM), and the cavity size, L = 4 cm. There is a copper wall of thickness w, which is subject to a constant temperature of T h and attached to the left side of the thermal energy storage unit. The other walls of the unit are well insulated, so they are assumed to permit zero heat flux. The thickness of the porous layer is l, and the distance between its center and the bottom wall is h. The local thermal equilibrium approach is used to model a copper foam filled by the NePCM composite. The matrix of the NePCM that is considered is capric acid, and the nanoparticles are copper. The properties of both materials are given in Table 1. Table 1. Thermophysical values of the PCM and the copper nanoparticles [41,42].

Physical Model and Governing Equations
The modeling assumptions are: (i) The variations of the density with the temperature can be modeled by the Boussinesq hypothesis, (ii) The NePCM and metal foam in the porous zone have the same temperature (local thermal equilibrium), and (iii) The NePCM and the solid matrix of the porous medium are isotropic and homogeneous. Considering these assumptions, the governing equations are: (ii) momentum conservation where t is time and x and y are the positions. The dependent field variables are pressure, p, and the velocity vector, u. The porosity ε k = ε inside the metal foam and 1 otherwise. The subscripts of "NeP,l" indicate the NePCM in the liquid state. The subscript j can be 1 for x or 2 for y; k is 1 for metal foam and 2 for clear flow. Both j and k are index parameters with no inherent physical meaning. The thermophysical properties are dynamic viscosity, µ, and density, ρ. Here f is a source term containing the body forces of the Darcy term, buoyancy forces, and a mushy zone control term. The porosity function and f are introduced as: K k is permeability, and it is artificially large outside the foam and equal to K inside the foam. β is the thermal expansion coefficient, and g is the acceleration due to gravity. A mush is relatively large (~10 6 ) compared to ς (~10 −3 ). ξ(T) is the melt fraction. It is 1 for a fully liquid PCM and 0 when the PCM is fully solid. In the temperature range in which the PCM is expected to be partially melted, around the melting temperature, T m , ξ(T) is assumed to take a linear distribution. The permeability, melting fraction, and gravity acceleration are introduced by Equation (3c-e), respectively.
where ∆T is the temperature range over which the PCM is able to change phase. The permeability of the foam layer, K, is given in Equation (4a,b) as [43]: where d p is the pore size, and ω is the pore density (pores per inch (PPI)).
(iii) energy conservation for the NePCM domain: ∂T ∂t where C p , h sf , and λ are the heat capacity, latent heat of phase change, and thermal conductivity, respectively. The subscript "eff" indicates the effective property for foam and the material inside the pores (composite property). The effective properties are introduced in Equations (6a,b) and (7), where the subscripts "sm" and "s" denote the copper foam and solid PCM, respectively.
The effective thermal conductivity of the copper foam and PCM can be computed using theoretical models, as explained by Ranut [44]. Equation (8a,b) has been adopted to take into account the porous details [45,46].
Eenergy is conserved in the copper wall by adopting Equation (9).
where subscript "w" denotes the wall. The NePCM's density is evaluated invoking a linear rule of mixtures (Equation (10a,b)) in which υ na is the volumetric concentration of nanoparticles in the PCM. The Brinkman model (Equation (10c)) is utilized to estimate the dynamic viscosity [47].
The thermal expansion of the molten PCM is an important variable that drives the natural convection flow (Equation (11)): In accordance with previous literature [38], the Maxwell model (Equation (12)) was selected to compute the thermal conductivity of the NePCM.
As with the density, the heat capacity of the NePCM is computed using a linear rule of mixtures, which is an implementation of the conservation energy (Equation (13a,b)).
Lastly, the nanoparticles do not contribute to latent heat energy storage; thus, the latent heat of the NePCM is computed according to Equation (14).
The temperature continuity and heat balance were applied at the interface boundaries, which can be mathematically represented as Equation (15a,b). where the domains I, II, and III were defined in the schematic Figure 1. Equation (15c-e) must be applied at the interface of the solid wall and the layers.
Lastly, the boundary conditions at the outer walls of the unit can be formulated as Equation (15f,g).
At the adiabatic wall : At the hot wall :

Characteristic Parameters
The characteristic parameters of the present research are stored Energy in the unit (ES), the melt volume fraction (MVF), and charging power (CP). The total energy deposited in the foam-NePCM composite, including the latent and sensible energy, is the integration of energy change over the domain (Equation (16a)).
The sensible energy stored in the copper wall and the total energy stored in the unit are given by Equation (16b,c), respectively.
Finally, the overall Melting Volume Fraction (MVF) is integrated over the PCM domain, taking into account the porosity of the porous layer (Equation (17)).
In a practical application of a TES unit, the performance of the unit can be evaluated by the charging power (Equation (18)). This parameter shows the capacity of the PCM to store energy and depends on the amount of the energy stored at a 100% melting volume fraction.

CP =
ES when the melting process complete full melting time ,

Numerical Method
To investigate the melting performance of a partially porous square medium, the Galerkin finite element method (GFEM) is utilized. This method uses the weak form to solve the governing equations. Details of GFEM are described elsewhere [48,49]. The object variables, i.e., the velocity components in the x and y directions, pressure and temperature, are expanded by utilizing a shape function. The expanded equations were integrated over the simulation domain to form a set of residual equations. The second-order Gaussian-quadrature technique was used for numerical integration. An automatic timestep adjustment was applied in the form of the backward differentiation formula (BDF) [50] to ensure the convergence and accuracy of computations. The PARallel DIrect SOlver (PARDISO) solver [51][52][53] and the Newton-Raphson method with a damping parameter of 0.8 were utilized to reduce the output of the residual equations to~10 −6 .

Impact of Mesh Size
The mesh quality can influence the accuracy of numerical solutions significantly. Thus, the impact of the mesh size of the solution was investigated systematically by adopting four different mesh sizes. The properties of the adopted meshes are presented in Table 2. The melt volume fraction, which shows the latent thermal energy storage, was selected as the characteristic parameter of the mesh study. The computations were performed for L = 40 mm, w = 3 mm, l = 6 mm, h = 11 mm, ε = 0.85, and υ na = 0.06.  Figure 2 illustrates a view of the mesh used, which is a uniform structured mesh. The mesh in the PCM domain is slightly denser than in the solid wall: in the wall, there is only conduction heat transfer with smooth temperature gradients, and hence a dense mesh is not required for this domain.   Table 2. Figure 3 shows that the variation of the mesh changes the results slightly. The corresponding computational time is reported in Table 2. As seen, the computational time for Case I is higher than Cases II-IV. The reason is that a low-resolution mesh cannot adequately capture a narrow phase change interface, and thus the solver must select small time steps to keep the solution accurate and stable. This leads to a longer simulation, despite the coarser mesh. For Case II, the computational time drops, since the mesh-size only increased slightly, but could capture the behavior of the phase change region more conveniently, allowing larger time steps. Any further increase in mesh size increases the computational time. Since the change in MVF is minimal with the increase of mesh size, Case III shows a mesh size of 125 × 125 elements (PCM domain) and 6 × 125 elements (wall) for the computations to minimize the computational costs while maintaining an acceptable level of accuracy.

Validation
The results of the present model are validated through a comparison with the investigation of Al-Jethelah et al. [39] for the melting of coconut oil enhanced by copper oxide nanoparticles, embedded in an aluminum foam. The copper oxide-coconut oil system is a stable NePCM that could stay stable for months with good phase change cycling properties. The composite was embedded in a rectangular thermal energy storage unit 5.0 cm wide and 7.2 cm high. One edge was subject to a uniform heat-flux while the other surfaces were at zero heat flux. The experiment was performed for a foam porosity of 0.92. The phase change temperature of PCM was 24 • C, and the heating commenced when the NePCM composite was at an initial uniform temperature of 20 • C. The permeability of the foam was evaluated to be 3.3 × 10 −7 m 2 (Equation (4a,b)). Figure 4a shows the images of the melting field at various time steps, reported in [39]. Figure 4b shows the computed melting field of the present simulations. Both images show the significance of natural convection flows in open foams. Moreover, the melting fronts for both images are the same, which implies that the model can reproduce the behavior of the system accurately. The melting front was also computed according to the conditions of benchmark references for a case with a Rayleigh number Ra = 1.25 × 10 5 and a Prandtl number Pr = 50 [54,55]. This case shows the melting of a PCM in a rectangular cavity when the heated wall is subject to a uniform hot temperature. The melting fronts are plotted in Figure 5 for all cases, which denotes fair proximity between all captured melting fronts. The melting front computed by Kashani et al. [56] has also been added for the sake of comparison.
Taguchi's technique is a robust statistical method used to optimize the design of experiments in which several parameters or control factors influence the outcome by performing the minimum number of required tests and reducing the associated experimental costs. For the present thermal energy storage unit, the five key parameters are considered to be control factors, and the value of each parameter, or level, can vary among different values. Here, each control factor is assigned four levels. The five control factors and their levels are presented in Table 3. If all the possible combinations were to be tested, 4 5 = 1024 experiments would be required, which is a prohibitive number. Taguchi's method is used to reduce the number of required tests, and the L16 orthogonal array concept is utilized ( Table 4). As can be seen in that table, only 16 tests with different combinations of the control factors are sufficient to define the influence of the factors, based on Taguchi's algorithm. Once the required tests are defined, the next step is to perform an analysis of the signal to noise ratio, S/N ratio or SNR, in order to evaluate the effect of each parameter on the outcome by calculating the ratio of the signal (desired outcomes) to the noise (undesired outcomes). Three different optimization criteria can be adopted, depending on the result: the higher-the-better, the nominal-the-better, and the lower-the-better. In the present investigation, the time required for full melting, t| MVF=1 , is the result that should be optimized. As the objective is to reduce t| MVF=1 to achieve more efficient thermal storage, then the lower-the-better approach is appropriate. In addition, a linear regression equation is derived to create a simple predictive relationship between t| MVF=1 and the various control factors:  Table 4 and Equation (19) clearly indicate that all the control factors have a nonnegligible influence on the result. Using Equation (19), the optimal control factors may be derived and are presented in Table 5. The optimized factors are: w = 4 mm, l = 8 mm, h = 11 mm, ε = 0.8, and υ na = 0.04, which gives melting time, t| MVF=1 = 2025 s, while performing a test with optimal condition that gives t| MVF=1 = 3291.6 s. This value of t| MVF=1 is lower than that of all the 16 combinations performed earlier, indicating that the factors are likely to be optimized. The optimum case shows a 58% reduction in melting time, 100 × (7900−3291.6)/7900, compared to the design case of no. 9 of Table 4. For now, it was observed that all the factors influence the result. However, the degree of influence of all the parameters is not necessarily the same. This can be evaluated by analyzing the SNR associated with each control factor. Table 6 presents the mean values of SNR for the different levels of each factor. The variation of SNR with the level of the factors is also illustrated in Figure 6, which shows that the optimal control factors that were previously obtained provide the highest values of SNR. In Table 6, the difference between the maximum and minimum values of SNR is calculated and denoted δ, which indicates the importance of each factor. As a consequence, the control factors can be ranked from the most influential to the least influential. The influence of the factors on the results has, therefore, the following decreasing order: h > ε > l > υ na > w. This indicates that the properties of the porous layer, i.e., its height, porosity, and thickness, are the most significant parameters, followed by the volume fraction of the dispersed nanoparticles, while the thickness of the copper wall is the least significant parameter.  Twelve more experiments were performed to investigate the optimum control factors further ( Table 7). The volume fraction of the nanoparticles was constant at 0.04. From the remaining control factors, three were constant, while the fourth was varied to three different values in each group of experiments. The optimal time for complete melting from the previous tests, t| optimum = 3291.6 s, was taken as the test time, and the melted volume fraction was measured at this time for each experiment. A volume fraction of melt that is lower than 1 indicates that full melting is not yet achieved, and the time required for full melting in the experiment is greater than t| optimum . It can be seen in Table 7 that in 10 out of 12 experiments, the PCM has not fully melted at t| optimum , which supports the supposition that the parameters that were calculated previously are indeed optimized. In the remaining two experiments, complete melting is fully achieved at t| optimum , when w was increased from 4 mm to 6 mm and when ε was increased from 0.8 to 0.85. Furthermore, the difference between the obtained values for melting time and t| optimum is lower when w is varied, which supports the rank defined based on Table 6. The variation of the foam layer's location from 2 mm to 6 mm increased the MVF from 0.917 to 0.998, which shows an 8.8% improvement in the melting rate. In order to provide a physical explanation for the results, various graphical representations of the streamlines and isotherms in the cavity, as well as the time evolution of the melted volume fraction MVF and of the stored energy ES, are presented. Figures 7 and 8 depict the streamlines and the isotherms in the enclosure for different values of the porous layer width l, while keeping the other parameters at their optimal values. In all the cases, the PCM initially melts in the left-hand region of the cavity (near the heated wall). Two phenomena occur in the cavity: thermal convection of the melted PCM and enhancement of the heat transfer by the porous layer. Convective flow takes place where the heated fluid goes up and is replaced by a colder melt, leading to a clockwise circulation. The PCM melts around the porous layer in the initial stages of melting, and the extent of the region in which melting occurs increases with l. The high thermal conductivity of the porous layer enables the flow of heat through the PCM, and when the size of the layer is larger, more heat is transferred to the PCM, leading to enhanced melting. It can be seen that, at every instant, the zone of melted PCM is greater for a higher l. The isotherm contours show that the temperature is higher in the different zones of the cavity when l is increased, thus confirming the contribution of the size of the porous layer to the heat transfer.
The variations of the MVF and the ES as a function of time are plotted in Figure 9 for various values of l. Full melting, corresponding to MVF = 1, is achieved more slowly when l is decreased. In addition, more energy is stored (ES increases) as l increases, leading to a higher charging power. This is due, as previously explained, to the enhanced heat transfer when the size of the porous layer is increased.   The impact of the height, h, at which the porous layer is located above the bottom edge of the cavity on the streamlines and the isotherms is illustrated in Figures 10 and 11. The same phenomena of thermal convection of the PCM and heat transfer enhancement by the porous layer are observed. However, it can be seen that moving the porous layer upwards (increasing h), even though still contributing to heat transfer, reduces PCM melting in the bottom part of the enclosure due to the diminished convective effects in that region. In fact, the heated PCM circulates to the top due to convection. When the porous layer is moved upwards, it increases the heat transfer to the (already hot) PCM, while moving it downwards contributes to heating the cold PCM and enhances thermal convection. This can be verified by looking at the isotherms, which clearly show that the bottom part becomes substantially colder when the porous layer is moved upwards.    The streamlines and the isothermal contours are depicted in Figures 13 and 14 for various values of the porosity of the porous layer, ε. The area of melted PCM around the porous layer decreases when ε increases. For ε = 0.95, it can be seen that the zone of the melted PCM is considerably limited compared to the case of ε = 0.8. This indicates a weaker heat transfer when the porosity is increased. Indeed, the main factor that gives the porous layer the capacity to transfer heat is the high thermal conductivity of its solid matrix. ε represents the ratio of the void space in the porous layer compared to the total volume. When ε is increased, the size of the solid matrix is reduced, and the contribution of the porous layer to the heat transfer is diminished. The isothermal lines show that the temperature in each zone of the cavity is higher when ε is reduced, indicating an enhanced heat transfer. For these reasons, both the MVF and the ES decrease when ε is increased and are minimum for ε=0.95, as shown in Figure 15.    Figure 18 shows that the impact of the nanoparticles' concentration, v na , is limited on the values of MVF and ES, thus confirming the outcomes of Table 6, in which v na was shown to have a rank-four importance compared to the other control factors.

Conclusions
The Taguchi method has been used to find the optimal combination of parameters to achieve the fastest melting of the PCM. The relative importance of each parameter was assessed. A total of 16 simulations were performed to enable the optimization. Using the optimized parameters as a base case, the parameters were varied to test if the Taguchi method had successfully found the optimum parameters and to understand how each control factor affects the thermal behavior of the PCM in the cavity. The main outcomes of the present investigation are summarized as follows: • In a cavity with side length, L = 40 mm, the optimal values obtained for the control factors are the following: w = 4 mm, l = 8 mm, h = 11 mm, ε = 0.8, and υ na = 0.04. By their decreasing order of influence, the control factors are ranked as: h > ε > l > υ na > w. The variation of the design parameters could induce a 58% variation in the melting time.
• When the left wall is heated, PCM starts melting, and convective flow takes place. The presence of the porous layer in the cavity improves heat transfer and contributes to PCM melting.

•
The size and location of the porous layer affect the thermal behavior of the PCM. Increasing the layer size, l, enhances and accelerates heat transfer. The charging power increases with l. Just shifting the porous layer from 2 mm to 6 mm increased the melting rate by 8.8%.

•
Moving the porous layer upwards (increasing h) hinders the convective effects in the bottom part of the cavity and lowers the contribution of the porous layer to PCM melting. The charging power decreases when h is raised.

•
Reducing the porosity of the porous layer, ε, which is equivalent to a higher presence of the solid matrix and, consequently, a higher thermal conductivity, enhances heat transfer and PCM melting. The charging power increases as ε decreases.

•
The width of the heated copper wall, w, has a very limited effect on the charging power.
In the present study, the foam layer could be placed horizontally, and its location could change in a horizontal direction. However, it is also possible to place the foam layer vertically and change its location horizontally. The layer can also be placed along the enclosure walls. These designs can be subject to future investigations.