원시데이터 수집 시스템
선정목록으로

Integrated Design and Optimization of Water-Energy Nexus: Combining Wastewater Treatment and Energy System

간접 관련 수소연료전지 · (5) 연료전지용 수분제어장치(가습기) (18) VENT(방수통기 부품)

기본 정보

저자
  1. Pouya Rezazadeh Kalehbasti — Department of Civil and Environmental Engineering, Stanford University, Stanford, CA, United States
  2. Michael D. Lepech — Department of Civil and Environmental Engineering, Stanford University, Stanford, CA, United States
  3. Craig S. Criddle — Department of Civil and Environmental Engineering, Stanford University, Stanford, CA, United States
DOI
10.3389/frsc.2022.856996
저널
Frontiers in Sustainable Cities
발행년도
2022
발행기관
Frontiers Media
피인용수
4
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.3389/frsc.2022.856996
토픽
Hybrid Renewable Energy Systems
OpenAlex ID
W4226000604

평가 내용

관련도
간접 관련
사업분야
수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
부 분야
(18) VENT(방수통기 부품)
R&D 측면
분석·모델링
확신도
0.70
근거 용어
membrane-based systems, forward osmosis (FO), reverse osmosis (RO), membrane fouling, wastewater treatment
판단 근거
본 논문은 도시 에너지-물 결합 시스템 최적화를 다루며, 그 과정에서 FO(정삼투), RO(역삼투), MD(막증류) 등 분리막(Membrane) 기반의 수처리 기술을 핵심 요소로 포함하고 있습니다.
R&D 활용 포인트
코오롱인더스트리의 수소연료전지용 중공사막(5) 및 방수통기용 멤브레인(18) 연구에 있어, 분리막의 오염(fouling) 메커니즘 및 에너지 효율적 운전 모델링에 참고할 수 있습니다.
평가 입력
본문 108,577자 중 30,032자 발췌

초록

Designing more sustainable urban infrastructure is an essential topic in practice and research. While many have tried to address this challenge by focusing on sustainability of either supply or demand in a single infrastructure system, few studies have integrated the decisions for both supply and demand across several infrastructure. This paper proposes a novel method to design and optimize the hourly demand and supply of integrated energy and water system in an urban district for environmental and economic sustainability. This modular framework concurrently designs the optimal building mix of an urban district and the systems supplying the district with wastewater treatment, cooling, heating, and electricity. The model is tested on a sample neighborhood from San Francisco, California, with 21 building prototypes, 32 combined heating and power engines, 16 chillers, and 3 wastewater treatment systems (a central treatment plant and two decentralized membrane-based systems). The results of this study show that the median values of normalized life-cycle cost, social cost of carbon, annual energy demand, and annual wastewater production of the integrated designs of water-energy system are, respectively, 20, 75, 8, and 20% lower than those of the traditional segregated designs. The results also demonstrate the economic and environmental viability of using decentralized advanced treatment in urban areas when energy system, wastewater treatment, and building mix are designed together.

본문 108,577자

