2D MHD Mixed Convection in a Zigzag Trapezoidal Thermal Energy Storage System Using NEPCM

In a magnetic field, two-dimensional (2D) mixed convection is investigated within a zigzagged trapezoidal chamber. The lower side of the trapezoidal chamber is irregular, in particular, a zigzagged wall with different zigzag numbers N. The fluid particles move in the room due to the motion of the upper wall, while the porosity-enthalpy approach represents the melting process. The thermal parameters of the fluid are enhanced by what is called a nano-encapsulated phase change material (NEPCM) consisting of polyurethane as the shell and a nonadecane as the core, while water is used as the base fluid. In order to treat the governing equations, the well-known Galerkin finite element method (GFEM) is applied. In addition, the heat transfer (HT) irreversibility and the fluid friction (FF) irreversibility are compared in terms of the average Bejan number. The main results show that the melt band curve behaves parabolically at smaller values of Reynolds number (Re) and larger values of Hartmann number (Ha). Moreover, minimizing the wave number is better in order to obtain a higher heat transfer rate.


Introduction
Phase-change materials (PCM) in thermal systems are gaining tremendous attraction for energy storage systems, heat exchangers, air-conditioning systems, green buildings, etc. The advantage of the PCM is that the energy is saved in the materials as latent energy during the phase transition process, resulting in the temperature being almost constant in the system. This process is also referred to as latent heat storage material, which is carried out in evaporators in cooling systems [1]. From the literature, it has been found that the PC properties of the different materials vary due to temperature variation. On behalf of the construction of the multiscale structure, the PCMs are categorized as organic, inorganic, and eutectics [2]. Cui et al. [3] reviewed the PCM to understand its application in building better. They found the best phase change material applications when the room air temperature was as low as 4.2 • C. Aftab et al. [4] used PCM-integrated latent heat storage systems for sustainable energy advancements. Choudhari et al. [5] employed a fin structure to develop a PCM battery thermal management system. Numerous pieces of research 1. Does the velocity of the flow increase with Re along with the temperature distribution? 2.
What is the role of the zigzag number on the flow velocity and the heat capacity? 3.
Does increasing the value of Ha affect the heat transfer inside the cavity?

Formulation, Properties, and Problem Settings
The geometry consists of a trapezoidal prism cavity (see Figure 1). The upper cavity wall is moving at a constant velocity of U, while the rest of the walls are stationary. Mixed convection of liquid-NEPCM takes place in the cavity due to movement of the upper wall (forced convection) and the temperature difference between side walls and the lower zigzag wall (natural convection). The side walls of the chamber have a constant temperature of T c , whereas the temperature of the bottom zigzag wall is given by a constant temperature of T h . The PCM serves as the core of the nano-encapsulated PCM, while the encapsulating material serves as the shell. At the fusion temperature, the core goes through a phase shift. Within its fusion temperature, the core of NEPCM nanoparticles can undergo a phase shift to a liquid state and absorb or release energy in the form of latent heat.
1. Does the velocity of the flow increase with Re along with the temperature distribution? 2. What is the role of the zigzag number on the flow velocity and the heat capacity? 3. Does increasing the value of Ha affect the heat transfer inside the cavity?

Formulation, Properties, and Problem Settings
The geometry consists of a trapezoidal prism cavity (see Figure 1). The upper cavity wall is moving at a constant velocity of U, while the rest of the walls are stationary. Mixed convection of liquid-NEPCM takes place in the cavity due to movement of the upper wall (forced convection) and the temperature difference between side walls and the lower zigzag wall (natural convection). The side walls of the chamber have a constant temperature of Tc, whereas the temperature of the bottom zigzag wall is given by a constant temperature of Th. The PCM serves as the core of the nano-encapsulated PCM, while the encapsulating material serves as the shell. At the fusion temperature, the core goes through a phase shift. Within its fusion temperature, the core of NEPCM nanoparticles can undergo a phase shift to a liquid state and absorb or release energy in the form of latent heat.

