Local entropy generation model for numerical CFD analysis of fluid flows through porous media, under laminar and turbulent regimes

ABSTRACT Porous media structures have been proposed as an interesting solution on the design of high-temperature volumetric heat exchangers and sensible thermal energy storage devices. The wide exchange area between the solid matrix and the fluid offers the possibility to reach higher conversion efficiencies, particularly on applications of high-temperature (∼1000°C) gases. Nevertheless, the presence of the solid matrix increases the hydrodynamic resistance on the flow, and consequently, generates irreversibilities. The entropy generation can assess in the same figure of merit the different irreversibilities generation mechanisms. In this context, this work presents a physical and mathematical model to determine the local entropy generation (LEG) rate and recognizes its different generation mechanisms for porous media. The proposed model defines a useful expression to determine the LEG as a post-process variable from the usual CFD scalar and vectorial results (temperature, velocity, TKE, and ), without the necessity of solving an additional entropy transport equation. A numerical experiment was implemented showing inflection points where the porous hydrodynamic resistance forces exceed the heat transfer in the LEG rate. The Forchheimer hydrodynamic resistance effect can domine the LEG in comparison to the volumetric heat transfer for high porous Reynolds regimes ( >100) when the porosity is under 0.6.


Introduction
The transport phenomena between a solid porous matrix and fluid or multiphase fluid mixtures have been an active research subject during the last 70 years (Avila-Marin, 2011;Ergun & Orning, 1949;Vafai, 2015) due to their high capacity to exchange and store thermal energy (Calderón-vásquez et al., 2021;Kalita & Dass, 2011). The first interest in the literature was focused on heat exchange devices and their applications as reacting and/or filtering media (Baumann et al., 2020); however, particularly during the last 20 years, several authors have proposed novel technological solutions for energy conversion and storage systems, such as hydrogen reactors, and concentrated solar power (CSP) systems (Avila-Marin, 2011;Kribus et al., 1996Kribus et al., , 2014Kun-Can et al., 2017;Villafán-Vidales et al., 2011;J. Wu & Yu, 2007; Z. Wu et al., 2010Wu et al., , 2011Xu et al., 2011;Younis & Viskanta, 1993). Likewise, due to the expansion of CSP systems during the last years, porous heat exchangers have been proposed as an interesting solution to increase the operating temperatures of solar tower systems using CONTACT Cristóbal Sarmiento-Laurel cristobal.sarmiento@mail.udp.cl volumetric receivers. The main idea is to increase the maximum temperature of the working fluid in the solar receiver, enabling the possibility of achieving higher overall conversion efficiencies. Currently, the operation of commercial central receiver CSP systems considers a benchmark operating temperature of around ∼ 600°C, established by the limit of chemical stability of the working fluid: molten nitrate salts (Ho, 2016). In this context, some authors (Avila-Marin, 2011) have proposed the use of compressible gases as working fluid in combination with a porous volumetric solar receiver (VSR) to increasing the operating temperature to 1000-1200°C and, consequently, increasing the conversion efficiencies to levels of around 50% (Avila-Marin, 2011; Kribus et al., 2014). A similar idea has been proposed for thermal energy storage systems (TES) (Singh et al., 2019), using porous solid media as a sensible heat storage matrix in interaction with compressible gases. Nevertheless, the use of this kind of system implies dealing with several challenges in the design phase, mainly related to difficulties in the computational modeling stage to properly describe the transport phenomena in a complex solid porous matrix of mini-and microchannels. Implementing a porous media either in a volumetric receiver or in a thermal storage system increases the heat exchanging area between the solid and the fluid; however, at the same time, the hydraulic resistance also increases significantly. Therefore, during the design process, it is necessary to consider a detailed analysis for determining the best configuration, material, and geometry of the porous media (i.e. ceramic foam, wire mesh, packed bed, among others), aiming to maximize the benefits of the porous morphology. In the same direction, it is necessary to have a figure of merit able to consider the trade-off of the disadvantages and the benefits in the same analysis. With this objective, some authors have proposed different approaches for assessing different materials, geometries, and designs in terms of heat exchange capacity and/or hydraulic resistance Bai, 2010;Hischier et al., 2012;Z. Wu et al., 2011), showing promising results in terms of VSR technology. In 2012, Hischier et al. (Hischier et al., 2012) presented a complete analysis methodology, which defines two parameters of thermal efficiency for the concentrating and absorbing systems, respectively. Later, the authors evaluated them for several operating configurations. The results report thermal efficiencies of 90% and outlet air temperatures of 1273 K for the configuration that minimizes thermal losses. From this result, it should be interesting to extend the decision criteria and to include the concept of energy quality, as stated by the second law of thermodynamics, to include in the decision parameter the influence of the fluid temperature. A second-law analysis offers the possibility, through the entropy generation concept, to compute the irreversibilities, expressed as thermal losses and pressure drop, and the quality of the energy dispatched in terms of the outlet temperature. In 2014, Kribus et al. (Kribus et al., 2014) presented a complete review of the modeling methods and available correlations for VSR systems, considering radiative, convective, and conductive heat transfer, and pressure drop across the absorber. Nevertheless, despite the progress evidenced, the assessments still present significant discrepancies regarding the behavior of porous systems and the heat transfer capacity of porous systems. In their analysis, the authors concluded that some convective heat transfer results do not match or overestimate the heat transfer capacity of porous foams, hindering the design process and comparison with other technological proposals. Finally, the authors state that is still required additional effort in the material selection and design approaches for building structures that reach reliable high operating temperatures and conversion efficiencies. Therefore, developing a figure of merit, coupled with a detailed methodology for assessing the design of VSR systems would be significantly useful. The present study aims to describe the potential use of LEG as a metric to evaluate the performance of porous media systems, integrating thermodynamic costs in one single parameter and the loss of useful energy potential (Bejan, 1995). Through the entropy generation as a metric it is possible to assess the irreversibilities generated by the transport phenomena (mass, momentum, and energy) and, at the same time, to distinguish the best design option in terms of the quality of energy (Sarmiento et al., 2019). Thus, the proposed analysis of entropy generation offers additional information on the internal conversion processes and the rationale use of the energy resources (Bejan, 1995;Sarmiento et al., 2019).

