CET 97 DOI: 10.3303/CET2297068 Paper Received: 15 June 2022; Revised: 18 August 2022; Accepted: 7 September 2022 Please cite this article as: Aguilar A.R., Bermejo J.D., Regala C.J., Zenarosa G., Aviso K.B., Beltran A.B., Tan R.R., 2022, P-Graph Optimization of Reverse Osmosis Networks, Chemical Engineering Transactions, 97, 403-408 DOI:10.3303/CET2297068 CHEMICAL ENGINEERING TRANSACTIONS VOL. 97, 2022 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Jeng Shiun Lim, Nor Alafiza Yunus, Jiří Jaromír Klemeš Copyright © 2022, AIDIC Servizi S.r.l. ISBN 978-88-95608-96-9; ISSN 2283-9216 P-Graph Optimization of Reverse Osmosis Networks Allysa Rae P. Aguilar, Jahnea Denise B. Bermejo, Cee Jay Z. Regala, Ghielen C. Zenarosa, Kathleen B. Aviso, Arnel B. Beltran*, Raymond R. Tan Department of Chemical Engineering, De La Salle University, 2401 Taft Avenue, 0922 Manila, Philippines arnel.beltran@dlsu.edu.ph Seawater desalination using reverse osmosis (RO) technology provides cost-effective solutions for clean water supply. To reduce energy consumption, optimal RO network (RON) designs are generated by either heuristics approach or mathematical programming. This study develops a P-graph approach for RON synthesis for freshwater production. A superstructure based on predefined RON components (pumps, power recovery turbines, and RO units) is developed and optimal and sub-optimal network structures are determined by minimizing the network’s total annualized cost (TAC). Two case studies are investigated to demonstrate the capability of the P-graph approach. The first case study is a RON based on El-Halwagi (1992) which considers two pumps, two RO units, and two turbines. The second case study uses Evangelista’s (1985) RON configuration, which is a similar network type with only one pump causing the permeate to flow directly to the secondary RO unit. Results show that the optimal network for Case 1 has a TAC of 387,770 USD and an energy consumption of 28,861 MJ/d. The optimal network for Case 2 resulted in a TAC of 359,352 USD with an energy consumption of 24,937 MJ/d. The optimal structure of Case 2 removed the second stage of the system which decreased the TAC and energy consumption of the system. Through the P-graph approach, it can be observed that the framework serves as an alternative method for designing RONs with the advantage of being able to generate alternative process topologies for detailed engineering evaluation. 1. Introduction Water scarcity is a problem that affects billions of people globally (Jia et al., 2020). The problem is expected to become more serious due to climate change (IPCC, 2022). Desalination of seawater or brackish water is being explored to satisfy the needs of communities with limited resources. The process is considered as one of the main sources of clean water, but its applicability may be constrained by cost considerations. Reverse osmosis (RO) is a membrane process that is well-suited to desalination (Rao et al., 2018). It involves pumping water at high pressure through an RO membrane module while retaining the solutes in a concentrated reject brine stream. The need for very high pressures makes RO highly energy intensive. To save on operating costs, some of the work in RO systems can be recovered using pressure recovery turbines. The main elements of an RO plant (RO units, pumps, and power recovery turbines) can be arranged into a process network that meets specific engineering goals such as minimal cost or minimal electricity consumption. These RO networks (RONs) can be designed using systematic Process Integration (PI) methods (El-Halwagi, 1992). Superstructure-based Mathematical Programming (MP) models are the most common approach to RON synthesis (Voros et al., 1996). The P-graph framework which was developed by Friedler et al. (1992a) is a rigorous framework for Process Network Synthesis (PNS). This framework consists of three algorithms – maximal structure generation (MSG) (Friedler et al., 1993), solution structure generation (SSG) (Friedler et al., 1992b), and accelerated branch-and- bound (ABB) (Friedler et al., 1996). This framework has been demonstrated on a wide range of PNS and PNS- like problems in the field of Process Systems Engineering (PSE) (Friedler et al., 2019). The P-graph Studio software developed by a team at the University of Pannonia in Hungary is the most used software for implementation (Bertok and Bartos, 2018), although alternative P-graph code have also been developed in other programming languages (Friedler et al., 2022). The integration of P-graph with commercial process flow sheeting software has also been reported recently, where SSG implemented using Visual Basic for Applications (VBA) was used to generate alternative process networks that were then simulated with Aspen (Pimentel et al., 403 2020). P-graph has been successfully applied to the design of resource conservation networks which considered direct recycle within a plant or among multiple plants (Lim et al., 2017). This approach was later extended for batch water networks (Foo et al., 2021). It has also been used in the design of wastewater treatment networks in consideration of multiple technologies (Yenkie et al., 2019) which may be present at each stage of the sequential process of treatment (Yenkie et al., 2021). P-graph for simultaneous heat and water integration has also been demonstrated (Chin et al., 2019). P-graph’s application to RONs is yet to be explored as recent work have only explored the use of mathematical programming (Parra et al., 2019). RON synthesis and design will benefit from P-graph through the error-free generation of the model superstructure, potential identification of counter-intuitive networks (Yenkie et al., 2021), and the provision of multiple alternative solutions which are critical for practical implementation (Voll et al., 2015). To address this research gap, this paper aims to develop a P-graph approach to RON synthesis and design which presented in Table 1. Table 1: Comparison of Related RON and P-Graph Optimization Literature Source RON Design P-Graph Framework Synthesis of Optimized Networks Parra et al. (2019) ✓ x ✓ Foo et al. (2021) x ✓ ✓ Yenkie et al. (2021) ✓ ✓ ✓ Chin et al. (2019) ✓ x ✓ This Study ✓ ✓ ✓ 2. Problem statement RON optimization considers the integration of multiple components (e.g., RO units, pumps, turbines) which requires rigorous computational approaches that are time-consuming and error prone. This can be addressed using P-graph, which is a systematic approach for the optimization and analysis of combinatorial parameters (Friedler et al., 1993). Given RO processes, pumps, and turbines with associated capital and operational costs as well as energy use requirements; given target freshwater quality characteristics, the objective is to determine the RON design which will desalinate pre-treated seawater for freshwater production which will either minimize total annualized cost (TAC) or minimize energy consumption. 3. Solution approach This paper uses P-Graph Studio (P-Graph, n.d.) and its algorithms to determine the optimal and suboptimal structures of different networks. The framework consists of three different algorithms: (1) MSG, (2) SSG, and (3) ABB. A simple RO process is illustrated in Figure 1. Pre-treated feed enters a high-pressure pump that uses a driving force. This force pushes the feed into a semi-permeable membrane in the RO unit. The streams are then separated into permeate and reject water or brine. The proposed system for this paper is a two-stage one-pass system that employs pumps, RO units, and energy recovery turbines. In the first stage, the pump takes the salt water from the source. This then passes through the first RO unit that separates the permeate from the reject water. The permeate goes through another pump before passing through the second RO unit. The P-graph framework determines the need for the second stage of the system to achieve the lowest TAC and energy consumption. The cost functions employed in the software is based on an equation presented by Sassi and Mujtaba (2011). The P-Graph software used this base equation to compute the TAC. Capital and operational costs are integrated within the P-Graph studio. Some limitations are applied to this original equation to account for other variables not included in the network. The final equation is expressed in Eq(1) where 1.4 refers to indirect costs related to capital costs and 0.08 refers to the capital charge rate. 𝑇𝑇𝑇𝑇𝑇𝑇 = 1.4(𝑇𝑇𝑃𝑃 + 𝑇𝑇𝑅𝑅𝑅𝑅 + 𝑇𝑇𝑇𝑇) + 0.08 + 𝑂𝑂𝑇𝑇𝑃𝑃 + 𝑂𝑂𝑇𝑇𝑚𝑚𝑚𝑚𝑚𝑚 (1) where CP is the pump capital cost (USD), CT is the turbine capital cost (USD), CRO is the RO capital cost (USD), OCP is the pump operating cost (USD), and OCmem is the membrane operating cost (USD). The energy consumption factors are Eq(2) for the total expenditure for electrical power (Ep) and Eq(3) for the cumulative recovered energy from turbines (Et,rev) taken from Hawlader et al. (1996). 𝐸𝐸𝑃𝑃 = 3.6𝑄𝑄𝑃𝑃𝜌𝜌∆𝐻𝐻𝑃𝑃𝑔𝑔 𝜂𝜂𝑃𝑃𝜂𝜂𝑀𝑀 (2) 404 𝐸𝐸𝑡𝑡,𝑟𝑟𝑚𝑚𝑟𝑟 = 3.6𝑄𝑄𝑇𝑇𝜌𝜌∆𝐻𝐻𝑡𝑡𝑔𝑔 𝜂𝜂𝑡𝑡 (3) where ρ is average brine density at 25 °C (kg/m3), ΔHP is the pump net head (m), ΔHt is the ERD net head (m), ηP is the pump efficiency, ηm is the motor efficiency, and ηt is the turbine efficiency. Figure 1: Illustration of RO process unit 4. Case studies This section intends to discuss two case studies that demonstrate the efficiency of P-Graph models. Both case studies are assumed to have a steady state and isothermal flow. The optimal and sub-optimal structures for both case studies are determined first using SSG and were narrowed down by ABB. Both cases have the same minimum volumetric flowrates of 17,652 m3/d and assume the same pressures and efficiencies at each unit. 4.1 Case study 1 Case study 1 is a two-stage direct pass network based on the fundamental elements of RON in El-Halwagi’s configuration (1992). This contains two pumps, two RO units, and two turbines, similar to El-Halwagi’s. The SSG algorithm identified six feasible networks while the ABB algorithm identified two network solutions. The optimal structure eliminated the second turbine, which resulted in the least TAC and least amount of energy consumption. The optimal structure generated by P-Graph for case study 1 is shown in Figure 2. The optimal TAC is 388,259 USD, with the capital cost amounting to 58 % of the total cost. This is compared to El-Halwagi’s optimization in 1992 in terms of TAC, which was 237,900 USD. El-Halwagi employed pumps and turbines with 65 % efficiency with an electric power cost of 0.06 USD/kWh. This case used units with efficiencies of 75 % for pumps and 96 % for energy recovery devices. The cost of electricity used was 0.114 USD/kWh. Factoring the Chemical Engineering Plant Cost Indices (CE CPI) (Jenkins, 2020), El-Halwagi’s optimal network will cost 403,851.75 USD today. This indicates that this case study has a better optimization with a cheaper TAC. This can be attributed to the higher efficiency of pumps assumed for the model. The energy consumption is also calculated to be 28,860.77 MJ/d. This value suggests that the optimal structure can still be improved to have lower energy consumption. In this case, the network with the minimum TAC also corresponded to the network with minimum energy consumption. The comparison between the optimal and sub-optimal structures is shown in Table 2, and the sub-optimal structure for case study 1 is shown in Figure 3. This sub-optimal structure removes the first turbine in the first pass, which increased the TAC by 49.90 % due to no energy recovery and energy consumption by 58.57 %. El-Halwagi’s optimal solution with the minimum TAC was solved using MINLP. No other alternatives were proposed. Other technical considerations such as energy consumption were also not included. P-graph’s greatest advantage is generating alternative solutions within seconds. When applied to a sea water desalination RO process, it can generate the most efficient path to produce the minimum water flow rate. Alternatives from this framework can be used to strategize efficient networks based on specific constraints. Table 2: Summary of comparison for two pumps, two RO units, and 2 turbines Solution Number TAC (USD/d) Energy Consumption (MJ/d) El-Halwagi 403,851.75 - P-graph optimal (1) 387,770.00 28,860.77 P-graph sub-optimal (2) 581,260.00 45,765.72 405 Figure 2: Case study 1 optimal solution Figure 3: Case study 1 suboptimal solution 4.2 Case study 2 Case study 2 takes Evangelista’s (1985) original configuration and is modelled through P-Graph. It is a two- stage, one-pass network that generates eight feasible network structures via the SSG algorithm and two networks via the ABB algorithm. Eight pathways are possible for case study 2 but only two structures meet the system requirements particularly when energy source is accounted. The generated optimal structure reroutes the first permeate directly into the clean water stream. This reduces both the treatment cost and the load on the streams going to the second pump. The P-Graph’s optimal solution is shown in Figure 4. The resulting TAC amounts to 359,352 USD with an energy consumption of 24,936.88 MJ/d. The removal of pump and turbine reduces the cost but increases the energy consumption. The summary of the comparison for case study 2 is shown in Table 3. The sub-optimal structure, shown in Figure 5, is 127 % more expensive and consumes 47.54 % more energy. Note that the energy consumption and TAC for the sub- optimal structure are higher because of the increase of pre-treated seawater flow rate. Table 3: Summary of comparison for one pump, two RO units, and two turbines Solution Number TAC (USD/d) Energy Consumption (MJ/d) Evangelista 475,993.22 - P-graph optimal (1) 359,352.00 24,936.88 P-graph sub-optimal (2) 814,504.00 26,791.38 406 Figure 4: Case study 2 optimal solution Figure 5: Case study 2 suboptimal solution 5. Conclusion In this study, a P-graph model for the synthesis of RONs has been developed. The method assembled RO units, pumps, and power recovery turbines into balanced RON design options and identifies the optimal and near- optimal ones. The model has been tested on two different RO case studies: case 1 - based on El-Halwagi (1992) work, and case 2 – based on Evangelista’s (1985) work. Optimal solution for case 1 show to be more economical in terms of the Total Annual Cost (TAC) by 4 % compared to El Halwagi’s solution. For case 2, the optimal solution is lower by 21 % compared to Evangelista’s solution. The energy consumptions were determined to be optimal at 28,860.77 for case 1 and 24,936.88 MJ/d for case 2. This P-graph approach provides an alternative to conventional design methodology using either heuristics or MP models. Alternative designs are more easily generated for evaluation by designers. Future work can develop this approach further by varying the recovery ratio, considering different RO configurations (e.g. hollow fine or capillary fibers, spiral-wound, or tubular), and adding pre-treatment costs (e.g. media filtration or ultrafiltration). References Bertok B., Bartos A., 2018, Algorithmic process synthesis and optimisation for multiple time periods including waste treatment: Latest developments in P-graph Studio software, Chemical Engineering Transactions, 70, 97–102. Bertok B., Heckl E., 2016, Process Synthesis by the P-Graph Framework Involving Sustainability, Chapter In: Ruiz-Mercado, G., Cabezas, H., Eds., Sustainability in the Design, Synthesis and Analysis of Chemical Engineering Processes, Elsevier, 203–225. Chin H., Foo D. Lam H., 2019, Simultaneous water and energy integration with isothermal and non-isothermal mixing – A P-graph approach. Resources, Conservation and Recycling, 149, 687-713. El-Halwagi M., 1992, Synthesis of reverse-osmosis networks for waste reduction, AIChE Journal, 38, 1185– 1198. Evangelista F., 1985, A short cut method for the design of reverse osmosis desalination plants. Industrial & Engineering Chemistry Process Design And Development, 24(1), 211-223. 407 Feng G., Fan L., Friedler F., 2000, Synthesizing alternative sequences via a P-graph-based approach in azeotropic distillation systems, Waste Management, 20, 639−643. Foulds L., 1983, The Heuristic Problem-Solving Approach, Journal of The Operational Research Society, 34(10), 927–934. Foo D.C., Chew L.X., Chong T.L., Teh W.H., Lam H.L., Affery A.P., Pang C.H., 2021, A note for the extended P-graph model for the synthesis of batch water network, Process Integration and Optimization for Sustainability, 5(3), 675-686. Friedler F., Tarjan K., Huang Y.W., Fan L.T., 1992a, Graph-theoretic approach to process synthesis: Axioms and theorems, Chemical Engineering Science, 47, 1973–1988. Friedler F., Tarjan K., Huang Y.W., Fan L.T., 1992b, Combinatorial algorithms for process synthesis, Computers and Chemical Engineering, 16, 313–320. Friedler F., Tarjan K., Huang Y.W., Fan L.T., 1993, Graph-theoretic approach to process synthesis: Polynomial algorithm for maximal structure generation, Computers and Chemical Engineering, 17, 929–942. Friedler F., Varga J. B., Fehér E., Fan L.T., 1996, Combinatorially Accelerated Branch-and-Bound Method for Solving the MIP Model of Process Network Synthesis, In: Floudas, C.A., Pardalos, P.M., Eds., State of the Art in Global Optimization: Computational Methods and Applications, p. 609–626, Springer, Dordrecht, Netherlands. Friedler F., Aviso K.B., Bertok B., Foo D.C.Y., Tan R.R., 2019, Prospects and challenges for chemical process synthesis with P-Graph, Current Opinion in Chemical Engineering, 26, 58–64. Hawlader M., Ho J., Malek A., 1996, Design and economics of RO seawater desalination, Desalination, 105(3), 245–261. IPCC, 2022, Climate Change 2022: Impacts, Adaptation, and Vulnerability. Contribution of Working Group II to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change, Cambridge University Press, UK. Jia X., Klemeš J.J., Wan Alwi S.R., Varbanova P.S., 2020, Regional water resources assessment using water scarcity pinch analysis, Resources, Conservation and Recycling, 157. Jenkins S., 2020, 2019 Chemical Engineering Plant Cost Index Annual Average, Chemical Engineering: Essentials for the CPI Professional accessed 08.11.2021. Lim C.H., Pereira P.S., Shum C.K., Ong W.J., Tan R.R., Lam H.L., Foo D.C., 2017, Synthesis of resource conservation networks with P-graph approach—direct reuse/recycle, Process Integration and Optimization for Sustainability, 1(1), 69-86. Parra A., Noriega M., Yokohama L., Bagajewicz M., 2019, Reverse osmosis network rigorous design optimization, Industrial & Engineering Chemical Research, 58(8), 3060-3071. P-Graph, P-Graph Studio, accessed 27.10.2020. Pimentel J., Orosz Á., Tan R.R., Friedler F., 2020, Automated synthesis of process-networks by the integration of P-graph with process simulation, Chemical Engineering Transactions, 81, 1171–1176. Sassi K.M., Mujtaba I.M., 2011, Optimal design and operation of reverse osmosis desalination process with membrane fouling, Chemical Engineering Journal, 71, 582–593. Rao P., Morrow W., Aghajanzadeh A., Sheaffer P., Dollinger C., Brueske S., Cresko J., 2018, Energy considerations associated with increased adoption of seawater desalination in the United States. Desalination, 445, 213−224. Tan R.R, Aviso K.B., Yoo D.C.Y., 2017, P-graph and Monte Carlo simulation approach to planning carbon management networks, Computers & Chemical Engineering, 106, 872−882. Voll P., Jennings M., Hennen M., Shah N., Bardow A., 2015, The optimum is not enough: A near-optimal solution paradigm for energy systems synthesis, Energy, 82, 446-456. Voros N., Maroulis Z., Marinos-Kouris D., 1996, Optimization of reverse osmosis networks for seawater desalination, Computers & Chemical Engineering, 20, S345–S350. Yenkie K.M., Burnham S., Dailey J., Cabezas H., Friedler F., 2019, Generating Efficient Wastewater Treatment Networks: An integrated approach comprising of contaminant properties, technology suitability, plant design, and process optimization, Computer Aided Chemical Engineering, 46, 1603-1608. Yenkie K.M., Pimentel J., Orosz Á., Cabezas H., Friedler F., 2021, The P-graph approach for systematic synthesis of wastewater treatment networks, AIChE Journal, 67, e17253. 408 068.pdf P-Graph Optimization of Reverse Osmosis Networks