Mathematical Modeling and Equations
As mentioned before, the buoyancy force (due to the temperature difference of the walls) and the moving upper wall produce the natural and forced convection currents, respectively. As a result of such a combination, one gets mixed convection. It is necessary to make some assumptions in order to predict the heat transfer behavior of NEPCMs when they are exposed to mixed convection. In this context, it is assumed that the distribution of NEPCMs throughout the combination of a base fluid and NEPCMs is consistent and stable. The thermophysical characteristics are unaffected by temperature in any way, with the exception of the density, which may be approximated using the Boussinesq approximation.
In addition, it is presumed that the nanoparticles and the base fluid are in a state of local thermal equilibrium that the flow is steady, two-dimensional, and incompressible.
In the sequel, we present the continuity, momentum, and energy equations in the xy coordinates [35]:

Mathematical Modeling and Equations
As mentioned before, the buoyancy force (due to the temperature difference of the walls) and the moving upper wall produce the natural and forced convection currents, respectively. As a result of such a combination, one gets mixed convection. It is necessary to make some assumptions in order to predict the heat transfer behavior of NEPCMs when they are exposed to mixed convection. In this context, it is assumed that the distribution of NEPCMs throughout the combination of a base fluid and NEPCMs is consistent and stable. The thermophysical characteristics are unaffected by temperature in any way, with the exception of the density, which may be approximated using the Boussinesq approximation.
In addition, it is presumed that the nanoparticles and the base fluid are in a state of local thermal equilibrium that the flow is steady, two-dimensional, and incompressible.
In the sequel, we present the continuity, momentum, and energy equations in the x-y coordinates [35]: ∂u ∂x The velocity components in the x and y directions are given by u and v in the above equations. In addition, the pressure, temperature, and acceleration due to gravity in the y-direction are given by P, T, and g, respectively. The last term in Equation (3) is the buoyant Boussinesq source term. The NEPCMs act through the advection term that appears in the energy conservation equation (Equation (4)). The impact of the NEPCM nanoparticles, as well as their effects on the overall performance of the problem, will be discussed later.
Boundary conditions are required for the above coupled equations. As mentioned earlier, the walls of the cavity have a constant temperature of Tc, whereas the temperature of the lower wall is given by a constant temperature of Th. We define the following dimensionless parameters, which leads in return to the dimensionless governing equations given below.
∂U ∂X The dimensionless numbers are expressed as follows [36]: and where v b f , α b f , Pr, Re b f , and Gr b f represent the kinematic viscosity, thermal diffusion, Prandtl, Reynolds, and Grashof numbers, respectively [34]. Moreover, the dimensionless constant in the energy equation is the ratio between the heat capacity of the mixture and that of the base fluid (Cr) [32].
The subscripts m and b f in Equation (12) stand for the nanoliquid mixture and base liquid, respectively. The specific heat capacity and density of liquid (ρC P ) b f are assumed to be constants. Nevertheless, for certain materials of the NEPCMs and the base liquid, the values of the specific heat capacity of the mixture are a function of the amount of latent heat of the NEPCMs core, the volume fraction of the NEPCMs, and the temperature ( f ). The variability relative to the volume fraction is shown by ϕ, whereas the variability associated with the latent heat of the NEPCM core is shown by χ. The quantity λ is calculated by [35]: Clearly, λ is the ratio of the heat capacity of NEPCMs in the liquid phase to the base liquid. The subscripts c, l, and s stand for core, liquid, and sell, respectively. The core-shell weight ratio is given by l the coefficient and equals 0.447. Moreover, the quantity χ in Equation (12) is calculated using the following [36]. where h s f is the latent heat of the core and T Mr is the melting temperature range of the core. Note that χ is the ratio of growth in the base liquid temperature to the energy stored as latent heat in the core [36]. In Equation (12), the quantity f is the dimensionless fusion function given by [35]: ∆T . The parameters δ and θ f stand for the dimensionless internal fusion and fusion temperature, respectively. Note that δ represents the thickness of the melting zone. Going back to Equation (15), one can see that if the nanoliquid temperature is larger than the NEPCM core melting temperature T > T f + T Mr 2 or smaller than the core solidification temperature , then the last term of Equation (12) becomes zero, and therefore the values of Cr are reduced. The melting temperature and the melting range also affect the values of Cr. Clearly, the heat transfer can be improved by changing the values of Cr. The substantial improvement in specific heat capacity when utilizing NEPCMs as opposed to conventional nanoparticles is the main advantage here. The coefficient of f appears in Equation (12) and is the amplitude of the change in specific heat capacity in the two-phase state. In comparison with Equation (15), it can be seen that the latent heat of the NEPCMs core hsf also has effects on the quantity Cr.
The rate of heat transfer can be computed using the Nusselt number as [35,36].
where Nu loc and Nu Ave represent the local and the average Nusselt number, respectively, and D represents the diameter of the inner cylinder. We mention here that the studied work was achieved in a permanent simulation (steady state) because the physical phenomena of the fluid in the studied range produces phenomena that are not related to the time Criterion.

