Simulation of a Fast-Charging Porous Thermal Energy Storage System Saturated with a Nano-Enhanced Phase Change Material

: The melting of a coconut oil–CuO phase change material (PCM) embedded in an engineered nonuniform copper foam was theoretically analyzed to reduce the charging time of a thermal energy storage unit. A nonuniform metal foam could improve the effective thermal conductivity of a porous medium at regions with dominant conduction heat transfer by increasing local porosity. Moreover, the increase in porosity contributes to ﬂow circulation in the natural convection-dominant regimes and adds a positive impact to the heat transfer rate, but it reduces the conduction heat transfer and overall heat transfer. The Taguchi optimization method was used to minimize the charging time of a shell-and-tube thermal energy storage (TES) unit by optimizing the porosity gradient, volume fractions of nanoparticles, average porosity, and porous pore sizes. The results showed that porosity is the most signiﬁcant factor and lower porosity has a faster charging rate. A nonuniform porosity reduces the charging time of TES. The size of porous pores induces a negligible impact on the charging time. Lastly, the increase in volume fractions of nanoparticles reduces the charging time, but it has a minimal impact on the TES unit’s charging power.


Introduction
The design of thermal energy storage (TES) systems has improved significantly in recent years. Phase change materials (PCMs) have been implemented in various practical applications such as buildings materials [1], air heating and cooling in buildings [2], cooling of electronic components [3], recovering low-temperature industrial waste heat [4], and automotive applications [5].
Most of the advances in TES system design have been around improving the response time of storage units during the charging and discharging process and the synthesis of new composite PCM materials. For instance, using expanded graphite additives [6], tree-like fins [7], stepped fins [8], and heat pipes [9] are some of the recent techniques. Moreover, thermal conductive structures such as three-dimensional (3D) porous diamond foams [10] and continuous diamond-carbon nanotube foams [11] have also shown promising performance.
Many researchers attempted using a frame of thermal conductive metals and porous metal foams, saturating them with phase change material. The thermal conductive structure of the metal foam carries out the heat to and from PCM inside the pores. Thus, the composite PCM-metal foam channels the heat from the heat sources and improves the thermal conductivity. Open metal foams allow some degree of natural convection heat transfer in molten areas of the TES unit. The natural convection heat transfer is an important phenomenon that transfers thermal energy by advection in a molten region. Considering open metal foams and natural convection effects, Talebizadehsardari [12] utilized a composite of metal foam and PCMs and designed an air heater for domestic application. The results indicated that the geometrical shape of air passages induces dominant effects on the PCM unit's thermal behavior. Sardari et al. [13] used an aluminum foam-PCM composite TES unit to absorb a wall-mounted radiator's heat during off-peak loads. Later, the TES unit releases the absorbed heat when the primary heating system turns off. The authors showed that using the metal foam shortens the charging time by 95% compared to a simple PCM. Interestingly, the increase in metal foam porosity (97%) produces a positive influence and reduces the TES unit's charging/discharging time.
Zhao et al. [14] compared the advantages of using fins with those of using metal foams in reducing the melting time of a PCM in a shell-and-tube shape TES unit. They found an optimum design for the fins. They then compared the melting time of using the optimum fin with a case made using the same amount of metal foam instead of the fins. They reported that properly designed fins could be as advantageous as metal foam.
Using nanoparticles is another approach to synthesize nano-enhanced phase change materials (NePCMs). Zhang et al. [15] dispersed copper oxide nanoparticles in RT28 PCM to improve the charging heat transfer rate in a wavy-channel TES unit. The presence of nanoparticles improved the heat transfer rate and reduced the charging time. Bondareva et al. [16] examined the melting of an alumina-paraffin NePCM inside a copper radiator. This investigation showed that the nanoparticle presence increases the viscosity of molten PCM, limiting the mobility of liquid PCM.
On the other hand, nano-additives enhance the thermal conductivity of the PCM. Thus, using NePCM was most advantageous at an early melting heat transfer stage, where the conduction regime was dominant. It can be concluded that the advantage of using nanoparticles mainly depends on the internal structure of the TES enclosure and dominant mechanisms of heat transfer.
All of the above studies used a uniform metal foam to improve the thermal conductivity of composite PCM. Mahdi et al. [17] employed a cascade (multiple segments) of PCM-metal foam composites to enhance a TES unit's discharging time. They also employed 5% nanoparticles to further enhance the thermal conductivity of the system. Using the multiple segments and nanoparticles, they reduced the discharging time by 94%.
The literature studies showed that the natural convection effects and the thermal conductivity of composite PCMs could significantly influence a TES unit's phase change behavior. A dense porous structure (low porosity) increases the composite thermal conductivity but suppresses convection flows. This is while a high porosity metal foam allows convection flows. Thus, a nonuniform porous metal foam could be advantageous from both points of view. The present study investigates the melting process of a PCM embedded in a nonuniform metal foam. The influence of using various concentrations of nanoparticles, porous densities, pores sizes, and porous gradients on the full charging time of the TES unit are addressed. The Taguchi optimization approach was employed to systematically find an optimum design of nonuniform porosity. In particular, the study addressed the following research questions: (1) Does a nonuniform porosity reduce the melting time for a fixed amount of metal foam? (2) What is the impact of nanoparticles and pore size on the melting time of TES?

