CHEMICAL ENGINEERING TRANSACTIONS VOL. 88, 2021 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Petar S. Varbanov, Yee Van Fan, Jiří J. Klemeš Copyright © 2021, AIDIC Servizi S.r.l. ISBN 978-88-95608-86-0; ISSN 2283-9216 An Optimisation Algorithm for Detailed Shell-and-Tube Heat Exchanger Designs for Multi-Period Operation Zain Mahmooda, Ishanki De Mela, Saif R. Kazib, Adeniyi J. Isafiadec, Michael Shorta,* a Department of Chemical and Process Engineering, University of Surrey, Guildford, GU2 7XH b Department of Chemical Engineering, Carnegie Mellon University, 5000 Forbes Ave, Pittsburgh, PA 15213 c Department of Chemical Engineering, University of Cape Town, Rondebosch, Cape Town, 7700 m.short@surrey.ac.uk Heat exchangers (HEs) are crucial processing units in industrial plants. Heat exchanger networks (HENs) are often designed for nominal operation. However, processes are becoming increasingly dynamic and should be able to operate over a range of operational periods to address changes in market, seasonality, and start-up and shutdown. HEN synthesis has been widely studied, however most approaches use simplified HE models for optimisation and analysis of the structures, assuming the largest area across all periods of operation results in a feasible HE. The detailed HE design, which includes many more practical constraints, such as variable heat transfer coefficients that are a function of velocity, may result in certain exchangers being infeasible in some operational periods. In this study, a HE design algorithm is proposed, which finds optimal shell-and-tube HEs that are feasible across any number of operational periods, which may involve different duties and fluid properties. This is the first such design algorithm presented in literature. The algorithm works via a smart enumeration algorithm, which solves a nonlinear programming (NLP) optimisation subproblem for each combination of discrete decisions (number of baffles, stream allocation, tube diameters, etc.). Each NLP solves Bell Delaware design equations across all considered periods and allows stream splitting and HE bypassing to find an optimal multi-period HE. If no feasible HE is found, a permutation algorithm is used to find the optimal combination of HEs that can fulfil the required heat duties. The algorithm is demonstrated on two examples, showcasing its performance. Future work is suggested to increase the algorithm’s computational efficiency and to include it in multi-period HEN synthesis. 1. Introduction HEs are common process units that transfer heat from one stream to another to heat and cool them to target temperatures required in other process units. HEN synthesis is a set of process integration methodologies that attempt to optimally utilise thermal energy within a process system to reduce external utility usage, thus resulting in higher efficiency processes with enhanced profits and lower emissions. In many cases, HEs and HENs may need to operate over a range of operating conditions that may relate to real-time optimisation – e.g. switching products due to market demands, changing fluid specifications or seasonal temperature changes, or from start-up and shutdown procedures (Wang et al., 2021). Verheyen and Zhang (2006) term networks able to operate optimally across periodic changes over certain time horizons, “multi-period”, whereas designs that remain operable over uncertain parameters resulting from fluctuations, “resilient”. Aaltola (2002) was the first to formulate the multi-period problem as a simultaneous mixed-integer nonlinear programming (MINLP) model. Verheyen and Zhang’s (2006) formulation of the multi-period HEN synthesis problem remains the most widely used formulation, where the largest area requirement across all periods is the area in the objective function. While these formulations can include trade-offs between capital costs (represented by HE area) and utility costs, this simplified formulation can lead to suboptimal solutions. In practice, when designing detailed HEs that can operate over multiple periods, heat transfer coefficients can vary due to differing flowrates, velocities, or duties, having significant implications for HE feasibility (Kang and Liu, 2019). Paper Received: 30 April 2021; Revised: 2 July 2021; Accepted: 9 October 2021 Please cite this article as: Mahmood Z., De Mel I., Kazi S.R., Isafiade A.J., Short M., 2021, An Optimisation Algorithm for Detailed Shell-and- Tube Heat Exchanger Designs for Multi-Period Operation, Chemical Engineering Transactions, 88, 253-258 DOI:10.3303/CET2188042 DOI: 10.3303/CET2188042 253 In some cases, these matches, while feasible in the shortcut formulations used in MINLP models, may be infeasible when HE design details are considered. In these cases, additional HEs may be needed to operate over certain operational periods, which can have significant implications on investment costs, and thus the optimal solution. With process industries becoming increasingly integrated and responsive to real-time changes in product demands, there is increasing interest in creating more flexible processes (Pavao et al., 2021). Short et al. (2016a) incorporated detailed HE designs into multi-period HEN synthesis. Their approach first applied a network design MINLP problem based on Verheyen and Zhang (2006), followed by detailed design of shell-and-tube HEs that satisfied the heat duties. This detailed design was done manually, using heuristics, wherein the largest HE area from across all operational periods was first designed, followed by testing the HE for feasibility across remaining periods. In doing this, the authors found solutions that would have resulted in one or more periods requiring additional HEs to meet duty requirements across all periods. The method then used the solutions from the detailed designs (areas, numbers of shells, etc.) to update the MINLP network topology method, using the correction factor hybrid approach of Short et al. (2016b). This study showed the importance of incorporating detailed HE designs within network synthesis problems, as shortcut models used within topology optimisation problems are often insufficient to model the system’s true costs. Shell-and-tube HEs are a common type of HE due to their standardisation and relative compactness, in addition to their reliability. While several algorithms exist for finding the optimal design of shell-and-tube HEs, these involve many non-convex relations and binary variables, which can be challenging to solve with deterministic MINLP solvers. Mizutani et al. (2003) were the first to suggest an MINLP formulation to solve the Bell-Delaware method for HE design. The problem modelled discrete decisions that refer to number of baffles, tube diameters, etc., as binary variables, but the non-convex relationships for heat transfer coefficients and pressure drop correlations make the problem computationally challenging to solve using deterministic solvers. Ravagnani et al. (2007) extended the formulation to consider further discrete decisions, such as head types and tube numbers to ensure designs adhered to TEMA standards. Due to the challenge in solving large, non- convex mixed-integer problems, particularly in cases where many HEs are required to be solved, such as in HEN synthesis, these approaches may not be appropriate. To more easily solve the MINLP, metaheuristic techniques have also been proposed, however these can be computationally expensive and provide no guarantees on solution quality (Xiao et al., 2019). More recently, several authors have used either linearisation approaches (Goncalves et al., 2019) and smart enumeration methods (Kazi et al., 2021) to avoid solving the large, non-convex problem simultaneously. These can provide some guarantees on solution quality and can be implemented and automated easily to solve reliably without extensive initialisation and bounding procedures. All previous studies only consider HE designs for nominal operating conditions. However, HEs are increasingly required to be designed for multiple operating conditions, flexibly meeting different heating/cooling duties depending on varying demands. In this work, a new algorithm for the design of shell- and-tube HEs that ensures feasible operation over multi-period operation is presented. The method provides flexible designs for different products and operating regimes, reducing the number of units, exchanger areas and pumping costs. The approach uses a smart enumeration approach for discrete variables and NLP optimisation of continuous variables to design optimal exchangers that include exchanger bypassing in each period as degrees of freedom. A permutation-based enumeration algorithm is also proposed if no single exchanger can feasibly operate across all operational periods. To the best knowledge of the authors, this is the first such algorithm, with all other detailed HE design models only considering nominal operating conditions. In future studies, the developed method will be extended to the synthesis of HENs involving multiple periods of operations. 2. Methodology To design a shell-and-tube HE that can operate across all operational periods, an enumeration approach is proposed. This avoids MINLP formulations, which can be challenging to solve reliably, but still explores all available HE topologies and increases the chances of finding feasible solutions. The approach is based on Kazi et al. (2021), in which lists of potential topology decisions are first defined. The number of iterations is calculated based on the topology decisions related to the hot and cold stream allocations to the tube- or shell- side (using indicator ∈ {0,1}), the numbers of baffles , the diameters of the tubes , etc. The method for enumerating all potential shell-and-tube HE geometries for each set of operational periods is shown in Figure 1a, wherein, for each geometry, a mathematical optimisation NLP model, based on the Bell-Delaware shell- and-tube HE design equations, is solved. Note that the number of potential geometries to be solved by the NLP are reduced by placing constraints on the number of baffles (based on an upper bound ), baffle 254 spacing (based on the shell diameter ), and pressure drop ∆ on both tube-side and shell-side (based on an upper bound ∆ ), as shown in Figure 1a. For brevity, only key differences from the work of Kazi et al. (2021) in the formulation are shown. The model formulation begins by defining a new set, ∈ , containing all the periods over which the exchanger is required to operate. Period-specific variables (e.g., heat transfer coefficients, velocities, temperatures, etc.) are defined in each of the sets, while design variables such as exchanger areas, numbers of tubes, etc. are constant across periods. The NLP uses Eq(1) as the objective function which represents the total annual costs (TAC): ( ) + ∆ + ∆ (1) Where , and are cost parameters for capital cost and pumping costs; is the area of the HE ( ); ∆ and ∆ are the tube-side and shell-side pressure drops ( ); and are the tube-side and shell-side mass flowrates; and and are tube-side and shell-side stream densities ( / ). is the fractional duration of period . In the original model of Kazi et al. (2021), the authors used a model with zero degrees of freedom in finding nominal operation topologies. To provide additional degrees of freedom and expand the feasible region to find more potentially optimal topologies during the enumeration across multiple operational periods, we introduce period-specific stream splitting as a variable, which allows fluids to bypass the exchanger if required. This is crucial for flexible operation, particularly when operational parameters differ significantly between periods. , = (2), = (3) Where , and , are mass flow rates in the tube-side and shell-side bypasses, and is the split ratio. As a result, we also define the following mixing relationships for the streams rejoining at the HE exits for the tube and shell sides. , , = , , + , − , ,, (4), = (1 − ) (5) , , = , , + , − , ,, (6), = (1 − ) (7) Where , , and , , are the temperatures of the HE outlet streams at the tube-side and shell-side, while , and , are the target temperatures of the HE outlet streams that have combined with the bypass streams on the tube-side and shell-side. All remaining constraints are the same as those presented in Kazi et al. (2021), with the additional set included. The proposed algorithm first attempts to find a single feasible HE that can operate across all periods, with the lowest TAC solution selected as the optimal HE (using Figure 1a as the Bell-Delaware method). However, if there is no single HE capable of meeting the required duties across all periods (i.e. the NLP models are all infeasible), then the algorithm is required to continue to find combinations of feasible solutions that involve exchangers that can operate across subsets of periods, with additional exchangers. A permutation algorithm to find the optimal combination is presented in Figure 1b. This allows the algorithm to consider all potential combinations of operational periods for operation in additional exchangers. The method assumes that a least- cost solution is one which contains fewer HEs which can operate over all periods. Therefore, it first attempts to find a 1-exchanger solution, however, if no such feasible HE exists, the algorithm attempts to find a 2- exchanger solution and so forth. The algorithm permutes through combinations of different periods to find combinations of periods that result in the lowest TAC. For example, if = {p1, p2, p3}, the model executes the Bell-Delaware enumeration (Figure 1a) for the following combinations, resulting in 2-exchanger solutions which operate over the periods: = {p1, p2} and = {p3}; = {p2, p3} and = {p1}; and = {p1,p3} and = {p2}. Each of these two-exchanger solutions is then compared to find the lowest TAC. If no feasible 2-exchanger solution exists, a 3-exchanger solution is the only feasible solution. Note that the method presented in this paper only considers 1-1 (one shell pass and one tube pass) HEs, as these have been extensively used in problems where HENs are synthesised along with detailed HE designs, which is a proposed future direction of this work (Xiao et al., 2019). The algorithm and optimisation problems are formulated in Python with the use of algebraic modelling language, Pyomo (Hart et al., 2018), with NLP solver IPOPT (Waechter and Biegler, 2006) used to solve each NLP. 255 Figure 1: On the left, a) shows the Bell Delaware enumeration algorithm and, on the right, b) shows the overall proposed algorithm 3. Results To demonstrate the approach, 2 examples are solved. For the purposes of this paper, only the topology decisions in Table 1 and stream allocations (hot or cold stream to tube or shell sides) are considered in the Bell Delaware enumeration algorithm in Figure 1a; however, the technique is easily extendable to include more options. Table 1: Tube lengths and tube diameters considered in the Bell-Delaware enumeration algorithm 3.1 Example 1 The first example is from Verheyen and Zhang (2006) and involves three hot and cold stream pairs to be matched across 3 periods. Table 2 shows the data for the problem and Table 4 shows all relevant stream data. Since this example is extracted from a multi-period HEN optimisation, a single HE (Exchanger 7) was taken from the final optimised HEN produced in Short et al. (2016a) and compared with results from the proposed algorithm. The results are shown in Table 5. The optimal HE from the algorithm is feasible across all 3 operational periods, and this is shown in the table, where each letter of the stream dictates hot or cold stream and the number notates the period of operation. The full algorithm is solved in 11.3 CPUs on a MacBook Pro, 2016 with 2.7 GHz Dual-Core Intel Core i5 processor, with each NLP subproblem solving in between 0.05 and 1 CPUs. The results compare well with the solution from Short et al. (2016a), who used a heuristic method to obtain a shell-and-tube HE with the same heat duties. While the area from their solution is lower, the solution obtained here has a lower TAC. This also shows the importance of considering pressure drops in HE designs. Note the use of the bypass streams by the optimisation algorithm to obtain a feasible exchanger across all periods. When performing the same optimisation considering only minimum area as an objective function, the algorithm finds a near-identical area as Short et al. (2016a). Tube diameter (mm) Tube length (m) 15.875 1.2192 19.05 2.4384 25.40 3.6576 4.8768 6.096 a) b) 256 Table 2: Stream data for all streams across all periods in Example 1 Table 3: Stream physical property data for Example 2 from Kazi et al. (2021) Property (unit) Value (kg/m3) 2.4 × 10-5 (kg/m3) 634 (kJ/kg) 2.454 k (W/(m•k)) 0.114 μ (kg/m3) ρ (kg/m3) C (J/kg) k (W/(m·k)) Hot p1 3.4 x 10 -4 750 2.840 0.19 Hot p2 1.2 x 10 -4 789 2.428 0.106 Hot p3 2.4 x 10 -4 634 2.454 0.114 Cold p1 8.0 x 10 -4 995 4.200 0.59 Cold p2 2.9 x 10 -4 820 2.135 0.123 Cold p3 2.4 x 10 -4 634 2.454 0.114 3.2 Example 2 The stream data for Example 2 is shown in Table 4. The stream pairs for each time period are taken from different case studies from Kazi et al. (2021) to show the full capabilities of the algorithm to find optimal HEs over a very wide range of operating periods, which may represent different fluids and products. A combination of two HEs is required as there is no single feasible exchanger capable of performing the required duty across all periods of operation. Exchanger 1 operates for P = {p1, p2}, while Exchanger 2 operates for P = {p3}. The results are reported in Table 5. The model requires significantly more computational effort at 97 CPUs on the same system. This is due to the enumeration of the various exchanger permutations required to assess the operability across the different sets of periods. Table 4: Example 1 data for from Verheyen and Zhang (2006) and Example 2 adapted from Kazi et al. (2021) Example 1 Example 2 m (kg/s) Tin (K) Tout (K) m (kg/s) Tin (K) Tout (K) Hot p1 55.90 428.51 376.20 27.78 368.15 313.75 Hot p2 55.58 430.27 376.68 19.15 483.15 377.59 Hot p3 54.65 426.61 374.88 28.50 533.00 418.90 Cold p1 85.33 345.15 379.47 68.88 298.15 313.15 Cold p2 85.74 345.15 379.89 75.22 324.81 355.37 Cold p3 86.82 345.15 378.01 143.00 408.90 431.70 Table 5: Comparison of results. Example 1 Example 2 Short et al. (2016b) This paper Exchanger 1 P = {p1, p2} Exchanger 2 P = {p3} Cost ($/year) 10,856 7,103 3,385 5,427 Area (m2) 380.0 450.5 196.1 513.0 Shell passes 1 1 1 1 Tube passes 2 1 1 1 Shell Diameter (m) 0.8382 0.871 0.661 1.02 Tube Diameter (m) 0.015875 0.015875 0.015875 0.015875 Number of tubes 1,250 1,482 807 2,110 Tube Length (m) 6.069 6.069 4.8768 4.8768 Tube pitch (m) 0.02063 0.0198 0.0198 0.0198 - 0.028 0 - - 0.014 0 - ∆ (kPa) 36.803 2.324 3.008 - ∆ (kPa) 1.727 19.27 17.60 - - 0.033 0.4227 - - 0.016 0.2143 - ∆ (kPa) 37.119 2.345 3.889 - ∆ (kPa) 1.703 19.05 7.94 - - 0.037 - 0 - 0.018 - 0 ∆ (kPa) 37.390 2.360 - 2.682 ∆ (kPa) 1.646 18.42 - 14.17 (W/(m2.K)) 650.94 413.72 702.17 - (W/(m2.K)) 649.69 414.00 457.72 - (W/(m2.K)) 644.33 413.13 - 405.69 257 4. Conclusions This paper presents an algorithm for the optimal design of shell-and-tube HEs that are required to operate over multiple operational periods. This is the first such algorithm presented in literature. The approach utilises a strategy that avoids the formulation of a large nonconvex MINLP, which are common in HE design algorithms and can be challenging to solve reliably without detailed initialisation and bounding procedures, and instead formulates a number of NLP subproblems, which can be solved quickly based on fixed topological decisions which are enumerated (tube diameters, tube lengths, stream allocation, etc.). The NLP allows for HE bypassing in the operational periods to provide the optimiser with additional degrees of freedom to expand the feasible region and find more potentially optimal topologies during the enumeration. The algorithm also considers scenarios where a single HE may not be suitable to carry out the required heat duty across all operational periods. In this case, the algorithm permutes between all possible combinations that require one fewer HE, comparing feasible HEs to find the optimal combination of HEs that can perform the required duty. The algorithm is demonstrated on two examples from literature, with the model shown to provide solutions that exceed current approaches based on heuristics. In future work, the model will be incorporated into multiperiod HEN synthesis models and extended to examples involving multiple shells and tube passes. New techniques will be explored to enhance computational efficiency through parallelising solution of the permutations and identify infeasible solutions prior to solving the NLP. Acknowledgements Prof AJ Isafiade would like to acknowledge the support of the National Research Foundation of South Africa (Grant number: 119140) and Faculty of Engineering and the Built Environment at the University of Cape Town. References Aaltola J., 2002. Simultaneous synthesis of flexible heat exchanger networks. Applied Thermal Engineering, 22(8), 907-918. Goncalves C.O., Costa A.H., Bagajewicz M.J., 2019. Linear method for the design of shell and tube heat exchangers using the Bell-Delaware method. AIChE Journal, 65, e16602. Hart W.E., Watson J.P., Woodruff D.L., 2011. Pyomo: Modeling and solving mathematical programs in Python. Mathematical Programming Computation, 3, 219-60. Kang L., Liu Y., 2019. Synthesis of flexible heat exchanger networks: A review. Chinese Journal of Chemical Engineering, 27 (7), 1485-1497. Kazi S., Short M., Biegler L., 2020. Heat exchanger network synthesis with detailed exchanger designs: Part 1. A discretized differential algebraic equation model for shell and tube heat exchanger design. AIChE Journal, 67(1), e17056. Mizutani F.T., Pessoa F.L.P., Queiroz E.M., Hauan S., Grossmann I.E., 2003. Mathematical programming model for heat exchanger network synthesis including detailed heat exchanger designs. 1. Shell and tube heat exchanger design. Industrial & Engineering Chemistry Research, 42, 4009-4018. Pavão L.V., Miranda C.B., Caballero J.A., Ravagnani M.A.S.S, Costa C.B.B., 2021. Multiperiod work and heat integration. Energy Conversion and Management, 227, 113587. Ravagnani M.A.S.S., Caballero J. A., 2007. MINLP model for the rigorous design of shell and tube heat exchangers using the Tema standards. Chemical Engineering Research & Design, 85, 1423-1435. Short M., Isafiade A., Fraser D.M., Kravanja Z., 2016a. Two-step hybrid approach for the synthesis of multi- period heat exchanger networks with detailed exchanger design. Applied Thermal Engineering, 105, 807- 821. Short M., Isafiade A., Fraser D.M., Kravanja Z., 2016b. Synthesis of heat exchanger networks using mathematical programming and heuristics in a two-step optimisation procedure with detailed exchanger design. Chemical Engineering Science, 144, 372-385. Verheyen W., Zhang N., 2006. Design of flexible heat exchanger network for multi-period operation. Chemical Engineering Science, 61(23), 7730-7753. Wächter A., Biegler L.T., 2006. On the implementation of an interior-point filter line-search algorithm for large- scale nonlinear programming. Mathematical Programming, 106, 25-57. Wang S., Tian Y., Li S., 2021. A simultaneous optimization of a flexible heat exchanger network under uncertain conditions. Applied Thermal Engineering, 183 (2), 116230. Xiao W., Wang K., Jiang X., Li X., Wu X., Hao Z., He G., 2019. Simultaneous optimization strategies for heat exchanger network synthesis and detailed shell-and-tube heat-exchanger design involving phase changes using GA/SA. Energy, 183, 1166-1177. 258