Entropy generation in the literature
The concept of entropy generation has been widely discussed in the last 40 years (Bejan, 1980;Sciacovelli et al., 2015), and it has recently received a special emphasis due to the need for increasing the exchange and conversion and efficiencies in energy systems (Sciacovelli et al., 2015). However, despite the potential of entropy generation as a development parameter on design and optimization (Han et al., 2021;Liu et al., 2021;Song & Liu, 2018), most of the entropy generation analyses are focused on large or medium-scale systems (such as power plants or their components). On the other hand, the CFD differential-scale analyses are limited mainly to the first law of thermodynamics, focusing on the energy losses such as pressure drop and thermal losses. Nevertheless, some authors have conducted interesting studies regarding entropy generation on micro and nano scales applied to heat transfer in porous media (Betchen & Straatman, 2008;Mahian et al., 2013;Torabi et al., 2019).
In 2008, Betchen and Straatman (Betchen & Straatman, 2008) developed an entropy generation function for non-thermal equilibrium (NTE) heat transfer in high-conductivity foams using a volume-average scope in transport equations (Quintard & Whitaker, 1994). The proposed model offers an appropriate theoretical expression for the viscous dissipation entropy generation through high-conductivity foams in several realistic applications, opening pathways for novel conceptual proposals. Although Betchen and Straatman's analysis proposes a theoretical expression for LEG in a porous foam, the results reported are restricted to laminar regimes. In addition to that, and despite their considerations, the final entropy model does not include a practical expression to determine the LEG by turbulent dissipation in terms of available turbulence models (k − ε, k − ωSST, etc.) (Wilcox, 2006). Usually, the viscous dissipation effects are neglected since it does not affect significantly the entropy generation in comparison to the heat transfer. Nevertheless, turbulence has indeed an impact on the mixing and advection of heat during the exchange process. Mahian et al. (2013) reviewed the state of the art in entropy analysis for nano fluid applications, reporting several contributions in the literature regarding differential-scale entropy analysis. The authors stated the importance of suitable relations to calculate the thermophysical properties because, in some cases, different thermophysical models could produce opposite predictions for the entropy generation. In 2010, Feng and Kleinstreuer (Feng & Kleinstreuer, 2010) presented a heat transfer analysis on parallel disc systems, using nanofluids under laminar flow regimes. The analysis considers the entropy generation as a figure of merit, showing a comparison between the entropy generation due to viscous effects and the heat transfer, recognizing the design configurations where the viscous dissipation is negligible against the entropy variation due to heat transfer. In the same way, in 2011 Moghaddami et al. (Moghaddami et al., 2011) presented a second-law analysis over nano fluid flows through a circular pipe under laminar and turbulent regimes, varying the volume fraction of particles. The authors distinguished the dominant entropy generation mechanisms and defined the optimal design in each flow configuration.
Later in 2014, from their previous research work on LEG in porous foams (Betchen & Straatman, 2008), Betchen and Straatman (2014) conducted a pore-scale CFD analysis of high-conductivity foam heat exchangers. The analysis defines some recommendable pore geometry to maximize the heat exchange capacity by minimizing the entropy generation. Furthermore, in 2015 and based on Betchen and Straatman's entropy generation model (Betchen & Straatman, 2008), Ting et al. (2015) presented a numerical analysis of nano fluid flows through porous media, focused on studying the relevance of viscous dissipation in the modeling of entropy generation. The authors concluded that neglecting the viscous dissipation in the analysis overestimates in 10% the fluid friction irreversibilities and underrates significantly the heat transfer irreversibilities, concluding that it is relevant to consider this effect to ensure the accuracy of the results. Recently, in 2019 Torabi et al. (Torabi et al., 2019) presented a numerical analysis of entropy generation in porous media at the pore scale. From the results, the authors show the impact on the heat exchange capacity of the porous media in terms of the diameter and shape of the pores under high Reynolds configurations. A RANS model was implemented, based on the proposal of Herwig (2004, 2005) to determine the viscous entropy generation in terms of the outlet parameters of viscous dissipation and turbulent kinetic energy (TKE) of k − ε and k − ω turbulence models (Wilcox, 2006).
In 2005, Kock and Herwig (Kock & Herwig, 2004) presented a numerical model to link the turbulence models as k − ε and k − ω (Wilcox, 2006) to the theoretical expression of entropy generation defined by Bejan (1995).
From the aforementioned, the LEG offers advantages on the optimization and CFD design task, in comparison with the commonly used pressure drop and heat transfer performance analysis. In that regard, an entropy generation analysis is an excellent assessing tool able to consider the trade-off between the benefit of the high heat exchanging area of porous heat exchange systems, and the thermodynamic costs of pressure drop produced by the presence of the solid matrix. Nevertheless, despite the extensive study in the literature on second-law analysis, it is necessary a LEG model able to determine the entropy generation and its generation mechanisms in fluid flows through porous matrix, from low to high Reynolds regimes. In that sense, encouraged by the wide field of applications of porous media (CSP VSR, TES, and hydrogen generation systems), and the advantages of the LEG as a figure of merit stated in the literature, the present work describes an assessment methodology for the design and optimization of heat exchange porous media systems. The proposed model allows determining the LEG for different entropy generation mechanisms (heat exchange and viscous dissipation) from high to low Reynolds regimes. The methodology determines the LEG as a post-process result from the solutions of continuity, momentum, and energy equations, without the need of solving an additional transport entropy equation per se.
Despite some authors have had analyzed the entropy generation in porous heat exchange devices (Betchen & Straatman, 2014;Torabi et al., 2017Torabi et al., , 2019, the analyses were performed over a specific geometry of spherical or oval pores at pore-scale limiting the impact of the results under one or two types of porous geometry. Currently, several porous geometries have been proposed in the literature such as ceramic and metal foams (Capuano et al., 2016;Pabst et al., 2017;Z. Wu et al., 2010Z. Wu et al., , 2011, packed wire mesh Avila-marin, Caliot, Flamant, et al., 2018), packed bed of rock or solid spheres (Spelling et al., 2012) and mineral wool (Fend et al., 2004), among others. Therefore, the proposed model is designed at a macroscopic scale based on the volumeaveraging method (Quintard & Whitaker, 1994), with the objective of simplifying the numerical task and opening the analysis to any available geometry. Also, based on the proposal of Kock and Herwig (2004), the turbulent viscous dissipation entropy generation was determined by the available RANS turbulence models, but adapting the local entropy model to the available turbulence model developed for porous media by Nakayama and Kuwahara (1999), Pedras and De Lemos (2001), and Rizwan-uddin (2009a, 2009b). Finally, a heat exchange of a Newtonian fluid flow through and a porous media is numerically analyzed, to identify the scope of the local entropy model.
The purpose of this work is: • Develop a macroscopic local entropy generation expression for porous media under laminar and turbulent flow regimes, considering non-thermal equilibrium. • Define a methodology to determine the LEG mechanisms from the CFD scalar and vectorial results (temperature, velocity, TKE, and ε). • Analyze the LEG distribution and compare its different generation mechanisms through a numerical experiment applied to a porous channel, considering different porosities, temperature differences, and Reynolds regimes.

Methodology
To analyze LEG in a porous medium, the present work defines a theoretical expression for local entropy transport from low to high Reynolds regimes. Then, to determine the local entropy production due to turbulent share effects, a mathematical relation is formulated, using the scalar parameters of closure RANS turbulence models for porous media. Finally, a numerical experiment is formulated to apply the proposed theoretical model in a simple configuration. Due to the complexity associated with instrumentation in porous media, it is reasonable to perform a numerical investigation to evaluate the performance of the proposed model in an initial stage of implementation (Ghalandari et al., 2019; Salih et al., 2019).

Entropy transport from mean flux
To determine a theoretical expression for the entropy transport phenomena in porous media, the volumeaveraging method ) is applied to the energy conservation equation. Likewise, to consider the turbulent effects related to high Reynolds regimes, the time-averaging operator is employed over the equations. As was established by Pedras and De Lemos (2001), both averaging operators (time and spatial) are independent among them (Commutative property). Therefore, the order of application of these does not modify the resulting equation or property, as follows.
where ϕ is an auxiliary property, ϕ V is the average value of ϕ at any point inside of a representative elementary volume (REV) of size ΔV, and analogously,φ is the average value of ϕ in a time interval of Δt. Thus, Then, the first step is to study the complete expression of the energy transport equation for a control volume (Currie, 2012), which considers the total energy per unit of mass (kinetic plus internal) and the total work done by the surface forces ∂ ∂x i (u j σ ij ), as follows: where ρ f is the fluid density, u j the fluid velocity vector, e is the internal energy per unit of mass, σ ij the surface forces tensor, f j the mass forces vector and q j net the heat flux.
Expanding and regrouping the left-hand side terms in Equation (A1) (see the complete mathematical development in Appendix 1), it holds, Therefore, by applying space-averaging v (see the details of the volume-averaging method in Appendix 2) in Equation (5), the following expression holds, where λ f is the fluid conductivity and T f is the fluid temperature. In addition, the last two terms on the rightside represent the local conduction between the solid and fluid phases, and the convective heat transfer between the solid and fluid, respectively. Expanding the first term of the right-hand side in Equation (6), and applying the space-averaging v .
Also, expanding the gradient of the surface forces where μ is the fluid viscosity, and P is the pressure. Then, the last two terms of the right-hand side in Equation (8) are the Darcy-Forchheimer's hydrodynamic resistance terms, both related to drag forces due to the presence of the solid matrix , and expressed as R as follow: Then, to obtain the complete expression of the sur- (9) is included in Equation (7), as follows.
Thus, introducing Equation (10) into Equation (6), In Equation (11) is possible to observe that the third and fourth terms on the left-hand side are canceled by the first and third terms on the right-hand side, since these terms collectively amount to the product of u j with the momentum equation (see Appendix 3).
The fourth and fifth terms on the right side correspond to the local conduction and volumetric heat transfer between the solid and fluid phases, respectively. In the literature, both heat transfer mechanisms are determined by computational simulation at pore-scale, and in some cases experimentally (Kuwahara et al., 1996). The local conduction between each phase is determined as follows (de Lemos, 2012): where λ fs is the local thermal conductivity tensor, usually determined by computational simulation at pore-scale. For simplicity, the local conduction term is considered inside the heat transfer term q j v in the effective conductivity tensor, given by: On the other hand, the volumetric convective heat transfer is determined as a function of the temperature difference of each phase (de Lemos, 2012;Kaviany, 1999;Saito & De Lemos, 2005) as follows.
where h i is the interfacial convective heat transfer and a i the surface area per unit of volume. Usually, the volumetric convection heat transfer coefficient and the local thermal conductivity tensor is determined experimentally and depends of the geometrical distribution of the solid matrix (such as packed rock bed, ceramic foam, wire mesh, etc.). Now, for simplicity, Equation (12) is written as follows: Expanding the first term on the right-side of deformation work in Equation (16), is possible to determine the viscous dissipation term (Currie, 2012), as follows: Thus, replacing the expression (19) in Equation (16), the following expression holds, Then, considering the continuity equation to change the term ∂u k Dt in Equation (20), and using the entropy definition from Gibbs' equation (Bejan, 2013;Cantwell, 2018;Currie, 2012) (see Appendix 4), is possible to establish an expression for entropy transport as follows: where s is the entropy per mass unit.
Expanding the heat transfer term on the right side of Equation (23), and using the expression ∂ ∂x j In addition, it is possible to express the directional heat flux of the second term on the right-side in terms of the Fourier's law of heat conduction (Bejan, 2013) in and the right-side first term as a volumetric heat source, as follows: Expanding the second term of the left-side in Equation (26) the convective entropy transport due to spatial dispersion of entropy and velocity is determined as follows: Convective entropy transport due to spatial-dispersion of entropy and velocity. This term is also present in laminar convective heat transfer, Re D < 150 (Forchheimer flow regime (Kaviany, 1999;Quintard & Whitaker, 1994) Therefore, Equation (27) shows the local entropy transport in a porous media through a macroscopic point of view, where each term represents the following phenomena defined in Table 1.
Finally, to consider turbulent effects in the analysis, the time-averaging (Reynolds et al., 1895) is applied to Equation (26), whereφ is the time average of ϕ, as follows: Considering that the solid matrix is rigid and static, the fluctuating mechanical energy u j i R is zero, thus, the fifth term on the right-side of Equation (29) is neglected (de Lemos, 2012;).
Expanding the second and third terms on the righthand side in Equation (30), both related to entropy generation by conduction heat transfer and viscous dissipation, respectively: Finally, the LEG rate in porous media considering the effects of macroscopic turbulence is as follows: Adding the complete expressions of the Darcy-Forchheimer analysis and the spatial-averaging method (de Lemos, 2012;Kaviany, 1999) in termsR and h i , the entropy generation rate is: Rewriting the last three right-side terms as is usually in the literature from the empirical correlations, Equation (33) is as follows: where h i a i , k 1 and k 2 are determined experimentally, and u D is Darcy's velocity with u D = φ u j i .
Bejan presented an intuitive expression for the entropy generation in porous media under Darcian regimes (Re D < 1) (Bejan, 1995). In addition to this idea, Equation (34) extends the analysis to higher values of Re D from Darcian flow regime to post-Forchheimer and fully turbulent flow regimes, and including the LEG due to the volumetric heat transfer between the flow and the solid matrix.
Bejan's expression: In addition to Bejan's LEG equation, in 2008 Betchen and Straatman (Betchen & Straatman, 2008) presented an extension of LEG in porous media where LEG was considered as a Forchheimer hydrodynamic resistance term and the volumetric heat transfer was included. Nevertheless, this expression was restricted to Forchheimer flow regime (Re D < 150). Thus, the expression developed in Equation (34) includes the LEG related to the velocity and temperature time-fluctuation effects.

