Computational Study of Phase Change Heat Transfer and Latent Heat Energy Storage for Thermal Management of Electronic Components Using Neural Networks

: The phase change heat transfer of nano-enhanced phase change materials (NePCMs) was addressed in a heatsink ﬁlled with copper metal foam ﬁns. The NePCM was made of 1-Tetradecanol graphite nanoplatelets. The heatsink was an annulus contained where its outer surface was subject to a convective cooling of an external ﬂow while its inner surface was exposed to a constant heat ﬂux. The governing equations, including the momentum and heat transfer with phase change, were explained in a partial differential equation form and integrated using the ﬁnite element method. An artiﬁcial neural network was employed to map the relationship between the anisotropic angle and nanoparticles fractions with the melting volume fraction. The computational model data were used to successfully train the ANN. The trained ANN showed an R-value close to unity, indicating the high prediction accuracy of the neural network. Then, ANN was used to produce maps of melting fractions as a function of design parameters. The impact of the geometrical placement of metal foam ﬁns and concentrations of the nanoparticles on the surface heat transfer was addressed. It was found that spreading the ﬁns (large angles between the ﬁns) could improve the cooling performance of the heatsink without increasing its weight. Moreover, the nanoparticles could reduce the thermal energy storage capacity of the heatsink since they do not contribute to heat transfer. In addition, since the nanoparticles generally increase the surface heat transfer, they could be beneﬁcial only with 1.0% wt in the middle stages of the melting heat transfer.


Introduction
There are a wide variety of electrochemical batteries; however, lithium-ion batteries with high power, energy density, and low self-discharge rates are the most common.This battery type creates a lot of heat, particularly during the quick drain process [1].The lack of an effective thermal management system (TMS) could raise the battery temperature and ultimately affect its performance, efficiency, capacity, power, safety, and life cycle [2].Furthermore, attaining temperatures below the battery's operating range will result in a loss of capacity and autonomy and various other issues during setup [3].Battery temperature monitoring systems maintain the battery temperature consistently and within a safe range [4].As a solution, researchers have proposed combining active and passive approaches [5].Air cooling [6], liquid cooling [7], and PCM cooling [8] systems are among the approaches employed in battery TMSs.
PCM use in battery TMSs has many drawbacks, including poor heat absorption capacity, a significant rise in battery temperature after completely melting the PCM, and the need for re-preparation (PCM solidification).Using PCM in cold weather also reduces the pace at which the battery heats up during the first driving period, which may deteriorate the battery [4].For most PCM materials, the heat conductivity coefficient is about 0.2, which causes significant issues when using PCMs to absorb heat produced by the battery.Once completely melted, however, PCM's low thermal conductivity changes it into an insulator, limiting heat transmission and causing a fast temperature rise [9].As a result, the PCM conductivity coefficient must be raised for the produced heat to be correctly transmitted [10].There are numerous ways to improve the heat transfer rate in PCMs, including the use of nanoparticles [11][12][13], metal foams [14][15][16], and fins [17][18][19].
Sushobhan and Kar [20] reported that nanoparticles in volume fractions of 5 and 2.5 percent might improve PCM performance and melting rate.Another method is to scatter metallic nanoparticles (NPs) throughout PCMs, producing nanoparticle-enhanced PCMs (NePCMs) [21].The inclusion of NPs may improve PCM conductivity and properties [22].However, many studies [23] have shown that highly thermally conductive materials improve NePCM viscosity and conduction while lowering heat convection.Loading NPs can only enhance the performance of the TES system at a specific concentration.Li et al. [24] performed an experimental study that proved the synergistic effects of a fin and NePCM on TES unit performance and presented a technique for assessing efficiencies [25].The researchers discovered that NPs boost TES performance when compared to clean PCM.Using nano-encapsulated phase change particles in working fluids also exhibits lower heat resistance than nano-encapsulated PCM, according to Ho et al. [26].Li et al. [27] investigated three methods for improving a triple-tube LHTES: MF addition, nanoparticle addition, and geometry modification.The findings demonstrated that nanoparticles and a porous medium did not influence performance.Metal foams may accelerate solidification with decreased porosity or nanoparticles with a more significant volume.
Recent studies on the impact of fins on energy transfer in PCM-filled enclosures have been reported.Ji et al. [28] calculated the melting of PCM in a hollow with a metal doublefinned heat sink.PCM melting is boosted by increasing the bottom fin's length and decreasing the top fin's size.According to Jmal and Baccar [29], a significant number of fins leads to PCM confinement.Each system should have a suitable number of fins.Abdi et al. [30] estimated the phase change performance of a PCM in a TES with and without aluminum fins.According to research, longer fins transport energy more effectively than a considerable number of fins.By altering the slope and number of fins, Yazici et al. [31] examined PCM melting in a chamber.The results revealed that the number of fins and chamber angle substantially impacted the system's operating duration.Nakhchi and Esfahani [32] studied heat sink fin designs.It has been shown that the structure of the fins influences PCM melting.
Among the several heat transfer enhancement options outlined above, nanoparticle hybrid fins [33,34], metal foam fin hybrids [35], and porous foams with nanoparticles [36] stand out.Guo et al. [37] investigated the influence of MF and foam on heat transfer via a series of comparative studies.Each MF and fin enhanced the phase change rate of PCMs, but various MF and fin combinations showed the most effect.In a simulated investigation, Zhang et al. [38] evaluated three popular ways of enhancing TES performance.These include heat pipes, copper foam, and fins.Fins and heat pipes offered the best solidification performance, whereas heat pipes and MF enhanced melting.Joshi et al. [39] studied how MF and fins affected heat transfer performance.The application of MF increased solidification and melting rates by 33.33 and 16.67%, respectively, whereas fins increased by 5.56 and 50%.Senobar et al. [40] studied the combined effects of PCM, MF, and NPs.Hybrids increased the phase change rate by 24% compared to pure PCM.
Sheikholeslami et al. [41] studied the phase-changing properties of a triangular fin TES containing CuO nanoparticles.Discharge and melting are minimized for NePCMs.
When triangular fins are employed, solidification rates increase by 40.75 percent but reduce by 44.88 percent when using NePCMs.In a finned tank, Kok [42] examined NePCM charging and observed that increasing the number of fins enhanced TES while lowering melt time.Pássaro et al. [43] examined the impact of fins on the melting and output temperatures of TES units and the combined effect of NePCMs and fins.Consequently, introducing graphene nanoparticles considerably increased thermal conductivity, and combining NePCMs with fins enhanced discharge performance.
Ren et al. [44] investigated the thermal performance of PCMs using metal foam and nanoparticles.According to the research, integrating metal foams into the PCM improves its heat transmission capacity more effectively than introducing nanoparticles.Singh et al. [45] used statistics to investigate the impact of a Nanoparticle-Enhanced PCM with a finned conical shell.There have been several studies that examine the effects of HTS tube design.Mahdi et al. [46] examined the thermal performance of an LHS unit comprised of modules with varying PCM melting temperatures.The LHS was enhanced by the use of a variety of PCMs with different melting points.Together with cascaded foam metal and nanoparticles, multi-PCMs provided the best results.Li et al. [47] developed a game-changing MFPCM design for enhanced LHS systems that use nano-encapsulated components.They featured foam porosity for evaluating MF-NePCM heat transmission capacities.
The literature review shows there are only a few studies utilizing NEPMCs and metal foam fins to manage the heat transfer of electronic components.This study investigates the impact of NePCM, fin shape, and MF on the phase change performance of a phase change heatsink.