The Thermophysical Properties
The NEPCM consists of an n-nonadecane core and a polyurethane shell. For thermal energy storage, the n-nonadecane is a favorable organic phase change material due to the fact that melting and solidification occur at a temperature of 31 • C. In addition, the latent heat of fusion of 156.07 kJ/kg and the latent heat of solidification of 164.99 kJ/kg. Hence, it can be used in buildings in order to store thermal energy. The operating temperature range and the amount of storable energy make such PCM feasible to be utilized in buildings [37]. On the other hand, the polyurethane shell has high strength, elevated elastic properties, smooth surface [36], and low Crystallinity [35]; therefore, it has been taken into consideration by many researchers. Moreover, such shell has no health or environmental issues related to the release of formaldehyde. Some previous experimental studies helped in extracting the thermophysical properties of water and the aforementioned NEPCM. The preparation of these nanoparticles for different applications was also studied and presented [36]. Considering the thermophysical properties of core and shell, the thermophysical properties of NEPCMs can be described as follows [35]: where n indicates the subscription of nanoparticles. The specific heat capacity of the nucleus can be presented in terms of a sinusoidal function whose argument is a function of temperature; the melting temperature T f , and the phase change temperature range T Mr , as described earlier. Its amplitude can also be seen as a function of the latent heat of the core h sf , and the specific heat capacity of the core in the liquid state C p . In addition, the specific heat capacity of the NEPCM core is C p , in the phase change temperature range [35]: Below, we introduce the specific heat capacity and thermal expansion coefficient of NEPCM [37]: The thermophysical properties of liquid, NEPCM nanoparticles, NEPCM volume fraction, and the water-NEPCM mixture are given in Table 1. The thermophysical equations of the mixture, including density, specific heat capacity, and thermal expansion coefficient, are given by the following equations [35,38]. In all equations, the subscripts m, n, c, and s stand for the mixture, NEPCM, core, and shell, respectively. The performed simulation was conducted with a constant volume fraction of 0.035. Hence, as indicated by [35], the thermal conductivity and dynamic viscosity of the mixture at 303 K are equal to 122 × 10 −5 kg/m.s and 0.7 W/m.K, respectively. The thermophysical properties of the materials that are used are given in Table 1.
Validation: The results of the previous study were confirmed using numerical analysis. Despite the fact that there are different numerical techniques that can be employed to solve the differential equations appear in different applications (see, e.g. [41][42][43][44]), the Galerkin Finite Element has been applied here to simulate the model's numerical solutions. Figure 2 shows a comparison between the outcomes from the model employed in the current investigation and those shown in Ghalambaz et al. [35]. Validation: The results of the previous study were confirmed using numerical analysis. Despite the fact that there are different numerical techniques that can be employed to solve the differential equations appear in different applications (see, e.g. [41][42][43][44]), the Galerkin Finite Element has been applied here to simulate the model's numerical solutions. Figure 2 shows a comparison between the outcomes from the model employed in the current investigation and those shown in Ghalambaz et al. [35].   Table 2 shows the average Nusselt number results for various grid sizes for the greatest values of interest parameters and various power-law fluid indices (Ha = 0, Re= 500). In the following computations, several elements of 23,522 were used.

