Entropy Generation Analysis of Natural Convection in Square Enclosures with Two Isoflux Heat Sources

This study investigates entropy generation resulting from natural convective heat transfer in square enclosures with local heating of the bottom and symmetrical cooling of the sidewalls. This analysis tends to optimize heat transfer of two pieces of semiconductor in a square electronic package. In this simulation, heaters are modeled as isoflux heat sources and sidewalls of the enclosure are isothermal heat sinks. The top wall and the non-heated portions of the bottom wall are adiabatic. Flow and temperature fields are obtained by numerical simulation of conservation equations of mass, momentum and energy in laminar, steady and two dimensional flows. With constant heat energy into the cavity, effect of Rayleigh number, heater length, heater strength ratios and heater position is evaluated on flow and temperature fields and local entropy generation. The results show that a minimum entropy generation rate is obtained under the same condition in which a minimum peak heater temperature is obtained. Keywordsnatural convection;enclosure; finite volume method; Rayleigh number; entropy Nomenclature Pr Prandtl number (=ν/α) (dimensionless) Ec Eckert number (=α k/h Cp q1) Ra Rayleigh number (=gβq1 h/kαν) g Acceleration due to gravity (m/s) h Height of cavity (m) k Thermal conductivity (W/mK) lh,1 Width of left heater (m) lh,2 Width of right heater (m) Lh,1 Dimensionless width of left heater (lh,1 /h) Ns Dimensionless rate of entropy generation (=Sgen h2/k) P Effective pressure (= ( ) a P gy P   P Dimensionless effective pressure (=p* h/α) q1 Flux over left heater (W/m2) q2 Flux over right heater (W/m2) qr Heat flux ratio (=q2/q1) TC Cold wall temperature (K) T Ambient temperature (K) * T Dimensionless ambient temperature (=TC k/q1 h) U Dimensionless horizontal velocity (=uh/α) V Dimensionless vertical velocity (=vh/α) X Dimensionless horizontal coordinate (=x/h) Y Dimensionless vertical coordinate (=y/h) α Thermal diffusivity (m/s) β Volumetric expansion coefficient (K) εr Heater length ratio (lh,2/lh,1) μ Dynamic viscosity (Pa.s) ν Kinematic viscosity (m/s) θ Dimensionless temperature (=(T-TC)k/q1 h)  Ambient density (kg/m)


I. INTRODUCTION
Entropy Generation Minimization (EGM) in a closed enclosure filled with fluid is the interaction of heat transfer, fluid mechanics, and engineering thermodynamics.This approach is considered as a part of exergy analysis, since exergy destruction is proportional to entropy generation.Various precise works on natural convection in enclosures have been published.In [1][2] authors numerically solved free convection problem in a square enclosure with insulated horizontal walls and vertical walls under two different temperatures.In [3] authors studied laminar free convection in a rectangular enclosure with discrete heat sources.They showed that constant temperature heat sources are generally more significant than constant flux.Passive systems such as fin or baffle are simple methods used to control fluid flow and heat transfer due to natural convection in enclosures.In [4], authors studied two-dimensional laminar natural convection heat transfer in an inclined fin located cavity.They observed that the inclination angle of the fin is an important parameter for controlling heat and fluid flow.In natural convection process, entropy generation should be minimized in thermal processing to achieve an optimal processing with minimum irreversibility.Optimal conditions can be evaluated by EGM.In [5][6], authors comprehensively discussed the analysis of entropy generation for various problems.In [7], authors studied entropy generation due to heat transfer and fluid low irreversibility in natural convection into diverse cavities.In [8] natural convection in closed enclosures with heating in corners was evaluated.It was documented that heat transfer depends on the length of the heating body and that the effect of Prandtl number on average Nusselt number is more significant in Prandtl numbers lower than 1.In [9], authors studied entropy generation due to natural convection in a square enclosure heated by a protruding heat source and filled with nanofluid.It was shown that heat transfer performance could be maximized and entropy generation could be minimized by positioning the heat source on the lower wall of the enclosure.In [10], authors investigated free convection in a rectangular system with hot sidewall in nine different positions of heat source.In [11], authors numerically analyzed free convection in a 3D square enclosure with a cubic body producing heat at the center of the enclosure.They found out that fluid flow inside the enclosure results from two temperature differences; one, temperature difference between hot and cold wall of the enclosure and the other temperature difference caused by heat generating body.In [12], entropy generation due to natural convection in square enclosures with two discrete heat sources was generated.
Recently, different studies have been conducted on mixed convection in nanofluid-containing enclosures with moving wall and different geometry and boundary conditions [13][14][15].In [16], authors addressed heat transfer in the space between cold outdoor square cylinder and hot indoor elliptical cylinder in the presence of a uniform magnetic field and reported the results relative to particle volume fraction, Rayleigh number and Hartman.In [17], authors simulated natural magne-tohydrodynamic convection in a square enclosure full of alumina water nanofluid using the Lattice-Boltzmann method.This simulation is different from similar cases in a place-dependent sine temperature distribution in vertical walls of the enclosure.Their results showed that heat transfer is directly proportional to Rayleigh number and inversely proportional to Hartmann.In [18], authors studied free convection in a steep chamber with two adjacent walls at two different temperatures.They found that the effect of the enclosure angle is negligible on lines of current and temperature in small Rayleigh numbers, while free convection considerably increases in large Rayleigh numbers.In [19], authors numerically investigated a mixed convection fluid flow, heat transfer and entropy generation inside a triangular enclosure filled with CuO-water nanofluid with variable properties.
This study tends to minimize operating heater temperatures and rate of entropy generation in the system.This study optimizes the relationship between locations of heaters, heater length ratios as a function of heater strength ratios.

II. METHODOLOGY
In this simulation, the electronic components and side walls were modeled as constant flux heat sources and isothermal thermal heat sinks, respectively.The flow and temperature fields were obtained by numerical simulation of mass conservation, momentum, and energy equations.
Simplifying assumptions are: • Incompressible and Newtonian fluid.
• 2D, steady state and laminar flow field.
• Constant thermo physical properties.
• Neglect the radiation effects.
• For elimination of density as a variable, the correlation between variation in density and temperature is given by Boussinesq approximation.
The numerical simulation was performed in MATLAB.The governing equations were discretized by finite volume method, and were solved using the SIMPLER algorithm.In finite volume method (FVM) integral forms of governing equations derived directly from conservation laws are used for discretization in the considered space.FVM contains simple discretization and applicability to complex networks.The most fundamental problem of FVM is the definition of variables in sides of control volume, particularly second order derivatives.In this method, interpolation methods are often used to obtain flux.It is proved that if Domain mesh resolution is less than 100×100, inverse matrix method performs better than other methods in obtaining linear algebraic equations.The current study uses this method.
A uniform 50×50 staggered grid was used to store velocities and scalar variables.The power law scheme was also used to define the relationships between convection-diffusion terms.At the beginning, the required parameters and matrices such as physical parameters, velocity and pseudo-velocity matrix are defined.This section defines convergence conditions for conservation equations of mass, momentum and energy.Then, pseudo-velocity field is obtained by simpler algorithm.
Step 1: calculate pseudo velocities: However, calculations are different for internal nodes and boundary conditions.Calculations are done separately.The next step of the SIMPLER algorithm is to calculate pressure field.
Step 2: solve pressure equation: Since Navier-Stokes equation and consequently discretized equation only contains pressure gradient, unknown pressure values may be considered as difference of two very large numbers (for example, 100100-1000000), which may cause problems in numerical solution.To avoid this problem, pressure value of a certain node is considered zero in the solution.
In the third step of simpler algorithm, the obtained pressure field is considered as speculative pressure field; then, infrarelease factor is applied on pressure field.

Step 3: p = p*
In the fourth step, velocity field is calculated by solving discretized momentum equation: Step 4: solve discretized momentum equations: Next, pressure correction field is calculated to correct velocity field.Then, temperature field is obtained by corrected velocity values.Finally, convergence conditions are checked.
Entropy field is obtained by calculating velocity and temperature fields.FDM and second-order CDS are used for discretization.To discretize term of entropy generation due to heat convection, temperature derivatives of CDS are substituted.To discretize term of entropy generation due to fluid friction, velocity derivatives of FDS are substituted.
Finally, the resulted the linear algebraic set of equations was solved using inversion matrix method.Process simulation and problem solving is shown in Figure 1.

www.etasr.com Nejad and Keshtkar: Entropy Generation Analysis of Natural Convection in Square Enclosures with…
In this optimization, the parameters prevailing in the flow field, temperature, and entropy were examined as the following: • The effect of changing dimensionless parameter of Rayleigh number (Ra) on flow field, temperature, and entropy was investigated in constant length and strength ratios of the heaters (ε r =q r =1).

•
The effect of changing strength ratio of the heaters (q r ) on flow field, temperature, and entropy was investigated in constant length ratio of the heaters (ε r =1).
• The effect of changing length ratio of the heaters (ε r ) on flow field, temperature, and entropy was investigated in constant strength ration of the heaters (q r =1).
• The effect of changing the dimensionless parameter of distance between centers of the heaters (X c ) on flow field, temperature, and entropy was investigated in constant length and strength ratios of the heaters (ε r =q r =1).

III. GEOMETRY AND BOUNDARY CONDITIONS
The geometry of the problem and details of boundary conditions, illustrated in Figure 2, involves a square chamber with 15 cm side length having two heat sources on the bottom wall.The length of left-hand and right-hand heaters are L h,1 and L h,2 , respectively.The distance between centers of the heaters is indicated by X c .The fluid inside the chamber is air with Pr=0.7.All chamber walls are fixed, having no movement.The temperature of left-and right-hand walls is equal to the constant cold wall temperature (T c ).The environment temperature is assumed to be 300 K (T ∞ =300K).The upper wall and not-heating part of the lower wall are insulated.The following boundary conditions were used to solve the governing equations: • The boundary condition of no slippage and impermeability for all walls (U=V=0).• The thermal boundary condition of θ=0 for cold side walls. • The subscript ∞ refers to the characteristic distance of the object.The dimensionless form of operators is defined as follows: Dimensionless form of continuity equation: Dimensionless form of momentum equation: Dimensionless Reynolds number: Dimensionless Grashof number: .

S g T T L Ra Gr Pr
Rayleigh number is defined as the ratio of buoyancy force to heat spreader in the fluid.Rayleigh number determines laminar or turbulent flow in the free convection.

V. GOVERNING EQUATIONS
The governing equations of this this problem include mass conservation, momentum, energy conservation, and the rate of generated entropy.The stable and dimensionless form of the governing equation is: Where, X=x/H and Y=y/H are dimensionless horizontal and vertical coordinate components respectively.U=uh/α and V=vh/α are the dimensionless velocity components in the X and Y directions.P is the dimensionless effective pressure, θ is the dimensionless temperature, θ=(T−T C )k/q 1 h , where T c is the cold wall temperature.In (5), The first phrase demonstrates entropy generation due to conduction heat transfer (N s,conduction ) and the second phrase demonstrates the entropy generation due to viscous dissipation (N s,viscous ).

VI. RESULTS
In order to validate the computational code, the results were compared with the results of reference [12] and it was observed that, in the same conditions, there is good agreement between the results.Minimal difference between the results is due to differences in applied methods and approximations solution.
The result of this comparison is shown in Figure 3.The summary of the states investigated in this study is shown in Table I.Convergence velocity and temperature fields controlled with relationship Root square.The remaining amount is defined as follow: ( ) 10 Comparing the results of preseny study with reference [12] In numerical simulations, one of the important points the independence of the results is the number of grid points.To evaluate the grid independence, the nondimensional maximum temperatures in a particular case and for two different grids obtained, and compared with results of the 100×100 grid.Result of this investigation are shown in Table II.Once the results were obtained and compared for several grids, it was concluded that the 50×50 grid occupied minimal memory or lower runtime provided reasonable results compared to other grids.

A. The effect of Rayleigh number on flow field,
temperature distributuon and entropy generation Figure 4 shows the streamlines and isotherms contours for different Rayleigh number.In this case, heaters have equal length and strength ratios (ε r =q r =1).Also the distances between heaters and sidewalls are equal.
The trend of streamlines reveals that in low Rayleigh numbers (Ra=10 3 and Ra=10 4 ), the viscous force is partly dominant over buoyancy force, and buoyant flow is weak.As well as, and the upper half of enclosure hasn't been practically affected by the heat sources.The cores of created vortices move upward by increasing Rayleigh number due to forming a stronger rotating flow and increasing buoyancy force.When Ra=10 6 , the isothermal curves are thinner that other states, which is due to increased energy transmission.In all states www.etasr.comNejad and Keshtkar: Entropy Generation Analysis of Natural Convection in Square Enclosures with… related to Figure 3, heaters have equal length and strength ratios and the boundary condition of side walls is also symmetrical, therefore, there is similar heat loss from cold side walls and expected that heater temperatures are equal.dominant over buoyancy force, and buoyant flow is weak.In this case, the isothermal curves are rather flat, and the upper half hasn't been practically affected by the heat sources.The cores of created vortices move upward by increasing Rayleigh number due to forming a stronger rotating flow and increasing buoyancy force.Furthermore, by increasing Rayleigh number, the isothermal curves divert from those of pure conductance, and fluid flow results in transmission of hot air to near the upper wall.When Ra=10 6 , the isothermal curves are thinner that other states, which is due to increased energy transmission.In all states related to Figure 4, heaters have equal length and power ratios and the boundary condition of side walls is also symmetrical, therefore, there is similar heat loss from cold side walls and the temperature of heaters are expected to be equal.1.5×10 6  1.25×10 6 8×10 5 6.66×10 5 10 6 10 6 10 6 10 6 2×10 6 /(1+ ε r × q r ) 2×10 6 /(1+ ε r × q r ) 2×10 6 /(1+ ε r × q r )  Figure 5 shows the trend of changing entropy generation contours resulted from fluid friction irreversibility (FFI) and conductive heat transfer irreversibility (HTI) by Rayleigh number.The contours are plotted using normalized values.These values are obtained by dividing the entropy resulted from conductive heat transfer (N s,conduction ) or fluid friction (N s,viscous ) to the maximum generated entropy (N s,max ).These contours show that the maximum entropy is generated near heaters and is due to HTI.The conductive heat transfer process was resulted by two temperature differences.These two temperature differences, caused by creation of the internal and external irreversibility due to heat transfer in the system, involve the temperature difference (conduction heat transfer) created between heaters and the fluid inside the enclosure, as well as the temperature difference created between the hot fluid and cold enclosure walls.The plot of entropy generated by heat transfer shows that the value of HTI is negligible near the upper wall, which is due to the little temperature gradient in these areas.The rate of entropy generation due to heat transfer increases by Rayleigh number.The plots of entropy generated by FFI show that the friction irreversibility is higher near the walls because of forming a boundary layer and velocity gradient.The fluid flow and thickness of the hydrodynamic boundary layer formed on the walls increases by Rayleigh number, and the FFI value increases as a result.In all states investigated in Figure 5, the magnitude of entropy generated by heat transfer is higher than the entropy generated by fluid friction.Therefore, the Bejan number, which represents the relative importance of heat transfer irreversibility over total irreversibility, can be considered equal to 1 for all states investigated in this study.This issue is consistent with the results of [12], whose authors found out that the magnitude of entropy generated by fluid friction is several orders of magnitude less than the entropy generated by heat transfer.Figure 6 shows the contours of changing total entropy generation by Rayleigh number.As it can be seen, the total entropy generation in the enclosure increases with Rayleigh number, which is the result of simultaneous rise in the value of entropy generated by fluid friction and conduction heat transfer with increasing Rayleigh number.B. The effect of length ratio on flow field, temperature distributuon and entropy generation Figure 7 shows the effect of inequality of heaters' length a flow field and entropy.The power ratio of the heaters are equal in all states related to this figure (q r =1), and only their length ratio changes.
The current study differs from [12] in: • Evaluating effect of heater length ratio on flow, temperature and entropy fields • Evaluating entropy generation due to fluid friction (FFI) in all scenarios • Solving linear algebraic equations obtained In practice, the studied problem is similar to [12]; thus, structure of this study is also similar to [12].
As a result, the length of vortices formed on heaters changes an asymmetric heat loss occurs from the sold side walls.When ε r =0.3, the length of right-hand heater is 0.3 of that in the left-hand heater, so the rate of input thermal energy to the right-hand heater is 0.3 of that to the left-hand heater.On the other hand, the convective flow creates stronger vortices on the shorter heater, therefore, more heat would be lost from the surface and walls of the right-hand heater.So, for any power ratio of the heaters, the temperature of the left-hand heater decreases with ε r , while the temperature of the right-hand heater increases.Figure 8 confirms the above statements.Comparing different states of Figure 8 shows that the temperature of the heaters will be equal and at minimum if their length and power ratios are equal.In other words, the optimum length and power ratios, which prevents creation of hot spot and early failure in the system, is equal to 1 (ε r = q r =1). Figure 9 shows the trend of changing the total entropy generation and the entropy generated by fluid friction versus length ratio of the heaters.As it was mentioned earlier, changing heaters' length results in changed length of the vortices formed on them and an asymmetrical heat loss from the cold side walls.So, the area of the surface in which the temperature gradient and irreversibility is important increases with heaters' length ratio.The contours shown in Figure 9, besides confirming the statements above, reveal that for the states related to ε r <1, increasing the heaters' length ratio results in approaching to the optimum state of ε r =1 and decreasing entropy generation in the chamber.Furthermore, for the states related to ε r >1, increasing the heaters' length ratio results in diverting from the optimal state and increasing entropy generation.
C. The effect of distance between heaters on flow field, temperature distributuon and entropy generation Figure 10 shows the effect of positioning of the heaters on the flow and temperature fields.In all states related to this figure, the length and strength ratios of the heaters are equal (ε r =q r =1), and their positioning related to the sidewalls are equal.The Rayleigh number is also constant and equal to Ra=10 6 .So, for a given value of X C , the temperature differences between each heater and the fluid inside the enclosure are equal, and the vortices formed on the heaters will be the same.This can be inferred from the patterns of flow curves.The isotherms show that by decreasing X C , the resulted interaction between the heaters reduces the rate of heat transfer from them, therefore, the surface temperature of the heaters increases and the hot fluid can move upward near to the upper wall.As X c increases, the greater distance between the heaters results in increasing the rate of heat transfer from them, and the surface temperature of the heaters decreases as a results.On the other hand, if the distance between the heaters exceeds a certain value, the buoyancy force and fluid flow created in the enclosure weak, the heat transfer from surface of the heaters decreases and their heat loss increases, and heaters temperature decreases again.The contrast of these two effects is shown in Figure 11. Figure 12 shows the contours of the total entropy generation versus distance between the heaters.The contours in this figure show that by increasing distance between the heaters, first, the entropy generation decreases, but then increases with approaching the to the side walls.So, the changes in the total entropy generation with the distance between the heaters is mainly a function of the entropy generated by heat transfer.This can also be inferred from Figure 13. Figure 11 shows the trend of changing the heater temperature and the rate of entropy generation versus distance between the heaters.The rate of total entropy generation is derived by integrating the rate of local entropy generation rate.This figure shows that changing the rate of entropy generation versus distance between the heaters is almost similar to the change in the peak temperature of the heaters versus their distance.This figure also indicates that the spacing between the heaters is the most important parameter in terms of optimal thermal management.The most important factor in controlling the irreversibility is the positioning of the heaters.Therefore, in the perspective of thermal management of the electronic components, mounting heaters near the chamber's central line is unfavorable since the peak temperature and generated entropy are high in this area.On the other hand, on order to minimize the peak temperature and entropy generation, heaters have to be mounted near cold side walls, or the distance between the heaters has to be half of the chamber width.In terms of efficiency, when the length and power ratios of the heaters are equal, presence of a number of heat sources results in equal power loss compared to presence of one heat source in the center.The studies carried out in this context confirm this issue.

VII. CONCLUSIONS
This study investigates numerically the entropy generated by natural convection in a square electronic package with two pieces of semiconductor.The flow field, temperature, and entropy maps were obtained by numerical simulation of the governing equation using finite volume method and SIMPLER algorithm in MATLAB.Results show that dominant heat transfer mechanism is conduction in low Rayleigh numbers, while heat transfer mechanism changes to convection by increasing Rayleigh number and effect of conduction disappears.Conduction heat transfer and fluid movement increased with Rayleigh number; as a result, fluid friction irreversibility and heat transfer irreversibility increased.In this study, entropy generation mainly resulted from heat transfer irreversibility, which was partially associated with fluid friction.For all scenarios investigated, the arrangement producing minimum peak temperature also produced minimum irreversibility.Among the examined scenarios, minimum rate of entropy generation was seen in a scenario in which heaters had equal length and strength ratios, and the heaters were mounted close to cold sidewalls.Future works can: 1. Study this subject in three dimensions and compare the results with current results 2. Add a fan to the system and re-optimize the problem in order to achieve optimal location of the fan and minimize power consumption 3. Apply a gradient to the enclosure and re-optimize the problem in order to achieve optimal gradient (the gradient for which entropy generation is minimized in the enclosure) 4. Create an obstacle (baffles) in the enclosure and evaluate the role of sizes and location of obstacles in flow, temperature and entropy fields 5. Evaluate different thermal boundary conditions for walls in order to achieve uniform temperature distribution and to minimize entropy generation in the enclosure 6. Evaluate the role of round corners in the enclosure and compare the results with current results

Fig. 1 .
Fig. 1.The flow chart of the method steps in this study wall and non-heating part of the lower wall.•The thermal boundary condition of 1 Y     for the position of mounting the left-hand heater.•The thermal boundary condition of of mounting the right-hand heater.

Fig. 2 .
Fig. 2.Problem geometry and boundary conditions Molding: modeling of cooling process of two semiconductors in the form of natural convection in enclosure.Modeling of electronic components in the form of isoflux heat sources.Modeling sidewalls in the form of isothermal heat sinks Derivation of governing equations: derived Differential form of conservation equations of mass, momentum and energy in state of steady, two-dimensional and laminar flow Discretization of governing equations: using finite volume method, approximation of power law, SIMPLER algorithm and staggered grid Solving set of algebraic equations obtained: Using matrix inversion methods Control convergence and grid independence Analysis the results www.etasr.comNejad and Keshtkar: Entropy Generation Analysis of Natural Convection in Square Enclosures with…

Fig. 11 .
Fig. 11.Plot of changing surface temperature of the heaters versus their distance

Fig . 12 .
Fig .12.The trend of changing the total entropy generation versus distance between the heaters

TABLE I .
THE SUMMARY OF THE STATES INVESTIGATED