Physical Model
Figure 1 shows a schematic view of a battery with a heated temperature of T h covered with a NePCM heatsink.The heatsink is a cylindrical enclosure partially filled with a metal foam layer.The foam layer covered the battery section.Some fin shape metal foams are also used to improve the heat transfer in the NePCM further.The NePCM comprises 1-Tetradecanol as the host PCM and graphite nanoplatelets (GNPs) as the nanoparticles.Gravity acts in the horizontal direction, as depicted in Figure 1.The entire foam layers and remaining cylindrical space are filled by a NePCM.The inside tube of the heatsink is subject to a heat flux of power q 0 .The outer perimeter of the heatsink is cooled by a natural convection flow of convective heat transfer coefficient of h ∞ and temperature T ∞ .Flow and heat transport in a porous media are the governing equations.The Darcy-Brinkman model, which is similar to the Navier-Stokes equation but includes a source component (f Darcy ) that explains the Darcy flow resistance, is used to represent the flow in the porous media.The convective heat transfer equation with effective thermophysical parameters is heat transfer.The heat capacity is a function of temperature (T), which is represented by a time-dependent source component in the heat equation (h source ).Finally, the solid region's velocity should be lowered to zero.To manage the velocity in solid and liquid zones, a sink component (f sink ) was introduced to momentum equations.The sink term acts as a substantial resistance force against the fluid flow in a solid location, bringing the velocity to a stop.The governing equations for mass, momentum, and energy conservation in the aforementioned model are as follows [48][49][50]: Conservation of mass: Conservation of momentum: Conservation of energy: in which u 1 and u 2 are the velocity components in the x 1 and x 2 directions.The thermophysical parameters include density (ρ) and dynamic viscosity (µ) in the momentum equations.The heat equation contains the thermal conductivity (k) and specific heat capacity (c p ).The subscripts NePCM and eff denote the nano-enhanced PCM and the effective thermophysical characteristics, respectively.In the governing equations, the source and sink terms are presented as: and in which the thermophysical features are the heat of phase change (L f ), phase change temperature (T f ), and volumetric thermal expansion (β).In addition, λ = 0.001, A mush = 10 10 (Pa•s/m 2 ), and g = 9.81 m/s 2 .The liquid PCM concentration, θ, is a function of temperature and is expressed as [50]: In the above, the fully molten and solid PCM are denoted by θ = 1 and θ = 0.There is a layer of metal foam fins with a fixed value of permeability (K) and porosity (ε).The porosity in the clear region (no metal foam) is unity, and the permeability tends to infinity.Thus, the domain can be explained as: ε = ε 1 metal foam 1 clear space , and K : K 1 meal foam ∞ clear space (6) According to Table 1, 1-tetradecanol thermophysical characteristics in the solid and liquid states were assumed to be constant.The thermophysical features of 1-tetradecanol-GNPs were used based on the experimental data [51] and summarized in Table 1.The composite PCM-metal foam's effective heat capacity and thermal conductivity are calculated as: The thermal conductivity of the composite was calculated using the following formula [52]: in which the coefficient δ takes a value of 0.35, according to [52].The practical observations of [53] are well supported by Equation (8).The metal foam is indicated by the subscript m.Furthermore, [48] was used to obtain the porous permeability: in which d p = 0.0254/10PPI.The permeability of the foam layer was computed as K = 9.6536 × 10 −8 m 2 for a porosity of ε = 0.95.The characteristics parameters melting volume fraction (MVF), the average temperature at the heated surface, and stored energy (SE), were expressed as where A is the domain surface, and s is the length of the heated wall.Q latent and Q sensible denote the latent and sensible heat stored in the heatsink domain.
Considering the boundary conditions, all surfaces are impermeable with zero slip.The symmetric boundary conditions were also applied for the heat and fluid equations at the symmetry line.The PCM-heatsink is initially at a supper cold temperature where the fusion temperature of NePCM is T f = 37 • C. The heated tube is exposed to a heat flux of q 0 = 5000 W/m 2 , and the heatsink perimeter is exposed to a cooling fluid of