Results and Discussion
We present in this section the results that were obtained in order to clarify the thermal and dynamic composition of a homogeneous suspension of NEPCM particles and water. This new type of suspension is studied in a chamber with a lid and trapezoidal geometry with a zigzag bottom. The questions to be studied are:

•
The value of Reynolds number (Re) is in the range of 1-500. This number (Re) expresses the velocity of the movement of the top of the container.

•
The value of Hartmann's number (Ha) is in the range of 0-100. This element (Ha) determines the magnetic field acting on the space from the outside. • Finally, the value of the Darcy number (Da) was studied in the range of 10 −5 -10 −2 .
The permeability of the medium is determined by this number (Da).

•
The shape of the soil changed by changing the number of ripples in the range of 1-4.
We find that the suspension (water + NEPCM particles) moves due to two factors, namely the horizontal movement of the top of the chamber and the force of thermal buoyancy (Gr = 1000). Understanding and deducing the dynamic behavior of the suspension flow and its direct influence on the heat transfer process is primarily done by analyzing the contours of the isotherms, heat capacity and trajectories. The purpose of adding NEPCM particles is to enhance the thermal properties of the water (heat capacity and conductivity).
To understand the effect of the velocity of motion of the wall, Figure 3 shows the incoming changes in the trajectories, dimensionless temperature, and heat capacity as a function of Reynolds number for Ha = 0, Da = 10 −2 , and N = 2. Figure 3 shows that the motion of the wall Creates a circular flow in space with its center near the moving wall. On the other hand, if we increase the value of Re, the velocity spread of the space increases, which also causes the vortex to move to the right side of the space. It can be concluded that the velocity of the rotating flow in the space increases as Re increases. For the dimensionless temperature, we find that there is an accumulation of isotherms near the bottom as Re increases. This accumulation is an indication of the high value of the temperature gradient. That is, the thermal activity interacts positively with respect to Re. Moreover, it is observed that the concentration of isotherms on the right-hand side of the soil is better than on the left-hand side, which means that the heat transfer is better on the right side of the soil. The heat capacity contours reflect the same behavior derived from the isotherms and streamlines. First, we note that the red line indicates the regions where the change in the physical state of the NEPCM particles occurs. We note that the red line follows the motion of the flow. The high-temperature gradient makes the line narrow and close to the bottom on the right side. Figure 4 shows the effects of soil shape on suspension stirring and thermal pattern. Therefore, Figure 4 demonstrates the effects of increasing the number of zigzag lines on the streamlines, isotherms, and heat capacity for Ha = 0, Da = 10 −2 , and Re = 10. When examining the streamlines, it is clear that the greater the number of zigzag lines on the bottom, the slower the velocity of the suspension flow. This is normal because the more zigzag lines the bottom has, the more it hinders the flow motion, which leads to a decrease in its velocity. As the velocity gradually decreases, the dimensionless temperatures also show a decrease in isothermal density near the ground, i.e., a decay in heat transfer in the form of the zigzag number. The same observations can be derived from the heat capacity diagrams. That is, the larger the zigzag number, the greater the distance of the red bar from the ground is. Figure 5 shows the effect of magnetic field strength (Ha = 0-100) on the motion of the suspension and its thermal pattern for N = 2, Da = 10 −2 , and Re = 10. As the suspension moves in a magnetic field, a force, the Lorentz force, is generated that impedes the motion of the suspension in the chamber. Therefore, the streamlines show a decrease in the velocity of the suspension flow as the number Ha grows. In addition, the size of the main vortex formed decreases as the value of Ha increases. The isotherms and heat capacity contours also confirm that the velocity decreases because the temperature gradient near the bottom decreases, and the distance between the bottom and the heat capacity line increases with increasing Ha.   Figure 4 shows the effects of soil shape on suspension stirring and thermal pattern. Therefore, Figure 4 demonstrates the effects of increasing the number of zigzag lines on the streamlines, isotherms, and heat capacity for Ha = 0, Da = 10 −2 , and Re = 10. When examining the streamlines, it is clear that the greater the number of zigzag lines on the bottom, the slower the velocity of the suspension flow. This is normal because the more zigzag lines the bottom has, the more it hinders the flow motion, which leads to a decrease in its velocity. As the velocity gradually decreases, the dimensionless temperatures also show a decrease in isothermal density near the ground, i.e., a decay in heat transfer in the form of the zigzag number. The same observations can be derived from the heat capacity diagrams. That is, the larger the zigzag number, the greater the distance of the red bar from the ground is.   Figure 5 shows the effect of magnetic field strength (Ha = 0-100) on the motion of the suspension and its thermal pattern for N = 2, Da = 10 −2 , and Re = 10. As the suspension moves in a magnetic field, a force, the Lorentz force, is generated that impedes the motion of the suspension in the chamber. Therefore, the streamlines show a decrease in the velocity of the suspension flow as the number Ha grows. In addition, the size of the main vortex moves in a magnetic field, a force, the Lorentz force, is generated that impedes the motion of the suspension in the chamber. Therefore, the streamlines show a decrease in the velocity of the suspension flow as the number Ha grows. In addition, the size of the main vortex formed decreases as the value of Ha increases. The isotherms and heat capacity contours also confirm that the velocity decreases because the temperature gradient near the bottom decreases, and the distance between the bottom and the heat capacity line increases with increasing Ha.