Governing Equations and Boundary Conditions
A schematic view of the physical and computational domains with dimensions of the latent heat thermal energy storage unit is depicted in Figure 1a,b. The TES unit is a cylinder with a longitudinal inner tube containing heat transfer fluid (HTF). The cylinder is filled with an inhomogeneous porous medium in which porosity and permeability vary along the z-direction. The porosity in the direction of the z-axis could be increasing, constant, or decreasing. Biobased coconut oil containing the CuO nanoparticles fills the pores. Table 1 lists the properties of coconut oil, CuO, copper metal foam, and water.  Table 1. Thermophysical properties of the coconut oil and the nanoadditives [18,19] The modeling was done under the following assumptions: (1) the melted NePCM  The modeling was done under the following assumptions: (1) the melted NePCM behaves as an incompressible Newtonian fluid, and the flow in the pores is laminar; (2) nanoparticles do not settle, and they are homogeneously dispersed in the PCM; (3) expansion of the NePCM is neglected; (4) the properties of the HTF in tube are considered to be constant and Newtonian. Here, a linear porosity profile is assumed as where Equation (1) shows the linear variation of porosity which is proposed in the present study. As seen, the porosity varies linearly in the vertical direction. The values of porosity at the lower and upper walls are According to the values of porosity on the lower and upper walls, and the average porosity of the domain, i.e., ε avg , the b parameter is calculated as follows: The equations for the transient melting process include mass conservation, momentum balance, and energy conservation equations [20][21][22].
Mass conservation: Momentum equations: where → U, p, and θ are the velocity vector, pressure, and temperature, respectively. Here, ε, β, µ, and g are the porosity, volume expansion coefficient, viscosity, and gravity acceleration, respectively. The subscript lnpcm denotes the molten PCM, and θ melting is the phase change temperature. The linear Boussinesq model is employed to apply the buoyancy force, and the Forchheimer term was neglected since the natural convection velocities are very small. The source term M(θ) is a function of temperature (θ) and is zero in liquid PCM, but it rises to large values in the solid PCM. The large values of M(θ) induce significant resistance forces to the fluid motion and force the velocities to zero in a solid PCM. The source term M(θ) is defined as where B vc is a large value, which intensifies the magnitude of the temperature-dependent term. The porous permeability, σ, as a function of porosity, is calculated as follows [23,24]: where R z and R m are the pore characteristics, as introduced in [23,24], and χ is the pore density in pore size per inch (PPI).
The subscript snepcm denotes the characteristics of the NePCM in solid state, and sm refers to the solid matrix of metal foam. The term ξ(θ) denotes the liquid volume fraction and can be changed in each element. The variation of the liquid fraction represents the variation of the stored/released latent heat. The thermal conductivity of the porous medium saturated with the NePCM is considered as the weighted average of the two media and is computed as )ξ e f f ,snpcm , (11) in which, The governing equations for flow and heat transfer of HTF passing the tube are laminar convection heat transfer.
Mass conservation: Momentum Balance: Energy conservation: where subscript HTF shows the heat transfer fluid. The thermophysical properties of the nano-enhanced phase change material can be defined as weighted functions of the pure PCM and nanoparticle properties. These properties are tabulated in Table 2. The initial and boundary conditions are listed in Table 3. Table 2. Properties of the nano-enhanced phase change material.

