CHEMICAL ENGINEERING TRANSACTIONS VOL. 52, 2016 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Petar Sabev Varbanov, Peng-Yen Liew, Jun-Yow Yong, Jiří Jaromír Klemeš, Hon Loong Lam Copyright © 2016, AIDIC Servizi S.r.l., ISBN 978-88-95608-42-6; ISSN 2283-9216 Efficient Flow Modelling in Equipment Containing Porous Elements Vojtěch Turek*, Dominika Fialová, Zdeněk Jegla Institute of Process Engineering, Faculty of Mechanical Engineering, Brno University of Technology, Technická 2, 616 69 Brno, Czech Republic turek@fme.vutbr.cz Possible ways to model flow distribution and pressure drop in process and power equipment containing porous elements (e.g. tube sheets of dense tube bundles of recuperative heat exchangers, matrices of regenerative heat exchangers, packed beds of catalytic converters, etc.) are discussed. A simplified, hybrid flow distribution and pressure drop model based on finite volume method and applicable to a wide variety of equipment is proposed. Given the fact that the model in question is intended to be utilised primarily in optimisation algorithms, emphasis is placed on both obtaining accurate-enough data within relatively short time frames and ease of automation of the process. A proof-of-concept implementation of the model is discussed alongside improvements regarding solution convergence and solution efficiency in general that are critical in order to make the model commercially viable given its intended application. 1. Introduction Often times it is necessary to optimise various parts of flow distribution systems for better performance and reliability. With the advent of more and more powerful computing hardware it may seem that utilising detailed 3D flow models based on Computational Fluid Dynamics (CFD) is the right choice for the mentioned purpose whether one is designing new equipment (Wei et al., 2015), analysing flow behaviour in an existing apparatus (Khaled et al., 2016), or making modifications to flow distribution-related parts in an already operated piece of equipment (Facão, 2015). But is it really so? In some cases (e.g. Anbumeenakshi and Thansekhar 2016) it may be beneficial to forgo modelling altogether and carry out an experimental investigation. If only a few flow system geometries need to be evaluated with the best possible accuracy (as was done for example by Chen et al., 2015) then it certainly is appropriate to utilise CFD and accept that, given the nature of such models, the necessary data will not be available in minutes but rather in hours, tens of hours, or even days. The same applies to situations where employing a simplified model just is not practicable – be it due to the complexity of the flow system geometry (Li et al., 2014) or because constructing a simplified model would probably be non-trivial (as discussed for instance by Pendyala et al. 2015 in case of nanofluid flows). If, however, an engineer deals with the initial part of a design process of relatively common equipment and needs to estimate the behaviour of tens or hundreds of possible flow system geometries (or distribution scenarios) then, clearly, making use of detailed CFD models just to reject the majority of options would not make much sense. This is where simplified and fast, albeit less accurate flow models are much more fitting. These, though, are rarely discussed in the literature and if they are, they either tend to be tailored to specific flow system geometries and thus suffer from limited flexibility (see for example the model developed by Turek et al. (2011) which is applicable to double-U-tube heat exchanger modules) or only a cursory outline is mentioned as a side note and the main focus is still on detailed CFD modelling – as is e.g. the case of the aforementioned paper by Facão (2015). Considering the porous nature of various elements of process and power equipment, by that we mean in this paper any element that can be for the purposes of flow distribution modelling reasonably represented by a porous structure. It can therefore be a packed bed of a catalytic converter (Turek et al., 2014), a matrix DOI: 10.3303/CET1652082 Please cite this article as: Turek V., Fialová D., Jegla Z., 2016, Efficient flow modelling in equipment containing porous elements, Chemical Engineering Transactions, 52, 487-492 DOI:10.3303/CET1652082 487 in a regenerative heat exchanger (Drobnič et al., 2016), a plate-fin block of a recuperative heat exchanger (Liu et al., 2015), a dense tube bundle (Turek et al., 2015), or any other similar structure. The following text discusses the two most common flow distribution and pressure drop modelling approaches, that is, detailed 3D Computational Fluid Dynamics-based modelling and simplified 1D or 2D modelling, together with their advantages and disadvantages. Then a proposed hybrid modelling approach is described and its benefits as well as not-yet-resolved caveats are reviewed. 2. Challenges of detailed 3D CFD flow distribution modelling In flow distribution systems the inlet stream splits into multiple, often thousands of streams and, consequently, combines back into a single outlet stream. Hence, the flow usually exhibits strong turbulence and, as the authors of this paper can attest, numerical flow simulations of these systems therefore are highly unstable in the first ca. 50 to 100 iterations. This brings about the need to bootstrap every such computation (unless, of course, one is willing to deal with meshes consisting of tens of millions of cells). In other words, if one is to obtain a converged solution with a moderately-sized mesh then: (i) Mesh quality (in terms of cell skewness, aspect ratio, and smoothness) must be reasonable and the solution must be initialised with a relatively accurate estimate – e.g. in ANSYS Fluent (ANSYS, 2015) Hybrid Initialisation is often much more suitable than Standard Initialisation. (ii) Lower under-relaxation factors may be necessary in the first phase of the solution process. Similarly, relatively generous solution variable limits are recommended to prevent unnecessary value cut-offs which may lead to divergence. (iii) It is good practice to start with a minimal setup – flow equations (momentum and pressure) together with turbulence included e.g. via the k-ε model (Launder and Spalding, 1974) or the Realizable k-ε model as recommended by Chen and Sparrow (2009). First-order differencing schemes such as the First Order Upwind Scheme (Courant et al., 1952), the Hybrid Scheme (Spalding, 1972), or the Power Law Scheme (Patankar, 1981) are good fits here as well as the straightforward SIMPLE pressure- velocity coupling (Patankar, 1972).There is virtually no point in attempting solution initialisation with a pressure-velocity coupling providing faster convergence because its benefit would be lost due to the current solution being very far from its stabilised state. It should also be noted that reversed flow is almost always encountered at the outlet(s) at the very beginning of the computation should the outlet zones be relatively short (3–6 times the hydraulic diameter of the outlet header). (iv) Once a converged intermediate solution is obtained, one can switch to a higher-order differencing scheme – e.g. QUICK (Leonard, 1979) – and, again, run the computation until convergence is reached. It is not uncommon to still encounter reversed flow at the outlet(s) this far into the computation in spite of the fact that later on in the converged solution no reversed flow will be observed there. (v) As the next step, under-relaxation factors can be gradually made larger while the solution is allowed to converge after each change. Analogously, the solution variable limits, if modified, can be gradually returned to their default values while making sure a converged state is reached after each change. (vi) At this point one can include other equations such as the energy equation. If the fluid undergoes no significant temperature change in the distribution system then this step may be omitted given our aim being to obtain an accurate-enough estimate of flow distribution in as little time as possible. As is apparent from the steps listed above, this is by no means a straightforward process. Also, even though automation is possible to a certain degree (e.g. in ANSYS Fluent one can employ journal files), one still has to monitor the computation closely and make impromptu adjustments to avoid divergence, unnecessarily slow convergence, or unsuitable y+ values. The second challenge concerning flow distribution modelling lies in flow instability. There is no guarantee that the steady-state solution which one has obtained earlier truly reflects the reality, that is, that flow rates through individual flow channels (e.g. the tubes of the bundle) do not fluctuate too much in time. This is why carrying out a transient simulation in addition to the steady one is always recommended. Should one opt to do so, it might be beneficial to switch to a faster-convergence pressure-velocity coupling – e.g. PISO (Issa, 1986) – after the steady-state solution has been obtained. Still, the relative benefit of such a decision depends on the actual flow system behaviour because in many cases a “one-iteration-per-time-step” simulation process results from a careful steady solution initialisation and as such a faster-convergence pressure-velocity coupling may prove to be slower due to its increased computational cost. In summary, with a detailed 3D CFD model one gets very accurate data compared to various simplified modelling approaches (although some simplified models have been shown to provide solutions very similar to those obtained with detailed CFD models – see e.g. (Turek et al., 2015)). The process is still rather laborious and requires a lot of time and almost constant supervision. This is why it makes sense to develop simplified, fast, and automatable flow distribution models which can then be used effortlessly by process engineers. 488 3. Challenges of simplified 1D and 2D flow distribution modelling Vast majority of porous elements present in process and power equipment do not feature one dominant dimension – a tube bundle, for instance, rarely consists of just one or two tube rows. As a consequence, (quasi-)1D flow distribution models, that is, models consisting of multiple interconnected 1D submeshes, usually cannot describe the porous elements in question accurately enough. Still, for a very limited set of scenarios (quasi-)1D models may serve quite well (Turek et al., 2011). Two-dimensional models, on the other hand, can handle various flow distribution geometries very well (see for example the aforementioned paper by Turek et al. (2015)). Flow variables corresponding to the mesh elements in such (quasi-)2D models, however, are almost always evaluated sequentially because simultaneous (or segregated) evaluation of velocity, pressure and other fields is rather challenging in terms of convergence on the grounds of problematic interconnection of the different-dimension submeshes via source terms. That being said, this type of models usually suffers from a major downside being the necessity to (i) carefully construct the respective computer code including a suitable and numerically sound way of making flow variable corrections, (ii) often times use significant under-relaxation factors slowing down already very slow convergence, and, last but not least, (iii) change non-negligible portions of the code each time a non- trivial change is made to the flow system geometry. Still, with respect to accuracy (quasi-)1D and (quasi-)2D models – if applied carefully to a specific class of flow distribution systems with a very limited range of possible geometry changes – often are more than satisfactory for fast and effortless preliminary evaluation of simpler flow systems. In reality, though, this is seldom the case. Process engineers need a tool that can be used to preliminarily evaluate many different types of flow systems without the need to change the respective computer code for it to meet the current requirements. 4. Hybrid modelling approach It is obvious from the previous paragraphs that both the detailed 3D CFD modelling and simplified (quasi-)1D and (quasi-)2D modelling approaches provide benefits as well as suffer from shortcomings. It would therefore be of great interest to process engineers to have available a tool that would (i) provide relatively accurate flow distribution data in reasonable time frames and (ii) allow effortless solution automation of flow distribution problems which, inherently, are numerically ill-posed. The former requirement is straightforward – fast flow evaluation at the cost of too low an accuracy is as pointless as obtaining quite an accurate solution within an unacceptably long time frame. The second requirement, however, is more complex and includes several factors. Given the needs of process engineers, the respective tool must be able to not only manage the solution process so that a converged solution is obtained with as little user intervention as possible but also generate a suitable mesh from several key pieces of data (such as the main dimensions of the evaluated flow distribution system) and statistically process the obtained results in case of unsteady computation (e.g. time-averaging of tube mass flow rates with respect to a maximum allowed fluctuation error). The following text is tailored to the specifics of dense tube bundles (i.e., tube bundles with larger ratios of total tube cross-sectional area to tube sheet area) but it can easily be generalised to other types of porous elements. 4.1 Implemented simplification measures The starting point for the hybrid modelling approach is a 3D CFD model including mass, momentum, and energy transport with turbulence being tentatively neglected. In other words, the initial model works with a 3D mesh and solves the momentum equations to get the u, v, and w velocity fields and the pressure correction equation (the SIMPLE pressure-velocity coupling is utilised) to get the pressure field. The primary simplification lies in mesh consisting solely of cuboid cells because this not only significantly reduces the number of cells required to span the flow system geometry but also greatly simplifies the manner in which gradients etc. are calculated internally when matrix coefficients are being generated. Lower overall number of cells provides obvious reduction in computation time. As for the gradients etc., the cuboid nature of the cells ensures that normal components of all face fluxes are inherently equal to the x-, y-, and z-fluxes themselves. The disadvantage of a cuboid-cell mesh is obvious; one can hardly use such cells to fully span non-cuboid elements. Still, there is relatively easy remedy for this – any tube can simply be replaced by a set of N × N cuboid cell layers resulting in the identical cross-sectional area (see Figure 1). If there is a non-zero heat flux prescribed for the tube surface then the original value must obviously be scaled to match the new “tube” surface area by the factor of Fq = π d2 / (4 N ltc) in which d2 denotes the tube outer diameter, N the number of cells spanning one side of the square tube mesh cross-section, and ltc the respective tube cell side length. 489 Figure 1: Top view of the original tube geometry and the replacement tube mesh consisting of layers of 4 × 4 cuboid cells There is one more benefit regarding cuboid-cell meshes, namely the ease with which such meshes can be generated. Given the common arrangements of tubes in bundles (90 °, 60 °, and 45 °) it can easily be seen that if one is to span the flow distribution system geometry without cell face splitting, the fineness of the resulting mesh is governed by a single parameter – the number of cells spanning one side of the square tube mesh cross-section, N. The spaces between tube rows and also between individual tubes in rows are then spanned accordingly with cells sized as close to the tube cells as possible. Considering the actual value of N, the lower limit generally is two. The reason for this is that in a simplified model it usually is sufficient to utilise the SIMPLE pressure-velocity coupling which operates on a staggered grid. With this in mind, it is obvious that with a single cell comprising tube cross-section the momentum transport from the distribution header to the tubes and from the tubes to the collection header would suffer thus rendering the computation even more unstable and likely to diverge. Using too large a value of N – say, more than six – also may not be a good idea because this would defeat the purpose of simplified modelling (size of the resulting mesh would most probably be of the order of units of millions of cells). In any case, one can further optimise the mesh by employing a double sided, uneven (e.g. successive ratio) longitudinal spacing in the tubes or a single sided, uneven spacing in the headers in directions normal to tube sheets. This modification, which is trivial to implement, provides two benefits: (i) the number of cells is further reduced and (ii) mesh quality is improved because mesh fineness is greater in areas where gradients of flow variables are likely to be large and lower where no significant changes are expected. As mentioned above, in most flow distribution problems the SIMPLE pressure-velocity coupling should suffice. One could make use of a faster-convergence coupling – e.g. SIMPLER (Patankar, 1980), SIMPLEC (Van Doormaal and Raithby, 1984), or PISO – but the actual benefit in terms of shortening of the evaluation time may well be cancelled due to its larger computational complexity. What is more, with respect to the nature of flow distribution problems such couplings may even hinder convergence in the initial phase of the computation when it is not yet stabilised enough. With respect to differencing schemes, again, there is virtually no point in employing other than the first order ones (upwind, hybrid, or power law). Although it is true that with a second order scheme such as QUICK the accuracy of the resulting data would be somewhat higher, given the nature of the model one is after here (a simplified one) it is debatable whether the associated increase in computational complexity and hence also increase in computational time is warranted. With regard to the fact that temperature changes stemming from energy dissipation are rather insignificant, solving the energy equation is only necessary if heat transfer is in effect in some part of the flow distribution system (e.g. in the tubes). Solving this equation for adiabatic systems would lead only to a marginal increase in accuracy but at the cost of significant increase in computational cost. Lastly, let us focus on boundary conditions. Because we are interested in maintaining the total mass flow rate through the entire system, the mass flow inlet boundary condition must be implemented (in some cases the velocity inlet boundary condition is also acceptable but the actual velocity then has to be calculated from the prescribed total mass flow rate). Second, the pressure outlet boundary condition must be available so that pressure frame can be specified for the solution. Third, we need the stationary wall boundary condition – e.g. of the “no slip” type. Frictional pressure drop as well as heat transfer in case of heated/cooled walls can then be easily modelled in a simplified way via source terms. 490 In summary, to obtain a simplified 3D CFD model covering virtually any reasonable flow distribution system it is enough to solve the usual momentum and pressure correction equations coupled via SIMPLE and supplemented by source terms accounting for changes in gravitational potential energy, pressure losses due to friction, and possible additional minor losses in the porous structure. Should heat transfer be in effect then, obviously, also the energy equation is required with fluid heating or cooling in the respective cells again being included in a simplified manner via source terms. 4.2 Computational efficiency concerns In each major iteration of the simplified CFD solver we must solve – at least approximately – four or five rather large systems of linearized equations. Each of these systems is of the rank of roughly the number of cells in the mesh, that is, each of the matrices contains tens to hundreds of thousands of rows. It is therefore essential that the numerical methods employed for this purpose are as efficient as possible. This can be achieved by utilising highly-optimised computer codes such as ATLAS (Whaley et al., 2001), BLAS (Dongarra, 2002), or LAPACK (Anderson et al., 1999). Further increase in efficiency can be accomplished by splitting the matrix-solving code over multiple threads. Many specialised linear algebra libraries based on such high-performance codes are available for programmers’ convenience. For example, the testing CFD code – written by the authors of this paper in Oracle Java (Oracle, 2016) – makes use of the MTJ-N package (Halliday, 2016) which acts as an intermediary between pure Java code and native implementations of BLAS and LAPACK. Being given a sample flow system, this code was able to automatically generate a suitable mesh consisting of roughly 55,000 cells and provide a fully converged steady-state solution in ca. 130 s (126 iterations) while being run in a single-core mode on a regular office computer. 4.3 Potential caveat & future work Admittedly, in many flow distribution scenarios the convergence of simplified 3D CFD models is rather slow (or even problematic) regardless the actual under-relaxation factors. It therefore still remains to be seen whether including the effect of turbulence into the model would provide substantial improvement in terms of convergence so that the increased computational cost would be justified. This, of course, renders the discussed type of models less practicable; however, possible computationally cheap ways of convergence improvement including the major iteration-specific selection of internal matrix solver type and its setup are currently researched by the authors. As for model validation and benchmarks, these activities are planned for the future but neither of them has yet been carried out for obvious reasons. 5. Conclusions It has been shown that, compared to both 3D CFD modelling and simplified (quasi-)1D and (quasi-)2D modelling the proposed hybrid approach provides significant benefits. First, hybrid models are universally applicable – just as the usual 3D CFD models are – but one is not required to deal with mesh creation (which is often non-trivial) because in case of cuboid-cell meshes this can easily be automated. Second, the model places emphasis on short evaluation times at the cost of lower, but still good-enough accuracy. Even though these times are somewhat longer compared to (quasi-)1D and (quasi-)2D models due to decidedly larger meshes and more complex nature of the employed equations, this is remedied by the fact that virtually no modifications to the hybrid model are necessary if flow system geometry is changed (apart from the portion which handles mesh creation but that is in most cases a rather simple affair). In contrast, a relatively minor change in geometry can result in a lot of necessary changes in a (quasi-)1D or (quasi-)2D model due to their being tailor-made for specific flow systems. Lastly, although no benchmark or validation has been carried out as of yet due to the still not fully resolved issues with convergence, one can reasonably expect the resulting data to be at least as accurate as those obtained with lower-dimension models. In any case, the main advantage, that is, the universality of such models combined with very easy generation of meshes and short computational times, remains and promises to yield a valuable flow distribution evaluation tool once the convergence issues have been overcome. Acknowledgement The authors gratefully acknowledge financial support provided by Technology Agency of the Czech Republic within the research project No. TE02000236 “Waste-to-Energy (WtE) Competence Centre”. References Anbumeenakshi C., Thansekhar M.R., 2016, Experimental investigation of header shape and inlet configuration on flow maldistribution in microchannel. Exp. Therm. Fluid Sci., 75, 156–161. 491 Anderson E., Bai Z., Bischof C., Blackford S., Demmel J., Dongarra J.J., Du Croz J., Greenbaum A., Hammarling S., McKenney A., Sorensen D., 1999, LAPACK Users' Guide, 3rd Ed., Society for Industrial and Applied Mathematics, Philadelphia, PA, USA. ANSYS Inc., 2015, ANSYS Fluent User’s Guide. ANSYS, Inc., Canonsburgh, USA. Chen A., Sparrow E.M., 2009, Turbulence modeling for flow in a distribution manifold. Int. J. Heat Mass Transfer, 52, 1573–1581. Chen Y., Wang Y., Bao Z., Zhang Q., Li X.-Y., 2016, Numerical investigation of flow distribution and heat transfer of hydrocarbon fuel in regenerative cooling panel. Appl. Therm. Eng., 98, 628–635. Courant R., Isaacson E., Rees M., 1952, On the solution of non-linear hyperbolic differential equations by finite differences, Comm. Pure Appl. Math., 5, 243–255. Dongarra J.J., 2002, Basic Linear Algebra Subprograms technical forum standard, Int. J. High Performance Applications and Supercomputing, 16, 1–111. Drobnič B., Oman J., Tuma M., 2006, A numerical model for the analyses of heat transfer and leakages in a rotary air preheater. Int. J. Heat Mass Tran., 49, 5001–5009. Facão J., 2015, Optimization of flow distribution in flat plate solar thermal collectors with riser and header arrangements. Sol. Energy, 120, 104–112. Halliday S., 2016, Matrix-Toolkits-Java, , accessed 28.02.2016. Issa R.I., 1986, Solution of the implicitly discretized fluid flow equation by operator splitting, J. Comput. Phys., 62, 40–65. Khaled M., Ramadan M., Shaito A., Hage H.E., Harambat F., Peerhossaini H., 2016, Parametric analysis of heat exchanger thermal performance in complex geometries — Effect of air velocity and water flow distributions, Heat Transfer Eng., 37, 1027–1037, DOI: 10.1080/01457632.2015.1104166. Launder B.E., SpaldingD.B., 1974, The numerical computation of turbulent flows, Comput. Method. Appl. M., 3, 269–289. Leonard B.P., 1979, A stable and accurate convective modelling procedure based on quadratic upstream interpolation, Comput. Method. Appl. M., 19, 59–98. Li L., Ma T., Xu X.Y., Zeng M., Wang Q.W., 2014, Study on heat transfer and pressure drop performances of airfoil-shaped printed circuit heat exchanger. Chem. Eng. Trans., 39, 895–900. Liu J., Zhang S., Zhao X., Yi G., Zhou Z., 2015, Influence of fin arrangement on fluid flow and heat transfer in the inlet of a plate-fin heat exchanger, J. Zhejiang Univ. Sci. A, 16, 279–294. Oracle, 2016, What is Java? , accessed 30.03.2016. Patankar S.V., 1980, Numerical Heat Transfer and Fluid Flow, McGraw-Hill, New York, NY, USA. Patankar S.V., 1981, A calculation procedure for two-dimensional elliptic situations, Num. Heat Transfer, 4, 409–425. Patankar S.V., Spalding D.B., 1972, A calculation procedure for heat, mass, and momentum transfer in three- dimensional parabolic flows, Int. J. Heat Mass Transfer, 15, 1787–1806. Pendyala R., Chong J.L., Ilyas S.U., 2015, CFD analysis of heat transfer performance in a car radiator with nanofluids as coolants. Chem. Eng. Trans., 45, 1261–1266. Spalding D.B., 1972, A novel finite-difference formulation for differential expressions involving both first and second derivatives, Int. J. Num. Methods Eng., 4, 551–559. Turek V., Bébar L., Jegla Z., 2014, Simplified pressure drop and flow distribution modelling in radial catalytic converters. Chem. Eng. Trans., 39, 853–858. Turek V., Fialová D., Jegla Z., Kilkovský B., 2015, Efficient 2D model of flow distribution in dense tube bundles, Chem. Eng. Trans., 45, 1177–1182. Turek V., Hájek J., Jegla Z., Stehlík P., 2011, Optimum design of fluid distribution systems in heat exchangers, Asia-Pac. J. Chem. Eng., 6, 750–759. Van Doormaal J.P., Raithby G.D., 1984, Enhancement of the SIMPLE method for predicting incompressible fluid flows, Numer. Heat Transfer, 7, 147–163. Wei M., Fan Y., Luo L., Flamant G., 2015, CFD-based evolutionary algorithm for the realization of target fluid flow distribution among parallel channels, Chem. Eng. Res. Des., 100, 341–352. Whaley R.C., Petitet A., Dongarra J.J., 2001, Automated empirical optimization of software and the ATLAS Project, Parallel Comput., 27, 3–35. 492