Streamlines
Isotherms  Figure 6 explains the evolution of the individual streamlines, heat capacity, and dimensionless temperature as a function of the Darcy number for N = 2, Re = 10, and Ha = 0. The value of the Darcy number expresses the permeability of the space, i.e., the larger this value, the better the permeability is. The streamlines show that the higher the Da number, the higher the velocity of the suspended particles and the more pronounced the development of the vortex is. The reason, of course, is the permeability of the space. That is, the greater the permeability, the more positive effect on the levitation is. In the contours of heat capacity and isotherms, there is a rise in the temperature gradient near the bottom, and the red line approaches the bottom because of the growth in the flow velocity inside the medium.

Streamlines
Isotherms  Figure 6 explains the evolution of the individual streamlines, heat capacity, and dimensionless temperature as a function of the Darcy number for N = 2, Re = 10, and Ha = 0. The value of the Darcy number expresses the permeability of the space, i.e., the larger this value, the better the permeability is. The streamlines show that the higher the Da number, the higher the velocity of the suspended particles and the more pronounced the development of the vortex is. The reason, of course, is the permeability of the space. That is, the greater the permeability, the more positive effect on the levitation is. In the contours of heat capacity and isotherms, there is a rise in the temperature gradient near the bottom, and the red line approaches the bottom because of the growth in the flow velocity inside the medium. Figure 7 shows the evolution of the Nu number of the hot soil surface as a function of Re and Da for N = 2 and Ha = 0. It can be noted that the higher the value of Re or Da, the higher the value of the Nu number is. The reason for this increase is that the higher the value of Da or Re, the better the flow velocity is, which increases the heat transfer, i.e., the value of the Nusselt number increases.
The effects of the Ha and Re numbers on Nu for N = 2 and Da = 10 −2 are shown in Figure 8. It can be observed that the higher the value of the Ha number, the lower the value of Nu is, which indeed, results from the Lorentz force, that prevents the movement of the suspension and, as a result, causes a reduction in the thermal activity between the fluid and the hot wall.
In Figure 9, we show the bottom wall shape's effect on the suspension flow's thermal performance. As the number N illustrates the effect of the number of zigzag lines of the soil on the number of Nu for Da = 10 −2 and without the MHD effect (Ha = 0). It can be observed that the higher the number of bottom ripples, the lower the value of the Nusselt number is, i.e., the thermal activity decreases, which is due to the shape of the bottom, i.e., the increase in ripples makes it more difficult for the flow to stick to the bottom, reducing the heat transfer and thus decreasing the value of the Nusselt number. this value, the better the permeability is. The streamlines show that the higher the Da number, the higher the velocity of the suspended particles and the more pronounced the development of the vortex is. The reason, of course, is the permeability of the space. That is, the greater the permeability, the more positive effect on the levitation is. In the contours of heat capacity and isotherms, there is a rise in the temperature gradient near the bottom, and the red line approaches the bottom because of the growth in the flow velocity inside the medium.