Dynamic viscosity
Coefficient of thermal expansion ρ lnpcm β npcm = ρ l ppcm β l ppcm − VF na ρ l ppcm β l ppcm + VF na ρ na β na (20) Thermal conductivity κ lnpcm(snpcm) = κ l ppcm(sppcm) Heat capacity ρc p lnepcm(snepcm) = ρc p l ppcm(sppcm) + VF na ρc p ,na − ρc p l ppcm(sppcm) (22)  Sensible energy, latent energy, and total energy stored in the unit are where V is the total volume of the NePCM domain. The melt volume fraction is The charging power of the TES unit is defined as Moreover, the uniformity of the temperature field can be measured using where θ mean is the mean temperature of the NePCM domain.

Numerical Approach and Grid Dependency
The model equations described above were solved by employing the finite element approach. A mesh independence test was performed to determine a balance between the precision and performance of the numerical simulation. Structural meshes with rectangular elements were employed for both computational domains. Initially, a mesh with 75 × 75 elements was considered. Then, five levels of finer meshes were used to test the solution accuracy and grid optimization. The simulation results for different grids are depicted in Figure 2. Figure 2a,b show, respectively, the mesh size's influence on the melting volume fraction (MVF) and local temperature at a specified point. It is seen that the temperature field is more sensitive to the mesh size. On the basis of Figure 2b, a mesh size with 125 × 125 elements was selected to satisfy the balance between the solution accuracy and simulation efficiency. 75 elements was considered. Then, five levels of finer meshes were used to test the solu-174 tion accuracy and grid optimization. The simulation results for different grids are de-175 picted in Figure 2. Figure 2a,b show, respectively, the mesh size's influence on the melting 176 volume fraction (MVF) and local temperature at a specified point. It is seen that the tem-177 perature field is more sensitive to the mesh size. On the basis of Figure 2b To guarantee the reliability of the implemented model and the employed numerical solution, we studied the liquid fraction field of biobased coconut oil contained in a uniform porous rectangular enclosure by conducting the two-dimensional (2D) numerical simulation. The predicted liquid fraction field was compared with the experimental observations of Al-Jethelah et al. [18]. In this validation test, a net heat flux was imposed on the cubic cavity's left side wall, and the insulated boundary conditions were set at the other surfaces. The porosity of copper metal foam used in the container was 0.92, and the corresponding permeability was 3.3142 × 10 −7 m 2 . The liquid fraction field obtained from the present model is in good agreement with the experimental field observation of Al-Jethelah et al. [18], as shown in Figure 3. To verify the computational model for application to an inhomogeneous porous domain, a square cavity occupied with an inhomogeneous metal foam utilized in [26] was studied. Here, the insulation boundary conditions were assigned to the cavity's upper and lower surfaces. However, the left and right vertical side boundaries were kept at high and low temperatures. The isotherms and streamlines of the present study are in excellent agreement with those of Xiong et al. [26], as illustrated in Figure 4. In this analysis, porosity was a linear function of the y-coordinate such that ε avg =0.7. In addition, the nondimensional parameters were as follows: Ra = 10 6 and Da = 10 −1 .
mental study conducted by Al-Jethelah et al. [18]. 197 To verify the computational model for application to an inhomogeneous porous do-198 main, a square cavity occupied with an inhomogeneous metal foam utilized in [26] was 199 studied. Here, the insulation boundary conditions were assigned to the cavity's upper and 200 lower surfaces. However, the left and right vertical side boundaries were kept at high and 201 low temperatures. The isotherms and streamlines of the present study are in excellent 202 agreement with those of Xiong et al. [26], as illustrated in Figure 4. In this analysis, poros-203 ity was a linear function of the y-coordinate such that εavg=0. 7. In addition, the nondimen-204 sional parameters were as follows: Ra = 10 6