본문 펼치기
Edited by: Juan Pablo Rodríguez Sánchez, University of Los Andes, Colombia Reviewed by: Qian Zhang, Queen’s University, Canada Dragan Komljenovic, IREQ, Canada *Correspondence: Pouya Rezazadeh Kalehbasti [pouyar@stanford.edu](mailto:pouyar@stanford.edu) Specialty section: This article was submitted to Sustainable Infrastructure, a section of the journal Frontiers in Sustainable Cities Received: 18 January 2022 Accepted: 02 March 2022 Published: 31 March 2022 Citation: Rezazadeh Kalehbasti P, Lepech MD and Criddle CS (2022) Integrated Design and Optimization of Water-Energy Nexus: Combining Wastewater Treatment and Energy System. Front. Sustain. Cities 4:856996. [doi: 10.3389/frsc.2022.856996](https://doi.org/10.3389/frsc.2022.856996) [ORIGINAL RESEARCH](https://www.frontiersin.org/journals/sustainable-cities#editorial-board) [published: 31 March 2022](https://www.frontiersin.org/journals/sustainable-cities#editorial-board) [doi: 10.3389/frsc.2022.856996](https://doi.org/10.3389/frsc.2022.856996) # Integrated Design and Optimization of Water-Energy Nexus: Combining Wastewater Treatment and Energy System Pouya Rezazadeh Kalehbasti*, Michael D. Lepech and Craig S. Criddle Department of Civil and Environmental Engineering, Stanford University, Stanford, CA, United States Designing more sustainable urban infrastructure is an essential topic in practice and research. While many have tried to address this challenge by focusing on sustainability of either supply or demand in a single infrastructure system, few studies have integrated the decisions for both supply and demand across several infrastructure. This paper proposes a novel method to design and optimize the hourly demand and supply of integrated energy and water system in an urban district for environmental and economic sustainability. This modular framework concurrently designs the optimal building mix of an urban district and the systems supplying the district with wastewater treatment, cooling, heating, and electricity. The model is tested on a sample neighborhood from San Francisco, California, with 21 building prototypes, 32 combined heating and power engines, 16 chillers, and 3 wastewater treatment systems (a central treatment plant and two decentralized membrane-based systems). The results of this study show that the median values of normalized life-cycle cost, social cost of carbon, annual energy demand, and annual wastewater production of the integrated designs of waterenergy system are, respectively, 20, 75, 8, and 20% lower than those of the traditional segregated designs. The results also demonstrate the economic and environmental viability of using decentralized advanced treatment in urban areas when energy system, wastewater treatment, and building mix are designed together. Keywords: district energy system, water-energy nexus, multi-objective optimization, wastewater treatment, membrane, K-means clustering INTRODUCTION Motivation While covering only 3% of the earth’s land, urban areas accommodate 55% of world population and are responsible for more than two-thirds of global energy consumption and CO2 emissions (United Nations, 2015; International Energy Agency, 2016). These ever-growing numbers make cities the forefront of the fight against climate change. On the other hand, around 39% of US primary energy is consumed by residential and commercial sectors (Energy Information Administration, 2019): designing more efficient buildings as well as water and energy systems can play an essential role in reducing the energy consumption and environmental footprint of urban districts. Coordinated design of infrastructure has proven to be an effective approach for creating more sustainable urban systems. Such coordination leads to integrated municipal supply systems (e.g., energy and water supply) with improved overall performance when compared to the simple superposition of individual supply systems (Mancarella, 2014). Further, integrated design of infrastructure systems facilitates closed-loop management of resources and can help create “circular economy” in urban areas (World Economic Forum, 2014; Kalmykova et al., 2018). This study focuses on integrating urban energy and wastewater treatment systems. Typically, urban energy and water infrastructure are designed after the demands of the community are determined. At that late stage, improving the environmental and economic performance of the system is difficult (Best, 2016). However, if the supply and demand of municipal services are optimized simultaneously, the resulting urban system has proven to outperform the isolated design based on social, economic, and environmental sustainability metrics (Keirstead et al., 2012; Allegrini et al., 2015; Best et al., 2015). Since building mix largely determines the consumption profile of urban neighborhoods (Best, 2016; Wu et al., 2018), simultaneously optimizing the building mix and integrating infrastructure represents an opportunity for designing more sustainable urban systems (Keirstead et al., 2012; Best, 2016). Developing a framework to investigate and understand this opportunity is the focus of this research paper. Prior Research Factors including urbanization, environmental stresses due to climate change, and demand for more livable built environments are creating challenges for cities to satisfy the needs of an increasing urban population (Bauer et al., 2015; Best, 2016; Khan et al., 2017; O’Neill et al., 2017). This imperative is urging urban and infrastructure planners to design more sustainable infrastructure systems that can maintain and improve the livability of cities (Arup, 2016; SF Environment, 2018). However, concerning the focus of this study, literature shows several obstacles to achieving more sustainable water and energy systems in urban areas; 1. Disconnected modeling of supply and demand: This disconnect results in a missed opportunity to design more sustainable systems by leveraging integrated supply and demand optimization (Manfren et al., 2011; Keirstead et al., 2012; Best et al., 2015; Wang et al., 2018), 2. Isolated design of infrastructure: This isolation overlooks the interdependence between different infrastructure systems and the opportunity to increase the efficiency of the overall urban system by exploiting this interconnection (Howells and Rogner, 2014; Wu et al., 2015; Khan et al., 2017; Saidi et al., 2018), 3. Qualitative assessment of economic and environmental outcomes of planning: The application of qualitative assessment, rather than quantitative metrics, yields inefficient designs with suboptimal performance (Coutts et al., 2008; Keirstead et al., 2012; Eicker et al., 2015; Best, 2016; Hukkalainen et al., 2017). To address these deficiencies in the context of urban water and energy systems, a framework is needed to optimize the supply and demand of infrastructure systems concurrently (Manfren et al., 2011; Keirstead et al., 2012; Best et al., 2015; Wang et al., 2018; Bakhtiari et al., 2020), integrate the design of urban water and energy infrastructure (Siddiqi and Anadon, 2011; Rodriguez et al., 2013; Bauer et al., 2015; Khan et al., 2017; United Nations, 2019), and provide quantitative feedback on the life-cycle performance of design alternatives (Keirstead et al., 2012; Best et al., 2015; Eicker et al., 2015). This paper develops such a framework to design the supply and demand of integrated wastewater treatment and energy infrastructure for urban neighborhoods. The framework designs infrastructure systems at the neighborhood scale and on an hourly basis following the recommendations by Hawkes and Leach (2005), Jaccard (2006), Evins et al. (2011), and Best et al. (2015). Co-optimizing Supply and Demand in Energy Systems Jaccard (2006) defined energy system as “the combined processes of acquiring and using energy in a given society or economy.” Manfren et al. (2011), Keirstead et al. (2012), and Allegrini et al. (2015) reviewed 400+ articles and tools on modeling supply and demand in urban energy systems, and concluded that frameworks must be developed to concurrently optimize energy supply and demand technologies at an urban scale. These frameworks can enable designers to make urban energy systems which are more efficient than systems created using traditional design methods (Manfren et al., 2011; Allegrini et al., 2015; Best, 2016). To address this requirement, Best et al. (2015) made a framework to simulate and optimize the energy supply systems and the building mix of an urban district composed of 100– 1,000 neighboring buildings. As a case study, Best et al. (2015) used NSGA-II Genetic Algorithm (Deb et al., 2002) to optimize the building mix and the combined cooling, heating, and power (CCHP) plant for an arbitrary development in San Francisco for minimum life-cycle cost (LCC), minimum greenhouse gas emissions (GHG), and maximum energy efficiency. The simulation successfully generated many neighborhoods with desirable life cycle costs, zero and near-zero operational GHG emissions, and energy efficiencies more than 70%. Best et al. took an essential step in integrating the optimization of the supply and demand of energy and numerically evaluating the infrastructure and urban planning. However, this framework and its successors (Best et al., 2019; Rezazadeh Kalehbasti and Lepech, 2021) did not consider the non-energy infrastructure. Wu et al. (2018) followed the method proposed by Best et al. (2015) and added simplified pumping and heat losses as functions of pipe dimensions. Wu et al. optimized the building mix and Combined Heating and Power (CHP) engine for an arbitrary neighborhood in Shanghai, China. More recently, Waibel et al. (2019) developed a framework for parametrically optimizing buildings and supply technologies in an urban setting. They optimized the height and geometry of four office buildings in Zurich, Switzerland. Supply systems for electricity, space heating, hot water, and cooling were composed of electricity and heat generators, an absorption chiller, and storage technologies. Waibel et al. developed a nested bi-level optimization routine to avoid direct multi-objective optimization and used it to minimize the life cycle cost and carbon emissions of the system. They also simplified the timescale for the optimization from an entire year to only 6 weeks. Similar to Best et al. (2015) and Wu et al. (2018), this paper focused only on energy infrastructure, and did not consider the water system and designing an integrated water-energy infrastructure. The Water-Energy Nexus Until recently, urban water and energy infrastructure systems were planned and managed independently (Howells and Rogner, 2014). However, urban infrastructures are becoming more interdependent in the face of mutual challenges including aging, population growth, shrinking resources, extreme events, and climate change (Bauer et al., 2015; Saidi et al., 2018; Moazeni et al., 2020). In particular, “integrated water and energy planning” has gained global public and scholarly attention due to recent difficulties faced by many countries to secure sustainable water and energy resources (Rodriguez et al., 2013; Bauer et al., 2015; Khan et al., 2017; United Nations, 2019; Huang et al., 2020). This concept, dubbed the “water-energy nexus,” focuses on the interrelations between production, transmission, and consumption of water and energy (Siddiqi and Anadon, 2011; Bauer et al., 2015; Dai et al., 2018). Water used for power plant cooling accounts for half of the freshwater withdrawals in the US (World Economic Forum Water Initiative, 2012). Meanwhile, water scarcity and growing demands require new sources of freshwater and more efficient technologies to treat water and generate energy (Luck et al., 2015; Khan et al., 2017). Wastewater treatment using the wasted heat and electricity of a power plant has shown to be effective in: 1. reducing the need for power plant cooling and, consequently, the required cooling water (Khan et al., 2017; Gingerich and Mauter, 2018), 2. improving the energy efficiency of the integrated water-energy system by increasing the amount of useful work done per unit input fuel (Khan et al., 2017; Gingerich and Mauter, 2018), 3. providing a fresh and “renewable” source of potable/irrigation water for cities (Cath et al., 2009; Guo and Englehardt, 2015; Atab et al., 2016), 4. reclaiming the wastewater and mitigating the environmental repercussions of discharging it into receiving waters (McGovern and Bastian, 2009), and 5. creating a potential revenue stream for cities through selling the reclaimed water (Dayton et al., 2016). Many studies on the water-energy nexus assess the water consumed in different processes involved in energy generation (e.g., Bouckaert et al., 2014; Khan et al., 2017; Murrant et al., 2017), or the energy consumed or produced during desalination or water treatment (e.g., Al-Karaghouli and Kazmerski, 2013; EPA, 2013; Gude, 2015; Buonocore et al., 2018). A subset of these studies examines the direct integration of power plants and desalination/water-treatment facilities. A part of these works focuses on implementing small-scale combined heating and power (CHP) or combined cooling, heating, and power (CCHP) plants inside existing water or wastewater treatment facilities to use the biogas from digestion processes (Chacartegui et al., 2013; Caceres and Alca, 2016; Mehr et al., 2018; MosayebNezhad et al., 2018). Other researchers have studied CHP/CCHP plants powering the desalination processes, also called dual-purpose or water-power plants. Examples of these articles are found in Ferreira et al. (2010), Xianli et al. (2014), González-Bravo et al. (2017), and Mata-Torres et al. (2019). Of specific interest, Zhou et al. (2015) modeled a wastewater treatment system based on forward osmosis (FO), which used the waste-heat from a thermal power generator to recover the draw solution of the FO process. Zhou et al. concluded that the FO process can treat the boiler makeup water and desulfurize the flue gas of all power plants in the US using the waste heat from the plants. The detailed modeling in this study provides evidence for the feasibility of combining a membrane-based treatment system with a power plant to exploit the waste-heat from the facility for wastewater treatment. In another study, Gabriel et al. (2016) investigated the techno-economic feasibility of several use-cases for excess heat from industrial processes. Gabriel et al. modeled power and cooling generation, as well as seawater desalination, using multi-effect and reverse osmosis processes to leverage industrial waste heat. More recently, Gingerich and Mauter (2018) studied 66 retrofit configurations to comply with scenarios of air and wastewater emission regulations (planned for 2030) for a typical coal-fired power plant. They combined several carbon capture and wastewater treatment technologies to retrofit the plant and use the electricity or residual heat and steam generated by the plant. The potential revenue under each scenario was then used to evaluate the combinations. The authors concluded that under the strictest regulation scenario, maximum revenue would result from allocating waste heat to amine-based carbon capture and allocating electricity to a mechanical vapor recompression water treatment system. This study is one of few in which the heat and electricity consumption of modern wastewater treatment technologies (including FO) are used to complement the operation of a power plant. Notwithstanding, their optimization algorithm adopted a single objective, and the operation of the plant and the considered technologies were independent of time and ambient temperature. Therefore, the effects of variations in the energy and wastewater treatment load as well as the ambient temperature on the operation of the facility were not captured. Objective and Contributions CCHP plants are a recurrent example of integrated energy infrastructure in practice and research. These plants have shown up to 30% higher overall energy efficiency than comparable segregated energy systems (Rezaie and Rosen, 2012; DOE, n.d). Despite the high efficiency of a CCHP plant, its constant power-to-heat ratio often causes electricity and heating losses (Díaz et al., 2010), as the electricity and heat demanded from the plant to power the network throughout the day do not necessarily align with this fixed ratio. Studies have shown that a wastewater treatment system located within or near the CCHP plant can effectively exploit any “excess” heat and electricity (Elimelech and Phillip, 2011; Zhou et al., 2015), providing an opportunity to design and optimize the water treatment and energy systems concurrently. Given growing water scarcity in many urban areas around the globe, this integration is important for curtailing the fresh water withdrawal used for dissipating the excess heat due to energy generation (Luck et al., 2015; Khan et al., 2017; Energy Information Administration, 2019) and providing decentralized wastewater treatment systems at the neighborhood scale. To realize this opportunity, this paper proposes a framework to design and optimize the demand and supply of integrated energy and water systems (water-energy nexus) for environmental and economic sustainability in an urban neighborhood on an hourly basis. The contributions of this paper are as follows: 1. Hourly water demand profiles of 21 building types: This paper creates, for the first time, the hourly water demand profiles for 21 building archetypes which represent more than 70% of the buildings in the US (Deru et al., 2011; Best et al., 2015), for the climate zone of San Francisco County, CA. This contribution is essential for integrating the design of different infrastructure systems with the water system at the neighborhood scale. Section Hourly Wastewater Treatment Demand details this contribution. 2. Models for hourly energy consumption and life-cycle cost of FO-RO and FO-MD wastewater treatment systems: This paper introduces computational models of the specific energy consumption, as well as the capital and operational costs of, forward osmosis-reverse osmosis (FO-RO) and forward osmosis-membrane distillation (FO-MD) treatment systems as functions of the temperature and flow of the input wastewater. These compact wastewater treatment systems can be located within the energy plant, can use the waste heat and electricity from the CHP engine to operate, and can output water ranging in quality from irrigation to drinking. These models provide a straightforward method to include these high-performance treatment systems in largescale simulations of the water system, and enable integrated design of a wastewater treatment system or desalination system with the energy infrastructure. Section Wastewater Treatment Module details the developed models. 3. Integrated approach to designing the wastewater treatment and energy system: The framework proposed in this paper is the first of its kind to concurrently design the optimal building mix of an urban neighborhood and the systems supplying the neighborhood with wastewater treatment, cooling, heating, and electricity on an hourly basis. The proposed framework is expected to inform urban planners and infrastructure designers of a “range” of optimal configurations, e.g., in terms of building mix or floor area ratio, for designing a neighborhood, thereby allowing them to flexibly select infrastructure systems and enact zoning rules leading to more sustainable urban neighborhoods when measured in terms of environmental and economic sustainability metrics. Unlike the typical approach where the energy system is designed independently from the wastewater treatment system, the proposed method allows for designing urban neighborhoods with lower life-cycle cost and emissions by reducing the energy loss and by improving the overall efficiency of the integrated energy system-wastewater treatment. The accuracy of the outputs of this integrated framework depends directly upon the accuracy of the models simulating the supply technologies, i.e., the CCHP engines and the wastewater treatment system, and the demand systems, i.e., the building models. MODEL DEVELOPMENT The model presented here extends and improves a previous framework created by Best et al. (2015) in Python programming language (Van Rossum, 2007). The original framework by Best et al. (2015) was able to simulate the supply and demand of energy for a community given its building uses and energy supply equipment. Three main modules comprised the original framework: (1) energy demand modeler, (2) energy supply modeler, and (3) analyzer and optimizer. The first component, “energy demand modeler,” could simulate the annual hourly cooling, heating, and electricity demands from several building archetypes and the associated losses at the supply and distribution levels. The “energy supply modeler” could model the hourly performance of a range of combined heating and power (CHP) engines and chillers given the ambient conditions (e.g., ambient temperature and pressure) as well as heating, cooling, and electric loads imposed on the engines. The final component of the framework, “analyzer and optimizer,” could (1) evaluate the lifetime performance of the supply equipment in terms of the defined optimization objectives (e.g., annual carbon emissions, life-cycle cost of equipment) and (2) using an evolutionary algorithm generate a set of neighborhoods optimized with respect to the optimization objectives. This study extends the demand modeler from the framework mentioned above by enabling it to model the hourly wastewater treatment demands for the 21 building archetypes presented by Best et al. (2015). This work also enables the supply-side module in the mentioned framework to model wastewater treatment systems and thermal energy storage. The former is done by adding three wastewater treatment technologies to the set of supply models developed by Best et al. (2015): two modern hybrid treatment technologies, namely Forward Osmosis-Reverse Osmosis (FO-RO) and Forward OsmosisMembrane Distillation (FO-MD), and one conventional central treatment. These treatment technologies augmented with a set of pre-treatment and post-treatment techniques can treat input municipal wastewater up to a potable quality. Finally, the triple optimization objectives in the original framework— annual carbon emissions, total fuel cycle energy efficiency, and undiscounted life-cycle cost of equipment—are reduced here to two modified objectives—discounted life-cycle social cost of carbon and discounted life-cycle cost of equipment, both normalized by the total gross-floor area of the buildings in the neighborhood. Figure 1 shows the flow diagram of the proposed framework, showing the three main components (supply module, demand module, and analysis and optimization module) and their subcomponents. The following provides the semi-formal formulation of the optimization problem solved by the proposed framework: Objective Functions FIGURE 1 | Flow diagram of the proposed framework. Minimize {Life-cycle cost (in $/m <sup>2</sup> ), Social cost of carbon (in $/m <sup>2</sup> )} Decision Variables Number of each building type (21 integers) Type of the CHP engine (integer ǫ [1,32]) Type of the chiller (integer ǫ [1,16]) Type of the wastewater treatment system (integer ǫ [1,3]) Constraints Sum of all building footprints must be less than 0.7 km <sup>2</sup> Sum of all floor areas (i.e., total GFA) must be larger than 0.1 km <sup>2</sup> but less than 3.3 km <sup>2</sup> The following sections detail the demand module, supply module, and optimization objectives. Hourly Wastewater Treatment Demand This work enables the demand module from Best et al. (2015) to model the hourly wastewater treatment demands for the 21 building archetypes originally discussed by Best et al. (2015) which represent more than 70% of the buildings in the US (Deru et al., 2011). Table 1 shows a summary of the specifications for these 21 building archetypes. The hourly wastewater outflow for these building archetypes were modeled by converting the potable water demand for each building into the wastewater generated by the building. Table A2 in Supplemenatry Material lists the references used to create the profiles of hourly water use for these 21 building archetypes over the 12 months of the year. As mentioned later in this article, San Francisco, CA, is selected as the location of the test case study; hence, studies on buildings located in San Francisco or in areas of California with similar climates to San Francisco, e.g., Santa Barbara (“IECC Climate Zone Map | Building America Solution Center”, 2012), were used for synthesizing the water demand profiles for the 21 The average daily water use (Q <sup>d</sup> w <sup>)</sup> <sup>of</sup> <sup>mixed-use</sup> <sup>building</sup> <sup>M1</sup> (symbol explained in Table 1 ) was computed by combining the average daily water uses of buildings R1 and C2 proportional to the gross-floor-area assigned to each building type, i.e., 8,621 m <sup>2</sup> of R1 and 784 m <sup>2</sup> of C2, based on the definition of this mixeduse building archetype (Best et al., 2015). The same approach was building archetypes. The water demand was considered only for indoor use—outdoor use, comprised mostly of irrigation use, was disregarded in this study. In converting water use to wastewater outflow, the consumptive use of water in the buildings was conservatively assumed negligible, i.e., the outflow of wastewater was taken equal to the inflow of potable water. The average daily water use of the four “residential” building types were calculated using Equation (1). <sup>d</sup> w <sup>=</sup> <sup>GFA ∗</sup> <sup>RESa ∗</sup> <sup>Qc</sup> w Q <sup>d</sup> w <sup>c</sup> w (1) here Q <sup>d</sup> w <sup>is</sup> <sup>the</sup> <sup>average</sup> <sup>daily</sup> <sup>indoor</sup> <sup>water</sup> <sup>use</sup> <sup>(m3/h),</sup> <sup>GFA</sup> <sup>is</sup> the total gross floor area of the building (in m <sup>2</sup> ), RES <sup>a</sup> is the average number of residents per unit area (person/m <sup>2</sup> ), and Q <sup>c</sup> w here Q <sup>d</sup> w w is the average daily indoor water use per capita for the building (m <sup>3</sup> /h/person). For this equation, for each different building type, the average number of residents per unit area was extracted from Deru et al. (2011) and the average daily indoor water use per capita was extracted from Carollo Engineers (2015). The average daily water use (Q <sup>d</sup> w <sup>)</sup> <sup>for</sup> <sup>all</sup> <sup>the</sup> <sup>other</sup> <sup>building</sup> <sup>types,</sup> <sup>except</sup> <sup>for</sup> daily water use (Q <sup>d</sup> w <sup>)</sup> <sup>for</sup> <sup>all</sup> <sup>the</sup> <sup>other</sup> <sup>building</sup> <sup>types,</sup> <sup>except</sup> <sup>for</sup> the mixed-use buildings, were calculated using Equation (2). Q <sup>d</sup> w <sup>d</sup> w <sup>=</sup> <sup>GFA ∗</sup> <sup>Qa</sup> w <sup>a</sup> w (2) here Q <sup>a</sup> w <sup>is the average daily indoor water use per unit area of the</sup> building (m <sup>3</sup> /h/m <sup>2</sup> ) based on US EIA (2017). TABLE 1 | Specifications of each building type—modified from Best et al. (2015). Symbol Type Building Gross floor area (m <sup>2</sup> ) Number of stories R1 Res Residential high-rise condo 9,405 12 R2 Res Residential midrise apartment 3,135 4 R3 Res Residential townhouse 392 2 R4 Res Residential single-family house 223 1 O1 Off Large office 46,320 12 O2 Off Medium office 4,982 3 O3 Off Small office 511 1 C1 Com Retail strip mall 2,090 1 C2 Com Stand alone retail 2,294 1 C3 Com Full-service restaurant 511 1 C4 Com Quick-service restaurant 232 1 C5 Com Supermarket 4,181 1 I1 Ind Warehouse 4,835 1 L1 Hos Large hotel 11,345 6 L2 Hos Small hotel 4,013 4 H1 Med Hospital 22,422 5 H2 Med Outpatient building 3,804 3 E1 Edu Primary school 19,592 1 E2 Edu Secondary school 6,871 2 M1 Res+Com Mixed use condo and retail 9,405 12 M2 Off+Com Mixed use large office and retail 46,320 12 followed for computing the average daily water use for mixed-use building M2: the average daily water uses of buildings O1 and C2 were combined proportional to the gross-floor-area assigned to each, i.e., 8,621 m <sup>2</sup> of O1 and 784 m <sup>2</sup> of C2. Assuming the same water demand profile for every day in a month, the wastewater demand of each building type at each hour was calculated using Equation (3). TABLE 2 | Average daily water use for all the 21 building archetypes. Building type Avg daily use (m <sup>3</sup> /h) Building type Avg daily use (m <sup>3</sup> /h) Q <sup>h</sup> ww <sup>, m</sup> <sup>d</sup> w <sup>∗</sup> <sup>Ch ∗</sup> <sup>Cm</sup> (3) <sup>h</sup> ww <sup>, m</sup> = Q <sup>d</sup> w here Q <sup>h</sup> ww <sup>, m</sup> here Q <sup>h</sup> ww <sup>, m</sup> <sup>is the wastewater outflow at hour h during month m</sup> (m <sup>3</sup> /h), Q <sup>d</sup> w <sup>is the average daily indoor water use (m3/h). Ch</sup> <sup>and</sup> (m <sup>3</sup> /h), Q <sup>d</sup> w <sup>is the average daily indoor water use (m3/h). Ch</sup> <sup>and</sup> C <sup>m</sup> are the hourly and monthly coefficients for converting the average daily water use to water used at hour h and in month m, respectively. The assumption of constant daily water demand profiles for each day in a month enabled us to construct hourly profiles of water demand over the entire year across several building types within the same climatic region. We recognize that such profiles do change but found that this information is lacking in the technical and academic literature. Tables 2 - 4 list Q <sup>d</sup> w <sup>,</sup> <sup>Ch</sup> R1 2.1 C5 0.2 R2 0.7 I1 0.1 R3 0.1 L1 2.2 R4 0.1 L2 0.8 O1 3.1 H1 5.2 O2 0.3 H2 0.3 O3 0.0 E1 1.3 C1 0.1 E2 0.5 C2 0.2 M1 2.0 C3 0.9 M2 3.2 C4 0.3 pre-treatment and post-treatment processes can treat municipal wastewater to a drinking quality. “ Appendix B : Wastewater Characteristics” in Supplementary Material shows the assumed composition of the input wastewater, the required quality of the output drinking water, and discusses the treatment capabilities of FO-RO and FO-MD systems. The advanced water/wastewater treatment technologies Forward Osmosis (FO), Reverse Osmosis (RO), and Membrane Distillation (MD) have recently received considerable attention from researchers and practitioners for water reuse applications (Alkhudhiri et al., 2012; Council, 2012; McCutcheon and Huang, 2013; Coday et al., 2014; Blandin et al., 2015; Shaffer et al., 2015; and C <sup>m</sup>, respectively, for all the 21 building archetypes. <sup>d</sup> w <sup>,</sup> <sup>Ch</sup> Wastewater Treatment Module This work enables the framework proposed by Best et al. (2015) to simulate wastewater treatment processes at the neighborhood scale. For this purpose, three wastewater treatment technologies are modeled and added to the supply module of the original framework: two membrane-based treatment technologies, namely FO-RO and FO-MD, and one conventional central treatment plant (CTP). These treatment systems augmented with TABLE 3 | Monthly coefficients for all the 21 building types (average of all the 12-month coefficients for each building equals 1). Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec R1 0.97 0.92 0.84 0.94 0.89 1.00 1.14 1.05 1.15 1.08 1.02 0.99 R2 1.01 0.93 0.88 0.97 0.93 1.03 1.10 0.99 1.14 1.02 1.03 0.96 R3 0.98 0.90 0.85 0.94 0.92 1.04 1.14 1.04 1.19 1.04 1.02 0.95 R4 0.98 0.90 0.85 0.94 0.92 1.04 1.14 1.04 1.19 1.04 1.02 0.95 O1 0.53 0.55 0.97 0.79 1.16 1.60 0.92 1.47 1.62 0.73 1.14 0.51 O2 0.53 0.55 0.97 0.79 1.16 1.60 0.92 1.47 1.62 0.73 1.14 0.51 O3 0.53 0.55 0.97 0.79 1.16 1.60 0.92 1.47 1.62 0.73 1.14 0.51 C1 0.97 0.78 0.93 0.93 1.03 1.11 1.16 1.10 0.98 0.97 1.04 0.99 C2 0.97 0.78 0.93 0.93 1.03 1.11 1.16 1.10 0.98 0.97 1.04 0.99 C3 0.88 0.71 0.70 0.74 0.93 0.85 1.26 1.30 1.45 1.39 1.01 0.78 C4 0.88 0.71 0.70 0.74 0.93 0.85 1.26 1.30 1.45 1.39 1.01 0.78 C5 0.97 0.78 0.93 0.93 1.03 1.11 1.16 1.10 0.98 0.97 1.04 0.99 I1 0.53 0.55 0.97 0.79 1.16 1.60 0.92 1.47 1.62 0.73 1.14 0.51 L1 0.94 0.99 1.14 1.06 1.05 1.03 1.04 1.00 0.95 0.96 0.95 0.90 L2 0.94 0.99 1.14 1.06 1.05 1.03 1.04 1.00 0.95 0.96 0.95 0.90 H1 0.80 0.75 1.00 0.99 1.13 1.09 1.14 1.11 1.12 1.07 0.90 0.89 H2 0.80 0.75 1.00 0.99 1.13 1.09 1.14 1.11 1.12 1.07 0.90 0.89 E1 1.25 1.11 1.09 1.03 1.29 0.55 0.53 0.44 1.16 1.28 1.17 1.10 E2 1.25 1.11 1.09 1.03 1.29 0.55 0.53 0.44 1.16 1.28 1.17 1.10 M1 0.97 0.92 0.84 0.94 0.89 1.00 1.14 1.05 1.15 1.08 1.02 0.99 M2 0.53 0.55 0.97 0.79 1.16 1.60 0.92 1.47 1.62 0.73 1.14 0.51 TABLE 4 | Hourly coefficients for all the 21 building types in “percent of total daily water use.” Hour of the day (24-h basis) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 R1 2.7 1.8 1.3 1.1 1.0 1.8 3.8 4.9 5.6 6.0 6.0 5.3 5.5 4.9 4.4 4.2 4.3 4.5 5.7 5.7 5.5 5.5 4.6 3.9 R2 2.7 1.8 1.3 1.1 1.0 1.8 3.8 4.9 5.6 6.0 6.0 5.3 5.5 4.9 4.4 4.2 4.3 4.5 5.7 5.7 5.5 5.5 4.6 3.9 R3 1.9 1.4 1.2 1.1 1.4 2.6 5.0 6.6 6.4 6.4 5.8 5.4 4.9 4.3 4.0 4.3 4.6 4.9 5.4 5.5 5.2 4.8 4.1 3.0 R4 1.9 1.4 1.2 1.1 1.4 2.6 5.0 6.6 6.4 6.4 5.8 5.4 4.9 4.3 4.0 4.3 4.6 4.9 5.4 5.5 5.2 4.8 4.1 3.0 O1 5.2 4.8 5.8 5.2 4.5 3.4 3.1 2.6 3.7 5.7 4.5 4.7 3.7 3.9 2.8 4.2 2.3 2.9 2.2 2.5 4.6 6.2 5.7 5.8 O2 5.2 4.8 5.8 5.2 4.5 3.4 3.1 2.6 3.7 5.7 4.5 4.7 3.7 3.9 2.8 4.2 2.3 2.9 2.2 2.5 4.6 6.2 5.7 5.8 O3 5.2 4.8 5.8 5.2 4.5 3.4 3.1 2.6 3.7 5.7 4.5 4.7 3.7 3.9 2.8 4.2 2.3 2.9 2.2 2.5 4.6 6.2 5.7 5.8 C1 1.3 2.5 2.0 2.8 2.2 1.6 1.9 2.1 3.2 4.2 6.1 6.8 6.9 8.0 8.4 6.6 6.2 6.5 5.4 5.1 4.4 3.3 1.7 1.0 C2 1.3 2.5 2.0 2.8 2.2 1.6 1.9 2.1 3.2 4.2 6.1 6.8 6.9 8.0 8.4 6.6 6.2 6.5 5.4 5.1 4.4 3.3 1.7 1.0 C3 2.2 4.7 1.2 3.5 3.2 1.8 1.8 2.0 4.1 4.2 4.5 5.2 5.3 5.8 6.3 4.7 3.9 4.4 5.0 5.2 5.8 5.6 5.5 4.3 C4 2.2 4.7 1.2 3.5 3.2 1.8 1.8 2.0 4.1 4.2 4.5 5.2 5.3 5.8 6.3 4.7 3.9 4.4 5.0 5.2 5.8 5.6 5.5 4.3 C5 2.7 3.1 3.5 5.6 5.7 4.8 3.9 4.0 4.2 4.2 4.3 4.8 4.8 4.7 4.6 4.5 4.4 4.3 4.4 4.2 3.9 3.7 3.1 2.8 I1 5.2 4.8 5.8 5.2 4.5 3.4 3.1 2.6 3.7 5.7 4.5 4.7 3.7 3.9 2.8 4.2 2.3 2.9 2.2 2.5 4.6 6.2 5.7 5.8 L1 2.8 2.6 2.4 2.2 2.5 3.1 4.0 6.1 5.4 5.0 5.5 4.9 4.7 4.8 4.8 4.9 4.6 4.5 4.6 4.4 3.9 4.0 4.4 3.9 L2 2.8 2.6 2.4 2.2 2.5 3.1 4.0 6.1 5.4 5.0 5.5 4.9 4.7 4.8 4.8 4.9 4.6 4.5 4.6 4.4 3.9 4.0 4.4 3.9 H1 2.6 2.6 2.5 2.4 2.7 3.0 3.1 3.9 4.7 6.1 6.4 5.2 5.2 6.3 6.6 5.8 5.2 4.2 4.7 4.9 3.1 2.9 3.1 2.8 H2 2.6 2.6 2.5 2.4 2.7 3.0 3.1 3.9 4.7 6.1 6.4 5.2 5.2 6.3 6.6 5.8 5.2 4.2 4.7 4.9 3.1 2.9 3.1 2.8 E1 5.1 5.0 4.3 4.6 4.3 3.6 3.7 4.6 4.0 2.8 4.1 4.3 2.8 4.3 4.0 4.4 3.7 4.0 3.9 4.4 4.4 5.0 4.5 4.7 E2 5.1 5.0 4.3 4.6 4.3 3.6 3.7 4.6 4.0 2.8 4.1 4.3 2.8 4.3 4.0 4.4 3.7 4.0 3.9 4.4 4.4 5.0 4.5 4.7 M1 2.7 1.8 1.3 1.1 1.0 1.8 3.8 4.9 5.6 6.0 6.0 5.3 5.5 4.9 4.4 4.2 4.3 4.5 5.7 5.7 5.5 5.5 4.6 3.9 M2 5.2 4.8 5.8 5.2 4.5 3.4 3.1 2.6 3.7 5.7 4.5 4.7 3.7 3.9 2.8 4.2 2.3 2.9 2.2 2.5 4.6 6.2 5.7 5.8 Guizania et al., 2019). This is partly because these technologies are more compact, require lighter maintenance, are easier to automate, and can more effectively remove pathogens compared to traditional treatment systems (Council, 2012). These systems have consistent effluent quality and can potentially reduce the chemical demand of the treatment process (Council, 2012). Such qualities make these technologies ideal for implementing at a combined cooling, heating, and power (CCHP) plant with limited space, and for treating domestic wastewater to drinking water quality—a procedure which requires robust treatment processes. RO and MD membranes suffer irreversible fouling (Husnain et al., 2015a,b; Kim et al., 2018). This phenomenon gradually reduces the water flux, demanding frequent replacement of the membrane. FO can largely mitigate this problem when used as a pretreatment step for RO (Cath et al., 2005; Zaviska and Zou, 2014; Kim et al., 2018) and MD (Husnain et al., 2015a,b). FO prevents the foulants from reaching the RO or MD membrane, whereas the resulting fouling of the FO membrane is mostly reversible and can be resolved with backwashing and chemical cleaning (Husnain et al., 2015a,b). Further, FOpretreatment filters the bacteria, viruses, and organic and inorganic compounds (Zaviska and Zou, 2014; Akther et al., 2015) making for a more robust treatment. “FO-RO” ( Figure 2 ) and “FO-MD” ( Figure 3 ) are the hybrid treatment processes resulting from combining FO process with RO and MD. The wastewater treatment module in the framework introduced here incorporates these two systems as the main “integrated” wastewater treatment technologies, i.e., treatment technologies collocated with the energy supply equipment. This module takes as its input the volume of hourly wastewater produced by the neighborhood and the ambient temperature (taken as the temperature of the wastewater). Assuming a 24-h storage capacity for the input wastewater, the module calculates the maximum membrane area required to treat the 24-h movingaverage of the inflow over the entire year. This number is used to calculate the capital and operational expenses of the treatment systems. The treatment module also outputs (1) the hourly electricity and heat demand of the selected treatment models (which will be supplied by the CHP engines), and (2) the operational electricity requirement as well as the initial and operational expenses associated with the pre-treatment processes, e.g., screening, and the post-treatment processes, e.g., disinfection and pH adjustment. The calculation of life-cycle expenses for the treatment modules also considers the costs associated with chemicals, labor, retentate handling, and all the other expenses required for normal operation of a treatment plant (Al-Obaidani et al., 2008; McGivney and Kawamura, 2008). Both treatment models consume electricity while the FOMD also consumes low-grade heat to treat the wastewater. This characteristic was the other reason for selecting these systems to be integrated with the CCHP plant: these wastewater treatment technologies can consume the unused heat and electricity generated by the CHP engine, and thus mitigate the loss of primary energy and increase the efficiency of the integrated CCHP-wastewater treatment plant over the levels achievable using segregated systems. FO-RO only requires electricity to operate while FO-MD mostly requires heat: FO-RO consumes 3.34 kWh of electricity, while FO-MD consumes 33.2 kWh of heat and 0.55 kWh of electricity to treat 1 m <sup>3</sup> of input wastewater at 20 <sup>◦</sup> C. The optimization algorithm is expected to favor FO-RO for treating the wastewater in cases with large amounts of extra FIGURE 2 | Schematic diagram of the FO-RO hybrid wastewater treatment system. FIGURE 3 | Schematic diagram of the FO-MD hybrid wastewater treatment system. The hot water produced by the CHP engine acts as the “Heat Source”. electricity (generated by the CHP engine), and to favor FO-MD in cases with large quantities of extra heat. As Figure 3 shows, the excess heat produced by the CHP engine will be used to heat the feed water to the MD process, while the ambient air will be used to cool the product water and concentrated draw solution. The induced temperature difference will provide the vapor pressure difference required to run the MD process. “ Appendix C : FORO” and “ Appendix D : FO-MD” in Supplementary Material detail the mathematical models developed for simulating the FO-RO and FO-MD systems, respectively, with overall water recovery ratios (RR) of 50%. In addition to the integrated treatment systems, a conventional wastewater treatment plant was modeled according to the treatment plant serving the location of the case study in San Francisco. “ Appendix E : CWWTP” in Supplementary Material describes the model developed for computing the electricity requirements and expenses associated with this central plant. The wastewater treatment module takes as its input the aggregated hourly demands of the neighborhood for wastewater treatment, and computes the required cost and electricity (1.1 kWh per 1 m <sup>3</sup> of input wastewater) to process this wastewater as well as the emissions due to the treatment process. The resulting heating and electric loads are added to the rest of the heating and electric loads imposed on the CHP engine. This module also considers the costs of chemicals, labor, bio-solid and retentate handling, and all the other expenses required for normal operation of a treatment plant (McGivney and Kawamura, 2008). Thermal Energy Storage Model This study enables the supply-side modeler from Best et al. (2015) to model Sensible Thermal Energy Storage (TES). Hot water storage tanks are selected and modeled for this purpose: hot water generated by the CHP engine for heating with a source temperature of 85 <sup>◦</sup> C (Best, 2016) is assumed to get stored in the TES and discharged to satisfy the heating loads when necessary. Four primary factors contribute to the heat loss in a storage tank (Dincer, 2002): heat loss to the surrounding environment, heat conduction between the segments of the storage fluid with higher and lower temperatures (due to the stratified storage of hot water), vertical conduction in the tank wall, and mixing of water during charging and discharging. “Capacity model,” a common loss model (Schütz et al., 2015), assumes the hot water tank to contain a homogenous fluid. With this assumption, the thermal storage at each time-step can be calculated using Equation (4): Objective Functions The original objective functions defined by Best et al. (2015) comprised undiscounted life-cycle cost of equipment, annual CO2 emissions of equipment, and total-fuel-cycle energy efficiency. In this study, the energy efficiency metric was removed from the set of objectives, as it was considered intangible and with no direct monetary or environmental consequences which were not captured by the other two objectives. Reducing the number of optimization objectives lowered the complexity of the optimization algorithm: now, the algorithm needs to inspect only two objectives rather than three when comparing different neighborhoods and finding the most optimal ones. Further, the two optimization objectives for carbon emissions and life-cycle cost were normalized by the GFA of the neighborhood. Without this normalization, the optimization algorithm would only favor neighborhoods with low emissions or low operational costs regardless of their size: e.g., a small neighborhood with 10,000 ft <sup>2</sup> of total GFA, would be equivalent to a 1,000,000 ft <sup>2</sup> neighborhood if they both have the same values of annual carbon emissions and life-cycle cost. However, the larger neighborhood is satisfying a much larger demand in a far more sustainable way than the smaller neighborhood. Normalization addresses this error, enabling the optimization method to achieve optimal (sustainable) neighborhoods with a variety of sizes. Also, to make more tangible the environmental impacts of building and operating the neighborhood, Social Cost of Carbon (SCC) was used to convert the annual carbon emissions into dollar values representing the social, environmental, and economic damage resulting from CO2 emissions (EPA, 2016). Among the different models used to calculate SCC, the version created by US Environmental Protection Agency (EPA) was chosen to be used here (EPA, 2016). “ Appendix F : Social Cost of Carbon” in Supplementary Material presents the regression function used to calculate the SCC for each year over the design period. In this new objective function, the carbon emissions associated with the construction of the equipment were also accounted for in addition to the operational emissions. The construction costs were converted into equivalent carbon emissions using conversion factors from EIO_LCA database (Carnegie Mellon University, 2007) for the construction of utilities: 243 Tons of CO2e was assumed to result from 1 million 2007 USD worth of economic activity. TEST CASE AND DISCUSSION Introduction To showcase the capabilities of the proposed framework in cooptimization of supply and demand as well as integrated design of water and energy infrastructure, a case study was conducted based on that proposed by Best et al. (2015). Best et al. modeled a 160-acre greenfield development in Civic Center, San Francisco, and simulated the electricity, cooling, and heating demands of 21 building archetypes (presented in Table 1 ) using EnergyPlus ver. 8.0.0 (Crawley et al., 2001). Best et al. also modeled 32 CHP engines and 16 chillers as the set of supply equipment. The same 160-acre development, building archetypes, CHP engines, TES (t) = �1 - kv� ∗ (TES (t - 1) + �t.H <sup>in</sup> TES,t <sup>)</sup> (4) where TES is the energy stored in the TES at time t [in kW], kv is a temporal loss factor (assumed 0.0534% based on Schütz et al., 2015), �t is the time interval (1 h), and HTES <sup>in</sup>,t <sup>[in</sup> <sup>kW]</sup> <sup>is</sup> <sup>the</sup> net heat flow into the TES tank at time-step t (positive for net charging and negative for net discharging of the tank). Equation (5) was extracted from IEA-ETSAP and IRENA (2013) to calculate the capital costs of a TES tank. TESCAPEX [$] <sup>∼</sup> = 95 ∗ TESCap ∗ 1.17 (5) here, TESCap is the capacity of the TES [in MWh], and 1.17 is a factor converting 2008 USD to 2019 USD (CPI, 2020). The TES is sized to store enough hot water to satisfy 6 h of maximum aggregate heating demand from the buildings that is computed for each designed neighborhood. The unused heating, in the form of hot water, at each hour gets stored in the TES tank, and the stored hot water in the tank is the first resource responding to heating demand at each hour, i.e., TES has priority over the CHP engine for satisfying the heating demand. and chillers are considered in this study with the following modifications: (i) Hourly wastewater treatment demands were added to the set of energy demands of the buildings, (ii) Thermal Energy Storage and three wastewater treatment technologies (namely, FO-RO, FO-MD, and CWWTP) were added to the original set of supply models, and (iii) the optimization objectives were changed to GFA-normalized life-cycle cost of equipment and life-cycle social cost of carbon. The proposed model was run for two scenarios: (i) In the first one, the building mix and energy system were designed and optimized together, while a conventional central wastewater treatment plant (CWWTP) treated the wastewater from the buildings, and (ii) in the seconds scenario, the building mix, energy system, and wastewater treatment system were optimized and designed concurrently. In the first scenario, the grid was assumed to supply the electricity required by the CWWTP, and grid emissions for generating this electricity were attributed to the CWWTP. The emissions and expenses of the CWWTP were in turn attributed to the neighborhood in proportion to the ratio of the “average daily wastewater output of the neighborhood” to “57 MGD” (i.e., the actual average daily input of the treatment plant). Since the existing CWWTP serving the location of the case study, i.e., Southeast Treatment Plant (SF PUC, 2019), does not produce potable water, it was arbitrarily replaced by a conventional treatment plant of the same size but capable of producing potable water—as also explained in Appendix E : CWWTP Model in Supplementary Material . This modification was necessary to make the two scenarios comparable. In the seconds scenario, a combined CCHP-wastewater treatment plant (CCHP-WWTP) supplied the energy and wastewater treatment demand of the buildings. Both scenarios were designed for minimum life cycle cost of equipment (LCC) and minimum social cost of carbon (SCC). The LCC optimization objective incorporated the construction and discounted operation and maintenance costs of only the CCHP plant for the first scenario, and the entire CCHP-WWTP for the seconds. The SCC optimization objective considered the construction and discounted operation costs of carbon emissions associated with only the CCHP plant for the first scenario, and the entire CCHP-WWTP for the seconds. Both scenarios were simulated for 20 year of operation with a 3.5% discount rate. The neighborhoods generated by the optimization algorithm were compared in terms of their total (i.e., including those associated with the CWWTP) life cycle cost of equipment, operational and construction GHG emissions, types of supply technologies, and building mix among other metrics. The LCC and SCC calculations excluded the reuse and redistribution of the recovered water. The excess electricity generated during each hour was assumed to be sold back to the grid at 80% of the purchase price at that hour which was extracted from CAISO for year 2018 (California ISO, 2019). The hourly ambient temperature for the case study was extracted from TMY3 dataset for the San Francisco International Airport (Wilcox and Marion, 2008). Further, the grid emissions for each hour were extracted from Beyond Efficiency (Beyond Efficiency, 2017) for year 2016. Results and Analysis The two scenarios, namely scenario 1 (conventional design) and scenario 2 (integrated design), were simulated each using an Intel Xeon E5-2640v4 processor (10-core Broadwell, 2.40 GHz) with 800 MBs of effective memory use over 145 mins of CPU wall-clock time. The map method from Scoop library (HoldGeoffroy et al., 2014) was used to parallelize the map calls to Genetic Algorithm (GA) methods from Deap library (Fortin et al., 2012). The advantage of using a GA for solving this problem is that it does not require assignment of weights to either of the two objective functions, and instead enables simultaneous optimization of both objectives (Deb et al., 2002). The GA algorithm, NSGA-II, used the following optimization parameters based on the recommendations of Best et al. (2015): Number of generations = 1,000; Population = 200; Mutation Probability = 0.05; Similarity Parameter = 2.5; Crossover Probability = 0.75. Substituting series data processing with parallelized Numpy (Oliphant, 2006) operations, reducing the number of objective functions from three to two, and other minor technical upgrades cut the optimization runtime by 97% compared to the optimization with the same configurations done using the original framework in Best et al. (2015). Of the 200,000 neighborhoods produced by the GA algorithm for each scenario, 93,210 for scenario 1 and 87,644 for scenario 2 had admissible total GFA (i.e., less than 3,237,485 m <sup>2</sup> ) and site GFA (i.e., less than 647,497 m <sup>2</sup> ). These neighborhoods are called the “admissible neighborhoods” from this point on. Figure 4 shows the two GFA-normalized objective functions of the optimization, social cost of carbon vs. life-cycle cost, for all the admissible neighborhoods with SCC values less than 0.10 k$/m <sup>2</sup>, i.e., the 99.8th and 99.7th percentile of SCC across all neighborhoods in the first and the seconds scenario, respectively. Earlier generations of neighborhoods produced by the GA are plotted using symbols that are more transparent than the later ones. One outstanding observation from Figure 4 is that the optimization algorithm has successfully identified paths to designing neighborhoods with minimum LCC and SCC over consecutive generations: the dots (neighborhoods) closer to the origin (which has the ideal lowest SCC and LCC, i.e., 0 kg of lifetime CO2 emissions and $0 of life-cycle cost) are more opaque (belong to later generations) than the dots farther away from the origin. Figure 4 also offers an insight on the comparison between the two scenarios: the blue dots in the figure are generally located lower than their adjacent red dots. This implies that the integrated design scenario, scenario 2, has resulted in neighborhoods with generally lower SCC than those of conventional design, scenario 1, for the same values of LCC. Figure 5 shows the approximate Pareto fronts of the two scenarios for the objective functions, life-cycle cost and life-cycle social cost of carbon, highlighted in yellow. In the Pareto optimal solutions, the SCC values of the integrated approach seem to be about 1/3 the SCC values of the segregated approach, while the LCC values of these solutions are similar between the two FIGURE 4 | Life-cycle social cost of carbon vs. life-cycle cost of equipment for the individual neighborhoods (single dots on the plot), with SCCs less than 0.1 k$/m <sup>2</sup>, generated by the optimization algorithm for the analyzed scenarios. Neighborhoods generated in later generations by the Genetic Algorithm are shown more opaque than the earlier generations (Red dots: conventional design, blue dots: integrated design). scenarios. These two observations about the Pareto fronts comply with the general trends deduced in the previous paragraph. To get a better understanding of the distribution of performance metrics across the designs produced by the two scenarios, standard deviation (SD), mean (average), 25th percentile, 50th percentile (median), and 75th percentile of LCC, SCC, annual aggregated energy demand, and annual wastewater treatment demand for all the neighborhoods resulting from the two design scenarios were calculated— Table 5 shows the results. The annual aggregated energy demand for each neighborhood was calculated by summing the total electricity and heating demand of the buildings and supply equipment (including chillers and treatment systems) over 8,760 h of the year. In this table, “CCHP | CWWTP” denotes scenario 1, and “CCHP+WWT” denotes scenario 2. The numbers in Table 5 are unitless since the values of each metric for each variable, e.g., 25th percentile of LCC, for both scenarios are normalized by the value of the scenario 1. This facilitates comparing the statistical metrics of the seconds scenario against those of the first scenario by converting the metrics of the first scenario into unity. The results in Table 5 show that integrated design of energy and wastewater treatment systems has resulted in lower life-cycle carbon emissions and cost as well as lower annual energy and wastewater treatment demands compared to a separate approach to the design of these two infrastructure systems. The difference in life-cycle social cost of carbon is the most noticeable, with scenario 2 having a mean value 56% lower than scenario 1. The reduction in mean values of annual demands from scenario 1 to 2 is ca. 40%. Comparing the SDs of the two scenarios also offers another observation: the optimal neighborhoods produced by the GA under scenario 2 are closer (more uniform) in terms of the four parameters inspected in Table 5 . This can imply the existence of some neighborhoods with dominant genes (i.e., configurations resulting in very low SCC and LCC) in the population of scenario 2 which have been identified by the GA and sustained across multiple generations of the analysis. To further inspect the differences between the designs resulting from the two scenarios, K-Means Clustering (KMC) was used to create clusters of similar individuals among the admissible neighborhoods based on eleven features: the seven building-type ratios (i.e., GFA associated with each building type divided by the total GFA of the neighborhood), GFA-normalized LCC and SCC, and GFA-normalized annual energy and wastewater treatment demands. The features were standardized before clustering, and K-Means Clustering method from Scikit-Learn library (Pedregosa et al., 2011) was used to conduct the clustering with the following variables: Initialization_method: “k-means++”; max_iterations: 300; n_init: 10; random_state: 42; tol: 0.0001. Euclidean distance was selected as the measure of proximity for clustering. The number of clusters was varied between 8 and 40 to find the highest average Silhouette Score (Rousseeuw, 1987) and lowest cost function across all clusters: for both scenarios, the highest Silhouette scores (0.53 for scenario 1, and 0.32 for scenario 2) were obtained for 10 clusters. However, the cost function (i.e., sum of squared distances to centroids) for the 10-cluster configuration was high −233,834 (2.51 per individual) and 257,098 (2.93 per individual) for scenarios 1 and 2, respectively—and the clusters were unevenly populated. To solve this issue, the number of clusters was set to 26 (scenario 1) and 40 (scenario 2) which had yielded other local optima of FIGURE 5 | The approximate Pareto fronts of the life-cycle social cost of carbon vs. life-cycle cost of equipment for (A) scenario 1 and (B) scenario 2. the Silhouette Score among the tested number of clusters. These new cluster counts resulted in acceptably reduced cost functions of 105,064 (i.e., 1.1 per each neighborhood) for scenario 1 and 107,026 (i.e., 1.2 per each neighborhood) for scenario 2 with Silhouette scores of 0.36 and 0.31, respectively. After the KMC algorithm converged, clusters with less than 500 members were removed to prune out the outliers, and the remaining centroids (19 centroids for scenario 1, and 27 for scenario 2) were plotted in Figure 6 . Each cluster centroid in this figure is shown as a continuous, unicolor line across the eleven variables along the x-axis, and the thickness of each line is proportional to the number of neighborhoods represented by that centroid. SCC, LCC, and the annual energy and wastewater demands for both scenarios in Figure 6 are normalized by the maximum values of each variable from both scenarios, and are presented in percent. Figure 6 shows that the building mix and normalized annual energy and wastewater demand for the most populous clusters of optimal neighborhoods for both design approaches cover roughly the same ranges of values. However, the most populated TABLE 5 | Statistical comparison between the results of scenario 1 (segregated) and scenario 2 (integrated). Scenario Variable SD Mean 25th 50th (Med) 75th 1 LCC ( ~~1.00~~ ~~1.00~~ ~~1.00~~ ~~1.00~~ ~~1.00~~ ) 2 m <sup><u>2</u></sup> ~~0.65~~ ~~0.89~~ ~~0.87~~ ~~0.80~~ ~~0.61~~ 1 SCC ( <u>$</u> <u>m</u> <sup><u>2</u></sup> <u>$</u> m <sup><u>2</u></sup> <u>$</u> <u>m</u> <sup><u>2</u></sup> <u>$</u> m <sup><u>2</u></sup> ~~1.00~~ ~~1.00~~ ~~1.00~~ ~~1.00~~ ~~1.00~~ ) 2 m <sup><u>2</u></sup> ~~0.60~~ ~~0.44~~ ~~0.29~~ ~~0.25~~ ~~0.22~~ 1 Annual E Demand ( <u>MWhm</u> <sup><u>2</u></sup> ~~1.00~~ ~~1.00~~ ~~1.00~~ ~~1.00~~ ~~1.00~~ <u>MWh</u> m <sup><u>2</u></sup> <sup>)</sup> ~~0.38~~ ~~0.63~~ ~~0.85~~ ~~0.92~~ ~~0.61~~ <u>MWh</u> <u>m</u> <sup><u>2</u></sup> <u>MWh</u> m <sup><u>2</u></sup> 2 ~~0.38~~ ~~0.63~~ ~~0.85~~ ~~0.92~~ ~~0.61~~ 1 Annual WW Demand ( <u>mm</u> <sup><u>2</u></sup> <u>3</u> ~~1.00~~ ~~1.00~~ ~~1.00~~ ~~1.00~~ ~~1.00~~ <u>m3</u> m <sup><u>2</u></sup> <sup>)</sup> ~~0.40~~ ~~0.72~~ ~~0.92~~ ~~0.80~~ ~~0.61~~ 2 ~~0.40~~ ~~0.72~~ ~~0.92~~ ~~0.80~~ ~~0.61~~ The cell colors in the table range from sharp red for a normalized value of 1 to sharp green for a normalized value of 0. FIGURE 6 | Traces of the cluster features—i.e., building area percentages for Residential, Office, Commercial, Industrial, Hospitality, Medical, and Educational buildings (Table 1 shows the building types belonging to each of these building-uses), normalized LCC and SCC, normalized annual energy (Anl_E), and wastewater treatment demand (Anl_WW)—across the centroids of the clustered neighborhoods for (A) scenario 1 and (B) scenario 2. Each centroid is shown as a unicolor line connecting eleven points across the seven building-uses and the four metrics. clusters in scenario 2 have lower GFA-normalized SCC and LCC than those of scenario 1, corroborating the statistical data from Table 5 . Also implied by the low standard deviation values of scenario 2 in Table 5, the most populous centroids of scenario 2 in Figure 6 are spread over smaller ranges of the eleven parameters plotted in the figure. The GFA ratios of individual building types show that (i) the percentage of residential buildings ranges from 0 to 60% for both scenarios, (ii) the office buildings range from 30 to 95% in scenario 1 and from 15 to 100% in scenario 2 with a high concentration around 80 to 100%, (iii) industrial and educational buildings are mostly negligible in scenario 1, while they range from 0 to 10% in scenario 2, and (iv) hospitality and medical buildings are mostly negligible in scenario 1 with two exceptional clusters showing ∼30 and ∼60% hospitality and medical type-ratios, while they range from 0 to 20% in scenario 2. These ranges show that the integrated design has resulted in a more diverse building mix among the optimal designs. Figure 6 offers another interesting observation: the building mix in the majority of optimal neighborhoods from both scenarios have a low share of residential buildings, a medium to high share of office buildings, low shares of educational and industrial buildings (in scenario 2), and trivial shares of commercial, hospitality, and medical buildings. This mix of building types seems to provide the lowest LCC and SCC per unit area among all possible building mixes inspected by the optimization algorithm and is hence predominant among the optimal building mixes for both scenarios. The types of selected supply equipment -were also analyzed for the admissible neighborhoods from both scenarios to identify the connections between the choices of supply equipment choices and metrics of life-cycle performance. Figure 7 shows for the two scenarios the normalized SCC against the types of CHP engines selected in neighborhoods with SCCs less than 0.1 k$/m <sup>2</sup>, i.e., the 99.8th percentile of the first scenario and 99.7th percentile of the seconds. In both cases, the neighborhoods with smallest SCCs use biomass/biogas, or fuel-cell CHP engines, which is consistent with the fact that the operation of these engines is deemed carbon-neutral since they are assumed to use renewable fuels (Best et al., 2015). The Pareto optimal solutions marked in Figure 5 are expected to be among these neighborhoods with carbon-neutral CHP engines, since the Pareto optimal solutions also have very low SCC values compared to the rest of the solutions. The neighborhoods designed with carbon-neutral CHP engines in scenario 1 seem to have a lower SCC compared to neighborhoods using the same engines in scenario 2. Further, since a large portion of the CHP engines selected in both scenarios for the local energy system are those with negligible operating emissions, supplying the wastewater treatment equipment with the local energy system in the integrated scenario would expectedly result in a much smaller life-cycle emission (SCC) compared to supplying the treatment equipment with the electric grid in the segregated scenario. These observations justify the lower SCC values of scenario 2 compared to scenario 1. Figure 7 also shows that the Genetic Algorithm has favored gas engines (i.e., gas turbines, microturbines, reciprocating engines, and steam turbines) much less than the carbon-neutral CHP engines in both scenarios given the significantly higher emission rates of the gas engines. Figure 8 also shows the normalized SCC vs. the types of chillers chosen for those neighborhoods in the analyzed scenarios which had SCCs less than 0.1 k$/m <sup>2</sup> . Low-emission neighborhoods have been possible to create using all types of the available chillers. Figure 9 shows the wastewater treatment (WWT) systems selected by the optimization algorithm for scenario 2. FO-MD has resulted in more low-emission neighborhoods than the other WWT system. Before, Figure 7 indicated that biomass engines were popular with low-emission neighborhoods. Most of the available biomass engines in the simulation framework have power-to-heat ratios lower than 0.42, which means they generate more heat than electricity in response to the energy demand. Part of the reason for popularity of FO-MD among the lowemission neighborhoods seems to be that this treatment system can “recycle” the excess heat generated by the carbon-neutral biomass engines selected for these neighborhoods. This excess heat can also be used for dewatering the solid residue from the treatment process (Scherson and Criddle, 2014) (discussed in more detail in Section Conclusions and Future Work). Figure 6 suggests a relationship between the oscillations in ratios of different building types with the values of SCC, LCC, and the annual demands. In a final analysis, the Pearson correlation matrices between the eleven variables plotted in Figure 6 were computed to inspect the linear relationships between these variables. Figure 10 shows the resulting correlation matrices for both scenarios. Normalized LCC and SCC are not strongly related to any other variables than each other, while normalized annual energy and wastewater demand seem to be negatively correlated with the ratio of office buildings in the neighborhoods. The latter is rooted in the low energy- and water-use intensities of the office buildings. The normalized annual demands also show a strong direct linear relationship with each other, meaning that neighborhoods with high annual wastewater treatment demands tend to have high annual energy demands and vice versa. Further, annual energy demand seems to be directly proportional to the percentage of medical buildings. This is caused by the high energy-use intensity of the medical buildings. The annual wastewater demand in scenario 2 also shows a strong collinearity with the percentage of residential buildings, which is caused by the high water-use intensity of these building types. Among the building type ratios, percentages of hospitality and medical buildings in both cases and commercial buildings in scenario 2 are negatively collinear with that of office buildings. The optimization algorithm seems to have strongly preferred office buildings in reverse proportion to the residentials, especially in the integrated design scenario. CONCLUSIONS AND FUTURE WORK This paper studies the advantages of integrated design and optimization of the wastewater treatment and energy systems at the district scale over the segregated design of these infrastructure systems in terms of environmental and economic sustainability metrics. The supply and demand of the integrated water-energy system are also concurrently considered and optimized. Annual hourly wastewater treatment demands from several building archetypes as well as advanced membranebased and conventional central wastewater treatment systems are modeled to cover both the decentralized (integrated) and centralized (conventional) wastewater treatment configurations. An optimization framework is proposed for the integrated design of water and energy infrastructure and a case study FIGURE 7 | Social cost of carbon vs. CHP type for (A) scenario 1 and (B) scenario 2, across all individual neighborhoods with SCCs less than 0.1 k$/m <sup>2</sup> . Each neighborhood is represented by a single dot in the plot. in San Francisco is adopted to compare the outcomes of the conventional (segregated) vs. the integrated approach to the design. The results of the case study show consistently lower normalized social cost of carbon, life-cycle cost of equipment, annual energy demand, and annual wastewater treatment FIGURE 8 | Social cost of carbon vs. Chiller type for (A) scenario 1 and (B) scenario 2, across all individual neighborhoods with SCCs less than 0.1 k$/m <sup>2</sup> . Each neighborhood is represented by a single dot in the plot. demand across the neighborhoods designed using the integrated vs. segregated approach, with the median values of these metrics for the seconds scenario being, respectively, 75, 20, 8, and 20% lower than those of the first scenario. These advantages of the integrated scenario can be attributed first to simultaneous optimization of the wastewater treatment and energy system in this scenario, and also to supplying the treatment system with the low to no-emission CHP engines FIGURE 9 | Social cost of carbon vs. WWT type for scenario 2 across all individual neighborhoods with SCCs less than 0.10 k$/m <sup>2</sup>, i.e., the 99.7th percentile of SCC. Each neighborhood is represented by a single dot in the plot. of the local energy system vs. supplying the treatment system with the electric grid in the segregated scenario. The results also showcase the economic and environmental viability of advanced wastewater treatment systems despite higher capital costs compared to conventional systems, when these advanced treatment processes are (i) optimized at the same time as the energy systems, (ii) physically and operationally integrated with the energy systems, and (iii) analyzed over the life-cycle of the neighborhood. The results also show that the building mixes of the neighborhoods generated under the two scenarios have similarities. This indicates that the districts designed for segregated water and energy systems can adopt integrated infrastructure with minimal modifications and without altering the building mix of the district. The considerable savings in emission and costs achieved by taking an integrated approach to the design of the water and energy infrastructure indicate the potential for integrating more infrastructure systems during the early-stage design of neighborhoods using approaches similar to that taken in this study. It is expected that the gains in sustainability of the integrated vs. the conventional design of infrastructure will become yet more significant as more systems, over longer analysis periods, and larger spatial scopes are designed concurrently. Future extensions of this research can address three general topics: the wastewater treatment model, the building and energy system models, and the optimization algorithm. Below are some of the potential future studies on the wastewater treatment model: 1. This study implicitly addresses handling of retentate from the treatment process; however, given its large environmental impacts, this topic merits in-depth analysis in future studies. In theory, Anaerobic Digestion (AD) combined with syngas processing of biosolids and/or short-cut nitrogen-removal systems could be used to minimize residuals and produce up to 0.35 kWh of energy per 1 m <sup>3</sup> of wastewater treated (Scherson et al., 2013; Scherson and Criddle, 2014). AD can also be combined with emerging anaerobic secondary treatment systems, like the SAF-MBR with air-stripper (Stanford University, 2021), to maximize methane recovery and increase net energy production from retentate (Scherson and Criddle, 2014). CHP engine can directly use the biogas and syngas from such processes to generate heat and electricity (Scherson and Criddle, 2014). This also motivates studies comparing centralized vs. decentralized treatment of retentate, where part or all of the treated water from decentralized treatment could be used for irrigation. 2. The excess heat from the CHP engine in this work is used for heating the wastewater when FO-MD was selected as the treatment system. This waste heat could also be used to dry the biosolids left from the treatment process after mechanical dewatering, as suggested by Scherson and Criddle (2014). Dewatering of the biosolids enables their gasification and production of ash, dramatically reducing solids for disposal and generating additional energy in the form of syngas. 3. To avoid overcomplicating the analysis, the scope of this paper excludes the reuse and redistribution of the treated wastewater. When distributed, the potable water recovered by the system proposed in this research can improve the water security (Cook and Bakker, 2012; World Economic Forum Water Initiative, 2012; Garrick and Hall, 2014), resilience, and sustainability of the urban areas. This also merits in-depth follow-up studies. FIGURE 10 | Correlation matrix for building area percentages (symbols from Table 1), normalized LCC and SCC, normalized annual energy (Anl_E) and wastewater treatment demand (Anl_WW) across the admissible neighborhoods from (A) scenario 1 and (B) scenario 2. 4. Future studies can investigate the sustainability and resilience impacts of setting different qualities—e.g., suitable for irrigation, or banking in reservoirs—for the effluent of the treatment process. Same can be done for the retentate of the treatment process. For example, the nitrogen-rich retentate of the treatment can be used for landscaping to help preserve water resources. 5. This paper simplifies modeling of water demand profiles by assuming that daily profiles are constant for every day of a month. This enabled constructing hourly demand profiles for all the 21 building types in the same climatic region and over the entire year, as the existing literature did not allow for making more detailed demand profiles. Future studies should examine the updated literature for modeling variable daily profiles for each day of a month. 6. The integration across the water and energy system proposed in this work can be tailored for applying to a range of different time scales, e.g., by using monthly rather than hourly models, or geographic scales, e.g., by focusing on regions rather than districts. Results of studies on these different scales can provide valuable insights for different stakeholders who require different levels of granularity in modeling and analysis. Adapting the proposed framework to these different scales is also a worthwhile extension of this work. The list below describes interesting future studies on the building and energy system models: 1. A limited, yet diverse, set of supply equipment were selected and modeled in this study: more treatment systems and energy systems, including all-electric technologies, can be introduced into the supply equipment mix in future efforts to make this framework applicable to a wider variety of cases. 2. Network configuration largely determines the loss and performance of the heating, cooling, and wastewater treatment infrastructure (Best et al., 2019)—future efforts should introduce network optimization into the proposed framework. This addition, nonetheless, increases the complexity of the optimization problem by several orders of magnitude, and this might require alternative optimization algorithms, more memory, and more computational power compared to this study. 3. This paper treats the input parameters of the supply and demand models as deterministic variables, whereas the uncertainties in these parameters can have tangible effects on the results of the analysis obtained using the proposed method. Uncertainty analysis of the proposed framework merits extensive future study. The following detail potential future studies on the optimization algorithm: 1. Improving the optimization algorithm has a great potential for further studies (e.g., Rezazadeh Kalehbasti et al., 2021). For instance, in this study no constraints were applied to the optimization problem other than to the gross-floor-area of the neighborhoods. Future studies can impose constraints on the ranges of building type ratios as well as the permitted types of CHP engines, chillers, and treatment systems to inform the optimization algorithm to obtain optimal neighborhoods with specific mixes of buildings and supply equipment. For the case study examined in this manuscript, the optimization algorithm found many optimal solutions with building type mixes dominated by office buildings. The COVID19 global pandemic has shown that the usage of different building types can vary, sometimes drastically, because of unforeseen conditions. This suggests the need for studies that consider other “black swan” events (Taleb, 2007) to understand how they can change the optimal design and performance of cities by imposing constraints on the components, e.g., the building mix, of the urban neighborhoods. DATA AVAILABILITY STATEMENT The original contributions presented in the study are included in the article/ Supplementary Materials, further inquiries can be directed to the corresponding author/s. Files required for replicating the experiments and visualizations of this paper can [be found at: https://github.com/PouyaREZ/Wastewater_Energy_](https://github.com/PouyaREZ/Wastewater_Energy_Optimization) [Optimization.](https://github.com/PouyaREZ/Wastewater_Energy_Optimization) AUTHOR CONTRIBUTIONS PR: conceptualization, data curation, formal analysis, funding acquisition, investigation, methodology, project administration, resources, software, writing—review and editing, roles/writing—original draft, visualization, and validation. ML: conceptualization, funding acquisition, methodology, project administration, resources, supervision, writing—review and editing, roles/writing—original draft, and validation. CC: resources, supervision, writing—review and editing, and validation. All authors contributed to the article and approved the submitted version. FUNDING This material is based on work supported by the Leavell Fellowship on Sustainable Built Environment from the Department of Civil and Environmental Engineering at Stanford University. This research has additionally been supported by AP Thailand. SUPPLEMENTARY MATERIAL The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/frsc.2022. 856996/full#supplementary-material REFERENCES Akther, N., Sodiq, A., Giwa, A., Daer, S., Arafat, H. A., and Hasan, S. W. (2015). Recent advancements in forward osmosis desalination: a review. Chem. Eng. J. 281, 502–522. doi: 10.1016/j.cej.2015. 05.080 Al-Karaghouli, A., and Kazmerski, L. L. (2013). Energy consumption and water production cost of conventional and renewable-energypowered desalination processes. Renew. Sustain. Energy Rev. 24, 343–356. [doi: 10.1016/j.rser.2012.12.064](https://doi.org/10.1016/j.rser.2012.12.064) Alkhudhiri, A., Darwish, N., and Hilal, N. (2012). Membrane distillation: a [comprehensive review. Desalination 287, 2–18. doi: 10.1016/j.desal.2011.08.027](https://doi.org/10.1016/j.desal.2011.08.027) Allegrini, J., Orehounig, K., Mavromatidis, G., Ruesch, F., Dorer, V., and Evins, R. (2015). A review of modelling approaches and tools for the simulation of district-scale energy systems. Renew. Sustain. Energy Rev. 52, 1391–1404. [doi: 10.1016/j.rser.2015.07.123](https://doi.org/10.1016/j.rser.2015.07.123) Al-Obaidani, S., Curcio, E., Macedonio, F., Profio, G. D., Al-Hinai, H., and Drioli, E. (2008). Potential of membrane distillation in seawater desalination: thermal efficiency, sensitivity study and cost estimation. J. Memb. Sci. 323, 85–98. [doi: 10.1016/j.memsci.2008.06.006](https://doi.org/10.1016/j.memsci.2008.06.006) Arup (2016). Deadline 2020: How Cities Will Get the Job Done. Available online [at: https://www.c40.org/researches/deadline-2020 (accessed April 25, 2019).](https://www.c40.org/researches/deadline-2020) Atab, M. S., Smallbone, A. J., and Roskilly, A. P. (2016). An operational and economic study of a reverse osmosis desalination system for potable water and land irrigation. Desalination 397, 174–1184. doi: 10.1016/j.desal.2016. 06.020 Bakhtiari, P. H., Nikoo, M. R., Izady, A., and Talebbeydokhti, N. (2020). A coupled agent-based risk-based optimization model for integrated urban water [management. Sustain. Cities Soc. 53, 101922. doi: 10.1016/j.scs.2019.101922](https://doi.org/10.1016/j.scs.2019.101922) Bauer, D., Philbrick, M., Vallario, B., Battey, H., Clement, Z., and Fields, F. (2015). The Water-Energy Nexus: Challenges and Opportunities. Washington, DC: US Department of Energy. Best, R. E. (2016). Modeling, Optimization, and Decision Support for Integrated Urban and Infrastructure Planning. Available online at: [https://searchworks.](https://searchworks.stanford.edu/view/11891198) [stanford.edu/view/11891198 (accessed April 26, 2019).](https://searchworks.stanford.edu/view/11891198) Best, R. E., Flager, F., and Lepech, M. D. (2015). Modeling and optimization of building mix and energy supply technology for urban districts. Appl. Energy [159, 161–1177. doi: 10.1016/j.apenergy.2015.08.076](https://doi.org/10.1016/j.apenergy.2015.08.076) Best, R. E., Rezazadeh Kalehbasti, P., and Lepech, M. D. (2019). A novel approach to district heating and cooling network design based on life cycle cost [optimization. Energy 194, 116837. doi: 10.1016/j.energy.2019.116837](https://doi.org/10.1016/j.energy.2019.116837) Beyond Efficiency. (2017). Beyond Efficiency. Available online at: [http://](http://beyondefficiency.us/) [beyondefficiency.us/ (accessed October 06, 2020).](http://beyondefficiency.us/) Blandin, G., Verliefde, A. R. D., Tang, C. Y., and Le-Clech, P. (2015). Opportunities to reach economic sustainability in forward osmosis– reverse osmosis hybrids for seawater desalination. Desalination 363, 26–36. [doi: 10.1016/j.desal.2014.12.011](https://doi.org/10.1016/j.desal.2014.12.011) Bouckaert, S., Assoumou, E., Selosse, S., and Maïzi, N. (2014). A prospective analysis of waste heat management at power plants and water conservation issues using a global TIMES model. Energy. 68, 80–91. [doi: 10.1016/j.energy.2014.02.008](https://doi.org/10.1016/j.energy.2014.02.008) Buonocore, E., Mellino, S., De Angelis, G., Liu, G., and Ulgiati, S. (2018). Life Cycle assessment indicators of urban wastewater and sewage sludge treatment. Ecol. [Indic. 94, 13–23. doi: 10.1016/j.ecolind.2016.04.047](https://doi.org/10.1016/j.ecolind.2016.04.047) Caceres, E., and Alca, J. J. (2016). Potential For energy recovery from a wastewater treatment plant. IEEE Latin Am. Trans. 14, 3316–333321. [doi: 10.1109/TLA.2016.7587636](https://doi.org/10.1109/TLA.2016.7587636) California ISO. (2019). California Independent System Operator. Available online at: www.caiso.com (accessed May 07, 2021). Carnegie Mellon University (2007). Economic Input-Output Life Cycle [Assessment—Carnegie Mellon University. http://www.eiolca.net/](http://www.eiolca.net/) Carollo Engineers (2015). Sanitary Sewer Flow Study Update. San Jose and Santa Clara. Available online [at:http://sanjoseca.gov/DocumentCenter/View/40355](http://sanjoseca.gov/DocumentCenter/View/40355) (accessed August 07, 2018). Cath, T. Y., Drewes, J. E., and Lundin, C. D. (2009). A Novel Hybrid Forward Osmosis Process for Drinking Water Augmentation Using Impaired Water and Saline Water Sources. Alexandria, VA: Water Research Foundation. Cath, T. Y., Gormly, S., Beaudry, E. G., Flynn, M. T., Adams, V. D., and Childress, A. E. (2005). Membrane contactor processes for wastewater reclamation in space: Part I. Direct osmotic concentration as pretreatment for reverse osmosis. [J. Membrane Sci. 257, 85–98. doi: 10.1016/j.memsci.2004.08.039](https://doi.org/10.1016/j.memsci.2004.08.039) Chacartegui, R., Monje, B., Sánchez, D., Becerra, J. A., and Campanari, S. (2013). Molten carbonate fuel cell: towards negative emissions in wastewater treatment chp plants. Int. J. Greenhouse Gas Control 19, 453–461. [doi: 10.1016/j.ijggc.2013.10.007](https://doi.org/10.1016/j.ijggc.2013.10.007) Coday, B. D., Xu, P., Beaudry, E. G., Herron, J., Lampi, K., Hancock, N. T., et al. (2014). The sweet spot of forward osmosis: treatment of produced water, drilling wastewater, and other complex and difficult liquid streams. [Desalination 333, 23–35. doi: 10.1016/j.desal.2013.11.014](https://doi.org/10.1016/j.desal.2013.11.014) Cook, C., and Bakker, K. (2012). Water security: debating an emerging paradigm. [Global Environ. Change 22, 94–102. doi: 10.1016/j.gloenvcha.2011.10.011](https://doi.org/10.1016/j.gloenvcha.2011.10.011) Council, N. R. (2012). Water Reuse: Potential for Expanding the Nation’s Water Supply Through Reuse of Municipal Wastewater. Washington, DC: National Academies Press. Coutts, A. M., Beringer, J., and Tapper, N. J. (2008). Investigating the Climatic Impact of Urban Planning Strategies through the Use of Regional Climate Modelling: A Case Study for Melbourne, Australia. Int. J. Climatol. J. R. [Meteorol. Soc. 28, 1943–191957. doi: 10.1002/joc.1680](https://doi.org/10.1002/joc.1680) CPI. (2020). CPI Inflation Calculator. Available online at: [https://www.](https://www.in2013dollars.com/us/inflation/) [in2013dollars.com/us/inflation/ (accessed October 06, 2020).](https://www.in2013dollars.com/us/inflation/) Crawley, D. B., Lawrie, L. K., Winkelmann, F. C., Buhl, W. F., Huang, Y. J., Pedersen, C. O., et al. (2001). EnergyPlus: creating a newgeneration building energy simulation program. Energy Build. 33, 319–331. [doi: 10.1016/S0378-7788(00)00114-6](https://doi.org/10.1016/S0378-7788%0x2800%0x2900114-6) Dai, J., Wu, S., Han, G., Weinberg, J., Xie, X., Wu, X., et al. (2018). Water-energy nexus: a review of methods and tools for macro-assessment. Appl. Energy 210, [393–408. doi: 10.1016/j.apenergy.2017.08.243](https://doi.org/10.1016/j.apenergy.2017.08.243) Dayton, K., Eicher, J., Joffe, M., and Ring, E. (2016). Rebuilding California’s infrastructure for the 21st centurcentury. Available online at: [http://](http://californiapolicycenter.org/wp-content/uploads/2016/11/Rebuilding-California-Infratructure-for-the-21st-CenturCentury.pdf) [californiapolicycenter.org/wp-content/uploads/2016/11/Rebuilding-](http://californiapolicycenter.org/wp-content/uploads/2016/11/Rebuilding-California-Infratructure-for-the-21st-CenturCentury.pdf) [California-Infratructure-for-the-21st-CenturCentury.pdf](http://californiapolicycenter.org/wp-content/uploads/2016/11/Rebuilding-California-Infratructure-for-the-21st-CenturCentury.pdf) (accessed May 02, 2019). Deb, K., Pratap, A., Agarwal, S., and Meyarivan, T. (2002). A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans. Evol. Comput. 6, [182–1197. doi: 10.1109/4235.996017](https://doi.org/10.1109/4235.996017) Deru, M., Field, K., Studer, D., Benne, K., Griffith, B., Torcellini, P., et al. (2011). US Department of Energy Commercial Reference Building Models of the National Building Stock. Golden, CO: National Renewable Energy Laboratory. Díaz, P. R., Benito, Y. R., and Parise, J. A. R. (2010). Thermoeconomic assessment of a multi-engine, multi-heat-pump CCHP (combined cooling, heating and power generation) system–a case study. Energy. 35, 3540–353550. [doi: 10.1016/j.energy.2010.04.002](https://doi.org/10.1016/j.energy.2010.04.002) Dincer, I. (2002). On Thermal Energy Storage Systems and Applications in Buildings. Energy and Buildings 34, 377–388. [doi: 10.1016/S0378-7788(01)00126-8](https://doi.org/10.1016/S0378-7788%0x2801%0x2900126-8) DOE (n.d). Combined Heat & Power: A Federal Manager’s Resource Guide Final Report. Available online at: [https://www.energy.gov/sites/prod/files/2013/11/](https://www.energy.gov/sites/prod/files/2013/11/f4/chp_femp.pdf) [f4/chp_femp.pdf (accessed March 21, 2019).](https://www.energy.gov/sites/prod/files/2013/11/f4/chp_femp.pdf) Eicker, U., Monien, D., Duminil, É., and Nouvel, R. (2015). Energy performance assessment in urban planning competitions. Appl. Energy 155, 323–333. [doi: 10.1016/j.apenergy.2015.05.094](https://doi.org/10.1016/j.apenergy.2015.05.094) Elimelech, M., and Phillip, W. A. (2011). The future of seawater desalination: energy, technology, and the environment. Science. 333, 712–717. [doi: 10.1126/science.1200488](https://doi.org/10.1126/science.1200488) Energy Information Administration (2019). Monthly Energy Review – March 2019. [Available online at: www.eia.gov/mer (accessed April 24, 2019).](http://www.eia.gov/mer) EPA (2013). Energy Efficiency in Water and Wastewater Facilities. Available online at: [www.epa.gov/statelocalclimate/resources/strategy-guides.html](http://www.epa.gov/statelocalclimate/resources/strategy-guides.html) (accessed April 30, 2019). EPA (2016). Social Cost of Carbon. Available online at: [https://www.whitehouse.](https://www.whitehouse.gov/omb/oira/social-cost-of-carbon) [gov/omb/oira/social-cost-of-carbon (accessed February 02, 2019).](https://www.whitehouse.gov/omb/oira/social-cost-of-carbon) Evins, R., Pointer, P., and Vaidyanathan, R. (2011). “Optimisation for CHP and CCHP Decision-Making,” in Proceedings of the Building Simulation 2011 Conference, Sydney, Australia, p. 1335–1342. Ferreira, E. M., Balestieri, J. A. P., and Zanardi, M. A. (2010). Optimization analysis of dual-purpose systems. Desalination 250, 936–944. [doi: 10.1016/j.desal.2009.06.010](https://doi.org/10.1016/j.desal.2009.06.010) Fortin, F.-A., De Rainville, F-, M., Gardner, M.-A., Parizeau, M., and Gagné, C. (2012). DEAP: evolutionary algorithms made easy. J. Mach. Learn. Res. 13, [2171–2175. doi: 10.5555/2503308.2503311](https://doi.org/10.5555/2503308.2503311) Gabriel, K. J., El-Halwagi, M. M., and Linke, P. (2016). Optimization across the water–energy nexus for integrating heat, power, and water for industrial processes, coupled with hybrid thermal-membrane desalination. Ind. Eng. [Chem. Res. 55, 3442–3466. doi: 10.1021/acs.iecr.5b03333](https://doi.org/10.1021/acs.iecr.5b03333) Garrick, D., and Hall, J. W. (2014). Water security and society: risks, metrics, and pathways. Annu. Rev. Environ. Resour. 39, 611–639. [doi: 10.1146/annurev-environ-013012-093817](https://doi.org/10.1146/annurev-environ-013012-093817) Gingerich, D. B., and Mauter, M. S. (2018). Retrofitting the regulated power plant: optimizing energy allocation to electricity generation, water treatment, and carbon capture processes at coal-fired generating facilities. ACS Sustain. Chem. [Eng. 6, 2694–2703. doi: 10.1021/acssuschemeng.7b04316](https://doi.org/10.1021/acssuschemeng.7b04316) González-Bravo, R., Ponce-Ortega, J. M., and El-Halwagi, M. M. (2017). Optimal design of water desalination systems involving waste heat recovery. Ind. Eng. [Chem. Res. 56, 1834–1847. doi: 10.1021/acs.iecr.6b04725](https://doi.org/10.1021/acs.iecr.6b04725) Gude, V. G. (2015). Energy and water autarky of wastewater treatment and power generation systems. Renew. Sustain. Energy Rev. 45, 52–68. [doi: 10.1016/j.rser.2015.01.055](https://doi.org/10.1016/j.rser.2015.01.055) Guizania, M., Saitod, M., Itoa, R., and Funamizue, N. (2019). Combined FO and RO system for the recovery of energy from wastewater and the desalination of [seawater. Desalination Water Treat. 154, 14–20. doi: 10.5004/dwt.2019.24083](https://doi.org/10.5004/dwt.2019.24083) Guo, T., and Englehardt, J. D. (2015). Principles for scaling of distributed direct potable water reuse systems: a modeling study. Water Res. 75, 146–163. [doi: 10.1016/j.watres.2015.02.033](https://doi.org/10.1016/j.watres.2015.02.033) Hawkes, A., and Leach, M. (2005). Impacts of temporal precision in optimisation modelling of micro-combined heat and power. Energy. 30, 1759–1779. [doi: 10.1016/j.energy.2004.11.012](https://doi.org/10.1016/j.energy.2004.11.012) Hold-Geoffroy, Y., Gagnon, O., and Parizeau, M. (2014). “Once you SCOOP, no need to fork,” in Proceedings of the 2014 Annual Conference on Extreme Science [and Engineering Discovery Environment, 1–8. doi: 10.1145/2616498.2616565](https://doi.org/10.1145/2616498.2616565) Howells, M., and Rogner, H-., H. (2014). Water-energy nexus: assessing integrated [systems. Nat. Clim. Chang. 4, 246. doi: 10.1038/nclimate2180](https://doi.org/10.1038/nclimate2180) Huang, D., Li, G., Sun, C., and Liu, Q. (2020). Exploring interactions in the local water-energy-food nexus (wef-nexus) using a simultaneous equations model. Sci. Total Environ. 703, 135034. doi: 10.1016/j.scitotenv.2019.13 5034 Hukkalainen, M., Virtanen, M., Paiho, S., and Airaksinen, M. (2017). Energy planning of low carbon urban areas-examples from Finland. Sustain. Cities [Society 35, 715–728. doi: 10.1016/j.scs.2017.09.018](https://doi.org/10.1016/j.scs.2017.09.018) Husnain, T., Mi, B., and Riffat, R. (2015a). Fouling and long-term durability of an integrated forward osmosis and membrane distillation system. Water Sci. [Technol. 72, 2000–2005. doi: 10.2166/wst.2015.415](https://doi.org/10.2166/wst.2015.415) Husnain, T., Mi, B., and Riffat, R. (2015b). A combined forward osmosis and membrane distillation system for sidestream treatment. J. Water Resource Prot. [7, 1111. doi: 10.4236/jwarp.2015.714091](https://doi.org/10.4236/jwarp.2015.714091) IEA-ETSAP, and, IRENA. (2013). Thermal Energy Storage: Technology Brief. Available online at: [https://www.inship.eu/docs/TES1IRENA-](https://www.inship.eu/docs/TES1IRENA-ETSAPTechBrief~E17ThermalEnergyStorage.pdf) [ETSAPTechBrief~E17ThermalEnergyStorage.pdf](https://www.inship.eu/docs/TES1IRENA-ETSAPTechBrief~E17ThermalEnergyStorage.pdf) (accessed October 06, 2020). International Energy Agency (2016). Cities Are at the Frontline of the Energy Transition. 2016. Available online at: [https://www.iea.org/newsroom/news/](https://www.iea.org/newsroom/news/2016/september/cities-are-at-the-frontline-of-the-energy-transition.html) [2016/september/cities-are-at-the-frontline-of-the-energy-transition.html](https://www.iea.org/newsroom/news/2016/september/cities-are-at-the-frontline-of-the-energy-transition.html) (accessed April 23, 2019). Jaccard, M. (2006). Sustainable Fossil Fuels: The Unusual Suspect in the Quest for Clean and Enduring Energy. Cambridge: Cambridge University Press. Kalmykova, Y., Sadagopan, M., and Rosado, L. (2018). Circular economy– from review of theories and practices to development of implementation tools. Resourc. Conserv. Recycl.135, 190–201. doi: 10.1016/j.resconrec.2017. 10.034 Keirstead, J., Jennings, M., and Sivakumar, A. (2012). A review of urban energy system models: approaches, challenges and opportunities. Renew. Sustain. [Energy Rev. 16, 3847–3866. doi: 10.1016/j.rser.2012.02.047](https://doi.org/10.1016/j.rser.2012.02.047) Khan, Z., Linares, P., and García-González, J. (2017). Integrating water and energy models for policy driven applications. A review of contemporary work and recommendations for future developments. Renew. Sustain. Energy Rev. 67, [1123–1138. doi: 10.1016/j.rser.2016.08.043](https://doi.org/10.1016/j.rser.2016.08.043) Kim, J. E., Phuntsho, S., Ali, S. M., Choi, J. Y., and Shon, H. K. (2018). Forward osmosis membrane modular configurations for osmotic dilution of seawater by forward osmosis and reverse osmosis hybrid system. Water Res. 128, 183–192. [doi: 10.1016/j.watres.2017.10.042](https://doi.org/10.1016/j.watres.2017.10.042) Luck, M., Landis, M., and Gassert, F. (2015). Aqueduct Water Stress Projections: Decadal Projections of Water Supply and Demand Using CMIP5 GCMs. World Resources Institute. Mancarella, P. (2014). MES (Multi-Energy Systems): an overview of concepts and [evaluation models. Energy. 65, 1–17. doi: 10.1016/j.energy.2013.10.041](https://doi.org/10.1016/j.energy.2013.10.041) Manfren, M., Caputo, P., and Costa, G. (2011). Paradigm shift in urban energy systems through distributed generation: methods and models. Appl. Energy 88, [1032–1048. doi: 10.1016/j.apenergy.2010.10.018](https://doi.org/10.1016/j.apenergy.2010.10.018) Mata-Torres, C., Zurita, A., Cardemil, J. M., and Escobar, R. A. (2019). Exergy cost and thermoeconomic analysis of a rankine cycle+ multi-effect distillation plant considering time-varying conditions. Energy Convers. Manag. 192, 114–132. [doi: 10.1016/j.enconman.2019.04.023](https://doi.org/10.1016/j.enconman.2019.04.023) McCutcheon, J., and Huang, L. (2013). “Forward osmosis,” in Encyclopedia of Membrane Science and Technology, 1–19. Hoboken, NJ: Wiley. McGivney, W., and Kawamura, S,. (2008). Cost Estimating Manual for Water Treatment Facilities. Hoboken, NJ: Wiley Online Library. McGovern, C., and Bastian, R,. (2009). Water Recycling and Reuse: The Environmental Benefits. Washington, DC: The United States Environmental Protection Agency. Mehr, A. S., MosayebNezhad, M., Lanzini, A., Yari, M., Mahmoudi, S. M. S., and Santarelli, M. (2018). Thermodynamic assessment of a novel SOFC Based CCHP system in a wastewater treatment plant. Energy. 150, 299–309. [doi: 10.1016/j.energy.2018.02.102](https://doi.org/10.1016/j.energy.2018.02.102) Moazeni, F., Khazaei, J., and Mendes, J. P. P. (2020). Maximizing energy efficiency of islanded micro water-energy nexus using co-optimization of water demand and energy consumption. Appl. Energy 266, 114863. [doi: 10.1016/j.apenergy.2020.114863](https://doi.org/10.1016/j.apenergy.2020.114863) MosayebNezhad, M., Mehr, A. S., Gandiglio, M., Lanzini, A., and Santarelli, M. (2018). Techno-economic assessment of biogas-fed CHP hybrid systems in a real wastewater treatment plant. Appl. Thermal Eng. 129, 1263–1280. [doi: 10.1016/j.applthermaleng.2017.10.115](https://doi.org/10.1016/j.applthermaleng.2017.10.115) Murrant, D., Quinn, A., Chapman, L., and Heaton, C. (2017). Water use of the UK thermal electricity generation fleet by 2050: Part 1 Identifying the Problem. [Energy Policy 108, 844–858. doi: 10.1016/j.enpol.2017.05.011](https://doi.org/10.1016/j.enpol.2017.05.011) Oliphant, T. E. (2006). A Guide to NumPy. Vol. 1. Spanish Fork: Trelgol Publishing USA. O’Neill, B. C., Kriegler, E., Ebi, K. L., Kemp-Benedict, E., Riahi, K., Rothman, D. S., et al. (2017). The roads ahead: narratives for shared socioeconomic pathways describing world futures in the 21st centurcentury. Glob. Environ. Change 42, [169–180. doi: 10.1016/j.gloenvcha.2015.01.004](https://doi.org/10.1016/j.gloenvcha.2015.01.004) Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., et al. (2011). Scikit-learn: machine learning in python. J. Mach. Learn. Res. 12, [2825–2830. doi: 10.5555/1953048.2078195](https://doi.org/10.5555/1953048.2078195) Rezaie, B., and Rosen, M. A. (2012). District heating and cooling: review of technology and potential enhancements. Appl. Energy 93, 2–10. [doi: 10.1016/j.apenergy.2011.04.020](https://doi.org/10.1016/j.apenergy.2011.04.020) Rezazadeh Kalehbasti, P., and Lepech, M. D. (2021). Augmenting high dimensional nonlinear optimization with conditional GANs. ArXiv Preprint [ArXiv:2103.04748. doi: 10.1145/3449726.3463675](https://doi.org/10.1145/3449726.3463675) Rezazadeh Kalehbasti, P., Lepech, M. D., and Pandher, S. S. (2021). “Augmenting High-Dimensional Nonlinear Optimization with Conditional GANs,” in Genetic and Evolutionary Computation Conference Companion (GECCO ’21), 1879–80. ACM. Rodriguez, D. J., Delgado, A., Delaquil, P., and Sohns, A. (2013). Thirsty Energy. Available online at: [http://www.dun-eumena.com/reagri/upload/files/](http://www.dun-eumena.com/reagri/upload/files/789230WP0Box377361B00PUBLIC0.pdf) [789230WP0Box377361B00PUBLIC0.pdf (accessed April 29, 2019).](http://www.dun-eumena.com/reagri/upload/files/789230WP0Box377361B00PUBLIC0.pdf) Rousseeuw, P. J. (1987). Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 20, 53–65. [doi: 10.1016/0377-0427(87)90125-7](https://doi.org/10.1016/0377-0427%0x2887%0x2990125-7) Saidi, S., Kattan, L., Jayasinghe, P., Hettiaratchi, P., and Taron, J. (2018). Integrated infrastructure systems—a review. Sustain. Citie Soc.y 36, 1–11. [doi: 10.1016/j.scs.2017.09.022](https://doi.org/10.1016/j.scs.2017.09.022) Scherson, Y. D., and Criddle, C. S. (2014). Recovery of freshwater from wastewater: upgrading process configurations to maximize energy recovery and minimize residuals. Environ. Sci. Technol. 48, 8420–8432. doi: 10.1021/ es501701s Scherson, Y. D., Wells, G. F., Woo, S-. G., Lee, J., Park, J., and Cantwell, B. J., et al. (2013). Nitrogen removal with energy recovery through N2O decomposition. Energy Environ. Sci. 6, 241–248. doi: 10.1039/ C2EE22487A Schütz, T., Streblow, R., and Müller, D. (2015). A comparison of thermal energy storage models for building energy system optimization. Energy Buildings 93, [23–31. doi: 10.1016/j.enbuild.2015.02.031](https://doi.org/10.1016/j.enbuild.2015.02.031) SF Environment. (2018). San Francisco Municipal Progress Report: Climate and Sustainability. San Francisco. Available online at: [https://sfenvironment.](https://sfenvironment.org/sites/default/files/fliers/files/sfe_municipal_progress_report_2019.pdf) [org/sites/default/files/fliers/files/sfe_municipal_progress_report_2019.pdf](https://sfenvironment.org/sites/default/files/fliers/files/sfe_municipal_progress_report_2019.pdf) (accessed April 25, 2019). SF PUC. (2019). San Francisco Public Utilities Commission: Southeast Treatment Plant. SF Public Utilities Commision. Available online at: [https://sfwater.org/](https://sfwater.org/index.aspx?page=616) [index.aspx?page=616 (accessed May 15, 2019).](https://sfwater.org/index.aspx?page=616) Shaffer, D. L., Werber, J. R., Jaramillo, H., Lin, S., and Elimelech, M. (2015). Forward osmosis: where are we now? Desalination 356, 271–284. [doi: 10.1016/j.desal.2014.10.031](https://doi.org/10.1016/j.desal.2014.10.031) Siddiqi, A., and Anadon, L. D. (2011). The water–energy nexus in Middle East and [North Africa. Energy Policy 39, 4529–4540. doi: 10.1016/j.enpol.2011.04.023](https://doi.org/10.1016/j.enpol.2011.04.023) [Stanford University. (2021). CR2C. Available online at: https://cr2c.stanford.edu/](https://cr2c.stanford.edu/about-0) [about-0 (accessed August 2, 2021).](https://cr2c.stanford.edu/about-0) Taleb, N. N. (2007). The Black Swan: The Impact of the Highly Improbable. Vol. 2. Rushden: Random House. United Nations (2015). Cities - United Nations Sustainable Development Action 2015. United Nations. Available online at: [https://www.un.org/](https://www.un.org/sustainabledevelopment/cities/) [sustainabledevelopment/cities/ (accessed March 20, 2019).](https://www.un.org/sustainabledevelopment/cities/) United Nations (2019). World Water Development Report 2019. Available online at: [http://www.unwater.org/publications/world-water-development-](http://www.unwater.org/publications/world-water-development-report-2019/) [report-2019/ (accessed April 29, 2019).](http://www.unwater.org/publications/world-water-development-report-2019/) US EIA (2017). CBECS Water Consumption in Large Buildings. [https://www.eia.](https://www.eia.gov/consumption/commercial/reports/2012/water/) [gov/consumption/commercial/reports/2012/water/ (accessed May 09, 2019).](https://www.eia.gov/consumption/commercial/reports/2012/water/) US EPA (n.d). Watersense. Available online at: [https://www.epa.gov/watersense/](https://www.epa.gov/watersense/types-facilities) [types-facilities (accessed May 09, 2019).](https://www.epa.gov/watersense/types-facilities) Van Rossum, G. (2007). “Python Programming Language,” in USENIX Annual Technical Conference, Vol. 41, p. 36. Waibel, C., Evins, R., and Carmeliet, J. (2019). Co-simulation and optimization of building geometry and multi-energy systems: interdependencies in energy supply, energy demand and solar potentials. Appl. Energy 242, 1661–1682. [doi: 10.1016/j.apenergy.2019.03.177](https://doi.org/10.1016/j.apenergy.2019.03.177) Wang, X., Guo, M., Koppelaar, R. H. E. M., van Dam, K. H., Triantafyllidis, C. P., and Shah, N. (2018). A nexus approach for sustainable urban energy-waterwaste systems planning and operation. Environ. Sci. Technol. 52, 3257–3266. [doi: 10.1021/acs.est.7b04659](https://doi.org/10.1021/acs.est.7b04659) Wilcox, S., and Marion, W. (2008). Users manual for TMY3 data sets. Renew. [Energy. 28. doi: 10.2172/928611](https://doi.org/10.2172/928611) World Economic Forum (2014). Towards the Circular Economy: Accelerating the Scale-up across Global Supply Chains. Available online at: [www.weforum.org](http://www.weforum.org) (accessed April 29, 2019). World Economic Forum Water Initiative (2012). Water Security: The Water-Food Energy-Climate Nexus. Washington, DC: Island Press. Wu, P. P-., Y., Fookes, C., Pitchforth, J., and Mengersen, K. (2015). A framework for model integration and holistic modelling of socio-technical systems. Dec. [Support Syst. 71, 14–27. doi: 10.1016/j.dss.2015.01.006](https://doi.org/10.1016/j.dss.2015.01.006) Wu, Q., Ren, H., Gao, W., Weng, P., and Ren, J. (2018). Coupling optimization of urban spatial structure and neighborhood-scale distributed energy systems. [Energy. 144, 472–481. doi: 10.1016/j.energy.2017.12.076](https://doi.org/10.1016/j.energy.2017.12.076) Xianli, W. U., Yangdong, H. U., Lianying, W. U., and Hong, L. I. (2014). Model and design of cogeneration system for different demands of desalination water, heat and power production. Chin. J. Chem. Eng. 22, 330–338. [doi: 10.1016/S1004-9541(14)60036-7](https://doi.org/10.1016/S1004-9541%0x2814%0x2960036-7) Zaviska, F., and Zou, L. (2014). Using modelling approach to validate a bench scale forward osmosis pre-treatment process for desalination. Desalination 350, [1–13. doi: 10.1016/j.desal.2014.07.005](https://doi.org/10.1016/j.desal.2014.07.005) Zhou, X., Gingerich, D. B., and Mauter, M. S. (2015). Water treatment capacity of forward-osmosis systems utilizing power-plant waste heat. Ind. Eng. Chem. Res. [54, 6378–6389. doi: 10.1021/acs.iecr.5b00460](https://doi.org/10.1021/acs.iecr.5b00460) Conflict of Interest: The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. Publisher’s Note: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher. Copyright © 2022 Rezazadeh Kalehbasti, Lepech and Criddle. This is an open-access [article distributed under the terms of the Creative Commons Attribution License (CC](http://creativecommons.org/licenses/by/4.0/) BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms. APPENDIX List of symbols and abbreviations. Subscript Definition w Water d Daily c Per capita a Average h Hourly ww Wastewater cap Capacity Variable Definition Unit Q <sup>d</sup> w Average daily indoor water use m <sup>3</sup> /h GFA Total gross floor area of the building m <sup>2</sup> Q <sup>c</sup> w Average daily indoor water use per capita m <sup>3</sup> /h/person RES <sup>a</sup> Average number of residents per unit area person/m <sup>2</sup> Q <sup>a</sup> w Average daily indoor water use per unit area of building m <sup>3</sup> /h/m <sup>2</sup> Q <sup>h</sup> ww <sup>,</sup> <sup>m</sup> Wastewater outflow at hour h during month m m <sup>3</sup> /h C <sup>h</sup> Coefficient for converting the average daily water use to water use at hour h C <sup>m</sup> Coefficient for converting the average daily water use to water use at month m TES Energy stored in the TES at time t kW �t Time interval (1 h) HTES <sup>in</sup>,t Net heat flow into the TES tank at time-step t kW TESCap Capacity of the TES MWh Parameter Definition kv Temporal loss factor Abbreviation Definition CCHP Combined cooling, heating, and power (Continued) Continued Subscript Definition LCC Life-cycle cost GHG Greenhouse gas emissions CHP Combined heating and power FO Forward osmosis RO Reverse osmosis MD Membrane distillation FO-RO Forward osmosis-reverse osmosis FO-MD Forward osmosis-membrane distillation Res Residential Off Office Com Commercial Ind Industrial Hos Hospitality Med Medical Edu Educational CTP central treatment plant CWWTP Central wastewater treatment plant TES Sensible thermal energy storage USD US dollar SCC Social cost of carbon EPA Environmental protection agency CCHPWWTP CCHP-wastewater treatment plant GA Genetic algorithm SD standard deviation WWT Wastewater treatment KMC K-Means clustering Anl_E Annual energy Anl_WW Annual wastewater treatment demand AD Anaerobic digestion

섹션 본문 211문단 · 195,183자

(제목 없음)

1Designing more sustainable urban infrastructure is an essential topic in practice and research. While many have tried to address this challenge by focusing on sustainability of either supply or demand in a single infrastructure system, few studies have integrated the decisions for both supply and demand across several infrastructure. This paper proposes a novel method to design and optimize the hourly demand and supply of integrated energy and water system in an urban district for environmental and economic sustainability. This modular framework concurrently designs the optimal building mix of an urban district and the systems supplying the district with wastewater treatment, cooling, heating, and electricity. The model is tested on a sample neighborhood from San Francisco, California, with 21 building prototypes, 32 combined heating and power engines, 16 chillers, and 3 wastewater treatment systems (a central treatment plant and two decentralized membrane-based systems). The results of this study show that the median values of normalized life-cycle cost, social cost of carbon, annual energy demand, and annual wastewater production of the integrated designs of waterenergy system are, respectively, 20, 75, 8, and 20% lower than those of the traditional segregated designs. The results also demonstrate the economic and environmental viability of using decentralized advanced treatment in urban areas when energy system, wastewater treatment, and building mix are designed together.

INTRODUCTION Motivation

2While covering only 3% of the earth's land, urban areas accommodate 55% of world population and are responsible for more than two-thirds of global energy consumption and CO 2 emissions (United Nations, 2015;International Energy Agency, 2016). These ever-growing numbers make cities the forefront of the fight against climate change. On the other hand, around 39% of US primary energy is consumed by residential and commercial sectors (Energy Information Administration, 2019): designing more efficient buildings as well as water and energy systems can play an essential role in reducing the energy consumption and environmental footprint of urban districts. Coordinated design of infrastructure has proven to be an effective approach for creating more sustainable urban systems. Such coordination leads to integrated municipal supply systems (e.g., energy and water supply) with improved overall performance when compared to the simple superposition of individual supply systems (Mancarella, 2014). Further, integrated design of infrastructure systems facilitates closed-loop management of resources and can help create "circular economy" in urban areas (World Economic Forum, 2014;Kalmykova et al., 2018).

3This study focuses on integrating urban energy and wastewater treatment systems. Typically, urban energy and water infrastructure are designed after the demands of the community are determined. At that late stage, improving the environmental and economic performance of the system is difficult (Best, 2016). However, if the supply and demand of municipal services are optimized simultaneously, the resulting urban system has proven to outperform the isolated design based on social, economic, and environmental sustainability metrics (Keirstead et al., 2012;Allegrini et al., 2015;Best et al., 2015). Since building mix largely determines the consumption profile of urban neighborhoods (Best, 2016;Wu et al., 2018), simultaneously optimizing the building mix and integrating infrastructure represents an opportunity for designing more sustainable urban systems (Keirstead et al., 2012;Best, 2016). Developing a framework to investigate and understand this opportunity is the focus of this research paper.

Prior Research

4Factors including urbanization, environmental stresses due to climate change, and demand for more livable built environments are creating challenges for cities to satisfy the needs of an increasing urban population (Bauer et al., 2015;Best, 2016;Khan et al., 2017;O'Neill et al., 2017). This imperative is urging urban and infrastructure planners to design more sustainable infrastructure systems that can maintain and improve the livability of cities (Arup, 2016;SF Environment, 2018). However, concerning the focus of this study, literature shows several obstacles to achieving more sustainable water and energy systems in urban areas;

51. Disconnected modeling of supply and demand: This disconnect results in a missed opportunity to design more sustainable systems by leveraging integrated supply and demand optimization (Manfren et al., 2011;Keirstead et al., 2012;Best et al., 2015;Wang et al., 2018), 2. Isolated design of infrastructure: This isolation overlooks the interdependence between different infrastructure systems and the opportunity to increase the efficiency of the overall urban system by exploiting this interconnection (Howells and Rogner, 2014;Wu et al., 2015;Khan et al., 2017;Saidi et al., 2018), 3. Qualitative assessment of economic and environmental outcomes of planning: The application of qualitative assessment, rather than quantitative metrics, yields inefficient designs with suboptimal performance (Coutts et al., 2008;Keirstead et al., 2012;Eicker et al., 2015;Best, 2016;Hukkalainen et al., 2017).

6To address these deficiencies in the context of urban water and energy systems, a framework is needed to optimize the supply and demand of infrastructure systems concurrently (Manfren et al., 2011;Keirstead et al., 2012;Best et al., 2015;Wang et al., 2018;Bakhtiari et al., 2020), integrate the design of urban water and energy infrastructure (Siddiqi and Anadon, 2011;Rodriguez et al., 2013;Bauer et al., 2015;Khan et al., 2017;United Nations, 2019), and provide quantitative feedback on the life-cycle performance of design alternatives (Keirstead et al., 2012;Best et al., 2015;Eicker et al., 2015). This paper develops such a framework to design the supply and demand of integrated wastewater treatment and energy infrastructure for urban neighborhoods. The framework designs infrastructure systems at the neighborhood scale and on an hourly basis following the recommendations by Hawkes and Leach (2005), Jaccard (2006), Evins et al. (2011), and Best et al. (2015).

Co-optimizing Supply and Demand in Energy Systems

7Jaccard (2006) defined energy system as "the combined processes of acquiring and using energy in a given society or economy." Manfren et al. (2011), Keirstead et al. (2012), and Allegrini et al. (2015) reviewed 400+ articles and tools on modeling supply and demand in urban energy systems, and concluded that frameworks must be developed to concurrently optimize energy supply and demand technologies at an urban scale. These frameworks can enable designers to make urban energy systems which are more efficient than systems created using traditional design methods (Manfren et al., 2011;Allegrini et al., 2015;Best, 2016).

8To address this requirement, Best et al. (2015) made a framework to simulate and optimize the energy supply systems and the building mix of an urban district composed of 100-1,000 neighboring buildings. As a case study, Best et al. (2015) used NSGA-II Genetic Algorithm (Deb et al., 2002) to optimize the building mix and the combined cooling, heating, and power (CCHP) plant for an arbitrary development in San Francisco for minimum life-cycle cost (LCC), minimum greenhouse gas emissions (GHG), and maximum energy efficiency. The simulation successfully generated many neighborhoods with desirable life cycle costs, zero and near-zero operational GHG emissions, and energy efficiencies more than 70%.

9Best et al. took an essential step in integrating the optimization of the supply and demand of energy and numerically evaluating the infrastructure and urban planning. However, this framework and its successors did not consider the non-energy infrastructure. Wu et al. (2018) followed the method proposed by Best et al. (2015) and added simplified pumping and heat losses as functions of pipe dimensions. Wu et al. optimized the building mix and Combined Heating and Power (CHP) engine for an arbitrary neighborhood in Shanghai, China.

10More recently, Waibel et al. (2019) developed a framework for parametrically optimizing buildings and supply technologies in an urban setting. They optimized the height and geometry of four office buildings in Zurich, Switzerland. Supply systems for electricity, space heating, hot water, and cooling were composed of electricity and heat generators, an absorption chiller, and storage technologies. Waibel et al. developed a nested bi-level optimization routine to avoid direct multi-objective optimization and used it to minimize the life cycle cost and carbon emissions of the system. They also simplified the timescale for the optimization from an entire year to only 6 weeks. Similar to Best et al. (2015) and Wu et al. (2018), this paper focused only on energy infrastructure, and did not consider the water system and designing an integrated water-energy infrastructure.

The Water-Energy Nexus

11Until recently, urban water and energy infrastructure systems were planned and managed independently (Howells and Rogner, 2014). However, urban infrastructures are becoming more interdependent in the face of mutual challenges including aging, population growth, shrinking resources, extreme events, and climate change (Bauer et al., 2015;Saidi et al., 2018;Moazeni et al., 2020). In particular, "integrated water and energy planning" has gained global public and scholarly attention due to recent difficulties faced by many countries to secure sustainable water and energy resources (Rodriguez et al., 2013;Bauer et al., 2015;Khan et al., 2017;United Nations, 2019;Huang et al., 2020). This concept, dubbed the "water-energy nexus, " focuses on the interrelations between production, transmission, and consumption of water and energy (Siddiqi and Anadon, 2011;Bauer et al., 2015;Dai et al., 2018).

12Water used for power plant cooling accounts for half of the freshwater withdrawals in the US (World Economic Forum Water Initiative, 2012). Meanwhile, water scarcity and growing demands require new sources of freshwater and more efficient technologies to treat water and generate energy (Luck et al., 2015;Khan et al., 2017). Wastewater treatment using the wasted heat and electricity of a power plant has shown to be effective in:

131. reducing the need for power plant cooling and, consequently, the required cooling water (Khan et al., 2017;Gingerich and Mauter, 2018), 2. improving the energy efficiency of the integrated water-energy system by increasing the amount of useful work done per unit input fuel (Khan et al., 2017;Gingerich and Mauter, 2018), 3. providing a fresh and "renewable" source of potable/irrigation water for cities (Cath et al., 2009;Guo and Englehardt, 2015;Atab et al., 2016), 4. reclaiming the wastewater and mitigating the environmental repercussions of discharging it into receiving waters (McGovern and Bastian, 2009), and 5. creating a potential revenue stream for cities through selling the reclaimed water (Dayton et al., 2016).

14Many studies on the water-energy nexus assess the water consumed in different processes involved in energy generation (e.g., Bouckaert et al., 2014;Khan et al., 2017;Murrant et al., 2017), or the energy consumed or produced during desalination or water treatment (e.g., Al-Karaghouli and Kazmerski, 2013;EPA, 2013;Gude, 2015;Buonocore et al., 2018). A subset of these studies examines the direct integration of power plants and desalination/water-treatment facilities. A part of these works focuses on implementing small-scale combined heating and power (CHP) or combined cooling, heating, and power (CCHP) plants inside existing water or wastewater treatment facilities to use the biogas from digestion processes (Chacartegui et al., 2013;Caceres and Alca, 2016;Mehr et al., 2018;MosayebNezhad et al., 2018). Other researchers have studied CHP/CCHP plants powering the desalination processes, also called dual-purpose or water-power plants. Examples of these articles are found in Ferreira et al. (2010), Xianli et al. (2014), González-Bravo et al. (2017), andMata-Torres et al. (2019). Of specific interest, Zhou et al. (2015) modeled a wastewater treatment system based on forward osmosis (FO), which used the waste-heat from a thermal power generator to recover the draw solution of the FO process. Zhou et al. concluded that the FO process can treat the boiler makeup water and desulfurize the flue gas of all power plants in the US using the waste heat from the plants. The detailed modeling in this study provides evidence for the feasibility of combining a membrane-based treatment system with a power plant to exploit the waste-heat from the facility for wastewater treatment. In another study, Gabriel et al. (2016) investigated the techno-economic feasibility of several use-cases for excess heat from industrial processes. Gabriel et al. modeled power and cooling generation, as well as seawater desalination, using multi-effect and reverse osmosis processes to leverage industrial waste heat.

15More recently, Gingerich and Mauter (2018) studied 66 retrofit configurations to comply with scenarios of air and wastewater emission regulations (planned for 2030) for a typical coal-fired power plant. They combined several carbon capture and wastewater treatment technologies to retrofit the plant and use the electricity or residual heat and steam generated by the plant. The potential revenue under each scenario was then used to evaluate the combinations. The authors concluded that under the strictest regulation scenario, maximum revenue would result from allocating waste heat to amine-based carbon capture and allocating electricity to a mechanical vapor recompression water treatment system. This study is one of few in which the heat and electricity consumption of modern wastewater treatment technologies (including FO) are used to complement the operation of a power plant. Notwithstanding, their optimization algorithm adopted a single objective, and the operation of the plant and the considered technologies were independent of time and ambient temperature. Therefore, the effects of variations in the energy and wastewater treatment load as well as the ambient temperature on the operation of the facility were not captured.

Objective and Contributions

16CCHP plants are a recurrent example of integrated energy infrastructure in practice and research. These plants have shown up to 30% higher overall energy efficiency than comparable segregated energy systems (Rezaie and Rosen, 2012;DOE, n.d).

17Despite the high efficiency of a CCHP plant, its constant power-to-heat ratio often causes electricity and heating losses (Díaz et al., 2010), as the electricity and heat demanded from the plant to power the network throughout the day do not necessarily align with this fixed ratio. Studies have shown that a wastewater treatment system located within or near the CCHP plant can effectively exploit any "excess" heat and electricity (Elimelech and Phillip, 2011;Zhou et al., 2015), providing an opportunity to design and optimize the water treatment and energy systems concurrently. Given growing water scarcity in many urban areas around the globe, this integration is important for curtailing the fresh water withdrawal used for dissipating the excess heat due to energy generation (Luck et al., 2015;Khan et al., 2017;Energy Information Administration, 2019) and providing decentralized wastewater treatment systems at the neighborhood scale. To realize this opportunity, this paper proposes a framework to design and optimize the demand and supply of integrated energy and water systems (water-energy nexus) for environmental and economic sustainability in an urban neighborhood on an hourly basis.

18The contributions of this paper are as follows:

191. Hourly water demand profiles of 21 building types: This paper creates, for the first time, the hourly water demand profiles for 21 building archetypes which represent more than 70% of the buildings in the US (Deru et al., 2011;Best et al., 2015), for the climate zone of San Francisco County, CA. This contribution is essential for integrating the design of different infrastructure systems with the water system at the neighborhood scale. Section Hourly Wastewater Treatment Demand details this contribution. 2. Models for hourly energy consumption and life-cycle cost of FO-RO and FO-MD wastewater treatment systems: This paper introduces computational models of the specific energy consumption, as well as the capital and operational costs of, forward osmosis-reverse osmosis (FO-RO) and forward osmosis-membrane distillation (FO-MD) treatment systems as functions of the temperature and flow of the input wastewater. These compact wastewater treatment systems can be located within the energy plant, can use the waste heat and electricity from the CHP engine to operate, and can output water ranging in quality from irrigation to drinking. These models provide a straightforward method to include these high-performance treatment systems in largescale simulations of the water system, and enable integrated design of a wastewater treatment system or desalination system with the energy infrastructure. Section Wastewater Treatment Module details the developed models. 3. Integrated approach to designing the wastewater treatment and energy system: The framework proposed in this paper is the first of its kind to concurrently design the optimal building mix of an urban neighborhood and the systems supplying the neighborhood with wastewater treatment, cooling, heating, and electricity on an hourly basis. The proposed framework is expected to inform urban planners and infrastructure designers of a "range" of optimal configurations, e.g., in terms of building mix or floor area ratio, for designing a neighborhood, thereby allowing them to flexibly select infrastructure systems and enact zoning rules leading to more sustainable urban neighborhoods when measured in terms of environmental and economic sustainability metrics. Unlike the typical approach where the energy system is designed independently from the wastewater treatment system, the proposed method allows for designing urban neighborhoods with lower life-cycle cost and emissions by reducing the energy loss and by improving the overall efficiency of the integrated energy system-wastewater treatment. The accuracy of the outputs of this integrated framework depends directly upon the accuracy of the models simulating the supply technologies, i.e., the CCHP engines and the wastewater treatment system, and the demand systems, i.e., the building models.

MODEL DEVELOPMENT

20The model presented here extends and improves a previous framework created by Best et al. (2015) in Python programming language (Van Rossum, 2007). The original framework by Best et al. (2015) was able to simulate the supply and demand of energy for a community given its building uses and energy supply equipment. Three main modules comprised the original framework: (1) energy demand modeler, (2) energy supply modeler, and (3) analyzer and optimizer. The first component, "energy demand modeler, " could simulate the annual hourly cooling, heating, and electricity demands from several building archetypes and the associated losses at the supply and distribution levels. The "energy supply modeler" could model the hourly performance of a range of combined heating and power (CHP) engines and chillers given the ambient conditions (e.g., ambient temperature and pressure) as well as heating, cooling, and electric loads imposed on the engines. The final component of the framework, "analyzer and optimizer, " could (1) evaluate the lifetime performance of the supply equipment in terms of the defined optimization objectives (e.g., annual carbon emissions, life-cycle cost of equipment) and (2) using an evolutionary algorithm generate a set of neighborhoods optimized with respect to the optimization objectives. This study extends the demand modeler from the framework mentioned above by enabling it to model the hourly wastewater treatment demands for the 21 building archetypes presented by Best et al. (2015). This work also enables the supply-side module in the mentioned framework to model wastewater treatment systems and thermal energy storage. The former is done by adding three wastewater treatment technologies to the set of supply models developed by Best et al. (2015): two modern hybrid treatment technologies, namely Forward Osmosis-Reverse Osmosis (FO-RO) and Forward Osmosis-Membrane Distillation (FO-MD), and one conventional central treatment. These treatment technologies augmented with a set of pre-treatment and post-treatment techniques can treat input municipal wastewater up to a potable quality. Finally, the triple optimization objectives in the original frameworkannual carbon emissions, total fuel cycle energy efficiency, and undiscounted life-cycle cost of equipment-are reduced here to two modified objectives-discounted life-cycle social cost of carbon and discounted life-cycle cost of equipment, both normalized by the total gross-floor area of the buildings in the neighborhood. Figure 1 shows the flow diagram of the proposed framework, showing the three main components (supply module, demand module, and analysis and optimization module) and their subcomponents.

21The following provides the semi-formal formulation of the optimization problem solved by the proposed framework:

22Objective Functions Sum of all building footprints must be less than 0.7 km 2 Sum of all floor areas (i.e., total GFA) must be larger than 0.1 km 2 but less than 3.3 km 2

23The following sections detail the demand module, supply module, and optimization objectives.

Hourly Wastewater Treatment Demand

24This work enables the demand module from Best et al. (2015) to model the hourly wastewater treatment demands for the 21 building archetypes originally discussed by Best et al. (2015) which represent more than 70% of the buildings in the US (Deru et al., 2011). Table 1 shows a summary of the specifications for these 21 building archetypes. The hourly wastewater outflow for these building archetypes were modeled by converting the potable water demand for each building into the wastewater generated by the building. Table A2 in Supplemenatry Material lists the references used to create the profiles of hourly water use for these 21 building archetypes over the 12 months of the year. As mentioned later in this article, San Francisco, CA, is selected as the location of the test case study; hence, studies on buildings located in San Francisco or in areas of California with similar climates to San Francisco, e.g., Santa Barbara ("IECC Climate Zone Map | Building America Solution Center", 2012), were used for synthesizing the water demand profiles for the 21 building archetypes. The water demand was considered only for indoor use-outdoor use, comprised mostly of irrigation use, was disregarded in this study.

25In converting water use to wastewater outflow, the consumptive use of water in the buildings was conservatively assumed negligible, i.e., the outflow of wastewater was taken equal to the inflow of potable water. The average daily water use of the four "residential" building types were calculated using Equation (1).

26here Q d w is the average daily indoor water use (m 3 /h), GFA is the total gross floor area of the building (in m 2 ), RES a is the average number of residents per unit area (person/m 2 ), and Q c w is the average daily indoor water use per capita for the building (m 3 /h/person). For this equation, for each different building type, the average number of residents per unit area was extracted from Deru et al. (2011) and the average daily indoor water use per capita was extracted from Carollo Engineers (2015). The average daily water use (Q d w ) for all the other building types, except for the mixed-use buildings, were calculated using Equation (2).

27here Q a w is the average daily indoor water use per unit area of the building (m 3 /h/m 2 ) based on US EIA (2017).

28The average daily water use (Q d w ) of mixed-use building M1 (symbol explained in Table 1) was computed by combining the average daily water uses of buildings R1 and C2 proportional to the gross-floor-area assigned to each building type, i.e., 8,621 m 2 of R1 and 784 m 2 of C2, based on the definition of this mixeduse building archetype (Best et al., 2015). The same approach was followed for computing the average daily water use for mixed-use building M2: the average daily water uses of buildings O1 and C2 were combined proportional to the gross-floor-area assigned to each, i.e., 8,621 m 2 of O1 and 784 m 2 of C2. Assuming the same water demand profile for every day in a month, the wastewater demand of each building type at each hour was calculated using Equation (3).

29here Q h, m ww is the wastewater outflow at hour h during month m (m 3 /h), Q d w is the average daily indoor water use (m 3 /h). C h and C m are the hourly and monthly coefficients for converting the average daily water use to water used at hour h and in month m, respectively. The assumption of constant daily water demand profiles for each day in a month enabled us to construct hourly profiles of water demand over the entire year across several building types within the same climatic region. We recognize that such profiles do change but found that this information is lacking in the technical and academic literature. Tables 2-4 list Q d w , C h and C m , respectively, for all the 21 building archetypes.

Wastewater Treatment Module

30This work enables the framework proposed by Best et al. (2015) to simulate wastewater treatment processes at the neighborhood scale. For this purpose, three wastewater treatment technologies are modeled and added to the supply module of the original framework: two membrane-based treatment technologies, namely FO-RO and FO-MD, and one conventional central treatment plant (CTP). These treatment systems augmented with pre-treatment and post-treatment processes can treat municipal wastewater to a drinking quality. "Appendix B: Wastewater Characteristics" in Supplementary Material shows the assumed composition of the input wastewater, the required quality of the output drinking water, and discusses the treatment capabilities of FO-RO and FO-MD systems. The advanced water/wastewater treatment technologies Forward Osmosis (FO), Reverse Osmosis (RO), and Membrane Distillation (MD) have recently received considerable attention from researchers and practitioners for water reuse applications (Alkhudhiri et al., 2012;Council, 2012;McCutcheon and Huang, 2013;Coday et al., 2014;Blandin et al., 2015;Shaffer et al., 2015; Guizania et al., 2019). This is partly because these technologies are more compact, require lighter maintenance, are easier to automate, and can more effectively remove pathogens compared to traditional treatment systems (Council, 2012). These systems have consistent effluent quality and can potentially reduce the chemical demand of the treatment process (Council, 2012).

31Such qualities make these technologies ideal for implementing at a combined cooling, heating, and power (CCHP) plant with limited space, and for treating domestic wastewater to drinking water quality-a procedure which requires robust treatment processes. RO and MD membranes suffer irreversible fouling (Husnain et al., 2015a,b;Kim et al., 2018). This phenomenon gradually reduces the water flux, demanding frequent replacement of the membrane. FO can largely mitigate this problem when used as a pretreatment step for RO (Cath et al., 2005;Zaviska and Zou, 2014;Kim et al., 2018) and MD (Husnain et al., 2015a,b). FO prevents the foulants from reaching the RO or MD membrane, whereas the resulting fouling of the FO membrane is mostly reversible and can be resolved with backwashing and chemical cleaning (Husnain et al., 2015a,b). Further, FOpretreatment filters the bacteria, viruses, and organic and inorganic compounds (Zaviska and Zou, 2014;Akther et al., 2015) making for a more robust treatment.

32"FO-RO" (Figure 2) and "FO-MD" (Figure 3) are the hybrid treatment processes resulting from combining FO process with RO and MD. The wastewater treatment module in the framework introduced here incorporates these two systems as the main "integrated" wastewater treatment technologies, i.e., treatment technologies collocated with the energy supply equipment. This module takes as its input the volume of hourly wastewater produced by the neighborhood and the ambient temperature (taken as the temperature of the wastewater). Assuming a 24-h storage capacity for the input wastewater, the module calculates the maximum membrane area required to treat the 24-h movingaverage of the inflow over the entire year. This number is used to calculate the capital and operational expenses of the treatment systems. The treatment module also outputs (1) the hourly electricity and heat demand of the selected treatment models (which will be supplied by the CHP engines), and (2) the operational electricity requirement as well as the initial and operational expenses associated with the pre-treatment processes, e.g., screening, and the post-treatment processes, e.g., disinfection and pH adjustment. The calculation of life-cycle expenses for the treatment modules also considers the costs associated with chemicals, labor, retentate handling, and all the other expenses required for normal operation of a treatment plant (Al-Obaidani et al., 2008;McGivney and Kawamura, 2008).

33Both treatment models consume electricity while the FO-MD also consumes low-grade heat to treat the wastewater. This characteristic was the other reason for selecting these systems to be integrated with the CCHP plant: these wastewater treatment technologies can consume the unused heat and electricity generated by the CHP engine, and thus mitigate the loss of primary energy and increase the efficiency of the integrated CCHP-wastewater treatment plant over the levels achievable using segregated systems. FO-RO only requires electricity to operate while FO-MD mostly requires heat: FO-RO consumes 3.34 kWh of electricity, while FO-MD consumes 33.2 kWh of heat and 0.55 kWh of electricity to treat 1 m 3 of input wastewater at 20 • C. The optimization algorithm is expected to favor FO-RO for treating the wastewater in cases with large amounts of extra electricity (generated by the CHP engine), and to favor FO-MD in cases with large quantities of extra heat. As Figure 3 shows, the excess heat produced by the CHP engine will be used to heat the feed water to the MD process, while the ambient air will be used to cool the product water and concentrated draw solution. The induced temperature difference will provide the vapor pressure difference required to run the MD process. "Appendix C: FO-RO" and "Appendix D: FO-MD" in Supplementary Material detail the mathematical models developed for simulating the FO-RO and FO-MD systems, respectively, with overall water recovery ratios (RR) of 50%.

34In addition to the integrated treatment systems, a conventional wastewater treatment plant was modeled according to the treatment plant serving the location of the case study in San Francisco. "Appendix E: CWWTP" in Supplementary Material describes the model developed for computing the electricity requirements and expenses associated with this central plant. The wastewater treatment module takes as its input the aggregated hourly demands of the neighborhood for wastewater treatment, and computes the required cost and electricity (1.1 kWh per 1 m 3 of input wastewater) to process this wastewater as well as the emissions due to the treatment process. The resulting heating and electric loads are added to the rest of the heating and electric loads imposed on the CHP engine. This module also considers the costs of chemicals, labor, bio-solid and retentate handling, and all the other expenses required for normal operation of a treatment plant (McGivney and Kawamura, 2008).

Thermal Energy Storage Model

35This study enables the supply-side modeler from Best et al. (2015) to model Sensible Thermal Energy Storage (TES). Hot water storage tanks are selected and modeled for this purpose: hot water generated by the CHP engine for heating with a source temperature of 85 • C (Best, 2016) is assumed to get stored in the TES and discharged to satisfy the heating loads when necessary. Four primary factors contribute to the heat loss in a storage tank (Dincer, 2002): heat loss to the surrounding environment, heat conduction between the segments of the storage fluid with higher and lower temperatures (due to the stratified storage of hot water), vertical conduction in the tank wall, and mixing of water during charging and discharging. "Capacity model, " a common loss model (Schütz et al., 2015), assumes the hot water tank to contain a homogenous fluid. With this assumption, the thermal storage at each time-step can be calculated using Equation (4):

36where TES is the energy stored in the TES at time t [in kW], k v is a temporal loss factor (assumed 0.0534% based on Schütz et al., 2015), t is the time interval (1 h), and H in TES,t [in kW] is the net heat flow into the TES tank at time-step t (positive for net charging and negative for net discharging of the tank).

37Equation (5) here, TES Cap is the capacity of the TES [in MWh], and 1.17 is a factor converting 2008 USD to 2019 USD (CPI, 2020). The TES is sized to store enough hot water to satisfy 6 h of maximum aggregate heating demand from the buildings that is computed for each designed neighborhood. The unused heating, in the form of hot water, at each hour gets stored in the TES tank, and the stored hot water in the tank is the first resource responding to heating demand at each hour, i.e., TES has priority over the CHP engine for satisfying the heating demand.

Objective Functions

38The original objective functions defined by Best et al. (2015) comprised undiscounted life-cycle cost of equipment, annual CO 2 emissions of equipment, and total-fuel-cycle energy efficiency. In this study, the energy efficiency metric was removed from the set of objectives, as it was considered intangible and with no direct monetary or environmental consequences which were not captured by the other two objectives. Reducing the number of optimization objectives lowered the complexity of the optimization algorithm: now, the algorithm needs to inspect only two objectives rather than three when comparing different neighborhoods and finding the most optimal ones. Further, the two optimization objectives for carbon emissions and life-cycle cost were normalized by the GFA of the neighborhood. Without this normalization, the optimization algorithm would only favor neighborhoods with low emissions or low operational costs regardless of their size: e.g., a small neighborhood with 10,000 ft 2 of total GFA, would be equivalent to a 1,000,000 ft 2 neighborhood if they both have the same values of annual carbon emissions and life-cycle cost. However, the larger neighborhood is satisfying a much larger demand in a far more sustainable way than the smaller neighborhood. Normalization addresses this error, enabling the optimization method to achieve optimal (sustainable) neighborhoods with a variety of sizes.

39Also, to make more tangible the environmental impacts of building and operating the neighborhood, Social Cost of Carbon (SCC) was used to convert the annual carbon emissions into dollar values representing the social, environmental, and economic damage resulting from CO 2 emissions (EPA, 2016). Among the different models used to calculate SCC, the version created by US Environmental Protection Agency (EPA) was chosen to be used here (EPA, 2016). "Appendix F: Social Cost of Carbon" in Supplementary Material presents the regression function used to calculate the SCC for each year over the design period. In this new objective function, the carbon emissions associated with the construction of the equipment were also accounted for in addition to the operational emissions. The construction costs were converted into equivalent carbon emissions using conversion factors from EIO_LCA database (Carnegie Mellon University, 2007) for the construction of utilities: 243 Tons of CO 2e was assumed to result from 1 million 2007 USD worth of economic activity.

Introduction

40To showcase the capabilities of the proposed framework in cooptimization of supply and demand as well as integrated design of water and energy infrastructure, a case study was conducted based on that proposed by Best et al. (2015). Best et al. modeled a 160-acre greenfield development in Civic Center, San Francisco, and simulated the electricity, cooling, and heating demands of 21 building archetypes (presented in Table 1) using EnergyPlus ver. 8.0.0 (Crawley et al., 2001). Best et al. also modeled 32 CHP engines and 16 chillers as the set of supply equipment. The same 160-acre development, building archetypes, CHP engines, and chillers are considered in this study with the following modifications: (i) Hourly wastewater treatment demands were added to the set of energy demands of the buildings, (ii) Thermal Energy Storage and three wastewater treatment technologies (namely, FO-RO, FO-MD, and CWWTP) were added to the original set of supply models, and (iii) the optimization objectives were changed to GFA-normalized life-cycle cost of equipment and life-cycle social cost of carbon.

41The proposed model was run for two scenarios: (i) In the first one, the building mix and energy system were designed and optimized together, while a conventional central wastewater treatment plant (CWWTP) treated the wastewater from the buildings, and (ii) in the seconds scenario, the building mix, energy system, and wastewater treatment system were optimized and designed concurrently. In the first scenario, the grid was assumed to supply the electricity required by the CWWTP, and grid emissions for generating this electricity were attributed to the CWWTP. The emissions and expenses of the CWWTP were in turn attributed to the neighborhood in proportion to the ratio of the "average daily wastewater output of the neighborhood" to "57 MGD" (i.e., the actual average daily input of the treatment plant). Since the existing CWWTP serving the location of the case study, i.e., Southeast Treatment Plant (SF PUC, 2019), does not produce potable water, it was arbitrarily replaced by a conventional treatment plant of the same size but capable of producing potable water-as also explained in Appendix E: CWWTP Model in Supplementary Material. This modification was necessary to make the two scenarios comparable. In the seconds scenario, a combined CCHP-wastewater treatment plant (CCHP-WWTP) supplied the energy and wastewater treatment demand of the buildings.

42Both scenarios were designed for minimum life cycle cost of equipment (LCC) and minimum social cost of carbon (SCC). The LCC optimization objective incorporated the construction and discounted operation and maintenance costs of only the CCHP plant for the first scenario, and the entire CCHP-WWTP for the seconds. The SCC optimization objective considered the construction and discounted operation costs of carbon emissions associated with only the CCHP plant for the first scenario, and the entire CCHP-WWTP for the seconds. Both scenarios were simulated for 20 year of operation with a 3.5% discount rate. The neighborhoods generated by the optimization algorithm were compared in terms of their total (i.e., including those associated with the CWWTP) life cycle cost of equipment, operational and construction GHG emissions, types of supply technologies, and building mix among other metrics. The LCC and SCC calculations excluded the reuse and redistribution of the recovered water.

43The excess electricity generated during each hour was assumed to be sold back to the grid at 80% of the purchase price at that hour which was extracted from CAISO for year 2018 (California ISO, 2019). The hourly ambient temperature for the case study was extracted from TMY3 dataset for the San Francisco International Airport (Wilcox and Marion, 2008). Further, the grid emissions for each hour were extracted from Beyond Efficiency (Beyond Efficiency, 2017) for year 2016.

Results and Analysis

44The two scenarios, namely scenario 1 (conventional design) and scenario 2 (integrated design), were simulated each using an Intel Xeon E5-2640v4 processor (10-core Broadwell, 2.40 GHz) with 800 MBs of effective memory use over 145 mins of CPU wall-clock time. The map method from Scoop library (Hold-Geoffroy et al., 2014) was used to parallelize the map calls to Genetic Algorithm (GA) methods from Deap library (Fortin et al., 2012). The advantage of using a GA for solving this problem is that it does not require assignment of weights to either of the two objective functions, and instead enables simultaneous optimization of both objectives (Deb et al., 2002). The GA algorithm, NSGA-II, used the following optimization parameters based on the recommendations of Best et al. (2015):

45Number of generations = 1,000; Population = 200; Mutation Probability = 0.05; Similarity Parameter = 2.5; Crossover Probability = 0.75.

46Substituting series data processing with parallelized Numpy (Oliphant, 2006) operations, reducing the number of objective functions from three to two, and other minor technical upgrades cut the optimization runtime by 97% compared to the optimization with the same configurations done using the original framework in Best et al. (2015). Of the 200,000 neighborhoods produced by the GA algorithm for each scenario, 93,210 for scenario 1 and 87,644 for scenario 2 had admissible total GFA (i.e., less than 3,237,485 m 2 ) and site GFA (i.e., less than 647,497 m 2 ). These neighborhoods are called the "admissible neighborhoods" from this point on. Figure 4 shows the two GFA-normalized objective functions of the optimization, social cost of carbon vs. life-cycle cost, for all the admissible neighborhoods with SCC values less than 0.10 k$/m 2 , i.e., the 99.8th and 99.7th percentile of SCC across all neighborhoods in the first and the seconds scenario, respectively. Earlier generations of neighborhoods produced by the GA are plotted using symbols that are more transparent than the later ones. One outstanding observation from Figure 4 is that the optimization algorithm has successfully identified paths to designing neighborhoods with minimum LCC and SCC over consecutive generations: the dots (neighborhoods) closer to the origin (which has the ideal lowest SCC and LCC, i.e., 0 kg of lifetime CO 2 emissions and $0 of life-cycle cost) are more opaque (belong to later generations) than the dots farther away from the origin. Figure 4 also offers an insight on the comparison between the two scenarios: the blue dots in the figure are generally located lower than their adjacent red dots. This implies that the integrated design scenario, scenario 2, has resulted in neighborhoods with generally lower SCC than those of conventional design, scenario 1, for the same values of LCC. Figure 5 shows the approximate Pareto fronts of the two scenarios for the objective functions, life-cycle cost and life-cycle social cost of carbon, highlighted in yellow. In the Pareto optimal solutions, the SCC values of the integrated approach seem to be about 1/3 the SCC values of the segregated approach, while the LCC values of these solutions are similar between the two FIGURE 4 | Life-cycle social cost of carbon vs. life-cycle cost of equipment for the individual neighborhoods (single dots on the plot), with SCCs less than 0.1 k$/m 2 , generated by the optimization algorithm for the analyzed scenarios. Neighborhoods generated in later generations by the Genetic Algorithm are shown more opaque than the earlier generations (Red dots: conventional design, blue dots: integrated design).

47scenarios. These two observations about the Pareto fronts comply with the general trends deduced in the previous paragraph.

48To get a better understanding of the distribution of performance metrics across the designs produced by the two scenarios, standard deviation (SD), mean (average), 25th percentile, 50th percentile (median), and 75th percentile of LCC, SCC, annual aggregated energy demand, and annual wastewater treatment demand for all the neighborhoods resulting from the two design scenarios were calculated- Table 5 shows the results. The annual aggregated energy demand for each neighborhood was calculated by summing the total electricity and heating demand of the buildings and supply equipment (including chillers and treatment systems) over 8,760 h of the year. In this table, "CCHP | CWWTP" denotes scenario 1, and "CCHP+WWT" denotes scenario 2. The numbers in Table 5 are unitless since the values of each metric for each variable, e.g., 25th percentile of LCC, for both scenarios are normalized by the value of the scenario 1. This facilitates comparing the statistical metrics of the seconds scenario against those of the first scenario by converting the metrics of the first scenario into unity.

49The results in Table 5 show that integrated design of energy and wastewater treatment systems has resulted in lower life-cycle carbon emissions and cost as well as lower annual energy and wastewater treatment demands compared to a separate approach to the design of these two infrastructure systems. The difference in life-cycle social cost of carbon is the most noticeable, with scenario 2 having a mean value 56% lower than scenario 1. The reduction in mean values of annual demands from scenario 1 to 2 is ca. 40%. Comparing the SDs of the two scenarios also offers another observation: the optimal neighborhoods produced by the GA under scenario 2 are closer (more uniform) in terms of the four parameters inspected in Table 5. This can imply the existence of some neighborhoods with dominant genes (i.e., configurations resulting in very low SCC and LCC) in the population of scenario 2 which have been identified by the GA and sustained across multiple generations of the analysis.

50To further inspect the differences between the designs resulting from the two scenarios, K-Means Clustering (KMC) was used to create clusters of similar individuals among the admissible neighborhoods based on eleven features: the seven building-type ratios (i.e., GFA associated with each building type divided by the total GFA of the neighborhood), GFA-normalized LCC and SCC, and GFA-normalized annual energy and wastewater treatment demands. The features were standardized before clustering, and K-Means Clustering method from Scikit-Learn library (Pedregosa et al., 2011) was used to conduct the clustering with the following variables:

51Initialization_method: "k-means++"; max_iterations: 300; n_init: 10; random_state: 42; tol: 0.0001.

52Euclidean distance was selected as the measure of proximity for clustering. The number of clusters was varied between 8 and 40 to find the highest average Silhouette Score (Rousseeuw, 1987) and lowest cost function across all clusters: for both scenarios, the highest Silhouette scores (0.53 for scenario 1, and 0.32 for scenario 2) were obtained for 10 clusters. However, the cost function (i.e., sum of squared distances to centroids) for the 10-cluster configuration was high −233,834 (2.51 per individual) and 257,098 (2.93 per individual) for scenarios 1 and 2, respectively-and the clusters were unevenly populated. To solve this issue, the number of clusters was set to 26 (scenario 1) and 40 (scenario 2) which had yielded other local optima of the Silhouette Score among the tested number of clusters. These new cluster counts resulted in acceptably reduced cost functions of 105,064 (i.e., 1.1 per each neighborhood) for scenario 1 and 107,026 (i.e., 1.2 per each neighborhood) for scenario 2 with Silhouette scores of 0.36 and 0.31, respectively.

53After the KMC algorithm converged, clusters with less than 500 members were removed to prune out the outliers, and the remaining centroids (19 centroids for scenario 1, and 27 for scenario 2) were plotted in Figure 6. Each cluster centroid in this figure is shown as a continuous, unicolor line across the eleven variables along the x-axis, and the thickness of each line is proportional to the number of neighborhoods represented by that centroid. SCC, LCC, and the annual energy and wastewater demands for both scenarios in Figure 6 are normalized by the maximum values of each variable from both scenarios, and are presented in percent. Figure 6 shows that the building mix and normalized annual energy and wastewater demand for the most populous clusters of optimal neighborhoods for both design approaches cover roughly the same ranges of values. However, the most populated The cell colors in the table range from sharp red for a normalized value of 1 to sharp green for a normalized value of 0.

54FIGURE 6 | Traces of the cluster features-i.e., building area percentages for Residential, Office, Commercial, Industrial, Hospitality, Medical, and Educational buildings ( Table 1 shows the building types belonging to each of these building-uses), normalized LCC and SCC, normalized annual energy (Anl_E), and wastewater treatment demand (Anl_WW)-across the centroids of the clustered neighborhoods for (A) scenario 1 and (B) scenario 2. Each centroid is shown as a unicolor line connecting eleven points across the seven building-uses and the four metrics.

55clusters in scenario 2 have lower GFA-normalized SCC and LCC than those of scenario 1, corroborating the statistical data from Table 5. Also implied by the low standard deviation values of scenario 2 in Table 5, the most populous centroids of scenario 2 in Figure 6 are spread over smaller ranges of the eleven parameters plotted in the figure. The GFA ratios of individual building types show that (i) the percentage of residential buildings ranges from 0 to 60% for both scenarios, (ii) the office buildings range from 30 to 95% in scenario 1 and from 15 to 100% in scenario 2 with a high concentration around 80 to 100%, (iii) industrial and educational buildings are mostly negligible in scenario 1, while they range from 0 to 10% in scenario 2, and (iv) hospitality and medical buildings are mostly negligible in scenario 1 with two exceptional clusters showing ∼30 and ∼60% hospitality and medical type-ratios, while they range from 0 to 20% in scenario 2. These ranges show that the integrated design has resulted in a more diverse building mix among the optimal designs. Figure 6 offers another interesting observation: the building mix in the majority of optimal neighborhoods from both scenarios have a low share of residential buildings, a medium to high share of office buildings, low shares of educational and industrial buildings (in scenario 2), and trivial shares of commercial, hospitality, and medical buildings. This mix of building types seems to provide the lowest LCC and SCC per unit area among all possible building mixes inspected by the optimization algorithm and is hence predominant among the optimal building mixes for both scenarios.

56The types of selected supply equipment -were also analyzed for the admissible neighborhoods from both scenarios to identify the connections between the choices of supply equipment choices and metrics of life-cycle performance. Figure 7 shows for the two scenarios the normalized SCC against the types of CHP engines selected in neighborhoods with SCCs less than 0.1 k$/m 2 , i.e., the 99.8th percentile of the first scenario and 99.7th percentile of the seconds. In both cases, the neighborhoods with smallest SCCs use biomass/biogas, or fuel-cell CHP engines, which is consistent with the fact that the operation of these engines is deemed carbon-neutral since they are assumed to use renewable fuels (Best et al., 2015). The Pareto optimal solutions marked in Figure 5 are expected to be among these neighborhoods with carbon-neutral CHP engines, since the Pareto optimal solutions also have very low SCC values compared to the rest of the solutions. The neighborhoods designed with carbon-neutral CHP engines in scenario 1 seem to have a lower SCC compared to neighborhoods using the same engines in scenario 2. Further, since a large portion of the CHP engines selected in both scenarios for the local energy system are those with negligible operating emissions, supplying the wastewater treatment equipment with the local energy system in the integrated scenario would expectedly result in a much smaller life-cycle emission (SCC) compared to supplying the treatment equipment with the electric grid in the segregated scenario. These observations justify the lower SCC values of scenario 2 compared to scenario 1. Figure 7 also shows that the Genetic Algorithm has favored gas engines (i.e., gas turbines, microturbines, reciprocating engines, and steam turbines) much less than the carbon-neutral CHP engines in both scenarios given the significantly higher emission rates of the gas engines. Figure 8 also shows the normalized SCC vs. the types of chillers chosen for those neighborhoods in the analyzed scenarios which had SCCs less than 0.1 k$/m 2 . Low-emission neighborhoods have been possible to create using all types of the available chillers. Figure 9 shows the wastewater treatment (WWT) systems selected by the optimization algorithm for scenario 2. FO-MD has resulted in more low-emission neighborhoods than the other WWT system. Before, Figure 7 indicated that biomass engines were popular with low-emission neighborhoods. Most of the available biomass engines in the simulation framework have power-to-heat ratios lower than 0.42, which means they generate more heat than electricity in response to the energy demand. Part of the reason for popularity of FO-MD among the lowemission neighborhoods seems to be that this treatment system can "recycle" the excess heat generated by the carbon-neutral biomass engines selected for these neighborhoods. This excess heat can also be used for dewatering the solid residue from the treatment process (Scherson and Criddle, 2014) (discussed in more detail in Section Conclusions and Future Work). Figure 6 suggests a relationship between the oscillations in ratios of different building types with the values of SCC, LCC, and the annual demands. In a final analysis, the Pearson correlation matrices between the eleven variables plotted in Figure 6 were computed to inspect the linear relationships between these variables. Figure 10 shows the resulting correlation matrices for both scenarios. Normalized LCC and SCC are not strongly related to any other variables than each other, while normalized annual energy and wastewater demand seem to be negatively correlated with the ratio of office buildings in the neighborhoods. The latter is rooted in the low energy-and water-use intensities of the office buildings. The normalized annual demands also show a strong direct linear relationship with each other, meaning that neighborhoods with high annual wastewater treatment demands tend to have high annual energy demands and vice versa. Further, annual energy demand seems to be directly proportional to the percentage of medical buildings. This is caused by the high energy-use intensity of the medical buildings. The annual wastewater demand in scenario 2 also shows a strong collinearity with the percentage of residential buildings, which is caused by the high water-use intensity of these building types. Among the building type ratios, percentages of hospitality and medical buildings in both cases and commercial buildings in scenario 2 are negatively collinear with that of office buildings. The optimization algorithm seems to have strongly preferred office buildings in reverse proportion to the residentials, especially in the integrated design scenario.

CONCLUSIONS AND FUTURE WORK

57This paper studies the advantages of integrated design and optimization of the wastewater treatment and energy systems at the district scale over the segregated design of these infrastructure systems in terms of environmental and economic sustainability metrics. The supply and demand of the integrated water-energy system are also concurrently considered and optimized. Annual hourly wastewater treatment demands from several building archetypes as well as advanced membranebased and conventional central wastewater treatment systems are modeled to cover both the decentralized (integrated) and centralized (conventional) wastewater treatment configurations. An optimization framework is proposed for the integrated design of water and energy infrastructure and a case study in San Francisco is adopted to compare the outcomes of the conventional (segregated) vs. the integrated approach to the design.

58The results of the case study show consistently lower normalized social cost of carbon, life-cycle cost of equipment, annual energy demand, and annual wastewater treatment demand across the neighborhoods designed using the integrated vs. segregated approach, with the median values of these metrics for the seconds scenario being, respectively, 75, 20, 8, and 20% lower than those of the first scenario. These advantages of the integrated scenario can be attributed first to simultaneous optimization of the wastewater treatment and energy system in this scenario, and also to supplying the treatment system with the low to no-emission CHP engines FIGURE 9 | Social cost of carbon vs. WWT type for scenario 2 across all individual neighborhoods with SCCs less than 0.10 k$/m 2 , i.e., the 99.7th percentile of SCC. Each neighborhood is represented by a single dot in the plot.

59of the local energy system vs. supplying the treatment system with the electric grid in the segregated scenario. The results also showcase the economic and environmental viability of advanced wastewater treatment systems despite higher capital costs compared to conventional systems, when these advanced treatment processes are (i) optimized at the same time as the energy systems, (ii) physically and operationally integrated with the energy systems, and (iii) analyzed over the life-cycle of the neighborhood.

60The results also show that the building mixes of the neighborhoods generated under the two scenarios have similarities. This indicates that the districts designed for segregated water and energy systems can adopt integrated infrastructure with minimal modifications and without altering the building mix of the district. The considerable savings in emission and costs achieved by taking an integrated approach to the design of the water and energy infrastructure indicate the potential for integrating more infrastructure systems during the early-stage design of neighborhoods using approaches similar to that taken in this study. It is expected that the gains in sustainability of the integrated vs. the conventional design of infrastructure will become yet more significant as more systems, over longer analysis periods, and larger spatial scopes are designed concurrently.

61Future extensions of this research can address three general topics: the wastewater treatment model, the building and energy system models, and the optimization algorithm. Below are some of the potential future studies on the wastewater treatment model:

621. This study implicitly addresses handling of retentate from the treatment process; however, given its large environmental impacts, this topic merits in-depth analysis in future studies. In theory, Anaerobic Digestion (AD) combined with syngas processing of biosolids and/or short-cut nitrogen-removal systems could be used to minimize residuals and produce up to 0.35 kWh of energy per 1 m 3 of wastewater treated (Scherson et al., 2013;Scherson and Criddle, 2014). AD can also be combined with emerging anaerobic secondary treatment systems, like the SAF-MBR with air-stripper (Stanford University, 2021), to maximize methane recovery and increase net energy production from retentate (Scherson and Criddle, 2014). CHP engine can directly use the biogas and syngas from such processes to generate heat and electricity (Scherson and Criddle, 2014). This also motivates studies comparing centralized vs. decentralized treatment of retentate, where part or all of the treated water from decentralized treatment could be used for irrigation. 2. The excess heat from the CHP engine in this work is used for heating the wastewater when FO-MD was selected as the treatment system. This waste heat could also be used to dry the biosolids left from the treatment process after mechanical dewatering, as suggested by Scherson and Criddle (2014). Dewatering of the biosolids enables their gasification and production of ash, dramatically reducing solids for disposal and generating additional energy in the form of syngas. 3. To avoid overcomplicating the analysis, the scope of this paper excludes the reuse and redistribution of the treated wastewater. When distributed, the potable water recovered by the system proposed in this research can improve the water security (Cook and Bakker, 2012;World Economic Forum Water Initiative, 2012;Garrick and Hall, 2014), resilience, and sustainability of the urban areas. This also merits in-depth follow-up studies. 4. Future studies can investigate the sustainability and resilience impacts of setting different qualities-e.g., suitable for irrigation, or banking in reservoirs-for the effluent of the treatment process. Same can be done for the retentate of the treatment process. For example, the nitrogen-rich retentate of the treatment can be used for landscaping to help preserve water resources. 5. This paper simplifies modeling of water demand profiles by assuming that daily profiles are constant for every day of a month. This enabled constructing hourly demand profiles for all the 21 building types in the same climatic region and over the entire year, as the existing literature did not allow for making more detailed demand profiles. Future studies should examine the updated literature for modeling variable daily profiles for each day of a month. 6. The integration across the water and energy system proposed in this work can be tailored for applying to a range of different time scales, e.g., by using monthly rather than hourly models, or geographic scales, e.g., by focusing on regions rather than districts. Results of studies on these different scales can provide valuable insights for different stakeholders who require different levels of granularity in modeling and analysis. Adapting the proposed framework to these different scales is also a worthwhile extension of this work.

63The list below describes interesting future studies on the building and energy system models:

641. A limited, yet diverse, set of supply equipment were selected and modeled in this study: more treatment systems and energy systems, including all-electric technologies, can be introduced into the supply equipment mix in future efforts to make this framework applicable to a wider variety of cases. 2. Network configuration largely determines the loss and performance of the heating, cooling, and wastewater treatment infrastructure )-future efforts should introduce network optimization into the proposed framework. This addition, nonetheless, increases the complexity of the optimization problem by several orders of magnitude, and this might require alternative optimization algorithms, more memory, and more computational power compared to this study. 3. This paper treats the input parameters of the supply and demand models as deterministic variables, whereas the uncertainties in these parameters can have tangible effects on the results of the analysis obtained using the proposed method. Uncertainty analysis of the proposed framework merits extensive future study.

65The following detail potential future studies on the optimization algorithm:

661. Improving the optimization algorithm has a great potential for further studies (e.g., Rezazadeh . For instance, in this study no constraints were applied to the optimization problem other than to the gross-floor-area of the neighborhoods. Future studies can impose constraints on the ranges of building type ratios as well as the permitted types of CHP engines, chillers, and treatment systems to inform the optimization algorithm to obtain optimal neighborhoods with specific mixes of buildings and supply equipment.

67For the case study examined in this manuscript, the optimization algorithm found many optimal solutions with building type mixes dominated by office buildings. The COVID-19 global pandemic has shown that the usage of different building types can vary, sometimes drastically, because of unforeseen conditions. This suggests the need for studies that consider other "black swan" events (Taleb, 2007) to understand how they can change the optimal design and performance of cities by imposing constraints on the components, e.g., the building mix, of the urban neighborhoods.

DATA AVAILABILITY STATEMENT

68The original contributions presented in the study are included in the article/Supplementary Materials, further inquiries can be directed to the corresponding author/s. Files required for replicating the experiments and visualizations of this paper can be found at: https://github.com/PouyaREZ/Wastewater_Energy_ Optimization.

AUTHOR CONTRIBUTIONS

69PR: conceptualization, data curation, formal analysis, funding acquisition, investigation, methodology, project administration, resources, software, writing-review and editing, roles/writing-original draft, visualization, and validation. ML: conceptualization, funding acquisition, methodology, project administration, resources, supervision, writing-review and editing, roles/writing-original draft, and validation. CC: resources, supervision, writing-review and editing, and validation. All authors contributed to the article and approved the submitted version.

FUNDING

70This material is based on work supported by the Leavell Fellowship on Sustainable Built Environment from the Department of Civil and Environmental Engineering at Stanford University. This research has additionally been supported by AP Thailand.

SUPPLEMENTARY MATERIAL

71The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/frsc.2022. 856996/full#supplementary-material

INTRODUCTION Motivation

72While covering only 3% of the earth's land, urban areas accommodate 55% of world population and are responsible for more than two-thirds of global energy consumption and CO 2 emissions (United Nations, 2015;International Energy Agency, 2016). These ever-growing numbers make cities the forefront of the fight against climate change. On the other hand, around 39% of US primary energy is consumed by residential and commercial sectors (Energy Information Administration, 2019): designing more efficient buildings as well as water and energy systems can play an essential role in reducing the energy consumption and environmental footprint of urban districts. Coordinated design of infrastructure has proven to be an effective approach for creating more sustainable urban systems. Such coordination leads to integrated municipal supply systems (e.g., energy and water supply) with improved overall performance when compared to the simple superposition of individual supply systems (Mancarella, 2014). Further, integrated design of infrastructure systems facilitates closed-loop management of resources and can help create "circular economy" in urban areas (World Economic Forum, 2014;Kalmykova et al., 2018).

73This study focuses on integrating urban energy and wastewater treatment systems. Typically, urban energy and water infrastructure are designed after the demands of the community are determined. At that late stage, improving the environmental and economic performance of the system is difficult (Best, 2016). However, if the supply and demand of municipal services are optimized simultaneously, the resulting urban system has proven to outperform the isolated design based on social, economic, and environmental sustainability metrics (Keirstead et al., 2012;Allegrini et al., 2015;Best et al., 2015). Since building mix largely determines the consumption profile of urban neighborhoods (Best, 2016;Wu et al., 2018), simultaneously optimizing the building mix and integrating infrastructure represents an opportunity for designing more sustainable urban systems (Keirstead et al., 2012;Best, 2016). Developing a framework to investigate and understand this opportunity is the focus of this research paper.

Prior Research

74Factors including urbanization, environmental stresses due to climate change, and demand for more livable built environments are creating challenges for cities to satisfy the needs of an increasing urban population (Bauer et al., 2015;Best, 2016;Khan et al., 2017;O'Neill et al., 2017). This imperative is urging urban and infrastructure planners to design more sustainable infrastructure systems that can maintain and improve the livability of cities (Arup, 2016;SF Environment, 2018). However, concerning the focus of this study, literature shows several obstacles to achieving more sustainable water and energy systems in urban areas;

751. Disconnected modeling of supply and demand: This disconnect results in a missed opportunity to design more sustainable systems by leveraging integrated supply and demand optimization (Manfren et al., 2011;Keirstead et al., 2012;Best et al., 2015;Wang et al., 2018), 2. Isolated design of infrastructure: This isolation overlooks the interdependence between different infrastructure systems and the opportunity to increase the efficiency of the overall urban system by exploiting this interconnection (Howells and Rogner, 2014;Wu et al., 2015;Khan et al., 2017;Saidi et al., 2018), 3. Qualitative assessment of economic and environmental outcomes of planning: The application of qualitative assessment, rather than quantitative metrics, yields inefficient designs with suboptimal performance (Coutts et al., 2008;Keirstead et al., 2012;Eicker et al., 2015;Best, 2016;Hukkalainen et al., 2017).

76To address these deficiencies in the context of urban water and energy systems, a framework is needed to optimize the supply and demand of infrastructure systems concurrently (Manfren et al., 2011;Keirstead et al., 2012;Best et al., 2015;Wang et al., 2018;Bakhtiari et al., 2020), integrate the design of urban water and energy infrastructure (Siddiqi and Anadon, 2011;Rodriguez et al., 2013;Bauer et al., 2015;Khan et al., 2017;United Nations, 2019), and provide quantitative feedback on the life-cycle performance of design alternatives (Keirstead et al., 2012;Best et al., 2015;Eicker et al., 2015). This paper develops such a framework to design the supply and demand of integrated wastewater treatment and energy infrastructure for urban neighborhoods. The framework designs infrastructure systems at the neighborhood scale and on an hourly basis following the recommendations by Hawkes and Leach (2005), Jaccard (2006), Evins et al. (2011), and Best et al. (2015).

Co-optimizing Supply and Demand in Energy Systems

77Jaccard (2006) defined energy system as "the combined processes of acquiring and using energy in a given society or economy." Manfren et al. (2011), Keirstead et al. (2012), and Allegrini et al. (2015) reviewed 400+ articles and tools on modeling supply and demand in urban energy systems, and concluded that frameworks must be developed to concurrently optimize energy supply and demand technologies at an urban scale. These frameworks can enable designers to make urban energy systems which are more efficient than systems created using traditional design methods (Manfren et al., 2011;Allegrini et al., 2015;Best, 2016).

78To address this requirement, Best et al. (2015) made a framework to simulate and optimize the energy supply systems and the building mix of an urban district composed of 100-1,000 neighboring buildings. As a case study, Best et al. (2015) used NSGA-II Genetic Algorithm (Deb et al., 2002) to optimize the building mix and the combined cooling, heating, and power (CCHP) plant for an arbitrary development in San Francisco for minimum life-cycle cost (LCC), minimum greenhouse gas emissions (GHG), and maximum energy efficiency. The simulation successfully generated many neighborhoods with desirable life cycle costs, zero and near-zero operational GHG emissions, and energy efficiencies more than 70%.

79Best et al. took an essential step in integrating the optimization of the supply and demand of energy and numerically evaluating the infrastructure and urban planning. However, this framework and its successors did not consider the non-energy infrastructure. Wu et al. (2018) followed the method proposed by Best et al. (2015) and added simplified pumping and heat losses as functions of pipe dimensions. Wu et al. optimized the building mix and Combined Heating and Power (CHP) engine for an arbitrary neighborhood in Shanghai, China.

80More recently, Waibel et al. (2019) developed a framework for parametrically optimizing buildings and supply technologies in an urban setting. They optimized the height and geometry of four office buildings in Zurich, Switzerland. Supply systems for electricity, space heating, hot water, and cooling were composed of electricity and heat generators, an absorption chiller, and storage technologies. Waibel et al. developed a nested bi-level optimization routine to avoid direct multi-objective optimization and used it to minimize the life cycle cost and carbon emissions of the system. They also simplified the timescale for the optimization from an entire year to only 6 weeks. Similar to Best et al. (2015) and Wu et al. (2018), this paper focused only on energy infrastructure, and did not consider the water system and designing an integrated water-energy infrastructure.

The Water-Energy Nexus

81Until recently, urban water and energy infrastructure systems were planned and managed independently (Howells and Rogner, 2014). However, urban infrastructures are becoming more interdependent in the face of mutual challenges including aging, population growth, shrinking resources, extreme events, and climate change (Bauer et al., 2015;Saidi et al., 2018;Moazeni et al., 2020). In particular, "integrated water and energy planning" has gained global public and scholarly attention due to recent difficulties faced by many countries to secure sustainable water and energy resources (Rodriguez et al., 2013;Bauer et al., 2015;Khan et al., 2017;United Nations, 2019;Huang et al., 2020). This concept, dubbed the "water-energy nexus, " focuses on the interrelations between production, transmission, and consumption of water and energy (Siddiqi and Anadon, 2011;Bauer et al., 2015;Dai et al., 2018).

82Water used for power plant cooling accounts for half of the freshwater withdrawals in the US (World Economic Forum Water Initiative, 2012). Meanwhile, water scarcity and growing demands require new sources of freshwater and more efficient technologies to treat water and generate energy (Luck et al., 2015;Khan et al., 2017). Wastewater treatment using the wasted heat and electricity of a power plant has shown to be effective in:

831. reducing the need for power plant cooling and, consequently, the required cooling water (Khan et al., 2017;Gingerich and Mauter, 2018), 2. improving the energy efficiency of the integrated water-energy system by increasing the amount of useful work done per unit input fuel (Khan et al., 2017;Gingerich and Mauter, 2018), 3. providing a fresh and "renewable" source of potable/irrigation water for cities (Cath et al., 2009;Guo and Englehardt, 2015;Atab et al., 2016), 4. reclaiming the wastewater and mitigating the environmental repercussions of discharging it into receiving waters (McGovern and Bastian, 2009), and 5. creating a potential revenue stream for cities through selling the reclaimed water (Dayton et al., 2016).

84Many studies on the water-energy nexus assess the water consumed in different processes involved in energy generation (e.g., Bouckaert et al., 2014;Khan et al., 2017;Murrant et al., 2017), or the energy consumed or produced during desalination or water treatment (e.g., Al-Karaghouli and Kazmerski, 2013;EPA, 2013;Gude, 2015;Buonocore et al., 2018). A subset of these studies examines the direct integration of power plants and desalination/water-treatment facilities. A part of these works focuses on implementing small-scale combined heating and power (CHP) or combined cooling, heating, and power (CCHP) plants inside existing water or wastewater treatment facilities to use the biogas from digestion processes (Chacartegui et al., 2013;Caceres and Alca, 2016;Mehr et al., 2018;MosayebNezhad et al., 2018). Other researchers have studied CHP/CCHP plants powering the desalination processes, also called dual-purpose or water-power plants. Examples of these articles are found in Ferreira et al. (2010), Xianli et al. (2014), González-Bravo et al. (2017), andMata-Torres et al. (2019). Of specific interest, Zhou et al. (2015) modeled a wastewater treatment system based on forward osmosis (FO), which used the waste-heat from a thermal power generator to recover the draw solution of the FO process. Zhou et al. concluded that the FO process can treat the boiler makeup water and desulfurize the flue gas of all power plants in the US using the waste heat from the plants. The detailed modeling in this study provides evidence for the feasibility of combining a membrane-based treatment system with a power plant to exploit the waste-heat from the facility for wastewater treatment. In another study, Gabriel et al. (2016) investigated the techno-economic feasibility of several use-cases for excess heat from industrial processes. Gabriel et al. modeled power and cooling generation, as well as seawater desalination, using multi-effect and reverse osmosis processes to leverage industrial waste heat.

85More recently, Gingerich and Mauter (2018) studied 66 retrofit configurations to comply with scenarios of air and wastewater emission regulations (planned for 2030) for a typical coal-fired power plant. They combined several carbon capture and wastewater treatment technologies to retrofit the plant and use the electricity or residual heat and steam generated by the plant. The potential revenue under each scenario was then used to evaluate the combinations. The authors concluded that under the strictest regulation scenario, maximum revenue would result from allocating waste heat to amine-based carbon capture and allocating electricity to a mechanical vapor recompression water treatment system. This study is one of few in which the heat and electricity consumption of modern wastewater treatment technologies (including FO) are used to complement the operation of a power plant. Notwithstanding, their optimization algorithm adopted a single objective, and the operation of the plant and the considered technologies were independent of time and ambient temperature. Therefore, the effects of variations in the energy and wastewater treatment load as well as the ambient temperature on the operation of the facility were not captured.

Objective and Contributions

86CCHP plants are a recurrent example of integrated energy infrastructure in practice and research. These plants have shown up to 30% higher overall energy efficiency than comparable segregated energy systems (Rezaie and Rosen, 2012;DOE, n.d).

87Despite the high efficiency of a CCHP plant, its constant power-to-heat ratio often causes electricity and heating losses (Díaz et al., 2010), as the electricity and heat demanded from the plant to power the network throughout the day do not necessarily align with this fixed ratio. Studies have shown that a wastewater treatment system located within or near the CCHP plant can effectively exploit any "excess" heat and electricity (Elimelech and Phillip, 2011;Zhou et al., 2015), providing an opportunity to design and optimize the water treatment and energy systems concurrently. Given growing water scarcity in many urban areas around the globe, this integration is important for curtailing the fresh water withdrawal used for dissipating the excess heat due to energy generation (Luck et al., 2015;Khan et al., 2017;Energy Information Administration, 2019) and providing decentralized wastewater treatment systems at the neighborhood scale. To realize this opportunity, this paper proposes a framework to design and optimize the demand and supply of integrated energy and water systems (water-energy nexus) for environmental and economic sustainability in an urban neighborhood on an hourly basis.

88The contributions of this paper are as follows:

891. Hourly water demand profiles of 21 building types: This paper creates, for the first time, the hourly water demand profiles for 21 building archetypes which represent more than 70% of the buildings in the US (Deru et al., 2011;Best et al., 2015), for the climate zone of San Francisco County, CA. This contribution is essential for integrating the design of different infrastructure systems with the water system at the neighborhood scale. Section Hourly Wastewater Treatment Demand details this contribution. 2. Models for hourly energy consumption and life-cycle cost of FO-RO and FO-MD wastewater treatment systems: This paper introduces computational models of the specific energy consumption, as well as the capital and operational costs of, forward osmosis-reverse osmosis (FO-RO) and forward osmosis-membrane distillation (FO-MD) treatment systems as functions of the temperature and flow of the input wastewater. These compact wastewater treatment systems can be located within the energy plant, can use the waste heat and electricity from the CHP engine to operate, and can output water ranging in quality from irrigation to drinking. These models provide a straightforward method to include these high-performance treatment systems in largescale simulations of the water system, and enable integrated design of a wastewater treatment system or desalination system with the energy infrastructure. Section Wastewater Treatment Module details the developed models. 3. Integrated approach to designing the wastewater treatment and energy system: The framework proposed in this paper is the first of its kind to concurrently design the optimal building mix of an urban neighborhood and the systems supplying the neighborhood with wastewater treatment, cooling, heating, and electricity on an hourly basis. The proposed framework is expected to inform urban planners and infrastructure designers of a "range" of optimal configurations, e.g., in terms of building mix or floor area ratio, for designing a neighborhood, thereby allowing them to flexibly select infrastructure systems and enact zoning rules leading to more sustainable urban neighborhoods when measured in terms of environmental and economic sustainability metrics. Unlike the typical approach where the energy system is designed independently from the wastewater treatment system, the proposed method allows for designing urban neighborhoods with lower life-cycle cost and emissions by reducing the energy loss and by improving the overall efficiency of the integrated energy system-wastewater treatment. The accuracy of the outputs of this integrated framework depends directly upon the accuracy of the models simulating the supply technologies, i.e., the CCHP engines and the wastewater treatment system, and the demand systems, i.e., the building models.

MODEL DEVELOPMENT

90The model presented here extends and improves a previous framework created by Best et al. (2015) in Python programming language (Van Rossum, 2007). The original framework by Best et al. (2015) was able to simulate the supply and demand of energy for a community given its building uses and energy supply equipment. Three main modules comprised the original framework: (1) energy demand modeler, (2) energy supply modeler, and (3) analyzer and optimizer. The first component, "energy demand modeler, " could simulate the annual hourly cooling, heating, and electricity demands from several building archetypes and the associated losses at the supply and distribution levels. The "energy supply modeler" could model the hourly performance of a range of combined heating and power (CHP) engines and chillers given the ambient conditions (e.g., ambient temperature and pressure) as well as heating, cooling, and electric loads imposed on the engines. The final component of the framework, "analyzer and optimizer, " could (1) evaluate the lifetime performance of the supply equipment in terms of the defined optimization objectives (e.g., annual carbon emissions, life-cycle cost of equipment) and (2) using an evolutionary algorithm generate a set of neighborhoods optimized with respect to the optimization objectives. This study extends the demand modeler from the framework mentioned above by enabling it to model the hourly wastewater treatment demands for the 21 building archetypes presented by Best et al. (2015). This work also enables the supply-side module in the mentioned framework to model wastewater treatment systems and thermal energy storage. The former is done by adding three wastewater treatment technologies to the set of supply models developed by Best et al. (2015): two modern hybrid treatment technologies, namely Forward Osmosis-Reverse Osmosis (FO-RO) and Forward Osmosis-Membrane Distillation (FO-MD), and one conventional central treatment. These treatment technologies augmented with a set of pre-treatment and post-treatment techniques can treat input municipal wastewater up to a potable quality. Finally, the triple optimization objectives in the original frameworkannual carbon emissions, total fuel cycle energy efficiency, and undiscounted life-cycle cost of equipment-are reduced here to two modified objectives-discounted life-cycle social cost of carbon and discounted life-cycle cost of equipment, both normalized by the total gross-floor area of the buildings in the neighborhood. Figure 1 shows the flow diagram of the proposed framework, showing the three main components (supply module, demand module, and analysis and optimization module) and their subcomponents.

91The following provides the semi-formal formulation of the optimization problem solved by the proposed framework:

92Objective Functions Sum of all building footprints must be less than 0.7 km 2 Sum of all floor areas (i.e., total GFA) must be larger than 0.1 km 2 but less than 3.3 km 2

93The following sections detail the demand module, supply module, and optimization objectives.

Hourly Wastewater Treatment Demand

94This work enables the demand module from Best et al. (2015) to model the hourly wastewater treatment demands for the 21 building archetypes originally discussed by Best et al. (2015) which represent more than 70% of the buildings in the US (Deru et al., 2011). Table 1 shows a summary of the specifications for these 21 building archetypes. The hourly wastewater outflow for these building archetypes were modeled by converting the potable water demand for each building into the wastewater generated by the building. Table A2 in Supplemenatry Material lists the references used to create the profiles of hourly water use for these 21 building archetypes over the 12 months of the year. As mentioned later in this article, San Francisco, CA, is selected as the location of the test case study; hence, studies on buildings located in San Francisco or in areas of California with similar climates to San Francisco, e.g., Santa Barbara ("IECC Climate Zone Map | Building America Solution Center", 2012), were used for synthesizing the water demand profiles for the 21 building archetypes. The water demand was considered only for indoor use-outdoor use, comprised mostly of irrigation use, was disregarded in this study.

95In converting water use to wastewater outflow, the consumptive use of water in the buildings was conservatively assumed negligible, i.e., the outflow of wastewater was taken equal to the inflow of potable water. The average daily water use of the four "residential" building types were calculated using Equation (1).

96here Q d w is the average daily indoor water use (m 3 /h), GFA is the total gross floor area of the building (in m 2 ), RES a is the average number of residents per unit area (person/m 2 ), and Q c w is the average daily indoor water use per capita for the building (m 3 /h/person). For this equation, for each different building type, the average number of residents per unit area was extracted from Deru et al. (2011) and the average daily indoor water use per capita was extracted from Carollo Engineers (2015). The average daily water use (Q d w ) for all the other building types, except for the mixed-use buildings, were calculated using Equation (2).

97here Q a w is the average daily indoor water use per unit area of the building (m 3 /h/m 2 ) based on US EIA (2017).

98The average daily water use (Q d w ) of mixed-use building M1 (symbol explained in Table 1) was computed by combining the average daily water uses of buildings R1 and C2 proportional to the gross-floor-area assigned to each building type, i.e., 8,621 m 2 of R1 and 784 m 2 of C2, based on the definition of this mixeduse building archetype (Best et al., 2015). The same approach was followed for computing the average daily water use for mixed-use building M2: the average daily water uses of buildings O1 and C2 were combined proportional to the gross-floor-area assigned to each, i.e., 8,621 m 2 of O1 and 784 m 2 of C2. Assuming the same water demand profile for every day in a month, the wastewater demand of each building type at each hour was calculated using Equation (3).

99here Q h, m ww is the wastewater outflow at hour h during month m (m 3 /h), Q d w is the average daily indoor water use (m 3 /h). C h and C m are the hourly and monthly coefficients for converting the average daily water use to water used at hour h and in month m, respectively. The assumption of constant daily water demand profiles for each day in a month enabled us to construct hourly profiles of water demand over the entire year across several building types within the same climatic region. We recognize that such profiles do change but found that this information is lacking in the technical and academic literature. Tables 2-4 list Q d w , C h and C m , respectively, for all the 21 building archetypes.

Wastewater Treatment Module

100This work enables the framework proposed by Best et al. (2015) to simulate wastewater treatment processes at the neighborhood scale. For this purpose, three wastewater treatment technologies are modeled and added to the supply module of the original framework: two membrane-based treatment technologies, namely FO-RO and FO-MD, and one conventional central treatment plant (CTP). These treatment systems augmented with pre-treatment and post-treatment processes can treat municipal wastewater to a drinking quality. "Appendix B: Wastewater Characteristics" in Supplementary Material shows the assumed composition of the input wastewater, the required quality of the output drinking water, and discusses the treatment capabilities of FO-RO and FO-MD systems. The advanced water/wastewater treatment technologies Forward Osmosis (FO), Reverse Osmosis (RO), and Membrane Distillation (MD) have recently received considerable attention from researchers and practitioners for water reuse applications (Alkhudhiri et al., 2012;Council, 2012;McCutcheon and Huang, 2013;Coday et al., 2014;Blandin et al., 2015;Shaffer et al., 2015; Guizania et al., 2019). This is partly because these technologies are more compact, require lighter maintenance, are easier to automate, and can more effectively remove pathogens compared to traditional treatment systems (Council, 2012). These systems have consistent effluent quality and can potentially reduce the chemical demand of the treatment process (Council, 2012).

101Such qualities make these technologies ideal for implementing at a combined cooling, heating, and power (CCHP) plant with limited space, and for treating domestic wastewater to drinking water quality-a procedure which requires robust treatment processes. RO and MD membranes suffer irreversible fouling (Husnain et al., 2015a,b;Kim et al., 2018). This phenomenon gradually reduces the water flux, demanding frequent replacement of the membrane. FO can largely mitigate this problem when used as a pretreatment step for RO (Cath et al., 2005;Zaviska and Zou, 2014;Kim et al., 2018) and MD (Husnain et al., 2015a,b). FO prevents the foulants from reaching the RO or MD membrane, whereas the resulting fouling of the FO membrane is mostly reversible and can be resolved with backwashing and chemical cleaning (Husnain et al., 2015a,b). Further, FOpretreatment filters the bacteria, viruses, and organic and inorganic compounds (Zaviska and Zou, 2014;Akther et al., 2015) making for a more robust treatment.

102"FO-RO" (Figure 2) and "FO-MD" (Figure 3) are the hybrid treatment processes resulting from combining FO process with RO and MD. The wastewater treatment module in the framework introduced here incorporates these two systems as the main "integrated" wastewater treatment technologies, i.e., treatment technologies collocated with the energy supply equipment. This module takes as its input the volume of hourly wastewater produced by the neighborhood and the ambient temperature (taken as the temperature of the wastewater). Assuming a 24-h storage capacity for the input wastewater, the module calculates the maximum membrane area required to treat the 24-h movingaverage of the inflow over the entire year. This number is used to calculate the capital and operational expenses of the treatment systems. The treatment module also outputs (1) the hourly electricity and heat demand of the selected treatment models (which will be supplied by the CHP engines), and (2) the operational electricity requirement as well as the initial and operational expenses associated with the pre-treatment processes, e.g., screening, and the post-treatment processes, e.g., disinfection and pH adjustment. The calculation of life-cycle expenses for the treatment modules also considers the costs associated with chemicals, labor, retentate handling, and all the other expenses required for normal operation of a treatment plant (Al-Obaidani et al., 2008;McGivney and Kawamura, 2008).

103Both treatment models consume electricity while the FO-MD also consumes low-grade heat to treat the wastewater. This characteristic was the other reason for selecting these systems to be integrated with the CCHP plant: these wastewater treatment technologies can consume the unused heat and electricity generated by the CHP engine, and thus mitigate the loss of primary energy and increase the efficiency of the integrated CCHP-wastewater treatment plant over the levels achievable using segregated systems. FO-RO only requires electricity to operate while FO-MD mostly requires heat: FO-RO consumes 3.34 kWh of electricity, while FO-MD consumes 33.2 kWh of heat and 0.55 kWh of electricity to treat 1 m 3 of input wastewater at 20 • C. The optimization algorithm is expected to favor FO-RO for treating the wastewater in cases with large amounts of extra electricity (generated by the CHP engine), and to favor FO-MD in cases with large quantities of extra heat. As Figure 3 shows, the excess heat produced by the CHP engine will be used to heat the feed water to the MD process, while the ambient air will be used to cool the product water and concentrated draw solution. The induced temperature difference will provide the vapor pressure difference required to run the MD process. "Appendix C: FO-RO" and "Appendix D: FO-MD" in Supplementary Material detail the mathematical models developed for simulating the FO-RO and FO-MD systems, respectively, with overall water recovery ratios (RR) of 50%.

104In addition to the integrated treatment systems, a conventional wastewater treatment plant was modeled according to the treatment plant serving the location of the case study in San Francisco. "Appendix E: CWWTP" in Supplementary Material describes the model developed for computing the electricity requirements and expenses associated with this central plant. The wastewater treatment module takes as its input the aggregated hourly demands of the neighborhood for wastewater treatment, and computes the required cost and electricity (1.1 kWh per 1 m 3 of input wastewater) to process this wastewater as well as the emissions due to the treatment process. The resulting heating and electric loads are added to the rest of the heating and electric loads imposed on the CHP engine. This module also considers the costs of chemicals, labor, bio-solid and retentate handling, and all the other expenses required for normal operation of a treatment plant (McGivney and Kawamura, 2008).

Thermal Energy Storage Model

105This study enables the supply-side modeler from Best et al. (2015) to model Sensible Thermal Energy Storage (TES). Hot water storage tanks are selected and modeled for this purpose: hot water generated by the CHP engine for heating with a source temperature of 85 • C (Best, 2016) is assumed to get stored in the TES and discharged to satisfy the heating loads when necessary. Four primary factors contribute to the heat loss in a storage tank (Dincer, 2002): heat loss to the surrounding environment, heat conduction between the segments of the storage fluid with higher and lower temperatures (due to the stratified storage of hot water), vertical conduction in the tank wall, and mixing of water during charging and discharging. "Capacity model, " a common loss model (Schütz et al., 2015), assumes the hot water tank to contain a homogenous fluid. With this assumption, the thermal storage at each time-step can be calculated using Equation (4):

106where TES is the energy stored in the TES at time t [in kW], k v is a temporal loss factor (assumed 0.0534% based on Schütz et al., 2015), t is the time interval (1 h), and H in TES,t [in kW] is the net heat flow into the TES tank at time-step t (positive for net charging and negative for net discharging of the tank).

107Equation (5) here, TES Cap is the capacity of the TES [in MWh], and 1.17 is a factor converting 2008 USD to 2019 USD (CPI, 2020). The TES is sized to store enough hot water to satisfy 6 h of maximum aggregate heating demand from the buildings that is computed for each designed neighborhood. The unused heating, in the form of hot water, at each hour gets stored in the TES tank, and the stored hot water in the tank is the first resource responding to heating demand at each hour, i.e., TES has priority over the CHP engine for satisfying the heating demand.

Objective Functions

108The original objective functions defined by Best et al. (2015) comprised undiscounted life-cycle cost of equipment, annual CO 2 emissions of equipment, and total-fuel-cycle energy efficiency. In this study, the energy efficiency metric was removed from the set of objectives, as it was considered intangible and with no direct monetary or environmental consequences which were not captured by the other two objectives. Reducing the number of optimization objectives lowered the complexity of the optimization algorithm: now, the algorithm needs to inspect only two objectives rather than three when comparing different neighborhoods and finding the most optimal ones. Further, the two optimization objectives for carbon emissions and life-cycle cost were normalized by the GFA of the neighborhood. Without this normalization, the optimization algorithm would only favor neighborhoods with low emissions or low operational costs regardless of their size: e.g., a small neighborhood with 10,000 ft 2 of total GFA, would be equivalent to a 1,000,000 ft 2 neighborhood if they both have the same values of annual carbon emissions and life-cycle cost. However, the larger neighborhood is satisfying a much larger demand in a far more sustainable way than the smaller neighborhood. Normalization addresses this error, enabling the optimization method to achieve optimal (sustainable) neighborhoods with a variety of sizes.

109Also, to make more tangible the environmental impacts of building and operating the neighborhood, Social Cost of Carbon (SCC) was used to convert the annual carbon emissions into dollar values representing the social, environmental, and economic damage resulting from CO 2 emissions (EPA, 2016). Among the different models used to calculate SCC, the version created by US Environmental Protection Agency (EPA) was chosen to be used here (EPA, 2016). "Appendix F: Social Cost of Carbon" in Supplementary Material presents the regression function used to calculate the SCC for each year over the design period. In this new objective function, the carbon emissions associated with the construction of the equipment were also accounted for in addition to the operational emissions. The construction costs were converted into equivalent carbon emissions using conversion factors from EIO_LCA database (Carnegie Mellon University, 2007) for the construction of utilities: 243 Tons of CO 2e was assumed to result from 1 million 2007 USD worth of economic activity.

Introduction

110To showcase the capabilities of the proposed framework in cooptimization of supply and demand as well as integrated design of water and energy infrastructure, a case study was conducted based on that proposed by Best et al. (2015). Best et al. modeled a 160-acre greenfield development in Civic Center, San Francisco, and simulated the electricity, cooling, and heating demands of 21 building archetypes (presented in Table 1) using EnergyPlus ver. 8.0.0 (Crawley et al., 2001). Best et al. also modeled 32 CHP engines and 16 chillers as the set of supply equipment. The same 160-acre development, building archetypes, CHP engines, and chillers are considered in this study with the following modifications: (i) Hourly wastewater treatment demands were added to the set of energy demands of the buildings, (ii) Thermal Energy Storage and three wastewater treatment technologies (namely, FO-RO, FO-MD, and CWWTP) were added to the original set of supply models, and (iii) the optimization objectives were changed to GFA-normalized life-cycle cost of equipment and life-cycle social cost of carbon.

111The proposed model was run for two scenarios: (i) In the first one, the building mix and energy system were designed and optimized together, while a conventional central wastewater treatment plant (CWWTP) treated the wastewater from the buildings, and (ii) in the seconds scenario, the building mix, energy system, and wastewater treatment system were optimized and designed concurrently. In the first scenario, the grid was assumed to supply the electricity required by the CWWTP, and grid emissions for generating this electricity were attributed to the CWWTP. The emissions and expenses of the CWWTP were in turn attributed to the neighborhood in proportion to the ratio of the "average daily wastewater output of the neighborhood" to "57 MGD" (i.e., the actual average daily input of the treatment plant). Since the existing CWWTP serving the location of the case study, i.e., Southeast Treatment Plant (SF PUC, 2019), does not produce potable water, it was arbitrarily replaced by a conventional treatment plant of the same size but capable of producing potable water-as also explained in Appendix E: CWWTP Model in Supplementary Material. This modification was necessary to make the two scenarios comparable. In the seconds scenario, a combined CCHP-wastewater treatment plant (CCHP-WWTP) supplied the energy and wastewater treatment demand of the buildings.

112Both scenarios were designed for minimum life cycle cost of equipment (LCC) and minimum social cost of carbon (SCC). The LCC optimization objective incorporated the construction and discounted operation and maintenance costs of only the CCHP plant for the first scenario, and the entire CCHP-WWTP for the seconds. The SCC optimization objective considered the construction and discounted operation costs of carbon emissions associated with only the CCHP plant for the first scenario, and the entire CCHP-WWTP for the seconds. Both scenarios were simulated for 20 year of operation with a 3.5% discount rate. The neighborhoods generated by the optimization algorithm were compared in terms of their total (i.e., including those associated with the CWWTP) life cycle cost of equipment, operational and construction GHG emissions, types of supply technologies, and building mix among other metrics. The LCC and SCC calculations excluded the reuse and redistribution of the recovered water.

113The excess electricity generated during each hour was assumed to be sold back to the grid at 80% of the purchase price at that hour which was extracted from CAISO for year 2018 (California ISO, 2019). The hourly ambient temperature for the case study was extracted from TMY3 dataset for the San Francisco International Airport (Wilcox and Marion, 2008). Further, the grid emissions for each hour were extracted from Beyond Efficiency (Beyond Efficiency, 2017) for year 2016.

Results and Analysis

114The two scenarios, namely scenario 1 (conventional design) and scenario 2 (integrated design), were simulated each using an Intel Xeon E5-2640v4 processor (10-core Broadwell, 2.40 GHz) with 800 MBs of effective memory use over 145 mins of CPU wall-clock time. The map method from Scoop library (Hold-Geoffroy et al., 2014) was used to parallelize the map calls to Genetic Algorithm (GA) methods from Deap library (Fortin et al., 2012). The advantage of using a GA for solving this problem is that it does not require assignment of weights to either of the two objective functions, and instead enables simultaneous optimization of both objectives (Deb et al., 2002). The GA algorithm, NSGA-II, used the following optimization parameters based on the recommendations of Best et al. (2015):

115Number of generations = 1,000; Population = 200; Mutation Probability = 0.05; Similarity Parameter = 2.5; Crossover Probability = 0.75.

116Substituting series data processing with parallelized Numpy (Oliphant, 2006) operations, reducing the number of objective functions from three to two, and other minor technical upgrades cut the optimization runtime by 97% compared to the optimization with the same configurations done using the original framework in Best et al. (2015). Of the 200,000 neighborhoods produced by the GA algorithm for each scenario, 93,210 for scenario 1 and 87,644 for scenario 2 had admissible total GFA (i.e., less than 3,237,485 m 2 ) and site GFA (i.e., less than 647,497 m 2 ). These neighborhoods are called the "admissible neighborhoods" from this point on. Figure 4 shows the two GFA-normalized objective functions of the optimization, social cost of carbon vs. life-cycle cost, for all the admissible neighborhoods with SCC values less than 0.10 k$/m 2 , i.e., the 99.8th and 99.7th percentile of SCC across all neighborhoods in the first and the seconds scenario, respectively. Earlier generations of neighborhoods produced by the GA are plotted using symbols that are more transparent than the later ones. One outstanding observation from Figure 4 is that the optimization algorithm has successfully identified paths to designing neighborhoods with minimum LCC and SCC over consecutive generations: the dots (neighborhoods) closer to the origin (which has the ideal lowest SCC and LCC, i.e., 0 kg of lifetime CO 2 emissions and $0 of life-cycle cost) are more opaque (belong to later generations) than the dots farther away from the origin. Figure 4 also offers an insight on the comparison between the two scenarios: the blue dots in the figure are generally located lower than their adjacent red dots. This implies that the integrated design scenario, scenario 2, has resulted in neighborhoods with generally lower SCC than those of conventional design, scenario 1, for the same values of LCC. Figure 5 shows the approximate Pareto fronts of the two scenarios for the objective functions, life-cycle cost and life-cycle social cost of carbon, highlighted in yellow. In the Pareto optimal solutions, the SCC values of the integrated approach seem to be about 1/3 the SCC values of the segregated approach, while the LCC values of these solutions are similar between the two FIGURE 4 | Life-cycle social cost of carbon vs. life-cycle cost of equipment for the individual neighborhoods (single dots on the plot), with SCCs less than 0.1 k$/m 2 , generated by the optimization algorithm for the analyzed scenarios. Neighborhoods generated in later generations by the Genetic Algorithm are shown more opaque than the earlier generations (Red dots: conventional design, blue dots: integrated design).

117scenarios. These two observations about the Pareto fronts comply with the general trends deduced in the previous paragraph.

118To get a better understanding of the distribution of performance metrics across the designs produced by the two scenarios, standard deviation (SD), mean (average), 25th percentile, 50th percentile (median), and 75th percentile of LCC, SCC, annual aggregated energy demand, and annual wastewater treatment demand for all the neighborhoods resulting from the two design scenarios were calculated- Table 5 shows the results. The annual aggregated energy demand for each neighborhood was calculated by summing the total electricity and heating demand of the buildings and supply equipment (including chillers and treatment systems) over 8,760 h of the year. In this table, "CCHP | CWWTP" denotes scenario 1, and "CCHP+WWT" denotes scenario 2. The numbers in Table 5 are unitless since the values of each metric for each variable, e.g., 25th percentile of LCC, for both scenarios are normalized by the value of the scenario 1. This facilitates comparing the statistical metrics of the seconds scenario against those of the first scenario by converting the metrics of the first scenario into unity.

119The results in Table 5 show that integrated design of energy and wastewater treatment systems has resulted in lower life-cycle carbon emissions and cost as well as lower annual energy and wastewater treatment demands compared to a separate approach to the design of these two infrastructure systems. The difference in life-cycle social cost of carbon is the most noticeable, with scenario 2 having a mean value 56% lower than scenario 1. The reduction in mean values of annual demands from scenario 1 to 2 is ca. 40%. Comparing the SDs of the two scenarios also offers another observation: the optimal neighborhoods produced by the GA under scenario 2 are closer (more uniform) in terms of the four parameters inspected in Table 5. This can imply the existence of some neighborhoods with dominant genes (i.e., configurations resulting in very low SCC and LCC) in the population of scenario 2 which have been identified by the GA and sustained across multiple generations of the analysis.

120To further inspect the differences between the designs resulting from the two scenarios, K-Means Clustering (KMC) was used to create clusters of similar individuals among the admissible neighborhoods based on eleven features: the seven building-type ratios (i.e., GFA associated with each building type divided by the total GFA of the neighborhood), GFA-normalized LCC and SCC, and GFA-normalized annual energy and wastewater treatment demands. The features were standardized before clustering, and K-Means Clustering method from Scikit-Learn library (Pedregosa et al., 2011) was used to conduct the clustering with the following variables:

121Initialization_method: "k-means++"; max_iterations: 300; n_init: 10; random_state: 42; tol: 0.0001.

122Euclidean distance was selected as the measure of proximity for clustering. The number of clusters was varied between 8 and 40 to find the highest average Silhouette Score (Rousseeuw, 1987) and lowest cost function across all clusters: for both scenarios, the highest Silhouette scores (0.53 for scenario 1, and 0.32 for scenario 2) were obtained for 10 clusters. However, the cost function (i.e., sum of squared distances to centroids) for the 10-cluster configuration was high −233,834 (2.51 per individual) and 257,098 (2.93 per individual) for scenarios 1 and 2, respectively-and the clusters were unevenly populated. To solve this issue, the number of clusters was set to 26 (scenario 1) and 40 (scenario 2) which had yielded other local optima of the Silhouette Score among the tested number of clusters. These new cluster counts resulted in acceptably reduced cost functions of 105,064 (i.e., 1.1 per each neighborhood) for scenario 1 and 107,026 (i.e., 1.2 per each neighborhood) for scenario 2 with Silhouette scores of 0.36 and 0.31, respectively.

123After the KMC algorithm converged, clusters with less than 500 members were removed to prune out the outliers, and the remaining centroids (19 centroids for scenario 1, and 27 for scenario 2) were plotted in Figure 6. Each cluster centroid in this figure is shown as a continuous, unicolor line across the eleven variables along the x-axis, and the thickness of each line is proportional to the number of neighborhoods represented by that centroid. SCC, LCC, and the annual energy and wastewater demands for both scenarios in Figure 6 are normalized by the maximum values of each variable from both scenarios, and are presented in percent. Figure 6 shows that the building mix and normalized annual energy and wastewater demand for the most populous clusters of optimal neighborhoods for both design approaches cover roughly the same ranges of values. However, the most populated The cell colors in the table range from sharp red for a normalized value of 1 to sharp green for a normalized value of 0.

124FIGURE 6 | Traces of the cluster features-i.e., building area percentages for Residential, Office, Commercial, Industrial, Hospitality, Medical, and Educational buildings ( Table 1 shows the building types belonging to each of these building-uses), normalized LCC and SCC, normalized annual energy (Anl_E), and wastewater treatment demand (Anl_WW)-across the centroids of the clustered neighborhoods for (A) scenario 1 and (B) scenario 2. Each centroid is shown as a unicolor line connecting eleven points across the seven building-uses and the four metrics.

125clusters in scenario 2 have lower GFA-normalized SCC and LCC than those of scenario 1, corroborating the statistical data from Table 5. Also implied by the low standard deviation values of scenario 2 in Table 5, the most populous centroids of scenario 2 in Figure 6 are spread over smaller ranges of the eleven parameters plotted in the figure. The GFA ratios of individual building types show that (i) the percentage of residential buildings ranges from 0 to 60% for both scenarios, (ii) the office buildings range from 30 to 95% in scenario 1 and from 15 to 100% in scenario 2 with a high concentration around 80 to 100%, (iii) industrial and educational buildings are mostly negligible in scenario 1, while they range from 0 to 10% in scenario 2, and (iv) hospitality and medical buildings are mostly negligible in scenario 1 with two exceptional clusters showing ∼30 and ∼60% hospitality and medical type-ratios, while they range from 0 to 20% in scenario 2. These ranges show that the integrated design has resulted in a more diverse building mix among the optimal designs. Figure 6 offers another interesting observation: the building mix in the majority of optimal neighborhoods from both scenarios have a low share of residential buildings, a medium to high share of office buildings, low shares of educational and industrial buildings (in scenario 2), and trivial shares of commercial, hospitality, and medical buildings. This mix of building types seems to provide the lowest LCC and SCC per unit area among all possible building mixes inspected by the optimization algorithm and is hence predominant among the optimal building mixes for both scenarios.

126The types of selected supply equipment -were also analyzed for the admissible neighborhoods from both scenarios to identify the connections between the choices of supply equipment choices and metrics of life-cycle performance. Figure 7 shows for the two scenarios the normalized SCC against the types of CHP engines selected in neighborhoods with SCCs less than 0.1 k$/m 2 , i.e., the 99.8th percentile of the first scenario and 99.7th percentile of the seconds. In both cases, the neighborhoods with smallest SCCs use biomass/biogas, or fuel-cell CHP engines, which is consistent with the fact that the operation of these engines is deemed carbon-neutral since they are assumed to use renewable fuels (Best et al., 2015). The Pareto optimal solutions marked in Figure 5 are expected to be among these neighborhoods with carbon-neutral CHP engines, since the Pareto optimal solutions also have very low SCC values compared to the rest of the solutions. The neighborhoods designed with carbon-neutral CHP engines in scenario 1 seem to have a lower SCC compared to neighborhoods using the same engines in scenario 2. Further, since a large portion of the CHP engines selected in both scenarios for the local energy system are those with negligible operating emissions, supplying the wastewater treatment equipment with the local energy system in the integrated scenario would expectedly result in a much smaller life-cycle emission (SCC) compared to supplying the treatment equipment with the electric grid in the segregated scenario. These observations justify the lower SCC values of scenario 2 compared to scenario 1. Figure 7 also shows that the Genetic Algorithm has favored gas engines (i.e., gas turbines, microturbines, reciprocating engines, and steam turbines) much less than the carbon-neutral CHP engines in both scenarios given the significantly higher emission rates of the gas engines. Figure 8 also shows the normalized SCC vs. the types of chillers chosen for those neighborhoods in the analyzed scenarios which had SCCs less than 0.1 k$/m 2 . Low-emission neighborhoods have been possible to create using all types of the available chillers. Figure 9 shows the wastewater treatment (WWT) systems selected by the optimization algorithm for scenario 2. FO-MD has resulted in more low-emission neighborhoods than the other WWT system. Before, Figure 7 indicated that biomass engines were popular with low-emission neighborhoods. Most of the available biomass engines in the simulation framework have power-to-heat ratios lower than 0.42, which means they generate more heat than electricity in response to the energy demand. Part of the reason for popularity of FO-MD among the lowemission neighborhoods seems to be that this treatment system can "recycle" the excess heat generated by the carbon-neutral biomass engines selected for these neighborhoods. This excess heat can also be used for dewatering the solid residue from the treatment process (Scherson and Criddle, 2014) (discussed in more detail in Section Conclusions and Future Work). Figure 6 suggests a relationship between the oscillations in ratios of different building types with the values of SCC, LCC, and the annual demands. In a final analysis, the Pearson correlation matrices between the eleven variables plotted in Figure 6 were computed to inspect the linear relationships between these variables. Figure 10 shows the resulting correlation matrices for both scenarios. Normalized LCC and SCC are not strongly related to any other variables than each other, while normalized annual energy and wastewater demand seem to be negatively correlated with the ratio of office buildings in the neighborhoods. The latter is rooted in the low energy-and water-use intensities of the office buildings. The normalized annual demands also show a strong direct linear relationship with each other, meaning that neighborhoods with high annual wastewater treatment demands tend to have high annual energy demands and vice versa. Further, annual energy demand seems to be directly proportional to the percentage of medical buildings. This is caused by the high energy-use intensity of the medical buildings. The annual wastewater demand in scenario 2 also shows a strong collinearity with the percentage of residential buildings, which is caused by the high water-use intensity of these building types. Among the building type ratios, percentages of hospitality and medical buildings in both cases and commercial buildings in scenario 2 are negatively collinear with that of office buildings. The optimization algorithm seems to have strongly preferred office buildings in reverse proportion to the residentials, especially in the integrated design scenario.

CONCLUSIONS AND FUTURE WORK

127This paper studies the advantages of integrated design and optimization of the wastewater treatment and energy systems at the district scale over the segregated design of these infrastructure systems in terms of environmental and economic sustainability metrics. The supply and demand of the integrated water-energy system are also concurrently considered and optimized. Annual hourly wastewater treatment demands from several building archetypes as well as advanced membranebased and conventional central wastewater treatment systems are modeled to cover both the decentralized (integrated) and centralized (conventional) wastewater treatment configurations. An optimization framework is proposed for the integrated design of water and energy infrastructure and a case study in San Francisco is adopted to compare the outcomes of the conventional (segregated) vs. the integrated approach to the design.

128The results of the case study show consistently lower normalized social cost of carbon, life-cycle cost of equipment, annual energy demand, and annual wastewater treatment demand across the neighborhoods designed using the integrated vs. segregated approach, with the median values of these metrics for the seconds scenario being, respectively, 75, 20, 8, and 20% lower than those of the first scenario. These advantages of the integrated scenario can be attributed first to simultaneous optimization of the wastewater treatment and energy system in this scenario, and also to supplying the treatment system with the low to no-emission CHP engines FIGURE 9 | Social cost of carbon vs. WWT type for scenario 2 across all individual neighborhoods with SCCs less than 0.10 k$/m 2 , i.e., the 99.7th percentile of SCC. Each neighborhood is represented by a single dot in the plot.

129of the local energy system vs. supplying the treatment system with the electric grid in the segregated scenario. The results also showcase the economic and environmental viability of advanced wastewater treatment systems despite higher capital costs compared to conventional systems, when these advanced treatment processes are (i) optimized at the same time as the energy systems, (ii) physically and operationally integrated with the energy systems, and (iii) analyzed over the life-cycle of the neighborhood.

130The results also show that the building mixes of the neighborhoods generated under the two scenarios have similarities. This indicates that the districts designed for segregated water and energy systems can adopt integrated infrastructure with minimal modifications and without altering the building mix of the district. The considerable savings in emission and costs achieved by taking an integrated approach to the design of the water and energy infrastructure indicate the potential for integrating more infrastructure systems during the early-stage design of neighborhoods using approaches similar to that taken in this study. It is expected that the gains in sustainability of the integrated vs. the conventional design of infrastructure will become yet more significant as more systems, over longer analysis periods, and larger spatial scopes are designed concurrently.

131Future extensions of this research can address three general topics: the wastewater treatment model, the building and energy system models, and the optimization algorithm. Below are some of the potential future studies on the wastewater treatment model:

1321. This study implicitly addresses handling of retentate from the treatment process; however, given its large environmental impacts, this topic merits in-depth analysis in future studies. In theory, Anaerobic Digestion (AD) combined with syngas processing of biosolids and/or short-cut nitrogen-removal systems could be used to minimize residuals and produce up to 0.35 kWh of energy per 1 m 3 of wastewater treated (Scherson et al., 2013;Scherson and Criddle, 2014). AD can also be combined with emerging anaerobic secondary treatment systems, like the SAF-MBR with air-stripper (Stanford University, 2021), to maximize methane recovery and increase net energy production from retentate (Scherson and Criddle, 2014). CHP engine can directly use the biogas and syngas from such processes to generate heat and electricity (Scherson and Criddle, 2014). This also motivates studies comparing centralized vs. decentralized treatment of retentate, where part or all of the treated water from decentralized treatment could be used for irrigation. 2. The excess heat from the CHP engine in this work is used for heating the wastewater when FO-MD was selected as the treatment system. This waste heat could also be used to dry the biosolids left from the treatment process after mechanical dewatering, as suggested by Scherson and Criddle (2014). Dewatering of the biosolids enables their gasification and production of ash, dramatically reducing solids for disposal and generating additional energy in the form of syngas. 3. To avoid overcomplicating the analysis, the scope of this paper excludes the reuse and redistribution of the treated wastewater. When distributed, the potable water recovered by the system proposed in this research can improve the water security (Cook and Bakker, 2012;World Economic Forum Water Initiative, 2012;Garrick and Hall, 2014), resilience, and sustainability of the urban areas. This also merits in-depth follow-up studies. 4. Future studies can investigate the sustainability and resilience impacts of setting different qualities-e.g., suitable for irrigation, or banking in reservoirs-for the effluent of the treatment process. Same can be done for the retentate of the treatment process. For example, the nitrogen-rich retentate of the treatment can be used for landscaping to help preserve water resources. 5. This paper simplifies modeling of water demand profiles by assuming that daily profiles are constant for every day of a month. This enabled constructing hourly demand profiles for all the 21 building types in the same climatic region and over the entire year, as the existing literature did not allow for making more detailed demand profiles. Future studies should examine the updated literature for modeling variable daily profiles for each day of a month. 6. The integration across the water and energy system proposed in this work can be tailored for applying to a range of different time scales, e.g., by using monthly rather than hourly models, or geographic scales, e.g., by focusing on regions rather than districts. Results of studies on these different scales can provide valuable insights for different stakeholders who require different levels of granularity in modeling and analysis. Adapting the proposed framework to these different scales is also a worthwhile extension of this work.

133The list below describes interesting future studies on the building and energy system models:

1341. A limited, yet diverse, set of supply equipment were selected and modeled in this study: more treatment systems and energy systems, including all-electric technologies, can be introduced into the supply equipment mix in future efforts to make this framework applicable to a wider variety of cases. 2. Network configuration largely determines the loss and performance of the heating, cooling, and wastewater treatment infrastructure )-future efforts should introduce network optimization into the proposed framework. This addition, nonetheless, increases the complexity of the optimization problem by several orders of magnitude, and this might require alternative optimization algorithms, more memory, and more computational power compared to this study. 3. This paper treats the input parameters of the supply and demand models as deterministic variables, whereas the uncertainties in these parameters can have tangible effects on the results of the analysis obtained using the proposed method. Uncertainty analysis of the proposed framework merits extensive future study.

135The following detail potential future studies on the optimization algorithm:

1361. Improving the optimization algorithm has a great potential for further studies (e.g., Rezazadeh . For instance, in this study no constraints were applied to the optimization problem other than to the gross-floor-area of the neighborhoods. Future studies can impose constraints on the ranges of building type ratios as well as the permitted types of CHP engines, chillers, and treatment systems to inform the optimization algorithm to obtain optimal neighborhoods with specific mixes of buildings and supply equipment.

137For the case study examined in this manuscript, the optimization algorithm found many optimal solutions with building type mixes dominated by office buildings. The COVID-19 global pandemic has shown that the usage of different building types can vary, sometimes drastically, because of unforeseen conditions. This suggests the need for studies that consider other "black swan" events (Taleb, 2007) to understand how they can change the optimal design and performance of cities by imposing constraints on the components, e.g., the building mix, of the urban neighborhoods.

DATA AVAILABILITY STATEMENT

138The original contributions presented in the study are included in the article/Supplementary Materials, further inquiries can be directed to the corresponding author/s. Files required for replicating the experiments and visualizations of this paper can be found at: https://github.com/PouyaREZ/Wastewater_Energy_ Optimization.

AUTHOR CONTRIBUTIONS

139PR: conceptualization, data curation, formal analysis, funding acquisition, investigation, methodology, project administration, resources, software, writing-review and editing, roles/writing-original draft, visualization, and validation. ML: conceptualization, funding acquisition, methodology, project administration, resources, supervision, writing-review and editing, roles/writing-original draft, and validation. CC: resources, supervision, writing-review and editing, and validation. All authors contributed to the article and approved the submitted version.

FUNDING

140This material is based on work supported by the Leavell Fellowship on Sustainable Built Environment from the Department of Civil and Environmental Engineering at Stanford University. This research has additionally been supported by AP Thailand.

SUPPLEMENTARY MATERIAL

141The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/frsc.2022. 856996/full#supplementary-material

INTRODUCTION Motivation

142While covering only 3% of the earth's land, urban areas accommodate 55% of world population and are responsible for more than two-thirds of global energy consumption and CO 2 emissions (United Nations, 2015;International Energy Agency, 2016). These ever-growing numbers make cities the forefront of the fight against climate change. On the other hand, around 39% of US primary energy is consumed by residential and commercial sectors (Energy Information Administration, 2019): designing more efficient buildings as well as water and energy systems can play an essential role in reducing the energy consumption and environmental footprint of urban districts. Coordinated design of infrastructure has proven to be an effective approach for creating more sustainable urban systems. Such coordination leads to integrated municipal supply systems (e.g., energy and water supply) with improved overall performance when compared to the simple superposition of individual supply systems (Mancarella, 2014). Further, integrated design of infrastructure systems facilitates closed-loop management of resources and can help create "circular economy" in urban areas (World Economic Forum, 2014;Kalmykova et al., 2018).

143This study focuses on integrating urban energy and wastewater treatment systems. Typically, urban energy and water infrastructure are designed after the demands of the community are determined. At that late stage, improving the environmental and economic performance of the system is difficult (Best, 2016). However, if the supply and demand of municipal services are optimized simultaneously, the resulting urban system has proven to outperform the isolated design based on social, economic, and environmental sustainability metrics (Keirstead et al., 2012;Allegrini et al., 2015;Best et al., 2015). Since building mix largely determines the consumption profile of urban neighborhoods (Best, 2016;Wu et al., 2018), simultaneously optimizing the building mix and integrating infrastructure represents an opportunity for designing more sustainable urban systems (Keirstead et al., 2012;Best, 2016). Developing a framework to investigate and understand this opportunity is the focus of this research paper.

Prior Research

144Factors including urbanization, environmental stresses due to climate change, and demand for more livable built environments are creating challenges for cities to satisfy the needs of an increasing urban population (Bauer et al., 2015;Best, 2016;Khan et al., 2017;O'Neill et al., 2017). This imperative is urging urban and infrastructure planners to design more sustainable infrastructure systems that can maintain and improve the livability of cities (Arup, 2016;SF Environment, 2018). However, concerning the focus of this study, literature shows several obstacles to achieving more sustainable water and energy systems in urban areas;

1451. Disconnected modeling of supply and demand: This disconnect results in a missed opportunity to design more sustainable systems by leveraging integrated supply and demand optimization (Manfren et al., 2011;Keirstead et al., 2012;Best et al., 2015;Wang et al., 2018), 2. Isolated design of infrastructure: This isolation overlooks the interdependence between different infrastructure systems and the opportunity to increase the efficiency of the overall urban system by exploiting this interconnection (Howells and Rogner, 2014;Wu et al., 2015;Khan et al., 2017;Saidi et al., 2018), 3. Qualitative assessment of economic and environmental outcomes of planning: The application of qualitative assessment, rather than quantitative metrics, yields inefficient designs with suboptimal performance (Coutts et al., 2008;Keirstead et al., 2012;Eicker et al., 2015;Best, 2016;Hukkalainen et al., 2017).

146To address these deficiencies in the context of urban water and energy systems, a framework is needed to optimize the supply and demand of infrastructure systems concurrently (Manfren et al., 2011;Keirstead et al., 2012;Best et al., 2015;Wang et al., 2018;Bakhtiari et al., 2020), integrate the design of urban water and energy infrastructure (Siddiqi and Anadon, 2011;Rodriguez et al., 2013;Bauer et al., 2015;Khan et al., 2017;United Nations, 2019), and provide quantitative feedback on the life-cycle performance of design alternatives (Keirstead et al., 2012;Best et al., 2015;Eicker et al., 2015). This paper develops such a framework to design the supply and demand of integrated wastewater treatment and energy infrastructure for urban neighborhoods. The framework designs infrastructure systems at the neighborhood scale and on an hourly basis following the recommendations by Hawkes and Leach (2005), Jaccard (2006), Evins et al. (2011), and Best et al. (2015).

Co-optimizing Supply and Demand in Energy Systems

147Jaccard (2006) defined energy system as "the combined processes of acquiring and using energy in a given society or economy." Manfren et al. (2011), Keirstead et al. (2012), and Allegrini et al. (2015) reviewed 400+ articles and tools on modeling supply and demand in urban energy systems, and concluded that frameworks must be developed to concurrently optimize energy supply and demand technologies at an urban scale. These frameworks can enable designers to make urban energy systems which are more efficient than systems created using traditional design methods (Manfren et al., 2011;Allegrini et al., 2015;Best, 2016).

148To address this requirement, Best et al. (2015) made a framework to simulate and optimize the energy supply systems and the building mix of an urban district composed of 100-1,000 neighboring buildings. As a case study, Best et al. (2015) used NSGA-II Genetic Algorithm (Deb et al., 2002) to optimize the building mix and the combined cooling, heating, and power (CCHP) plant for an arbitrary development in San Francisco for minimum life-cycle cost (LCC), minimum greenhouse gas emissions (GHG), and maximum energy efficiency. The simulation successfully generated many neighborhoods with desirable life cycle costs, zero and near-zero operational GHG emissions, and energy efficiencies more than 70%.

149Best et al. took an essential step in integrating the optimization of the supply and demand of energy and numerically evaluating the infrastructure and urban planning. However, this framework and its successors did not consider the non-energy infrastructure. Wu et al. (2018) followed the method proposed by Best et al. (2015) and added simplified pumping and heat losses as functions of pipe dimensions. Wu et al. optimized the building mix and Combined Heating and Power (CHP) engine for an arbitrary neighborhood in Shanghai, China.

150More recently, Waibel et al. (2019) developed a framework for parametrically optimizing buildings and supply technologies in an urban setting. They optimized the height and geometry of four office buildings in Zurich, Switzerland. Supply systems for electricity, space heating, hot water, and cooling were composed of electricity and heat generators, an absorption chiller, and storage technologies. Waibel et al. developed a nested bi-level optimization routine to avoid direct multi-objective optimization and used it to minimize the life cycle cost and carbon emissions of the system. They also simplified the timescale for the optimization from an entire year to only 6 weeks. Similar to Best et al. (2015) and Wu et al. (2018), this paper focused only on energy infrastructure, and did not consider the water system and designing an integrated water-energy infrastructure.

The Water-Energy Nexus

151Until recently, urban water and energy infrastructure systems were planned and managed independently (Howells and Rogner, 2014). However, urban infrastructures are becoming more interdependent in the face of mutual challenges including aging, population growth, shrinking resources, extreme events, and climate change (Bauer et al., 2015;Saidi et al., 2018;Moazeni et al., 2020). In particular, "integrated water and energy planning" has gained global public and scholarly attention due to recent difficulties faced by many countries to secure sustainable water and energy resources (Rodriguez et al., 2013;Bauer et al., 2015;Khan et al., 2017;United Nations, 2019;Huang et al., 2020). This concept, dubbed the "water-energy nexus, " focuses on the interrelations between production, transmission, and consumption of water and energy (Siddiqi and Anadon, 2011;Bauer et al., 2015;Dai et al., 2018).

152Water used for power plant cooling accounts for half of the freshwater withdrawals in the US (World Economic Forum Water Initiative, 2012). Meanwhile, water scarcity and growing demands require new sources of freshwater and more efficient technologies to treat water and generate energy (Luck et al., 2015;Khan et al., 2017). Wastewater treatment using the wasted heat and electricity of a power plant has shown to be effective in:

1531. reducing the need for power plant cooling and, consequently, the required cooling water (Khan et al., 2017;Gingerich and Mauter, 2018), 2. improving the energy efficiency of the integrated water-energy system by increasing the amount of useful work done per unit input fuel (Khan et al., 2017;Gingerich and Mauter, 2018), 3. providing a fresh and "renewable" source of potable/irrigation water for cities (Cath et al., 2009;Guo and Englehardt, 2015;Atab et al., 2016), 4. reclaiming the wastewater and mitigating the environmental repercussions of discharging it into receiving waters (McGovern and Bastian, 2009), and 5. creating a potential revenue stream for cities through selling the reclaimed water (Dayton et al., 2016).

154Many studies on the water-energy nexus assess the water consumed in different processes involved in energy generation (e.g., Bouckaert et al., 2014;Khan et al., 2017;Murrant et al., 2017), or the energy consumed or produced during desalination or water treatment (e.g., Al-Karaghouli and Kazmerski, 2013;EPA, 2013;Gude, 2015;Buonocore et al., 2018). A subset of these studies examines the direct integration of power plants and desalination/water-treatment facilities. A part of these works focuses on implementing small-scale combined heating and power (CHP) or combined cooling, heating, and power (CCHP) plants inside existing water or wastewater treatment facilities to use the biogas from digestion processes (Chacartegui et al., 2013;Caceres and Alca, 2016;Mehr et al., 2018;MosayebNezhad et al., 2018). Other researchers have studied CHP/CCHP plants powering the desalination processes, also called dual-purpose or water-power plants. Examples of these articles are found in Ferreira et al. (2010), Xianli et al. (2014), González-Bravo et al. (2017), andMata-Torres et al. (2019). Of specific interest, Zhou et al. (2015) modeled a wastewater treatment system based on forward osmosis (FO), which used the waste-heat from a thermal power generator to recover the draw solution of the FO process. Zhou et al. concluded that the FO process can treat the boiler makeup water and desulfurize the flue gas of all power plants in the US using the waste heat from the plants. The detailed modeling in this study provides evidence for the feasibility of combining a membrane-based treatment system with a power plant to exploit the waste-heat from the facility for wastewater treatment. In another study, Gabriel et al. (2016) investigated the techno-economic feasibility of several use-cases for excess heat from industrial processes. Gabriel et al. modeled power and cooling generation, as well as seawater desalination, using multi-effect and reverse osmosis processes to leverage industrial waste heat.

155More recently, Gingerich and Mauter (2018) studied 66 retrofit configurations to comply with scenarios of air and wastewater emission regulations (planned for 2030) for a typical coal-fired power plant. They combined several carbon capture and wastewater treatment technologies to retrofit the plant and use the electricity or residual heat and steam generated by the plant. The potential revenue under each scenario was then used to evaluate the combinations. The authors concluded that under the strictest regulation scenario, maximum revenue would result from allocating waste heat to amine-based carbon capture and allocating electricity to a mechanical vapor recompression water treatment system. This study is one of few in which the heat and electricity consumption of modern wastewater treatment technologies (including FO) are used to complement the operation of a power plant. Notwithstanding, their optimization algorithm adopted a single objective, and the operation of the plant and the considered technologies were independent of time and ambient temperature. Therefore, the effects of variations in the energy and wastewater treatment load as well as the ambient temperature on the operation of the facility were not captured.

Objective and Contributions

156CCHP plants are a recurrent example of integrated energy infrastructure in practice and research. These plants have shown up to 30% higher overall energy efficiency than comparable segregated energy systems (Rezaie and Rosen, 2012;DOE, n.d).

157Despite the high efficiency of a CCHP plant, its constant power-to-heat ratio often causes electricity and heating losses (Díaz et al., 2010), as the electricity and heat demanded from the plant to power the network throughout the day do not necessarily align with this fixed ratio. Studies have shown that a wastewater treatment system located within or near the CCHP plant can effectively exploit any "excess" heat and electricity (Elimelech and Phillip, 2011;Zhou et al., 2015), providing an opportunity to design and optimize the water treatment and energy systems concurrently. Given growing water scarcity in many urban areas around the globe, this integration is important for curtailing the fresh water withdrawal used for dissipating the excess heat due to energy generation (Luck et al., 2015;Khan et al., 2017;Energy Information Administration, 2019) and providing decentralized wastewater treatment systems at the neighborhood scale. To realize this opportunity, this paper proposes a framework to design and optimize the demand and supply of integrated energy and water systems (water-energy nexus) for environmental and economic sustainability in an urban neighborhood on an hourly basis.

158The contributions of this paper are as follows:

1591. Hourly water demand profiles of 21 building types: This paper creates, for the first time, the hourly water demand profiles for 21 building archetypes which represent more than 70% of the buildings in the US (Deru et al., 2011;Best et al., 2015), for the climate zone of San Francisco County, CA. This contribution is essential for integrating the design of different infrastructure systems with the water system at the neighborhood scale. Section Hourly Wastewater Treatment Demand details this contribution. 2. Models for hourly energy consumption and life-cycle cost of FO-RO and FO-MD wastewater treatment systems: This paper introduces computational models of the specific energy consumption, as well as the capital and operational costs of, forward osmosis-reverse osmosis (FO-RO) and forward osmosis-membrane distillation (FO-MD) treatment systems as functions of the temperature and flow of the input wastewater. These compact wastewater treatment systems can be located within the energy plant, can use the waste heat and electricity from the CHP engine to operate, and can output water ranging in quality from irrigation to drinking. These models provide a straightforward method to include these high-performance treatment systems in largescale simulations of the water system, and enable integrated design of a wastewater treatment system or desalination system with the energy infrastructure. Section Wastewater Treatment Module details the developed models. 3. Integrated approach to designing the wastewater treatment and energy system: The framework proposed in this paper is the first of its kind to concurrently design the optimal building mix of an urban neighborhood and the systems supplying the neighborhood with wastewater treatment, cooling, heating, and electricity on an hourly basis. The proposed framework is expected to inform urban planners and infrastructure designers of a "range" of optimal configurations, e.g., in terms of building mix or floor area ratio, for designing a neighborhood, thereby allowing them to flexibly select infrastructure systems and enact zoning rules leading to more sustainable urban neighborhoods when measured in terms of environmental and economic sustainability metrics. Unlike the typical approach where the energy system is designed independently from the wastewater treatment system, the proposed method allows for designing urban neighborhoods with lower life-cycle cost and emissions by reducing the energy loss and by improving the overall efficiency of the integrated energy system-wastewater treatment. The accuracy of the outputs of this integrated framework depends directly upon the accuracy of the models simulating the supply technologies, i.e., the CCHP engines and the wastewater treatment system, and the demand systems, i.e., the building models.

MODEL DEVELOPMENT

160The model presented here extends and improves a previous framework created by Best et al. (2015) in Python programming language (Van Rossum, 2007). The original framework by Best et al. (2015) was able to simulate the supply and demand of energy for a community given its building uses and energy supply equipment. Three main modules comprised the original framework: (1) energy demand modeler, (2) energy supply modeler, and (3) analyzer and optimizer. The first component, "energy demand modeler, " could simulate the annual hourly cooling, heating, and electricity demands from several building archetypes and the associated losses at the supply and distribution levels. The "energy supply modeler" could model the hourly performance of a range of combined heating and power (CHP) engines and chillers given the ambient conditions (e.g., ambient temperature and pressure) as well as heating, cooling, and electric loads imposed on the engines. The final component of the framework, "analyzer and optimizer, " could (1) evaluate the lifetime performance of the supply equipment in terms of the defined optimization objectives (e.g., annual carbon emissions, life-cycle cost of equipment) and (2) using an evolutionary algorithm generate a set of neighborhoods optimized with respect to the optimization objectives. This study extends the demand modeler from the framework mentioned above by enabling it to model the hourly wastewater treatment demands for the 21 building archetypes presented by Best et al. (2015). This work also enables the supply-side module in the mentioned framework to model wastewater treatment systems and thermal energy storage. The former is done by adding three wastewater treatment technologies to the set of supply models developed by Best et al. (2015): two modern hybrid treatment technologies, namely Forward Osmosis-Reverse Osmosis (FO-RO) and Forward Osmosis-Membrane Distillation (FO-MD), and one conventional central treatment. These treatment technologies augmented with a set of pre-treatment and post-treatment techniques can treat input municipal wastewater up to a potable quality. Finally, the triple optimization objectives in the original frameworkannual carbon emissions, total fuel cycle energy efficiency, and undiscounted life-cycle cost of equipment-are reduced here to two modified objectives-discounted life-cycle social cost of carbon and discounted life-cycle cost of equipment, both normalized by the total gross-floor area of the buildings in the neighborhood. Figure 1 shows the flow diagram of the proposed framework, showing the three main components (supply module, demand module, and analysis and optimization module) and their subcomponents.

161The following provides the semi-formal formulation of the optimization problem solved by the proposed framework:

162Objective Functions Sum of all building footprints must be less than 0.7 km 2 Sum of all floor areas (i.e., total GFA) must be larger than 0.1 km 2 but less than 3.3 km 2

163The following sections detail the demand module, supply module, and optimization objectives.

Hourly Wastewater Treatment Demand

164This work enables the demand module from Best et al. (2015) to model the hourly wastewater treatment demands for the 21 building archetypes originally discussed by Best et al. (2015) which represent more than 70% of the buildings in the US (Deru et al., 2011). Table 1 shows a summary of the specifications for these 21 building archetypes. The hourly wastewater outflow for these building archetypes were modeled by converting the potable water demand for each building into the wastewater generated by the building. Table A2 in Supplemenatry Material lists the references used to create the profiles of hourly water use for these 21 building archetypes over the 12 months of the year. As mentioned later in this article, San Francisco, CA, is selected as the location of the test case study; hence, studies on buildings located in San Francisco or in areas of California with similar climates to San Francisco, e.g., Santa Barbara ("IECC Climate Zone Map | Building America Solution Center", 2012), were used for synthesizing the water demand profiles for the 21 building archetypes. The water demand was considered only for indoor use-outdoor use, comprised mostly of irrigation use, was disregarded in this study.

165In converting water use to wastewater outflow, the consumptive use of water in the buildings was conservatively assumed negligible, i.e., the outflow of wastewater was taken equal to the inflow of potable water. The average daily water use of the four "residential" building types were calculated using Equation (1).

166here Q d w is the average daily indoor water use (m 3 /h), GFA is the total gross floor area of the building (in m 2 ), RES a is the average number of residents per unit area (person/m 2 ), and Q c w is the average daily indoor water use per capita for the building (m 3 /h/person). For this equation, for each different building type, the average number of residents per unit area was extracted from Deru et al. (2011) and the average daily indoor water use per capita was extracted from Carollo Engineers (2015). The average daily water use (Q d w ) for all the other building types, except for the mixed-use buildings, were calculated using Equation (2).

167here Q a w is the average daily indoor water use per unit area of the building (m 3 /h/m 2 ) based on US EIA (2017).

168The average daily water use (Q d w ) of mixed-use building M1 (symbol explained in Table 1) was computed by combining the average daily water uses of buildings R1 and C2 proportional to the gross-floor-area assigned to each building type, i.e., 8,621 m 2 of R1 and 784 m 2 of C2, based on the definition of this mixeduse building archetype (Best et al., 2015). The same approach was followed for computing the average daily water use for mixed-use building M2: the average daily water uses of buildings O1 and C2 were combined proportional to the gross-floor-area assigned to each, i.e., 8,621 m 2 of O1 and 784 m 2 of C2. Assuming the same water demand profile for every day in a month, the wastewater demand of each building type at each hour was calculated using Equation (3).

169here Q h, m ww is the wastewater outflow at hour h during month m (m 3 /h), Q d w is the average daily indoor water use (m 3 /h). C h and C m are the hourly and monthly coefficients for converting the average daily water use to water used at hour h and in month m, respectively. The assumption of constant daily water demand profiles for each day in a month enabled us to construct hourly profiles of water demand over the entire year across several building types within the same climatic region. We recognize that such profiles do change but found that this information is lacking in the technical and academic literature. Tables 2-4 list Q d w , C h and C m , respectively, for all the 21 building archetypes.

Wastewater Treatment Module

170This work enables the framework proposed by Best et al. (2015) to simulate wastewater treatment processes at the neighborhood scale. For this purpose, three wastewater treatment technologies are modeled and added to the supply module of the original framework: two membrane-based treatment technologies, namely FO-RO and FO-MD, and one conventional central treatment plant (CTP). These treatment systems augmented with pre-treatment and post-treatment processes can treat municipal wastewater to a drinking quality. "Appendix B: Wastewater Characteristics" in Supplementary Material shows the assumed composition of the input wastewater, the required quality of the output drinking water, and discusses the treatment capabilities of FO-RO and FO-MD systems. The advanced water/wastewater treatment technologies Forward Osmosis (FO), Reverse Osmosis (RO), and Membrane Distillation (MD) have recently received considerable attention from researchers and practitioners for water reuse applications (Alkhudhiri et al., 2012;Council, 2012;McCutcheon and Huang, 2013;Coday et al., 2014;Blandin et al., 2015;Shaffer et al., 2015; Guizania et al., 2019). This is partly because these technologies are more compact, require lighter maintenance, are easier to automate, and can more effectively remove pathogens compared to traditional treatment systems (Council, 2012). These systems have consistent effluent quality and can potentially reduce the chemical demand of the treatment process (Council, 2012).

171Such qualities make these technologies ideal for implementing at a combined cooling, heating, and power (CCHP) plant with limited space, and for treating domestic wastewater to drinking water quality-a procedure which requires robust treatment processes. RO and MD membranes suffer irreversible fouling (Husnain et al., 2015a,b;Kim et al., 2018). This phenomenon gradually reduces the water flux, demanding frequent replacement of the membrane. FO can largely mitigate this problem when used as a pretreatment step for RO (Cath et al., 2005;Zaviska and Zou, 2014;Kim et al., 2018) and MD (Husnain et al., 2015a,b). FO prevents the foulants from reaching the RO or MD membrane, whereas the resulting fouling of the FO membrane is mostly reversible and can be resolved with backwashing and chemical cleaning (Husnain et al., 2015a,b). Further, FOpretreatment filters the bacteria, viruses, and organic and inorganic compounds (Zaviska and Zou, 2014;Akther et al., 2015) making for a more robust treatment.

172"FO-RO" (Figure 2) and "FO-MD" (Figure 3) are the hybrid treatment processes resulting from combining FO process with RO and MD. The wastewater treatment module in the framework introduced here incorporates these two systems as the main "integrated" wastewater treatment technologies, i.e., treatment technologies collocated with the energy supply equipment. This module takes as its input the volume of hourly wastewater produced by the neighborhood and the ambient temperature (taken as the temperature of the wastewater). Assuming a 24-h storage capacity for the input wastewater, the module calculates the maximum membrane area required to treat the 24-h movingaverage of the inflow over the entire year. This number is used to calculate the capital and operational expenses of the treatment systems. The treatment module also outputs (1) the hourly electricity and heat demand of the selected treatment models (which will be supplied by the CHP engines), and (2) the operational electricity requirement as well as the initial and operational expenses associated with the pre-treatment processes, e.g., screening, and the post-treatment processes, e.g., disinfection and pH adjustment. The calculation of life-cycle expenses for the treatment modules also considers the costs associated with chemicals, labor, retentate handling, and all the other expenses required for normal operation of a treatment plant (Al-Obaidani et al., 2008;McGivney and Kawamura, 2008).

173Both treatment models consume electricity while the FO-MD also consumes low-grade heat to treat the wastewater. This characteristic was the other reason for selecting these systems to be integrated with the CCHP plant: these wastewater treatment technologies can consume the unused heat and electricity generated by the CHP engine, and thus mitigate the loss of primary energy and increase the efficiency of the integrated CCHP-wastewater treatment plant over the levels achievable using segregated systems. FO-RO only requires electricity to operate while FO-MD mostly requires heat: FO-RO consumes 3.34 kWh of electricity, while FO-MD consumes 33.2 kWh of heat and 0.55 kWh of electricity to treat 1 m 3 of input wastewater at 20 • C. The optimization algorithm is expected to favor FO-RO for treating the wastewater in cases with large amounts of extra electricity (generated by the CHP engine), and to favor FO-MD in cases with large quantities of extra heat. As Figure 3 shows, the excess heat produced by the CHP engine will be used to heat the feed water to the MD process, while the ambient air will be used to cool the product water and concentrated draw solution. The induced temperature difference will provide the vapor pressure difference required to run the MD process. "Appendix C: FO-RO" and "Appendix D: FO-MD" in Supplementary Material detail the mathematical models developed for simulating the FO-RO and FO-MD systems, respectively, with overall water recovery ratios (RR) of 50%.

174In addition to the integrated treatment systems, a conventional wastewater treatment plant was modeled according to the treatment plant serving the location of the case study in San Francisco. "Appendix E: CWWTP" in Supplementary Material describes the model developed for computing the electricity requirements and expenses associated with this central plant. The wastewater treatment module takes as its input the aggregated hourly demands of the neighborhood for wastewater treatment, and computes the required cost and electricity (1.1 kWh per 1 m 3 of input wastewater) to process this wastewater as well as the emissions due to the treatment process. The resulting heating and electric loads are added to the rest of the heating and electric loads imposed on the CHP engine. This module also considers the costs of chemicals, labor, bio-solid and retentate handling, and all the other expenses required for normal operation of a treatment plant (McGivney and Kawamura, 2008).

Thermal Energy Storage Model

175This study enables the supply-side modeler from Best et al. (2015) to model Sensible Thermal Energy Storage (TES). Hot water storage tanks are selected and modeled for this purpose: hot water generated by the CHP engine for heating with a source temperature of 85 • C (Best, 2016) is assumed to get stored in the TES and discharged to satisfy the heating loads when necessary. Four primary factors contribute to the heat loss in a storage tank (Dincer, 2002): heat loss to the surrounding environment, heat conduction between the segments of the storage fluid with higher and lower temperatures (due to the stratified storage of hot water), vertical conduction in the tank wall, and mixing of water during charging and discharging. "Capacity model, " a common loss model (Schütz et al., 2015), assumes the hot water tank to contain a homogenous fluid. With this assumption, the thermal storage at each time-step can be calculated using Equation (4):

176where TES is the energy stored in the TES at time t [in kW], k v is a temporal loss factor (assumed 0.0534% based on Schütz et al., 2015), t is the time interval (1 h), and H in TES,t [in kW] is the net heat flow into the TES tank at time-step t (positive for net charging and negative for net discharging of the tank).

177Equation (5) here, TES Cap is the capacity of the TES [in MWh], and 1.17 is a factor converting 2008 USD to 2019 USD (CPI, 2020). The TES is sized to store enough hot water to satisfy 6 h of maximum aggregate heating demand from the buildings that is computed for each designed neighborhood. The unused heating, in the form of hot water, at each hour gets stored in the TES tank, and the stored hot water in the tank is the first resource responding to heating demand at each hour, i.e., TES has priority over the CHP engine for satisfying the heating demand.

Objective Functions

178The original objective functions defined by Best et al. (2015) comprised undiscounted life-cycle cost of equipment, annual CO 2 emissions of equipment, and total-fuel-cycle energy efficiency. In this study, the energy efficiency metric was removed from the set of objectives, as it was considered intangible and with no direct monetary or environmental consequences which were not captured by the other two objectives. Reducing the number of optimization objectives lowered the complexity of the optimization algorithm: now, the algorithm needs to inspect only two objectives rather than three when comparing different neighborhoods and finding the most optimal ones. Further, the two optimization objectives for carbon emissions and life-cycle cost were normalized by the GFA of the neighborhood. Without this normalization, the optimization algorithm would only favor neighborhoods with low emissions or low operational costs regardless of their size: e.g., a small neighborhood with 10,000 ft 2 of total GFA, would be equivalent to a 1,000,000 ft 2 neighborhood if they both have the same values of annual carbon emissions and life-cycle cost. However, the larger neighborhood is satisfying a much larger demand in a far more sustainable way than the smaller neighborhood. Normalization addresses this error, enabling the optimization method to achieve optimal (sustainable) neighborhoods with a variety of sizes.

179Also, to make more tangible the environmental impacts of building and operating the neighborhood, Social Cost of Carbon (SCC) was used to convert the annual carbon emissions into dollar values representing the social, environmental, and economic damage resulting from CO 2 emissions (EPA, 2016). Among the different models used to calculate SCC, the version created by US Environmental Protection Agency (EPA) was chosen to be used here (EPA, 2016). "Appendix F: Social Cost of Carbon" in Supplementary Material presents the regression function used to calculate the SCC for each year over the design period. In this new objective function, the carbon emissions associated with the construction of the equipment were also accounted for in addition to the operational emissions. The construction costs were converted into equivalent carbon emissions using conversion factors from EIO_LCA database (Carnegie Mellon University, 2007) for the construction of utilities: 243 Tons of CO 2e was assumed to result from 1 million 2007 USD worth of economic activity.

Introduction

180To showcase the capabilities of the proposed framework in cooptimization of supply and demand as well as integrated design of water and energy infrastructure, a case study was conducted based on that proposed by Best et al. (2015). Best et al. modeled a 160-acre greenfield development in Civic Center, San Francisco, and simulated the electricity, cooling, and heating demands of 21 building archetypes (presented in Table 1) using EnergyPlus ver. 8.0.0 (Crawley et al., 2001). Best et al. also modeled 32 CHP engines and 16 chillers as the set of supply equipment. The same 160-acre development, building archetypes, CHP engines, and chillers are considered in this study with the following modifications: (i) Hourly wastewater treatment demands were added to the set of energy demands of the buildings, (ii) Thermal Energy Storage and three wastewater treatment technologies (namely, FO-RO, FO-MD, and CWWTP) were added to the original set of supply models, and (iii) the optimization objectives were changed to GFA-normalized life-cycle cost of equipment and life-cycle social cost of carbon.

181The proposed model was run for two scenarios: (i) In the first one, the building mix and energy system were designed and optimized together, while a conventional central wastewater treatment plant (CWWTP) treated the wastewater from the buildings, and (ii) in the seconds scenario, the building mix, energy system, and wastewater treatment system were optimized and designed concurrently. In the first scenario, the grid was assumed to supply the electricity required by the CWWTP, and grid emissions for generating this electricity were attributed to the CWWTP. The emissions and expenses of the CWWTP were in turn attributed to the neighborhood in proportion to the ratio of the "average daily wastewater output of the neighborhood" to "57 MGD" (i.e., the actual average daily input of the treatment plant). Since the existing CWWTP serving the location of the case study, i.e., Southeast Treatment Plant (SF PUC, 2019), does not produce potable water, it was arbitrarily replaced by a conventional treatment plant of the same size but capable of producing potable water-as also explained in Appendix E: CWWTP Model in Supplementary Material. This modification was necessary to make the two scenarios comparable. In the seconds scenario, a combined CCHP-wastewater treatment plant (CCHP-WWTP) supplied the energy and wastewater treatment demand of the buildings.

182Both scenarios were designed for minimum life cycle cost of equipment (LCC) and minimum social cost of carbon (SCC). The LCC optimization objective incorporated the construction and discounted operation and maintenance costs of only the CCHP plant for the first scenario, and the entire CCHP-WWTP for the seconds. The SCC optimization objective considered the construction and discounted operation costs of carbon emissions associated with only the CCHP plant for the first scenario, and the entire CCHP-WWTP for the seconds. Both scenarios were simulated for 20 year of operation with a 3.5% discount rate. The neighborhoods generated by the optimization algorithm were compared in terms of their total (i.e., including those associated with the CWWTP) life cycle cost of equipment, operational and construction GHG emissions, types of supply technologies, and building mix among other metrics. The LCC and SCC calculations excluded the reuse and redistribution of the recovered water.

183The excess electricity generated during each hour was assumed to be sold back to the grid at 80% of the purchase price at that hour which was extracted from CAISO for year 2018 (California ISO, 2019). The hourly ambient temperature for the case study was extracted from TMY3 dataset for the San Francisco International Airport (Wilcox and Marion, 2008). Further, the grid emissions for each hour were extracted from Beyond Efficiency (Beyond Efficiency, 2017) for year 2016.

Results and Analysis

184The two scenarios, namely scenario 1 (conventional design) and scenario 2 (integrated design), were simulated each using an Intel Xeon E5-2640v4 processor (10-core Broadwell, 2.40 GHz) with 800 MBs of effective memory use over 145 mins of CPU wall-clock time. The map method from Scoop library (Hold-Geoffroy et al., 2014) was used to parallelize the map calls to Genetic Algorithm (GA) methods from Deap library (Fortin et al., 2012). The advantage of using a GA for solving this problem is that it does not require assignment of weights to either of the two objective functions, and instead enables simultaneous optimization of both objectives (Deb et al., 2002). The GA algorithm, NSGA-II, used the following optimization parameters based on the recommendations of Best et al. (2015):

185Number of generations = 1,000; Population = 200; Mutation Probability = 0.05; Similarity Parameter = 2.5; Crossover Probability = 0.75.

186Substituting series data processing with parallelized Numpy (Oliphant, 2006) operations, reducing the number of objective functions from three to two, and other minor technical upgrades cut the optimization runtime by 97% compared to the optimization with the same configurations done using the original framework in Best et al. (2015). Of the 200,000 neighborhoods produced by the GA algorithm for each scenario, 93,210 for scenario 1 and 87,644 for scenario 2 had admissible total GFA (i.e., less than 3,237,485 m 2 ) and site GFA (i.e., less than 647,497 m 2 ). These neighborhoods are called the "admissible neighborhoods" from this point on. Figure 4 shows the two GFA-normalized objective functions of the optimization, social cost of carbon vs. life-cycle cost, for all the admissible neighborhoods with SCC values less than 0.10 k$/m 2 , i.e., the 99.8th and 99.7th percentile of SCC across all neighborhoods in the first and the seconds scenario, respectively. Earlier generations of neighborhoods produced by the GA are plotted using symbols that are more transparent than the later ones. One outstanding observation from Figure 4 is that the optimization algorithm has successfully identified paths to designing neighborhoods with minimum LCC and SCC over consecutive generations: the dots (neighborhoods) closer to the origin (which has the ideal lowest SCC and LCC, i.e., 0 kg of lifetime CO 2 emissions and $0 of life-cycle cost) are more opaque (belong to later generations) than the dots farther away from the origin. Figure 4 also offers an insight on the comparison between the two scenarios: the blue dots in the figure are generally located lower than their adjacent red dots. This implies that the integrated design scenario, scenario 2, has resulted in neighborhoods with generally lower SCC than those of conventional design, scenario 1, for the same values of LCC. Figure 5 shows the approximate Pareto fronts of the two scenarios for the objective functions, life-cycle cost and life-cycle social cost of carbon, highlighted in yellow. In the Pareto optimal solutions, the SCC values of the integrated approach seem to be about 1/3 the SCC values of the segregated approach, while the LCC values of these solutions are similar between the two FIGURE 4 | Life-cycle social cost of carbon vs. life-cycle cost of equipment for the individual neighborhoods (single dots on the plot), with SCCs less than 0.1 k$/m 2 , generated by the optimization algorithm for the analyzed scenarios. Neighborhoods generated in later generations by the Genetic Algorithm are shown more opaque than the earlier generations (Red dots: conventional design, blue dots: integrated design).

187scenarios. These two observations about the Pareto fronts comply with the general trends deduced in the previous paragraph.

188To get a better understanding of the distribution of performance metrics across the designs produced by the two scenarios, standard deviation (SD), mean (average), 25th percentile, 50th percentile (median), and 75th percentile of LCC, SCC, annual aggregated energy demand, and annual wastewater treatment demand for all the neighborhoods resulting from the two design scenarios were calculated- Table 5 shows the results. The annual aggregated energy demand for each neighborhood was calculated by summing the total electricity and heating demand of the buildings and supply equipment (including chillers and treatment systems) over 8,760 h of the year. In this table, "CCHP | CWWTP" denotes scenario 1, and "CCHP+WWT" denotes scenario 2. The numbers in Table 5 are unitless since the values of each metric for each variable, e.g., 25th percentile of LCC, for both scenarios are normalized by the value of the scenario 1. This facilitates comparing the statistical metrics of the seconds scenario against those of the first scenario by converting the metrics of the first scenario into unity.

189The results in Table 5 show that integrated design of energy and wastewater treatment systems has resulted in lower life-cycle carbon emissions and cost as well as lower annual energy and wastewater treatment demands compared to a separate approach to the design of these two infrastructure systems. The difference in life-cycle social cost of carbon is the most noticeable, with scenario 2 having a mean value 56% lower than scenario 1. The reduction in mean values of annual demands from scenario 1 to 2 is ca. 40%. Comparing the SDs of the two scenarios also offers another observation: the optimal neighborhoods produced by the GA under scenario 2 are closer (more uniform) in terms of the four parameters inspected in Table 5. This can imply the existence of some neighborhoods with dominant genes (i.e., configurations resulting in very low SCC and LCC) in the population of scenario 2 which have been identified by the GA and sustained across multiple generations of the analysis.

190To further inspect the differences between the designs resulting from the two scenarios, K-Means Clustering (KMC) was used to create clusters of similar individuals among the admissible neighborhoods based on eleven features: the seven building-type ratios (i.e., GFA associated with each building type divided by the total GFA of the neighborhood), GFA-normalized LCC and SCC, and GFA-normalized annual energy and wastewater treatment demands. The features were standardized before clustering, and K-Means Clustering method from Scikit-Learn library (Pedregosa et al., 2011) was used to conduct the clustering with the following variables:

191Initialization_method: "k-means++"; max_iterations: 300; n_init: 10; random_state: 42; tol: 0.0001.

192Euclidean distance was selected as the measure of proximity for clustering. The number of clusters was varied between 8 and 40 to find the highest average Silhouette Score (Rousseeuw, 1987) and lowest cost function across all clusters: for both scenarios, the highest Silhouette scores (0.53 for scenario 1, and 0.32 for scenario 2) were obtained for 10 clusters. However, the cost function (i.e., sum of squared distances to centroids) for the 10-cluster configuration was high −233,834 (2.51 per individual) and 257,098 (2.93 per individual) for scenarios 1 and 2, respectively-and the clusters were unevenly populated. To solve this issue, the number of clusters was set to 26 (scenario 1) and 40 (scenario 2) which had yielded other local optima of the Silhouette Score among the tested number of clusters. These new cluster counts resulted in acceptably reduced cost functions of 105,064 (i.e., 1.1 per each neighborhood) for scenario 1 and 107,026 (i.e., 1.2 per each neighborhood) for scenario 2 with Silhouette scores of 0.36 and 0.31, respectively.

193After the KMC algorithm converged, clusters with less than 500 members were removed to prune out the outliers, and the remaining centroids (19 centroids for scenario 1, and 27 for scenario 2) were plotted in Figure 6. Each cluster centroid in this figure is shown as a continuous, unicolor line across the eleven variables along the x-axis, and the thickness of each line is proportional to the number of neighborhoods represented by that centroid. SCC, LCC, and the annual energy and wastewater demands for both scenarios in Figure 6 are normalized by the maximum values of each variable from both scenarios, and are presented in percent. Figure 6 shows that the building mix and normalized annual energy and wastewater demand for the most populous clusters of optimal neighborhoods for both design approaches cover roughly the same ranges of values. However, the most populated The cell colors in the table range from sharp red for a normalized value of 1 to sharp green for a normalized value of 0.

194FIGURE 6 | Traces of the cluster features-i.e., building area percentages for Residential, Office, Commercial, Industrial, Hospitality, Medical, and Educational buildings ( Table 1 shows the building types belonging to each of these building-uses), normalized LCC and SCC, normalized annual energy (Anl_E), and wastewater treatment demand (Anl_WW)-across the centroids of the clustered neighborhoods for (A) scenario 1 and (B) scenario 2. Each centroid is shown as a unicolor line connecting eleven points across the seven building-uses and the four metrics.

195clusters in scenario 2 have lower GFA-normalized SCC and LCC than those of scenario 1, corroborating the statistical data from Table 5. Also implied by the low standard deviation values of scenario 2 in Table 5, the most populous centroids of scenario 2 in Figure 6 are spread over smaller ranges of the eleven parameters plotted in the figure. The GFA ratios of individual building types show that (i) the percentage of residential buildings ranges from 0 to 60% for both scenarios, (ii) the office buildings range from 30 to 95% in scenario 1 and from 15 to 100% in scenario 2 with a high concentration around 80 to 100%, (iii) industrial and educational buildings are mostly negligible in scenario 1, while they range from 0 to 10% in scenario 2, and (iv) hospitality and medical buildings are mostly negligible in scenario 1 with two exceptional clusters showing ∼30 and ∼60% hospitality and medical type-ratios, while they range from 0 to 20% in scenario 2. These ranges show that the integrated design has resulted in a more diverse building mix among the optimal designs. Figure 6 offers another interesting observation: the building mix in the majority of optimal neighborhoods from both scenarios have a low share of residential buildings, a medium to high share of office buildings, low shares of educational and industrial buildings (in scenario 2), and trivial shares of commercial, hospitality, and medical buildings. This mix of building types seems to provide the lowest LCC and SCC per unit area among all possible building mixes inspected by the optimization algorithm and is hence predominant among the optimal building mixes for both scenarios.

196The types of selected supply equipment -were also analyzed for the admissible neighborhoods from both scenarios to identify the connections between the choices of supply equipment choices and metrics of life-cycle performance. Figure 7 shows for the two scenarios the normalized SCC against the types of CHP engines selected in neighborhoods with SCCs less than 0.1 k$/m 2 , i.e., the 99.8th percentile of the first scenario and 99.7th percentile of the seconds. In both cases, the neighborhoods with smallest SCCs use biomass/biogas, or fuel-cell CHP engines, which is consistent with the fact that the operation of these engines is deemed carbon-neutral since they are assumed to use renewable fuels (Best et al., 2015). The Pareto optimal solutions marked in Figure 5 are expected to be among these neighborhoods with carbon-neutral CHP engines, since the Pareto optimal solutions also have very low SCC values compared to the rest of the solutions. The neighborhoods designed with carbon-neutral CHP engines in scenario 1 seem to have a lower SCC compared to neighborhoods using the same engines in scenario 2. Further, since a large portion of the CHP engines selected in both scenarios for the local energy system are those with negligible operating emissions, supplying the wastewater treatment equipment with the local energy system in the integrated scenario would expectedly result in a much smaller life-cycle emission (SCC) compared to supplying the treatment equipment with the electric grid in the segregated scenario. These observations justify the lower SCC values of scenario 2 compared to scenario 1. Figure 7 also shows that the Genetic Algorithm has favored gas engines (i.e., gas turbines, microturbines, reciprocating engines, and steam turbines) much less than the carbon-neutral CHP engines in both scenarios given the significantly higher emission rates of the gas engines. Figure 8 also shows the normalized SCC vs. the types of chillers chosen for those neighborhoods in the analyzed scenarios which had SCCs less than 0.1 k$/m 2 . Low-emission neighborhoods have been possible to create using all types of the available chillers. Figure 9 shows the wastewater treatment (WWT) systems selected by the optimization algorithm for scenario 2. FO-MD has resulted in more low-emission neighborhoods than the other WWT system. Before, Figure 7 indicated that biomass engines were popular with low-emission neighborhoods. Most of the available biomass engines in the simulation framework have power-to-heat ratios lower than 0.42, which means they generate more heat than electricity in response to the energy demand. Part of the reason for popularity of FO-MD among the lowemission neighborhoods seems to be that this treatment system can "recycle" the excess heat generated by the carbon-neutral biomass engines selected for these neighborhoods. This excess heat can also be used for dewatering the solid residue from the treatment process (Scherson and Criddle, 2014) (discussed in more detail in Section Conclusions and Future Work). Figure 6 suggests a relationship between the oscillations in ratios of different building types with the values of SCC, LCC, and the annual demands. In a final analysis, the Pearson correlation matrices between the eleven variables plotted in Figure 6 were computed to inspect the linear relationships between these variables. Figure 10 shows the resulting correlation matrices for both scenarios. Normalized LCC and SCC are not strongly related to any other variables than each other, while normalized annual energy and wastewater demand seem to be negatively correlated with the ratio of office buildings in the neighborhoods. The latter is rooted in the low energy-and water-use intensities of the office buildings. The normalized annual demands also show a strong direct linear relationship with each other, meaning that neighborhoods with high annual wastewater treatment demands tend to have high annual energy demands and vice versa. Further, annual energy demand seems to be directly proportional to the percentage of medical buildings. This is caused by the high energy-use intensity of the medical buildings. The annual wastewater demand in scenario 2 also shows a strong collinearity with the percentage of residential buildings, which is caused by the high water-use intensity of these building types. Among the building type ratios, percentages of hospitality and medical buildings in both cases and commercial buildings in scenario 2 are negatively collinear with that of office buildings. The optimization algorithm seems to have strongly preferred office buildings in reverse proportion to the residentials, especially in the integrated design scenario.

CONCLUSIONS AND FUTURE WORK

197This paper studies the advantages of integrated design and optimization of the wastewater treatment and energy systems at the district scale over the segregated design of these infrastructure systems in terms of environmental and economic sustainability metrics. The supply and demand of the integrated water-energy system are also concurrently considered and optimized. Annual hourly wastewater treatment demands from several building archetypes as well as advanced membranebased and conventional central wastewater treatment systems are modeled to cover both the decentralized (integrated) and centralized (conventional) wastewater treatment configurations. An optimization framework is proposed for the integrated design of water and energy infrastructure and a case study in San Francisco is adopted to compare the outcomes of the conventional (segregated) vs. the integrated approach to the design.

198The results of the case study show consistently lower normalized social cost of carbon, life-cycle cost of equipment, annual energy demand, and annual wastewater treatment demand across the neighborhoods designed using the integrated vs. segregated approach, with the median values of these metrics for the seconds scenario being, respectively, 75, 20, 8, and 20% lower than those of the first scenario. These advantages of the integrated scenario can be attributed first to simultaneous optimization of the wastewater treatment and energy system in this scenario, and also to supplying the treatment system with the low to no-emission CHP engines FIGURE 9 | Social cost of carbon vs. WWT type for scenario 2 across all individual neighborhoods with SCCs less than 0.10 k$/m 2 , i.e., the 99.7th percentile of SCC. Each neighborhood is represented by a single dot in the plot.

199of the local energy system vs. supplying the treatment system with the electric grid in the segregated scenario. The results also showcase the economic and environmental viability of advanced wastewater treatment systems despite higher capital costs compared to conventional systems, when these advanced treatment processes are (i) optimized at the same time as the energy systems, (ii) physically and operationally integrated with the energy systems, and (iii) analyzed over the life-cycle of the neighborhood.

200The results also show that the building mixes of the neighborhoods generated under the two scenarios have similarities. This indicates that the districts designed for segregated water and energy systems can adopt integrated infrastructure with minimal modifications and without altering the building mix of the district. The considerable savings in emission and costs achieved by taking an integrated approach to the design of the water and energy infrastructure indicate the potential for integrating more infrastructure systems during the early-stage design of neighborhoods using approaches similar to that taken in this study. It is expected that the gains in sustainability of the integrated vs. the conventional design of infrastructure will become yet more significant as more systems, over longer analysis periods, and larger spatial scopes are designed concurrently.

201Future extensions of this research can address three general topics: the wastewater treatment model, the building and energy system models, and the optimization algorithm. Below are some of the potential future studies on the wastewater treatment model:

2021. This study implicitly addresses handling of retentate from the treatment process; however, given its large environmental impacts, this topic merits in-depth analysis in future studies. In theory, Anaerobic Digestion (AD) combined with syngas processing of biosolids and/or short-cut nitrogen-removal systems could be used to minimize residuals and produce up to 0.35 kWh of energy per 1 m 3 of wastewater treated (Scherson et al., 2013;Scherson and Criddle, 2014). AD can also be combined with emerging anaerobic secondary treatment systems, like the SAF-MBR with air-stripper (Stanford University, 2021), to maximize methane recovery and increase net energy production from retentate (Scherson and Criddle, 2014). CHP engine can directly use the biogas and syngas from such processes to generate heat and electricity (Scherson and Criddle, 2014). This also motivates studies comparing centralized vs. decentralized treatment of retentate, where part or all of the treated water from decentralized treatment could be used for irrigation. 2. The excess heat from the CHP engine in this work is used for heating the wastewater when FO-MD was selected as the treatment system. This waste heat could also be used to dry the biosolids left from the treatment process after mechanical dewatering, as suggested by Scherson and Criddle (2014). Dewatering of the biosolids enables their gasification and production of ash, dramatically reducing solids for disposal and generating additional energy in the form of syngas. 3. To avoid overcomplicating the analysis, the scope of this paper excludes the reuse and redistribution of the treated wastewater. When distributed, the potable water recovered by the system proposed in this research can improve the water security (Cook and Bakker, 2012;World Economic Forum Water Initiative, 2012;Garrick and Hall, 2014), resilience, and sustainability of the urban areas. This also merits in-depth follow-up studies. 4. Future studies can investigate the sustainability and resilience impacts of setting different qualities-e.g., suitable for irrigation, or banking in reservoirs-for the effluent of the treatment process. Same can be done for the retentate of the treatment process. For example, the nitrogen-rich retentate of the treatment can be used for landscaping to help preserve water resources. 5. This paper simplifies modeling of water demand profiles by assuming that daily profiles are constant for every day of a month. This enabled constructing hourly demand profiles for all the 21 building types in the same climatic region and over the entire year, as the existing literature did not allow for making more detailed demand profiles. Future studies should examine the updated literature for modeling variable daily profiles for each day of a month. 6. The integration across the water and energy system proposed in this work can be tailored for applying to a range of different time scales, e.g., by using monthly rather than hourly models, or geographic scales, e.g., by focusing on regions rather than districts. Results of studies on these different scales can provide valuable insights for different stakeholders who require different levels of granularity in modeling and analysis. Adapting the proposed framework to these different scales is also a worthwhile extension of this work.

203The list below describes interesting future studies on the building and energy system models:

2041. A limited, yet diverse, set of supply equipment were selected and modeled in this study: more treatment systems and energy systems, including all-electric technologies, can be introduced into the supply equipment mix in future efforts to make this framework applicable to a wider variety of cases. 2. Network configuration largely determines the loss and performance of the heating, cooling, and wastewater treatment infrastructure )-future efforts should introduce network optimization into the proposed framework. This addition, nonetheless, increases the complexity of the optimization problem by several orders of magnitude, and this might require alternative optimization algorithms, more memory, and more computational power compared to this study. 3. This paper treats the input parameters of the supply and demand models as deterministic variables, whereas the uncertainties in these parameters can have tangible effects on the results of the analysis obtained using the proposed method. Uncertainty analysis of the proposed framework merits extensive future study.

205The following detail potential future studies on the optimization algorithm:

2061. Improving the optimization algorithm has a great potential for further studies (e.g., Rezazadeh . For instance, in this study no constraints were applied to the optimization problem other than to the gross-floor-area of the neighborhoods. Future studies can impose constraints on the ranges of building type ratios as well as the permitted types of CHP engines, chillers, and treatment systems to inform the optimization algorithm to obtain optimal neighborhoods with specific mixes of buildings and supply equipment.

207For the case study examined in this manuscript, the optimization algorithm found many optimal solutions with building type mixes dominated by office buildings. The COVID-19 global pandemic has shown that the usage of different building types can vary, sometimes drastically, because of unforeseen conditions. This suggests the need for studies that consider other "black swan" events (Taleb, 2007) to understand how they can change the optimal design and performance of cities by imposing constraints on the components, e.g., the building mix, of the urban neighborhoods.

DATA AVAILABILITY STATEMENT

208The original contributions presented in the study are included in the article/Supplementary Materials, further inquiries can be directed to the corresponding author/s. Files required for replicating the experiments and visualizations of this paper can be found at: https://github.com/PouyaREZ/Wastewater_Energy_ Optimization.

AUTHOR CONTRIBUTIONS

209PR: conceptualization, data curation, formal analysis, funding acquisition, investigation, methodology, project administration, resources, software, writing-review and editing, roles/writing-original draft, visualization, and validation. ML: conceptualization, funding acquisition, methodology, project administration, resources, supervision, writing-review and editing, roles/writing-original draft, and validation. CC: resources, supervision, writing-review and editing, and validation. All authors contributed to the article and approved the submitted version.

FUNDING

210This material is based on work supported by the Leavell Fellowship on Sustainable Built Environment from the Department of Civil and Environmental Engineering at Stanford University. This research has additionally been supported by AP Thailand.

SUPPLEMENTARY MATERIAL

211The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/frsc.2022. 856996/full#supplementary-material

참고문헌 80건

  1. Users Manual for TMY3 Data Sets (Revised) 2008 10.2172/928611
  2. Fouling and long-term durability of an integrated forward osmosis and membrane distillation system Water Science & Technology · Pergamon Press · 2015 10.2166/wst.2015.415
  3. A review of modelling approaches and tools for the simulation of district-scale energy systems Renewable and Sustainable Energy Reviews · Elsevier BV · 2015 10.1016/j.rser.2015.07.123
  4. Modeling and optimization of building mix and energy supply technology for urban districts Applied Energy · Elsevier BV · 2015 10.1016/j.apenergy.2015.08.076
  5. Python Programming Language. USENIX Annual Technical Conference · 2007
  6. The black swan: the impact of the highly improbable Choice Reviews Online · Association of College and Research Libraries · 2007 10.5860/choice.45-1430
  7. Using modelling approach to validate a bench scale forward osmosis pre-treatment process for desalination Desalination · Elsevier BV · 2014 10.1016/j.desal.2014.07.005
  8. Principles for scaling of distributed direct potable water reuse systems: A modeling study Water Research · Elsevier BV · 2015 10.1016/j.watres.2015.02.033
  9. District heating and cooling: Review of technology and potential enhancements Applied Energy · Elsevier BV · 2011 10.1016/j.apenergy.2011.04.020
  10. Energy consumption and water production cost of conventional and renewable-energy-powered desalination processes Renewable and Sustainable Energy Reviews · Elsevier BV · 2013 10.1016/j.rser.2012.12.064
  11. Recovery of Freshwater from Wastewater: Upgrading Process Configurations To Maximize Energy Recovery and Minimize Residuals Environmental Science & Technology · American Chemical Society · 2014 10.1021/es501701s
  12. On thermal energy storage systems and applications in buildings Energy and Buildings · Elsevier BV · 2002 10.1016/s0378-7788(01)00126-8
  13. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis Journal of Computational and Applied Mathematics · Elsevier BV · 1987 10.1016/0377-0427(87)90125-7
  14. Energy and water autarky of wastewater treatment and power generation systems Renewable and Sustainable Energy Reviews · Elsevier BV · 2015 10.1016/j.rser.2015.01.055
  15. The roads ahead: Narratives for shared socioeconomic pathways describing world futures in the 21st century Global Environmental Change · Elsevier BV · 2015 10.1016/j.gloenvcha.2015.01.004
  16. Impacts of temporal precision in optimisation modelling of micro-Combined Heat and Power Energy · Elsevier BV · 2005 10.1016/j.energy.2004.11.012
  17. Forward osmosis: Where are we now? Desalination · Elsevier BV · 2014 10.1016/j.desal.2014.10.031
  18. Opportunities to reach economic sustainability in forward osmosis–reverse osmosis hybrids for seawater desalination Desalination · Elsevier BV · 2014 10.1016/j.desal.2014.12.011
  19. Molten carbonate fuel cell: Towards negative emissions in wastewater treatment CHP plants International journal of greenhouse gas control · Elsevier BV · 2013 10.1016/j.ijggc.2013.10.007
  20. Thermoeconomic assessment of a multi-engine, multi-heat-pump CCHP (combined cooling, heating and power generation) system – A case study Energy · Elsevier BV · 2010 10.1016/j.energy.2010.04.002
  21. Assessing integrated systems Nature Climate Change · Nature Portfolio · 2014 10.1038/nclimate2180
  22. MES (multi-energy systems): An overview of concepts and evaluation models Energy · Elsevier BV · 2013 10.1016/j.energy.2013.10.041
  23. Water security: Debating an emerging paradigm Global Environmental Change · Elsevier BV · 2011 10.1016/j.gloenvcha.2011.10.011
  24. A comparison of thermal energy storage models for building energy system optimization Energy and Buildings · Elsevier BV · 2015 10.1016/j.enbuild.2015.02.031
  25. Optimization analysis of dual-purpose systems Desalination · Elsevier BV · 2009 10.1016/j.desal.2009.06.010
  26. A prospective analysis of waste heat management at power plants and water conservation issues using a global TIMES model Energy · Elsevier BV · 2014 10.1016/j.energy.2014.02.008
  27. Paradigm shift in urban energy systems through distributed generation: Methods and models Applied Energy · Elsevier BV · 2010 10.1016/j.apenergy.2010.10.018
  28. Membrane distillation: A comprehensive review Desalination · Elsevier BV · 2011 10.1016/j.desal.2011.08.027
  29. The water–energy nexus in Middle East and North Africa Energy Policy · Elsevier BV · 2011 10.1016/j.enpol.2011.04.023
  30. The Future of Seawater Desalination: Energy, Technology, and the Environment Science · American Association for the Advancement of Science · 2011 10.1126/science.1200488
  31. Investigating the climatic impact of urban planning strategies through the use of regional climate modelling: a case study for Melbourne, Australia International Journal of Climatology · Wiley · 2008 10.1002/joc.1680
  32. Once you SCOOP, no need to fork 2014 10.1145/2616498.2616565
  33. Model and Design of Cogeneration System for Different Demands of Desalination Water, Heat and Power Production Chinese Journal of Chemical Engineering · Elsevier BV · 2014 10.1016/s1004-9541(14)60036-7
  34. Potential of membrane distillation in seawater desalination: Thermal efficiency, sensitivity study and cost estimation Journal of Membrane Science · Elsevier BV · 2008 10.1016/j.memsci.2008.06.006
  35. A framework for model integration and holistic modelling of socio-technical systems Decision Support Systems · Elsevier BV · 2015 10.1016/j.dss.2015.01.006
  36. The sweet spot of forward osmosis: Treatment of produced water, drilling wastewater, and other complex and difficult liquid streams Desalination · Elsevier BV · 2013 10.1016/j.desal.2013.11.014
  37. Water Security and Society: Risks, Metrics, and Pathways Annual Review of Environment and Resources · Annual Reviews · 2014 10.1146/annurev-environ-013012-093817
  38. EnergyPlus: creating a new-generation building energy simulation program Energy and Buildings · Elsevier BV · 2001 10.1016/s0378-7788(00)00114-6
  39. Membrane contactor processes for wastewater reclamation in space Journal of Membrane Science · Elsevier BV · 2005 10.1016/j.memsci.2004.08.039
  40. A fast and elitist multiobjective genetic algorithm: NSGA-II IEEE Transactions on Evolutionary Computation · Institute of Electrical and Electronics Engineers · 2002 10.1109/4235.996017
  41. Nitrogen removal with energy recovery through N<sub>2</sub>O decomposition Energy & Environmental Science · Royal Society of Chemistry · 2012 10.1039/c2ee22487a
  42. U.S. Department of Energy Commercial Reference Building Models of the National Building Stock 2011 10.2172/1009264
  43. A review of urban energy system models: Approaches, challenges and opportunities Renewable and Sustainable Energy Reviews · Elsevier BV · 2012 10.1016/j.rser.2012.02.047
  44. OPTIMISATION FOR CHP AND CCHP DECISION-MAKING 2011
  45. A Combined Forward Osmosis and Membrane Distillation System for Sidestream Treatment Journal of Water Resource and Protection · Scientific Research Publishing · 2015 10.4236/jwarp.2015.714091
  46. Optimization across the Water–Energy Nexus for Integrating Heat, Power, and Water for Industrial Processes, Coupled with Hybrid Thermal-Membrane Desalination Industrial & Engineering Chemistry Research · American Chemical Society · 2016 10.1021/acs.iecr.5b03333
  47. Water Treatment Capacity of Forward-Osmosis Systems Utilizing Power-Plant Waste Heat Industrial & Engineering Chemistry Research · American Chemical Society · 2015 10.1021/acs.iecr.5b00460
  48. Life cycle assessment indicators of urban wastewater and sewage sludge treatment Ecological Indicators · Elsevier BV · 2016 10.1016/j.ecolind.2016.04.047
  49. An operational and economic study of a reverse osmosis desalination system for potable water and land irrigation Desalination · Elsevier BV · 2016 10.1016/j.desal.2016.06.020
  50. Cost Estimating Manual for Water Treatment Facilities 2008 10.1002/9780470260036
  51. Potential For Energy Recovery From A Wastewater Treatment Plant IEEE Latin America Transactions · Institute of Electrical and Electronics Engineers · 2016 10.1109/tla.2016.7587636
  52. Integrating water and energy models for policy driven applications. A review of contemporary work and recommendations for future developments Renewable and Sustainable Energy Reviews · Elsevier BV · 2016 10.1016/j.rser.2016.08.043
  53. Optimal Design of Water Desalination Systems Involving Waste Heat Recovery Industrial & Engineering Chemistry Research · American Chemical Society · 2017 10.1021/acs.iecr.6b04725
  54. Water use of the UK thermal electricity generation fleet by 2050: Part 1 identifying the problem Energy Policy · Elsevier BV · 2017 10.1016/j.enpol.2017.05.011
  55. Water-energy nexus: A review of methods and tools for macro-assessment Applied Energy · Elsevier BV · 2017 10.1016/j.apenergy.2017.08.243
  56. Energy planning of low carbon urban areas - Examples from Finland Sustainable Cities and Society · Elsevier BV · 2017 10.1016/j.scs.2017.09.018
  57. Integrated infrastructure systems—A review Sustainable Cities and Society · Elsevier BV · 2017 10.1016/j.scs.2017.09.022
  58. Techno-economic assessment of biogas-fed CHP hybrid systems in a real wastewater treatment plant Applied Thermal Engineering · Elsevier BV · 2017 10.1016/j.applthermaleng.2017.10.115
  59. Forward osmosis membrane modular configurations for osmotic dilution of seawater by forward osmosis and reverse osmosis hybrid system Water Research · Elsevier BV · 2017 10.1016/j.watres.2017.10.042
  60. Circular economy – From review of theories and practices to development of implementation tools Resources Conservation and Recycling · Elsevier BV · 2017 10.1016/j.resconrec.2017.10.034
  61. Coupling optimization of urban spatial structure and neighborhood-scale distributed energy systems Energy · Elsevier BV · 2017 10.1016/j.energy.2017.12.076
  62. Retrofitting the Regulated Power Plant: Optimizing Energy Allocation to Electricity Generation, Water Treatment, and Carbon Capture Processes at Coal-Fired Generating Facilities ACS Sustainable Chemistry & Engineering · American Chemical Society · 2018 10.1021/acssuschemeng.7b04316
  63. A Nexus Approach for Sustainable Urban Energy-Water-Waste Systems Planning and Operation Environmental Science & Technology · American Chemical Society · 2018 10.1021/acs.est.7b04659
  64. Thermodynamic assessment of a novel SOFC based CCHP system in a wastewater treatment plant Energy · Elsevier BV · 2018 10.1016/j.energy.2018.02.102
  65. Water-Energy Nexus: Challenges and Opportunities 2014
  66. Co-simulation and optimization of building geometry and multi-energy systems: Interdependencies in energy supply, energy demand and solar potentials Applied Energy · Elsevier BV · 2019 10.1016/j.apenergy.2019.03.177
  67. Exergy cost and thermoeconomic analysis of a Rankine Cycle + Multi-Effect Distillation plant considering time-varying conditions Energy Conversion and Management · Elsevier BV · 2019 10.1016/j.enconman.2019.04.023
  68. Combined FO and RO system for the recovery of energy from wastewater and the desalination of seawater Desalination and Water Treatment · Taylor & Francis · 2019 10.5004/dwt.2019.24083
  69. A coupled agent-based risk-based optimization model for integrated urban water management Sustainable Cities and Society · Elsevier BV · 2019 10.1016/j.scs.2019.101922
  70. Exploring interactions in the local water-energy-food nexus (WEF-Nexus) using a simultaneous equations model The Science of The Total Environment · Elsevier BV · 2019 10.1016/j.scitotenv.2019.135034
  71. Scikit-learn: Machine Learning in Python Journal of Machine Learning Research · The MIT Press · 2011 10.5555/1953048.2078195
  72. A novel approach to district heating and cooling network design based on life cycle cost optimization Energy · Elsevier BV · 2019 10.1016/j.energy.2019.116837
  73. Aqueduct Water Stress Projections: Decadal Projections of Water Supply and Demand Using CMIP5 GCMs 2015
  74. Maximizing energy efficiency of islanded micro water-energy nexus using co-optimization of water demand and energy consumption Applied Energy · Elsevier BV · 2020 10.1016/j.apenergy.2020.114863
  75. Augmenting high-dimensional nonlinear optimization with conditional GANs Proceedings of the Genetic and Evolutionary Computation Conference Companion · 2021 10.1145/3449726.3463675
  76. Forward Osmosis 2013 10.1002/9781118522318.emst081
  77. Water Recycling and Reuse: The Environmental Benefits Water Encyclopedia · 2004 10.1002/047147844x.wr2155
  78. Sustainable Fossil Fuels: The Unusual Suspect in the Quest for Clean and Enduring Energy 2010
  79. Recent advancements in forward osmosis desalination: A review Chemical Engineering Journal · Elsevier BV · 2015 10.1016/j.cej.2015.05.080
  80. Energy performance assessment in urban planning competitions Applied Energy · Elsevier BV · 2015 10.1016/j.apenergy.2015.05.094