Streamlines
Isotherms  Figure 7 shows the evolution of the Nu number of the hot soil surface as a function of Re and Da for N = 2 and Ha = 0. It can be noted that the higher the value of Re or Da, the higher the value of the Nu number is. The reason for this increase is that the higher the value of Da or Re, the better the flow velocity is, which increases the heat transfer, i.e., the value of the Nusselt number increases. The effects of the Ha and Re numbers on Nu for N = 2 and Da = 10 −2 are shown in Figure 8. It can be observed that the higher the value of the Ha number, the lower the value of Nu is, which indeed, results from the Lorentz force, that prevents the movement of the suspension and, as a result, causes a reduction in the thermal activity between the fluid and the hot wall.  . It can be observed that the higher the value of the Ha number, the lower the value of Nu is, which indeed, results from the Lorentz force, that prevents the movement of the suspension and, as a result, causes a reduction in the thermal activity between the fluid and the hot wall.  aterials 2022, 12, x FOR PEER REVIEW 13 In Figure 9, we show the bottom wall shape's effect on the suspension flow's the performance. As the number N illustrates the effect of the number of zigzag lines o soil on the number of Nu for Da = 10 −2 and without the MHD effect (Ha = 0). It ca observed that the higher the number of bottom ripples, the lower the value of the Nu number is, i.e., the thermal activity decreases, which is due to the shape of the bottom the increase in ripples makes it more difficult for the flow to stick to the bottom, redu the heat transfer and thus decreasing the value of the Nusselt number.
Through our analysis of all figures, we can adopt a general idea, which is tha better and easier the fluid movement, the greater the thermal transfer.

Conclusions
In this work, we simulate numerically the mixed convection of NEPCM confin a trapezoidal lidded cavity saturated with porous media and subject to a magnetic While the upper cavity wall is insulated and moves at a constant speed, we let the l one be zigzagged and maintained at a cold temperature. In addition, the two sloping walls are maintained at a hot temperature. The effects of Reynolds number (Re = 100, 500), zigzag number of the lower wall (N = 1, 2, 3, 4), Hartmann number (Ha = 50, 100), and Darcy number (Da = 10 −5 , 10 −4 , 10 −3 , 10 −2 ) are presented and analyzed. F Through our analysis of all figures, we can adopt a general idea, which is that the better and easier the fluid movement, the greater the thermal transfer.

Conclusions
In this work, we simulate numerically the mixed convection of NEPCM confined in a trapezoidal lidded cavity saturated with porous media and subject to a magnetic field. While the upper cavity wall is insulated and moves at a constant speed, we let the lower one be zigzagged and maintained at a cold temperature. In addition, the two sloping side walls are maintained at a hot temperature. The effects of Reynolds number (Re = 1, 10, 100, 500), zigzag number of the lower wall (N = 1, 2, 3, 4), Hartmann number (Ha = 0, 25, 50, 100), and Darcy number (Da = 10 −5 , 10 −4 , 10 −3 , 10 −2 ) are presented and analyzed. From the study results, we demonstrate the following conclusions: • Higher values of Re increase the velocity of the flow, resulting in better temperature distribution. • An increase in the zigzag number of the lower wall hinders the flow velocity; this leads to a limitation of the temperature distribution and a decrease in the heat capacity.

•
Increasing the value of Ha (increasing the intensity of the magnetic field) had a negative effect on the heat transfer inside the cavity because the magnetic field inhibits the flow velocity inside the cavity. Funding: Not applicable.
Data Availability Statement: Not applicable.