Results and Discussion
Here, the Taguchi optimization method was adopted to systematically investigate the impact of design parameters on the melting rate of PCM in the TES unit. The volume fraction of nanoparticles (VF na ), average porosity of porous medium (ε avg ), intensity of porosity gradient (a), and pore size per inch (PPI) were selected as design parameters. These parameters are known as control factors in the context of the Taguchi method. The aim was to minimize the full melting time (charging time). Thus, the charging time was selected as the target parameter. Since the time should be minimized, the target function was selected as "the lower, the better" for the Taguchi method. Following the Taguchi method, the control factors were divided into several levels. Here, five levels were selected for each factor. The details of the levels and factors are summarized in Table 4. The porosity gradient was selected in the range of −0.6 to +0.6, which covered a negative and positive gradient distribution. The zero gradient case represents uniform porosity. The total combination of four factors and five levels resulted in 5 4 combination variables. A full melting process should be computed for each combination, which is computationally impractical. The Taguchi method uses an orthogonal table to probe the possible solution space efficiently. Here, we adopted the L25 design. The L25 design selects only 25 unique combinations of possible designs out of 5 4 possibilities. These selected combinations are summarized in Table 5. The simulations were carried out for all 25 cases listed in Table 5, and the corresponding values for the time of full melting (t| MVF=1 ), stored energy (ES), and TES unit power (CP) at full charge are reported in Table 5. The Taguchi method was then used to compute the signal to noise (S/N) ratio values. The S/N ratio indicates the robustness of a factor level to possible noises. Thus, a factor with the highest S/N value is a promising candidate to produce an optimum design (lowest charging time). Using the values of t| MVF=1 from Table 5, the S/N of the Taguchi method was computed, and the results are summarized in Table 5. Following the standard Taguchi method, Table 6 shows the S/N and rank values of each level and control factor. Figure 5 shows a graphical representation of S/N values in Table 6. The highest value of S/N for each control parameter shows the promising level for the minimum charging time. Table 6 also shows the rank of each factor with respect to the variation of melting time. As seen, the average porosity (ε avg ) was the most effective parameter influencing the melting time, followed by the volume fraction of nanoparticles. The porosity gradient (a) and pore size (PPI) were ranked third and fourth. Here, δ indicates the maximum difference between the computed S/N values of each factor. A higher δ value denotes a more influential factor. the optimum design are shown in Table 7.  only difference between these two cases was the porosity gradient. 268 The results of Table 5 were also used to develop a linear relationship for design pa-    Figure 5 shows that Levels 4, 1, 4, and 4 corresponded to the highest S/N ratios for nanoparticle volume fraction (VF na ), average porosity (ε avg ), porosity gradient (a), and pore size (PPI), respectively. The approach for computing the S/N ratio was "smaller is better"; thus, a case with a lower melting time produced a larger S/N ratio value. Using Table 4, these levels can be read as VF na = 0.04, ε avg = 0.8, a = 0.3, and PPI = 25. The Taguchi method estimated a melting time of 8784 s for this design parameter combination. A simulation was performed for this specific combination to confirm the reduction in the TES unit's charging time. The simulation outcomes showed a full melting (charging) time of 9097 s, which is slightly higher than the estimated time of 8784 s estimated using the Taguchi method. However, a comparison between the computed melting time and the 25 cases of Table 5 confirms that this melting time was the smallest. Thus, the proposed design according to the Taguchi method was selected as the optimum design. The details of the optimum design are shown in Table 7.  Table 5 also shows that case 5 resulted in the highest melting time (15,900 s). Considering the investigated range of control parameters, the optimum melting time of 9097s was 74% better than the highest melting time. It should be noted that case 5 contained no nanoparticles and had the maximum average porosity of 0.9. Moreover, case 21 with a full melting time of 9150 s provided a melting time that was close to the optimum case. The only difference between these two cases was the porosity gradient.
The results of Table 5 were also used to develop a linear relationship for design parameters and the charging time of the TES. That is, Here, 16 more cases were adopted to further explore the impact of the variation of the design parameters on the optimum design. The details of selected cases are presented in Table 8. Figure 6a shows the time evaluations of MVF during the charging process for various values of nanoparticle volume fraction. It is seen that the increase in the concentration of nanoparticles slightly increased the MVF. The differences were only visible in the final stages of charging.  Figure 6b depicts the predicted temperature of point A in the enclosure. The temperature in the solid region increased sharply until it reached the fusion temperature. Then, the temperature slightly increased until the entire PCM changed to liquid at this point. The temperature then increased again. The increase in nanoparticle concentration slightly increased the temperature of point A in the liquid region due to the improved thermal conductivity of NePCM and better heat transfer between the hot liquid in the tube and the PCM inside the enclosure. The melting interfaces during the melting process were very close; thus, they were not plotted. ature in the solid region increased sharply until it reached the fusion temperature. Then, 283 the temperature slightly increased until the entire PCM changed to liquid at this point. 284 The temperature then increased again. The increase in nanoparticle concentration slightly 285 increased the temperature of point A in the liquid region due to the improved thermal 286 conductivity of NePCM and better heat transfer between the hot liquid in the tube and 287 the PCM inside the enclosure. The melting interfaces during the melting process were 288 very close; thus, they were not plotted.  Interestingly, the melting started at the bottom since the HTF fluid at the entry was 300 hot, and the convection heat transfer coefficients at the undeveloped region of the HTF 301 tube was also larger. Thus, the heat transfer between HTF liquid and NePCM at the bot-302 tom was more intense. The advancement of the melting interface accelerated as the poros-303 ity decreased (mass of metal foam increased). This was due to the increase in thermal 304 conductivity of metal foam, which enhanced the heat transfer rate. It should be noted that 305 the inlet temperature of HTF fluid was constant; hence, a higher composite thermal con-306 ductivity at the PCM side increased the heat transfer rate. Thus, the amount of stored heat 307 in an enclosure increased for a higher composite thermal conductivity. Therefore, as seen 308 in Figure 7 at t = 7800 s, there was a clear difference between the melting interfaces. Interestingly, the melting started at the bottom since the HTF fluid at the entry was hot, and the convection heat transfer coefficients at the undeveloped region of the HTF tube was also larger. Thus, the heat transfer between HTF liquid and NePCM at the bottom was more intense. The advancement of the melting interface accelerated as the porosity decreased (mass of metal foam increased). This was due to the increase in thermal conductivity of metal foam, which enhanced the heat transfer rate. It should be noted that the inlet temperature of HTF fluid was constant; hence, a higher composite thermal conductivity at the PCM side increased the heat transfer rate. Thus, the amount of stored heat in an enclosure increased for a higher composite thermal conductivity. Therefore, as seen in Figure 7 at t = 7800 s, there was a clear difference between the melting interfaces. Figure 8a illustrates the time history of MVF for various average porosities. The average porosity induced notable changes in the values of MVF. In agreement with the melting interfaces of Figure 7, this figure shows that the increase in average porosity raised the MVF.  Figure 8b depicts the temperature uniformity inside the PCM domain. The enclosure temperature distribution experienced a slightly higher temperature gradient during the melting process when average porosity was maximum. The rise in temperature was due to the lower composite thermal conductivity and large temperature gradients. At the early stages of heat transfer, the NePCM was in a solid state, and there was no practical molten region or natural convection circulations. As the MVF increased and the molten region grew, natural convection flows occurred. During the phase change, the temperature uniformity stayed almost constant. When the molten region grew significantly, the natural convection circulation started, and the temperature gradients also increased. Figure 9 is plotted to show the impact of pore sizes on MVF and temperature evaluations of point A. It is seen that the variation of pore size induced a negligible impact on the MVF. There was a slight temperature variation for point A around 6000 s. Half of the enclosure was in a molten state, and there was a dominant natural convection heat transfer flow. In a microscopic view, the overall heat, which diffused to the composite PCM (foam and PCM), first channeled through the pore walls, and then the PCM inside the pores could absorb it. A decrease in the pore size could provide a larger contact surface and a better melting rate. However, since the amount of foam was low (80% or higher porosity), the heat transfer rate was limited by the foam's capacity to conduct heat into the solid PCM region. Since the amount of foam was limited (constant porosity), the condition heat transfer through the foam was also limited. Thus, the change in pore size could impact the heat transfer, but it did not play a dominant role. Moreover, a smaller pore size led to a smaller permeability, which reduced the natural convection effects.
The variation of pore sizes could affect the permeability of the medium, according to Equation (4); thus, the impact of pore size on the flow and heat transfer can be boosted in convective dominant heat transfer regimes. Since the influence of the pore size (PPI) on the MVF was minimal, the melting interfaces were not plotted for the sake of brevity. Figure 10 display the dependency of the porosity gradient on the evaluation of melting interfaces at various time steps. Interestingly, the increase in a shifted the melting interface toward the left wall and resulted in an increased melting rate. According to Equation (1), the increase in a meant more metal foam at the bottom and less metal foam at the top. Thus, the PCM's thermal conductivity at the bottom of the enclosure was higher than that at the top. At the bottom and in the initial stages of phase change, the dominant mechanism of heat transfer was conduction. Thus, the increase in thermal conductivity enhanced the heat transfer. As the phase change continued, the molten region grew, and convection heat transfer occurred in the enclosure's top regions. In natural convection flows, the increase in porosity of metal foams increased the medium's permeability. Consequently, the liquid PCM could circulate more easily in the top area, contributing to convection heat transfer.
The relative difference in full charging of TES for a = 0.3 (optimum case) and a = 0.6 (case 12, Table 8) was only 0.5%, and Figure 10 shows the close competition of these two cases at 7800 s. Case a = 0.3, which was the adopted optimum design, led to a better melting at the final stage of thermal energy storage (above 90% MVF) compared to case 12 in Table 8. enclosure was in a molten state, and there was a dominant natural convection heat transfer 329 flow. In a microscopic view, the overall heat, which diffused to the composite PCM (foam 330 and PCM), first channeled through the pore walls, and then the PCM inside the pores 331 could absorb it. A decrease in the pore size could provide a larger contact surface and a 332 better melting rate. However, since the amount of foam was low (80% or higher porosity), 333 the heat transfer rate was limited by the foam's capacity to conduct heat into the solid 334 PCM region. Since the amount of foam was limited (constant porosity), the condition heat 335 transfer through the foam was also limited. Thus, the change in pore size could impact 336 the heat transfer, but it did not play a dominant role. Moreover, a smaller pore size led to 337 a smaller permeability, which reduced the natural convection effects.  Table   358 8) was only 0.5%, and Figure 10 shows the close competition of these two cases at 7800 s. 359 Case a = 0.3, which was the adopted optimum design, led to a better melting at the final 360 stage of thermal energy storage (above 90% MVF) compared to case 12 in Table 8.  Figure 11 illustrates the time history of MVF and temperature uniformity for various values of porosity gradients. Figure 11a shows that an increase in a improved the MVF during the middle stages of phase change. This finding is in agreement with the advancement of the melting interfaces, as observed in Figure 10. However, in the final stages of charging, the case a = 0.3 provided better performance than the case of a = 0.6. The temperature uniformity for the initial stages of the melting process was almost independent of the a parameter. However, in the middle stages, where the molten region grew, the increase in a parameter promoted the temperature nonuniformity. In the middle stages, the increase in a promoted temperature nonuniformities. A high value of a led to a stronger heat transfer flow and natural convection flows. Here, a1, b1, and c1 were the points placed at the bottom of the enclosure. Point a1 was 395 next to the tube wall, point b1 was in the middle, and c1 was next to the insulated shell 396 wall. Since a1 was the closest point next to the tube, it experienced a sharp temperature 397 rise at the beginning of the charging process. In contrast, c1 showed a smooth temperature 398 variation since it was far from the tube. Point c3 was placed near the top-right corner of 399 the enclosure, which was the last place to be melted. Thus, during the melting process, 400 this point remained at the fusion temperature. 401 Figure 11. The variation of (a) MVF, and the (b) temperature distribution at various gradients of porosity as a function of time for VF na = 0.04, PPI = 25, and ε avg = 0.800.
Nine points in the NePCM-metal foam region were selected to investigate the temperature variations during the melting process. These points were located at a 1 Figure 12 shows the variation of temperatures at these nine points in the PCM domain during the melting process. All points started with an initial temperature of 293 K followed by a linear increase in temperature. The linear segment showed pure conduction in a super-cold solid PCM before it reached a melting temperature. Then, there was a flattened segment, in which the temperature slightly increased. This was the phase change stage, where the PCM absorbed the energy in the form of latent heat. Then, there was a semi-linear increase in the temperature, which corresponded to the heat transfer in the molten region with no phase change. The time variations of temperatures for all cases showed that the impact of the porosity gradient (a) on temperature profiles was minimal in the solid state and during melting phase change. However, after the phase change, the molten NePCM circulated in the enclosure, enhancing the effect of the porosity gradient.
Here, a 1 , b 1 , and c 1 were the points placed at the bottom of the enclosure. Point a 1 was next to the tube wall, point b 1 was in the middle, and c 1 was next to the insulated shell wall. Since a 1 was the closest point next to the tube, it experienced a sharp temperature rise at the beginning of the charging process. In contrast, c 1 showed a smooth temperature variation since it was far from the tube. Point c 3 was placed near the top-right corner of the enclosure, which was the last place to be melted. Thus, during the melting process, this point remained at the fusion temperature. Figure 13 compares the full charging power of TES units for various values of design factors. Figure 13a shows that the variation of nanoparticle concentration slightly changed the unit power. This is because the presence of nanoparticles improved the heat transfer rate; they also reduced the heat capacity of the storage unit. Figure 13b depicts an increasing trend of power (CP) as the porosity gradient (a) increased. Both cases of a = 0.3 and a = 0.6 showed almost similar charging powers. The increase in average porosity (Figure 13c) reduced the charging power. As the average porosity increased, the heat capacity of the TES also increased. However, a reduction in the composite PCM's effective thermal conductivity weakened the heat transfer rate and consequently increased the charging time. The variation of pore sizes had a negligible impact on the TES power since PPI variation did not induce notable changes in either the unit's heat capacity or the melting time.

Conclusions
The charging process of a TES unit filled with a nonuniform metal foam was studied. The metal foam was saturated with coconut oil-CuO NEPCM, and the porosity was linearly changed from bottom to top. Hot water flowed in the heat transfer tube. Finite element method FEM was applied to solve the governing partial differential equations for momentum and phase change energy. The Taguchi optimization method was employed to find an optimum design for the TES unit. The results led to the following conclusions:

•
The average porosity was the dominant factor influencing the charging time and power. Thus, in the design of TES units improved by metal foams, the first step should be selecting the average porosity of the metal foam. The uniformity of the porous medium contributed to heat transfer, and a positive value of porosity gradient (a > 0) could reduce the charging time of the TES unit. A positive porosity gradient corresponded to low porosity at the bottom and high porosity at the top of the PCM enclosure.

•
The volume fraction of nanoparticles was the second most important parameter affecting the TES unit's phase change behavior. The increase in nanoparticle volume fraction smoothly decreased the charging time.

•
The porous medium's average pore size had a negligible influence on the charging time. This design factor was the least critical parameter among design variables.