The Finite Element Method
The finite element technique (FEM) [54] was used to integrate the momentum and energy equations, as well as the related initial and boundary conditions, across a discretized time and space.Based on the FEM, the weak form transformation was applied for the partial differential equations.Then, the basis set was invoked to expand the filed variables.Furthermore, the second-order shape functions were applied to the field variables.Gauss's quadrature elements method was then utilized to integrate the field variable and get residual equations.As a result of using the Gauss quadrature integration to integrate the equations over the domain of the solution, the residual functions equations at each element.The residual equations are estimated by using the second-order Gaussian quadratic method.The Galerkin finite-element-method details can be found in [55,56].
In a linked approach, the Newton technique, A PARDISO (PARallel DIrect SOlver (PARDISO) solver [57][58][59], was used to solve the residual equations for the field variables, with a relaxation factor of 0.9.In addition, the backward differential formula [60] with a first-second order was then used to regulate the timesteps and precision of the calculations, resulting in a relative error of less than 10 −4 .MVF > 0.999 met the halt criterion for calculations, which was complete melting.

Mesh Sensitivity
An unstructured mesh was selected to discretize the domain.The boundary layer shape meshes were used for walls to better capture velocity and temperature gradients.Mesh sensitivity analysis was performed on a case with γ = 35 • and ω = 1% wt to check the effectiveness of different grid sizes on the findings.A mesh control variable, Nmesh, is introduced to control the mesh sizes.The smaller the Nmesh variable, the finer the mesh elements.Table 2 summarizes the specific features of each analyzed mesh, including the elements, edges, MVF, and heated wall average temperature after 5 h of heating.Figure 2 illustrates the impact of mesh sizes on the computed MVF in the enclosure for various Nmesh values.As seen, a mesh produced by a Nmesh value of 0.25 could provide an accurate wall temperature and also evaluate MVF with fair accuracy.As a consequence, the current study's findings are calculated using a Nmesh = 0.25.Figure 3 shows a broad and detailed perspective of the preferred mesh.

Validation and Verification
The accuracy of the present model and computations were examined by comparing the outcomes with the literature study of Gau and Viskanta [61] for PCM melting in a rectangular shape container (63.5 × 88.9 mm).The results simulated the melting of a super-cold PCM (28.3 • C) while the contained wall was subject to a heated temperature of 38 • C. The shape of the melting interface is compared with the experimental study of [61] and simulations of [62] in Figure 4.This figure represents acceptable proximity between the results.Nmesh Elements Edges MVF @5 h Tavg − Tf (°C) @5 h Computational Time (s)

Validation and Verification
The accuracy of the present model and computations were examined by comparing the outcomes with the literature study of Gau and Viskanta [61] for PCM melting in a rectangular shape container (63.5 × 88.9 mm).The results simulated the melting of a supercold PCM (28.3 °C) while the contained wall was subject to a heated temperature of 38 °C.The shape of the melting interface is compared with the experimental study of [61] and simulations of [62] in Figure 4.This figure represents acceptable proximity between the results.
Moreover, the melting of paraffin wax in a copper metal foam, as explained in [63], was simulated.The simulations were performed for melting paraffin-embedded in Cu foam (ε = 0.975) enclosed in a square container with a height of 10 cm.The PCM was heated from below.The results are reported in Figure 5.This figure also denoted fair proximity between the simulated data of the current research and [63].

Validation and Verification
The accuracy of the present model and computations were examined by comparing the outcomes with the literature study of Gau and Viskanta [61] for PCM melting in a rectangular shape container (63.5 × 88.9 mm).The results simulated the melting of a supercold PCM (28.3 °C) while the contained wall was subject to a heated temperature of 38 °C.The shape of the melting interface is compared with the experimental study of [61] and simulations of [62] in Figure 4.This figure represents acceptable proximity between the results.
Moreover, the melting of paraffin wax in a copper metal foam, as explained in [63], was simulated.The simulations were performed for melting paraffin-embedded in Cu foam (ε = 0.975) enclosed in a square container with a height of 10 cm.The PCM was heated from below.The results are reported in Figure 5.This figure also denoted fair proximity between the simulated data of the current research and [63].Moreover, the melting of paraffin wax in a copper metal foam, as explained in [63], was simulated.The simulations were performed for melting paraffin-embedded in Cu foam (ε = 0.975) enclosed in a square container with a height of 10 cm.The PCM was heated from below.The results are reported in Figure 5.This figure also denoted fair proximity between the simulated data of the current research and [63].

Results and Discussions
In the current study, the impact of the fin's angles and the weight concentration of nanoparticles on the cooling performance of the heatsink was investigated.

Impact of Fin Angle
Here, four fin placement angles of 30, 32.5, 35, and 37.5° were investigated.The impact of the fin's placement angle, δ, was addressed on MVF, surface temperature difference (Tave − Tf), and the stored energy in Figure 6.From now on, for the sake of simplicity, we call the surface average temperature difference the surface temperature.
As seen, the change of δ induces almost no impact on the MVF and the stored energy.This could be expected since the amount of energy that enters the heatsink is equal to the heat flux power (q0) times the surface area of the heated wall.Thus, the net amount of heat rate is a fixed value, and the change of δ does not change the heat capacity of the heatsink.Therefore, the net amount of stored energy in the enclosure should remain constant regardless of the value of δ.Since there is a negligible temperature gradient in the solid PCM, the amount of MVF also follows the trend of stored energy.
Moreover, the variation of δ slightly changes the surface temperature.A larger δ results in a smaller surface temperature in the middle of the melting process.This is because the larger the δ, the better the fin distribution in the entire heatsink.Thus, for a fixed amount of metal foam, a heatsink with a larger δ could work well.

Results and Discussion
In the current study, the impact of the fin's angles and the weight concentration of nanoparticles on the cooling performance of the heatsink was investigated.

Impact of Fin Angle
Here, four fin placement angles of 30, 32.5, 35, and 37.5 • were investigated.The impact of the fin's placement angle, δ, was addressed on MVF, surface temperature difference (T ave − T f ), and the stored energy in Figure 6.From now on, for the sake of simplicity, we call the surface average temperature difference the surface temperature.
As seen, the change of δ induces almost no impact on the MVF and the stored energy.This could be expected since the amount of energy that enters the heatsink is equal to the heat flux power (q 0 ) times the surface area of the heated wall.Thus, the net amount of heat rate is a fixed value, and the change of δ does not change the heat capacity of the heatsink.Therefore, the net amount of stored energy in the enclosure should remain constant regardless of the value of δ.Since there is a negligible temperature gradient in the solid PCM, the amount of MVF also follows the trend of stored energy.
Moreover, the variation of δ slightly changes the surface temperature.A larger δ results in a smaller surface temperature in the middle of the melting process.This is because the larger the δ, the better the fin distribution in the entire heatsink.Thus, for a fixed amount of metal foam, a heatsink with a larger δ could work well.
Figures 7 and 8 illustrate the maps of MVF and temperature differences in the heatsink for four timesteps of one (3600 s), two (7200 s), three (10,800 s), and four (14,400 s) hours.Initially, the MVF patterns for both cases of δ = 30 • and δ = 37.5 • are similar.As time progresses, and since the effective thermal conductivity of the composite fins is enhanced compared to the rest of the medium, the MVF has a tendency to extend along the directions of the fins.Moreover, at the final melting times (four hours) for the case of δ = 37.5, there is a larger molten area at the top regions of the enclosure compared to the case of δ = 30 • .The bottom region for both cases looks similar.The temperature patterns for both cases also show similar patterns.The most notable difference between the isotherms is at the final stages of the melting process (four hours).In the case of δ = 30 • , a large plume of heated PCM (+10 • C) can be seen in the upper region of the enclosure.This is a Rayleigh-Bénard shape natural convection shape that forms toward the top cold regions of the heatsink container.In the case of δ = 37.5 • , the melting interface is more advanced toward the top, and there is a larger gap between the heated surface and the top region (melting interface); thus, the heated plume is smaller.Figures 7 and 8 illustrate the maps of MVF and temperature differences in the heatsink for four timesteps of one (3600 s), two (7200 s), three (10,800 s), and four (14,400 s) hours.Initially, the MVF patterns for both cases of δ = 30° and δ = 37.5° are similar.As time progresses, and since the effective thermal conductivity of the composite fins is enhanced compared to the rest of the medium, the MVF has a tendency to extend along the directions of the fins.Moreover, at the final melting times (four hours) for the case of δ = 37.5, there is a larger molten area at the top regions of the enclosure compared to the case of δ = 30°.The bottom region for both cases looks similar.The temperature patterns for both cases also show similar patterns.The most notable difference between the isotherms is at the final stages of the melting process (four hours).In the case of δ = 30°, a large plume of heated PCM (+10 °C) can be seen in the upper region of the enclosure.This is a Ray-

Impact of Nanoparticles Concentration
The impact of the weight fraction of GNPs (ω) on the MVF, surface temperature, and stored energy is depicted in Figure 9.With the increase of ω, the MVF rises.Indeed, the GNPs do not contribute to the phase change heat transfer, and since the amount of heat rate from the heated surface is fixed, the MVF increases.This means more NePCM should be melted to absorb the input heat from the heated surface.The amount of stored energy per unit weight of the heatsink reduces by increasing the weight fraction of nanoparticles because the GNP is much heavier than the base PCM and does not contribute to the phase change heat transfer.Thus, the heavy and low heat capacity GNPs reduced the overall normal heat capacity of the heatsink.Finally, the presence of GNP nanoparticles raises the temperature of the heated surface at final times.However, a small decrease in surface temperature in the middle of the melting process can be observed for the case ω = 1.0%.It should be noted that the heat flux at the heated surface is constant; thus, the surface temperature is directly related to the heat transfer rate.The reduction of surface temperature for ω = 1.0% could be the result of improved thermal conductivity caused by the presence of GNPs.In the initial stages of melting heat transfer, the convection heat transfer mechanisms are negligible, and conduction is the dominant mechanism of heat transfer.However, as the melting advances, the amount of molten NePCM increases, and natural convection effects appear.The dynamic viscosity NePCM is an important parameter in controlling the strength of the natural convection flows.The presence of NePCM particles increases the dynamic viscosity of the NePCM mixture and thus reduces the strength of the natural convection flows.Therefore, an increased surface temperature can be observed at the final stages of melting heat transfer.Figures 10 and 11 show the influence of nanoparticle concentrations on the contours of MVF and temperature for two weight fractions of 0% and 3.0%.It is interesting that the melting front extends more uniformly in the presence of GNPs compared to the case with no GNPs.For example, the edge of the top fin (t = 14,400 s) is completely melted when ω = 0, whereas a fair portion of the top fin is still in the solid region when ω = 3.0%.This could be due to a pure PCM's lower dynamic viscosity, which results in a stronger natural convection circulation.Moreover, attention to the temperature contours shows the heated surface and its neighbor regions are generally at a higher temperature when ω = 3.0% wt compared to the case of ω = 0%.This observation agrees with the average surface temperature, i.e., T avg − T f , noted in Figure 9.

Impact of Nanoparticles Concentration
The impact of the weight fraction of GNPs (ω) on the MVF, surface temperature, and stored energy is depicted in Figure 9.With the increase of ω, the MVF rises.Indeed, the GNPs do not contribute to the phase change heat transfer, and since the amount of heat rate from the heated surface is fixed, the MVF increases.This means more NePCM should be melted to absorb the input heat from the heated surface.The amount of stored energy per unit weight of the heatsink reduces by increasing the weight fraction of nanoparticles because the GNP is much heavier than the base PCM and does not contribute to the phase change heat transfer.Thus, the heavy and low heat capacity GNPs reduced the overall normal heat capacity of the heatsink.Finally, the presence of GNP nanoparticles raises the temperature of the heated surface at final times.However, a small decrease in surface temperature in the middle of the melting process can be observed for the case ω = 1.0%.It should be noted that the heat flux at the heated surface is constant; thus, the surface temperature is directly related to the heat transfer rate.The reduction of surface temperature for ω = 1.0% could be the result of improved thermal conductivity caused by the presence of GNPs.In the initial stages of melting heat transfer, the convection heat transfer mechanisms are negligible, and conduction is the dominant mechanism of heat transfer.However, as the melting advances, the amount of molten NePCM increases, and natural convection effects appear.The dynamic viscosity NePCM is an important parameter in controlling the strength of the natural convection flows.The presence of NePCM particles increases the dynamic viscosity of the NePCM mixture and thus reduces the strength of the natural convection flows.Therefore, an increased surface temperature can be observed at the final stages of melting heat transfer.= 0, whereas a fair portion of the top fin is still in the solid region when ω = 30.%.This could be due to a pure PCM's lower dynamic viscosity, which results in a stronger natural convection circulation.Moreover, attention to the temperature contours shows the heated surface and its neighbor regions are generally at a higher temperature when ω = 3.0% wt compared to the case of ω = 0%.This observation agrees with the average surface temperature, i.e., Tavg − Tf, noted in Figure 9.

Neural Network Analysis
The study of complex, intelligent calculations similar to those regularly carried out by the human brain is known as artificial intelligence (AI), and it is a branch of computer science.It encompasses techniques, tools, and systems designed to mimic how people acquire knowledge logically and inductively and use their brains to reason through difficulties.AI advancements fall into two primary groups.The first category includes techniques and programs, such as expert systems, that mimic the human experience and derive conclusions from a set of rules.The second category consists of devices that simulate how the brain functions, including artificial neural networks (ANNs).
Expert systems, also known as knowledge-based systems or the fifth generation of computing, are a development of conventional computing.This knowledge base gives an expert the ability to specify the rules that imitate a thought process and offers a straightforward method for coming to decisions and finding solutions by adhering to a set of rules.Expert systems propose that logical reasoning may be represented by creating lists of logical propositions and applying logical operations to them.Expert systems help address diagnostic problems in medicine and other fields [64,65].It offers a roadmap for making predictions and decisions in ambiguous and uncertain situations.
ANNs come in a wide variety of forms, some of which are more well-known than others.The feedforward neural networks are well-suitable for mapping simple nonlinear inputs to nonlinear outputs [66].
Here, a feedforward artificial neural network (ANN) with a hidden layer (made of ten neurons), one input layer, and one output layer was adopted.The sensitivity analysis and network structure analysis can be used to select the effective parameters [67,68] and adequate network structure [69].However, here, the input parameters are clear from the numerical step, and the impact of these design parameters on the storage design is notable.

Neural Network Analysis
The study of complex, intelligent calculations similar to those regularly carried out by the human brain is known as artificial intelligence (AI), and it is a branch of computer science.It encompasses techniques, tools, and systems designed to mimic how people acquire knowledge logically and inductively and use their brains to reason through difficulties.AI advancements fall into two primary groups.The first category includes techniques and programs, such as expert systems, that mimic the human experience and derive conclusions from a set of rules.The second category consists of devices that simulate how the brain functions, including artificial neural networks (ANNs).
Expert systems, also known as knowledge-based systems or the fifth generation of computing, are a development of conventional computing.This knowledge base gives an expert the ability to specify the rules that imitate a thought process and offers a straightforward method for coming to decisions and finding solutions by adhering to a set of rules.Expert systems propose that logical reasoning may be represented by creating lists of logical propositions and applying logical operations to them.Expert systems help address diagnostic problems in medicine and other fields [64,65].It offers a roadmap for making predictions and decisions in ambiguous and uncertain situations.
ANNs come in a wide variety of forms, some of which are more well-known than others.The feedforward neural networks are well-suitable for mapping simple nonlinear inputs to nonlinear outputs [66].
Here, a feedforward artificial neural network (ANN) with a hidden layer (made of ten neurons), one input layer, and one output layer was adopted.The sensitivity analysis The ANN maps the physical relationship between the control and target parameters.Three inputs of angles (δ), nanoparticles fractions (ω), and time (t) were considered as the control parameters, whereas the melting volume fraction (MVF) was adopted as the target parameter (output).The computational data were recorded every two mins.A schematic view of the utilized ANN is depicted in Figure 12a.The hyperbolic tangent function was used for the activation function of neurons [70].A dataset made of 1057 sample data was used to train the ANN using the mean of squared errors (MSE) [71].All investigated cases in Sections 4.1 and 4.2 were adopted to make the sample data.
The details of the training setup are reported in Figure 12b.The sample data were randomly divided into 15% test, 15% validation, and 70% train data.Figure 13 shows the performance history for the train, test, and validation data.As seen, epoch 39 provides the best validation data; hence, the ANN after 39 training epochs was adopted for further simulations.Figure 14  The results show an excellent R-value next to unity.There is an excellent match between the target and predicted MVF values.Only a few sample data next to the origin show a slight error.These data are related to the initial melting when the storage unit has strong conduction heat transfer gradients.The initial temperature gradients vanish after a few minutes, and the neural network recovers its full accuracy.
The basis and the weights of the neural network are reported in Table 3.The weights for the input layer to the hidden layer (IW), the weights from the hidden layer to the output (LW), and the basis for the hidden layer and the output layer are summarized in Table 3.Since there are three inputs and ten neurons in the hidden layer, the size of IW is 3 × 10.There are ten neurons in the hidden layer and one output layer.Thus, the size of LW is 10 × 1, and the size of the basis is equal to the neurons in the hidden layer, i.e., ten.There is a basis for the output neuron with a value of 0.20576.nanoparticles fraction was changed in the range of 0 to 3 with an interval of 0.1.Thus, for each contour, 1023 simulations were performed by the ANNs.The results for each hour are reported in Figure 16.After one hour of the melting process, most melting (MVF = 0.12) occurs for a case with the highest nanoparticles fraction (1.8 < ω < 3) at an angle in the range of 30° < δ < 34°.The lowest melting corresponds to an angle of 36° and a nanoparticles fraction of about 2%.In the second hour of the melting process, the best melting (MVF = 0.24) occurs in the range of 1.7 < ω < 3 and 30° < δ < 34°.Angles higher than 35° are not suitable.For the third hour, the maximum melting (MVF = 0.38) can be observed for the highest nanoparticles fraction (ω ≈ 3) and an angle of δ ≈ 33.5°.A high nanoparticles fraction and low angle provide a fair MVF = 0.36.For high angles and low nanoparticles fractions, the MVF drops to 0.34.For the fourth hour, the maximum MVF = 0.5 takes place for a similar case as the third hour.Thus, it can be concluded that a design with ω ≈ 3 and δ ≈ 33.5° can provide the maximum melting fraction during the whole melting process.Each numerical experiment takes a long time (see Table 2).Thus, exploring the design space is computationally expensive.Hence, the simulated neural network was used to produce a map of melting behavior as a function of the design parameter of angle (δ) and nanoparticles fraction (ω).In order to produce these maps, the trained ANN was simulated for the angle in the range of 30 • to 38 • with an interval of 0.25 • , whereas the nanoparticles fraction was changed in the range of 0 to 3 with an interval of 0.1.Thus, for each contour, 1023 simulations were performed by the ANNs.The results for each hour are reported in Figure 16.After one hour of the melting process, most melting (MVF = 0.12) occurs for a case with the highest nanoparticles fraction (1.8 < ω < 3) at an angle in the range of 30 • < δ < 34 • .The lowest melting corresponds to an angle of 36 • and a nanoparticles fraction of about 2%.In the second hour of the melting process, the best melting (MVF = 0.24) occurs in the range of 1.7 < ω < 3 and 30 • < δ < 34 • .Angles higher than 35 • are not suitable.For the third hour, the maximum melting (MVF = 0.38) can be observed for the highest nanoparticles fraction (ω ≈ 3) and an angle of δ ≈ 33.5 • .A high nanoparticles fraction and low angle provide a fair MVF = 0.36.For high angles and low nanoparticles fractions, the MVF drops to 0.34.For the fourth hour, the maximum MVF = 0.5 takes place for a similar case as the third hour.Thus, it can be concluded that a design with ω ≈ 3 and δ ≈ 33.5 • can provide the maximum melting fraction during the whole melting process.

Conclusions
The cooling capability and thermal storage of phase change heatsinks were filled by a 1-tetradecanol-GPNs and copper metal foam fins.The heatsink was exposed to a constant heat flux source at its heated surface.The natural convection effects in the liquid NePCM were taken into account.The thermophysical properties of NePCM were adopted directly from the actually measured properties.The finite element method was applied to solve the governing equations.An automatic time step based on BDF was invoked to control the solution accuracy.The melting heat transfer was simulated for different porous fin angles and mass fractions of GPNs.It was found that using fins with large mounding angles (37.5°) is better than close angles (30°).Moreover, the GNPs could increase the surface temperature since they increase the dynamic viscosity and suppress the natural convection flows.A 1.0% wt GPNs could add some advantage in reducing the surface temperature in the middle of the melting process.The presence of GPNs reduces the amount of stored energy per unit weight of the heatsink since these heavy nanoparticles do not contribute to the latent heat thermal energy storage.An ANN was trained to map the relationship between the melt fraction and the design variable.The computed data were used to train the ANN.The results showed that the ANN could accurately estimate the

Conclusions
The cooling capability and thermal storage of phase change heatsinks were filled by a 1-tetradecanol-GPNs and copper metal foam fins.The heatsink was exposed to a constant heat flux source at its heated surface.The natural convection effects in the liquid NePCM were taken into account.The thermophysical properties of NePCM were adopted directly from the actually measured properties.The finite element method was applied to solve the governing equations.An automatic time step based on BDF was invoked to control the solution accuracy.The melting heat transfer was simulated for different porous fin angles and mass fractions of GPNs.It was found that using fins with large mounding angles (37.5 • ) is better than close angles (30 • ).Moreover, the GNPs could increase the surface temperature since they increase the dynamic viscosity and suppress the natural convection flows.A 1.0% wt GPNs could add some advantage in reducing the surface temperature in the middle of the melting process.The presence of GPNs reduces the amount of stored energy per unit weight of the heatsink since these heavy nanoparticles do not contribute to the latent heat thermal energy storage.An ANN was trained to map the relationship between the melt fraction and the design variable.The computed data were used to train the ANN.The results showed that the ANN could accurately estimate the MVF at various times for any set of design variables.Finally, the ANN was used to provide contours of MVF as a function of angle and nanoparticles fractions at different times during the melting process.Using the MVF maps produced by ANN, it was concluded that a design with ω ≈ 3 and δ ≈ 33.5 • provided the highest melting fraction during the entire melting process.

Mathematics 2023 , 22 Figure 1 .
Figure 1.The physical model of the battery and PCM heatsink, and metal foam fins.Flow and heat transport in a porous media are the governing equations.The Darcy-Brinkman model, which is similar to the Navier-Stokes equation but includes a source component (fDarcy) that explains the Darcy flow resistance, is used to represent the flow in

Figure 1 .
Figure 1.The physical model of the battery and PCM heatsink, and metal foam fins.

Figure 2 .
Figure 2. Mesh sensitivity data for various element sizes.Figure 2. Mesh sensitivity data for various element sizes.

Figure 2 . 22 Figure 3 .
Figure 2. Mesh sensitivity data for various element sizes.Figure 2. Mesh sensitivity data for various element sizes.Mathematics 2023, 11, x FOR PEER REVIEW 8 of 22

Figure 3 . 22 Figure 3 .
Figure 3.A view of utilized mesh for case Nmesh = 0.25.(a) An overall mesh view, (b) mesh details over the fins and PCM domain, (c) mesh details at the tube wall and metal foam layer, and (d) the mesh details at the fin edge and PCM domain outer wall.

Figure 4 .
Figure 4.The melting interface simulated in the current study and[62] against the experiment of[61].

Figure 4 .
Figure 4.The melting interface simulated in the current study and [62] against the experiment of [61].

Mathematics 2023 , 22 Figure 5 .
Figure 5.The melting interface shapes simulated in the current study and the experimental reports adapted with permission from Ref. [63].2018, Elsevier.

Figure 5 .
Figure 5.The melting interface shapes simulated in the current study and the experimental reports adapted with permission from Ref. [63].2018, Elsevier.

Figure 6 .
Figure 6.The (a) melting volume fraction, (b) surface heat transfer rate, and (c) stored energy as a function of time when ε = 0.95 and ω = 1%.

Figure 6 .
Figure 6.The (a) melting volume fraction, (b) surface heat transfer rate, and (c) stored energy as a function of time when ε = 0.95 and ω = 1%.

Figure 9 .
Figure 9.The (a) melting volume fraction, (b) surface heat transfer rate, and (c) stored energy as a function of time when ε = 0.95 and δ = 35.

Figure 9 .
Figure 9.The (a) melting volume fraction, (b) surface heat transfer rate, and (c) stored energy as a function of time when ε = 0.95 and δ = 35.
provides a histogram for the error distributions.The figure divides the range of the predicted errors into 20 intervals (bins), and it then shows the number of samples for each bin.As seen, the error range for the prediction of MVF is quite small.Most of the samples were placed at the center with an error next to zero.Only a few samples were placed on the edges of the figure with an absolute error of 0.0063 or lower.Finally, Figure15depicts the regression data for the training, test, validation, and all cases.

Figure 12 .
Figure 12.The structure of the utilized ANN and the applied settings.(a) the structure of the ANN with a hidden layer and input and output layer.(b) the training parameters and convergence criteria.

Figure 12 .
Figure 12.The structure of the utilized ANN and the applied settings.(a) the structure of the ANN with a hidden layer and input and output layer.(b) the training parameters and convergence criteria.

Figure 12 .
Figure 12.The structure of the utilized ANN and the applied settings.(a) the structure of the ANN with a hidden layer and input and output layer.(b) the training parameters and convergence criteria.

Figure 13 .
Figure 13.The performance curves during the training process.Epoch 39 provided the best validation performance and was selected for simulations.

Figure 13 .
Figure 13.The performance curves during the training process.Epoch 39 provided the best validation performance and was selected for simulations.Mathematics 2023, 11, x FOR PEER REVIEW 17

Figure 14 .
Figure 14.Error histogram with 20 bins for the training, test, and validations.Error ranges betw −0.0034 to +0.0063.Most samples were predicted with a tiny error next to zero.There are only a samples' data with an absolute error of about 0.0063.

Figure 14 .
Figure 14.Error histogram with 20 bins for the training, test, and validations.Error ranges between −0.0034 to +0.0063.Most samples were predicted with a tiny error next to zero.There are only a few samples' data with an absolute error of about 0.0063.

Figure 14 .
Figure 14.Error histogram with 20 bins for the training, test, and validations.Error ranges between −0.0034 to +0.0063.Most samples were predicted with a tiny error next to zero.There are only a few samples' data with an absolute error of about 0.0063.

Figure 15 .
Figure 15.Regression reports for the training, validation, test, and all data.The R-value for each case is reported above each subfigure.

Figure 15 .
Figure 15.Regression reports for the training, validation, test, and all data.The R-value for each case is reported above each subfigure.

Figure 16 .
Figure 16.Contours of MVF for each melting hour as a function of angle (δ) and nanoparticles fraction (ω).

Figure 16 .
Figure 16.Contours of MVF for each melting hour as a function of angle (δ) and nanoparticles fraction (ω).

Table 2 .
The specification of investigated meshes.

Table 3 .
The weights and the basis of the trained neural network.