Local entropy generation in turbulent share flows
Several authors (Nakayama & Kuwahara, 1999;Teruel & Rizwan-uddin, 2009a, 2009b in the literature have presented their closure models to extend the k − ε turbulence equations scope to porous media by a macroscopic view. In general terms, the proposals have the same structure of the usual k − ε turbulence model (Khan & Straatman, 2016). It includes an additional term in each equation related to the production and dissipation of macroscopic TKE, due to the presence of the solid matrix G k and G ε (see Table 2), as follows: Nakayama and Kuwahara (Nakayama & Kuwahara, 1999) Teruel and Rizwan-uddin (Teruel & Rizwan-uddin, 2009a, 2009b = where k i is the volume-average TKE, ε i is the volume average of the dissipation rate of TKE, P i is the production rate of k i , G i is the generation rate of k i , μ tφ is the turbulent viscosity for porous media, and C 1 , C 2 , σ k are k−ε model constants. Therefore, to solve the usual transport equations of mass, momentum, and energy (in Appendix 5), this analysis aims to determine the LEG without solving an additional entropy transport equation. The beginning of the LEG expression determined in the previous section (Equation (34)) it is possible to define an expression of LEG as a post-process result from the velocity, temperature, TKE, and viscous dissipation results. Thus, the present analysis proposes an expression to determine the LEG as a post-process from the velocity, temperature, k, and ε solution fields, after solving the volume-averaged conservation equations and the turbulence k − ε equations for porous media in the literature.
Studying Equation (34) it is possible to define two principal groups of entropy generation mechanisms, heat transfer ṡ v and viscous dissipation ṡ v , as follows: where ṡ ,C v is the LEG rate by the conductive heat transfer related to the time-average fluid temperature, ṡ ,C v is the LEG rate due to the conductive heat transfer associated with the fluid temperature time-fluctuations. The last termṡ ,V is the entropy generation rate, due the volumetric heat transfer between the solid and fluid phases. Analogously, where ṡ ,D v is the LEG rate due to viscous dissipation related to the time-average velocity, ṡ ,D v is the LEG rate by viscous dissipation regarded to the fluid velocity time-fluctuations, andṡ ,DF is the LEG rate associated to Darcy-Forchheimer's hydrodynamic resistance due to the presence of the solid matrix against the flow.

Entropy generation by turbulent dissipation and thermal dispersion
For the analysis of ṡ v and ṡ v , the terms ṡ ,C v ,ṡ ,V and ṡ ,D v can be calculated solving the transport and volume-averaged k − ε equations. On the other hand, the time-fluctuation terms ṡ ,D v and ṡ ,C v , are determined from the k − ε scalar results. Thus, from the ε definition: where ε i is the viscous dissipation scalar term of the volume-averaged turbulence model k − ε.
To solve ṡ ,D v it is necessary to consider the dissipation of the temperature time-fluctuation ε = α f ∂T f ∂x j 2 defined by Nagano and Kim (1988) in their two equations turbulence model, which establishes two equation pairs, k − ε and k − ε , where the second defines the temperature field time-fluctuations. Thus, ṡ ,C v can be rewritten as: To determine the term ε without solving an additional k − ε pair of equations, Kock and Herwig (2004) have proposed a useful approximation, which consists in approximating ε as the production rate of k defined as P k, (Gersten & Herwig, 1992;Kock & Herwig, 2005). From this approximation, it is possible to determine ε without solving an additional k − ε equation system. This approximation is usually considered valid in the logarithmic region. Thus, ε can be rewritten as follow: Extending Equation (42) to ε v , In addition, to solve the terms u j T i a Boussinesquelike approach is applied (Kock & Herwig, 2004), adapted to the volume-average method proposed by Nakayama and Kawahara (de Lemos, 2012;Nakayama & Kuwahara, 1999), through the eddy-diffusivity concept.
where α tφ = μ tφ /ρ f Pr tφ is the turbulent thermal diffusivity for porous media, Pr tφ is the turbulent volumeaverage Prandtl number, and μ tφ is the turbulent viscosity for porous media μ tφ = ρ f C μ k i 2 / ε i , stated by de Lee and Howell (de Lemos, 2012;Lee & Howell, 1987). Finally, replacing Equation (43) and Equation (44) in Equation (41): Hence, from the mathematical methodology described above it is possible to determine the LEG without solving an additional entropy transport equation or k − ε equation system, additional to the usual conservation equations and k − ε turbulence model for porous media.
Recapitulating, the proposed expression determines the LEG for a flow through a porous medium, considering the effects associated with the turbulence and the transport of heat and momentum between the solid and liquid faces. The definitive expression for the LEG and the assumptions considered are shown below.
Local entropy generation model assumptions: • Non-thermal equilibrium between the solid and fluid phases. • There is no mass exchange between the solid phase and the liquid phase. • The solid matrix is rigid and static in space.
• A Newtonian fluid is considered.
• The mechanical energy of the fluctuating hydrodynamic drag force u j i R is neglected (de Lemos, 2012).
• The temperature time-fluctuation ε and the production rate of k have the same order of magnitude; ergo:

System description
To illustrate the application of the method proposed herein, a case of study is implemented consisting of a 2D conduit, where the temperature of the solid and fluid are fixed at the entrance, as shown in Figure 1. For the entire parametrical analysis described in the following sections, the inlet fluid temperature is fixed at 300 K, and the temperature difference with the solid inlet varies from 0 to 1000 K. The temperatures of the upper and lower walls are set as the average between the solid and fluid inlet temperatures, as follows.
In addition, Table 3 summarizes the key physical parameters considered for the analysis.

Simulation
The channel was simulated in OpenFOAM (OpenFOAM v9, 2021) using an in-house developed solver, adapted from the porousSimpleFoam solver. This tool was built Table 3. Analysis parameters. from the basic structure of the porousSimpleFoam solver, but including the solid and fluid energy equations for non-thermal equilibrium porous systems (Equation (20)). The PorousSimpleFoam tool solves the pressure and velocity from continuity and momentum equations through the SIMPLE algorithm (Semi-Implicit Method for pressure Linked Equations) of Patankar and Spalding (Patankar, 1980(Patankar, , 1981Patankar & Spalding, 1972). The hydrodynamic resistance of Darcy-Forchheimer's terms is included in the momentum equation as a source term. The turbulent effects were determined through the k − ε tool of RAS (Reynolds average simulation) of the OpenFOAM turbulence library considering the following constants: C μ = 0.09, σ k = 1, σ ε = 1.3, C 1ε = 1.44, and C 2ε = 1.92. The simulation considers steady-state regime. The thermal conductivity and the specific heat of the fluid were determined through the correlations proposed by Z. Wu et al. (2011), and the fluid viscosity through the Sutherland law (Sutherland, 1893). Finally, the solving tolerance for the residuals was fixed to 10 −7 , considering a grid resolution of 500 × 1000 elements.

System parameters
Assumptions for the numerical experiment modeling: • Isotropic porosity distribution.
• The air is considered as an ideal gas.
• Constant thermophysical properties for the solid phase. • The local conduction between the solid and fluid phases is neglected; ergo ∂ ∂x j 1 In order to validate the developed solver, a comparison was done adjusting the model parameters to the analysis presented by Alazmi and Vafai in 2000. In their analysis, several transport phenomena models for heat exchange in porous media are studied and compared. Figure 2 shows the axial profile for dimensionless temperature for each phase (fluid and solid), located at X = 0.1, where X = H/L is the dimensionless distance in the direction of flow. The results are in good agreement with those from the work of Alazmi and Vafai (2000).

Boundary conditions
To solve momentum and continuity equation systems, the inlet velocity and the outlet pressure are considered as fixed values. Likewise, to solve the energy equation system, the inlet and wall temperatures of the solid and fluid phases are fixed values. Finally, on the boundaries of the domain, the gradient is set to zero for the following variables, and as seen in Figure 1.

Dimensionless analysis
As a prelude of the numerical analysis, to have more information about the relevance of each LEG mechanism before the CFD analysis, a dimensionless analysis was developed considering the following dimensionless variables: where * x i is the dimensionless longitude, * ū i is the dimensionless velocity, θ is the dimensionless temperature difference, and γ is the dimensionless inlet temperature. The subscripts f and s denote the fluid and solid phases, respectively. Thus, as was proposed by Betchen and Straatman (2008), the dimensionless LEG term is written as follows: where * () refers to a dimensionless expression. Then, substituting the dimensionless properties on Equation (38).
Regrouping terms, where Nu H is the Nusselt number based on the channel high H and λ tφ,f is the fluid turbulent thermal conductivity.
Analogously, for the viscous and Darcy-Forchheimer terms in Equation (39) Finally, the following equation shows the complete expression of * ṡ gen,f v considering all the mechanisms of LEG, such as heat conduction, volumetric heat transfer, viscous effects, and hydrodynamic resistance. * ṡ gen, From Equation (58) it is possible to identify the key factors that define the impact of macroscopic conduction heat transfer (N CHT ), volumetric heat transfer (N VHT ), viscous effects (N V ), and Darcy-Forchheimer hydrodynamic resistances (N D and N FH ).

Results
The dimensionless LEG term in Equation (58) shows five key factors which define the magnitude of each entropy generation mechanism. Figure 3 shows the variation of the two most significant parameters, comparing their development under different porosities, temperatures, and ranging the porous Reynolds number from 10 to 1000.
As shown in Figure 3, the heat transfer dimensionless factors were analyzed ranging the inlet temperature difference T from 10 to 1000 K. The heat conduction factor N CHT and the volumetric heat transfer factor N VHT reach their highest values about 3 and 6 magnitude orders, respectively, when the Reynolds number is over 200; and reaches its maximum value for φ = 0.9 at T = 1000 K. As expected, the volumetric heat transfer dominates the heat transfer LEG and reaches its maximum value for higher porosities, which it is translated as higher exchange areas. Nevertheless, a CFD analysis is necessary to conclude the influence of each mechanism and to determine its spatial distribution, because the two phenomena obey to different temperature fields. The conduction obeys the fluid field temperature and the volumetric heat transfer to the interaction phenomenon between the two phases.
Analogously, Figure 4 shows the same dimensionless analysis applied to the viscous and hydrodynamic mechanisms of LEG. Due to the low viscosity that the working fluid (air) exhibits in the complete range of analysis, the viscous LEG is negligible for all cases. The same  effect occurs for Darcy's viscous hydrodynamic resistance, which is negligible for the complete domain analyzed. On the other hand, Forchheimer's hydrodynamic resistance does present a significant impact on the LEG. The value of N FH reaches 9 magnitude orders for porosity of 0.1. In low porosities configurations, the fluid is constantly impinging on the solid matrix, significantly increasing the amount of useless work done by the flow over the porous media. Summarizing the dimensionless analysis of each LEG mechanism in Figures 3 and 4, the maximum values of each magnitude factor are: N CHT < 2 × 10 3 , N VHT < 2 × 10 6 , N V < 10 −1 , N D < 10 −7 , N FH < 10 10 .
Usually, the hydrodynamic effects are neglected in entropy generation analyses (Bejan, 1995). Nevertheless, the magnitude of the Forchheimer's hydrodynamic term expressed through N FH , makes necessary to consider its effect in differential CFD analyses, in either laminar or turbulent regimes. Figure 5 shows the distribution of N VHT /N FH to compare the impact of each LEG mechanism on the different ranges of analysis (porosity, temperature difference, and porous Reynolds regime). From Figure 5 it is possible to recognize the inflection points where the Forchheimer's hydrodynamic resistance dominates the LEG in comparison to the volumetric heat transfer. For a porosity of 0.1, the magnitude of N FH dominates from Re D of 13.43, 29.92, and 36.62, for T of 10, 100, and 1000 K, respectively. For higher porosities, 0.5 and 0.9, the volumetric heat transfer phenomenon dominates the LEG rate but is necessary a numerical CFD analysis to define with accuracy the regions in the domain where each mechanism dominates the others.
Consequently, a CFD analysis was conducted to adjust the preliminary results in Figure 5. Figure 6 shows the computational results for a parametrical analysis under different boundary conditions and operation configurations, ranging the porosity of the solid matrix from 0.2 Figure 6. Comparison factor for the volumetric heat transfer against the Forchheimer's hydrodynamic resistance effect over the LEG. to 0.8, and the solid-fluid inlet temperature difference from 0 to 1000 K. These results could be useful for low temperature configurations as sensible thermal energy storages, and for high-temperature differences as VSR. N Sgen compares the integrated LEG on the entire volume of heat transfer against the viscous and hydrodynamic resistances. As was appreciated in the previous dimensionless analysis, the Forchheimer's effects are more relevant under higher porous Reynolds regimes, and its influence decreases with porosity. Considering the cases of T below 100 K, the viscous and hydrodynamic resistances are dominant from Re D of 20, 100, 600, and 1000 for porosities of 0.2, 0.4, 0.6, and 0.8, respectively. These ranges of T are commonly observed in sensible TES, where the temperature differences between solid and fluid phases are under 100 K, for charge and discharge cycles. Therefore, it is recommended to consider Forchheimer's effects in LEG analysis. Analogously, T ranges from 100 K show the dominance of the heat transfer LEG mechanisms under laminar and turbulent regimes for porosities higher than 0.6. These configurations are usually observed on VSR systems where the porosities are around 0.8 and the temperature differences on the inlet are close to 1000 K.
Finally, Figure 7 shows the total entropy generation rate for the aforementioned range of porosity, solid-fluid inlet temperature difference, and the Reynolds flow regime. The entropy rate reaches its maximum value of 825.18 W/K for a porosity of 0.2, regardless of the temperature difference. This is due to the high impact of the hydrodynamic resistance on the LEG rate, presented in Figure 6. On the other hand, for porosities higher than 0.6 the total entropy generation rate does not show significant variation, where the higher influence is assumed by the inlet solid-fluid temperature difference.

Conclusions
A detailed physical and mathematical procedure was proposed to determine the entropy transport equation for fluid flow in a porous medium, from laminar to turbulent regimes. The entropy transport equation was developed using the Reynolds' time-averaging method and the spatial volume-averaging method. In addition, a methodology to determine the LEG from the formulated thermophysical local entropy transport model (Equation (31)), was developed as a post-process function from the velocity, temperature, k, and fields, commonly resulting from regular CFD analysis. The proposed methodology allows determining the LEG without solving an additional transport entropy equation. The LEG model allows studying the performance of a porous heat exchange device, distinguishing different LEG mechanisms (or irreversibility sources), such as momentum dissipation phenomena, porous hydraulic resistance and heat transfer effects, in a single figure of merit. Thus, it is possible to measure the disadvantages related to the pressure drop and viscous effects of a porous media ( ṡ v ), and at the same time, determine the benefits related to the large heat exchanging area related to the porous matrix. In addition, through the entropy concept, the most rational way to exchange thermal energy is recognized, distinguishing the level of irreversibility ( ṡ v ) of each design configuration.
A numerical experiment was developed to study and compare the dominance of the different LEG mechanisms, considering different configurations of inlet temperature, porosity, and flow regime. The results are proposed as a starting point for future CFD entropy analysis applied to solar thermal sensible heat storage systems, solar hydrogen generation reactors, and volumetric solar receivers.
From the numerical results, the hydrodynamic resistance predominates on heat transfer effects over the total LEG for porosities under 0.4 at temperature differences below 100 K. Therefore, it is recommended to include hydrodynamic resistance in the LEG analysis of sensible TES. Analogously, the heat transfer LEG could be about 10 3 times the magnitude of viscous and hydrodynamic dissipation effects, for porosities larger than 0.6, and at temperature differences from 100 and larger. Thus, hightemperature VSR analyses should include heat transfer effects in LEG analysis to ensure the accuracy of its results.
An analysis based on a LEG model allows to recognize and compare the impact of all the irreversibility mechanisms in a single figure of merit, allowing to define the main focuses in the optimization procedure, during the design of porous media systems. In future research, the proposed LEG expression and the dimensionless parameters could be implemented to study more working fluids and porous media configurations (wire mesh, wool, packed bed, ceramic foam, etc.), allowing to optimize novel applications on storage, exchange and generate energy, and/or energy conversion systems at differential scales.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Funding
The authors wish to express their gratitude for the financial support from the project ANID/FONDAP 15110019 'Solar Energy Research Center' -SERC-Chile and the project Fondecyt N°1 1140725 from Chilean ANID. In addition, C. Sarmiento-Laurel would like to acknowledge the PhD scholarship ANID PFCHA/Doctorado Nacional 2018/2018-21181794.