A Smart Water Grid for Micro-Trading Rainwater: Hydraulic Feasibility Analysis

: Water availability is increasingly stressed in cities across the world due to population growth, which increases demands, and climate change, which can decrease supply. Novel water markets and water supply paradigms are emerging to address water shortages in the urban environment. This research develops a new peer-to-peer non-potable water market that allows households to capture, use, sell, and buy rainwater within a network of water users. A peer-to-peer non-potable water market, as envisioned in this research, would be enabled by existing and emerging technologies. A dual reticulation system, which circulates non-potable water, serves as the backbone for the water trading network by receiving water from residential rainwater tanks and distributing water to households for irrigation purposes. Prosumer households produce rainwater by using cisterns to collect and store rainwater and household pumps to inject rainwater into the network at sufﬁciently high pressures. The smart water grid would be enabled through an array of information and communication technologies that provide capabilities for automated and real-time metering of water ﬂow, control of infrastructure, and trading between households. The goal of this manuscript is to explore and test the hydraulic feasibility of a micro-trading system through an agent-based modeling approach. Prosumer households are represented as agents that store rainwater and pump rainwater into the network; consumer households are represented as agents that withdraw water from the network for irrigation demands. An all-pipe hydraulic model is constructed and loosely coupled with the agent-based model to simulate network hydraulics. A set of scenarios are analyzed to explore how micro-trading performs based on the level of irrigation demands that could realistically be met through decentralized trading; pressure and energy requirements at prosumer households; pressure and water quality in the pipe network. is used to simulate irrigation demands at households. Multiple scenarios are explored to demonstrate the feasibility of peer-to-peer non-potable water trading, and tradeoffs among the volume of traded water, energy savings, satisfaction of pressure constraints, and water quality are explored. The smart water grid is a complex system, and energy outcomes emerge based on reductions in the volume of water required by households, the volume of water provided by prosumers, and the dynamics of centralized water distribution infrastructure. The water and energy efﬁciency of scenarios depends on the reduction in the volume of water that is provided by the centralized system through traded rainwater. Higher volumes of water produced by prosumers increases both water and energy savings. Analysis demonstrates that there is a lower bound on the number of households that should participate as prosumers to meet pressure requirements, and an upper bound on prosumers to protect water quality. This research develops a novel water management system designed to further the use of decentralized infrastructure and smart city technologies in improving the sustainability of the built environment.


Introduction
Urban water utility systems around the world are increasingly pressured by limited water resources, growing urban demand, and impacts from climate change. The United Nations projects that, by 2025, 1.8 billion people will be living in regions with absolute water scarcity, and two-thirds of the world population could be living under water-stressed conditions [1]. Supply-side strategies for urban water management are limited in water-scarce regimes, because they require large investments to construct new infrastructure and develop new resources. Demand-side strategies, on the other hand, extend existing resources by reducing demands through conservation campaigns, pricing strategies, and restrictions. Demand-side strategies that rely on continued demand reduction, however,  The goal of this manuscript is to explore the feasibility of a smart water grid based on the performance of the centralized infrastructure and energy demands. This research develops a simulation framework that couples agent-based modeling and hydraulic models to test energy consumption, water consumption, and nodal water pressure in a smart water grid. Agent-based models simulate the individual behaviors and interactions of a population of agents to explore emergent system-level dynamics [9,10]. Agent-based modeling has been applied in water resources management to simulate a population of water consumers as agents with the purpose of exploring the emergence of system-level performance due to micro-level interactions [11]. A few studies couple agent-based models with hydraulic simulation to explore how changes in household demands affect system-level performance, such as pressure and flow directions [12][13][14]. Further, agent-based modeling has been applied to simulate markets for trading natural resources [11,[15][16][17], and recent research applied agent-based modeling to simulate how households trade solar generated energy in a peer-to-peer energy market [8].
In the formulation developed in this research, consumer households are simulated as agents that exert irrigation demands, and prosumer households are simulated as agents that store rainwater, and pump rainwater into a pipe network. A hydraulic model is developed of a reclaimed water network that serves a small community of non-potable water consumers and prosumers. Output from the agent-based model specifies flows into and out of the water network at each node, and these outputs are used as negative and positive demand patterns for the hydraulic model. The modeling framework is applied for an illustrative case study that was developed based on realistic infrastructure data. Water consumption, nodal pressure, and energy consumption are evaluated for the network of water users for scenarios with and without micro-trading. System performance is tested for 126 scenarios across different climates and concentrations of prosumers to explore how precipitation and participation affect feasibility. The results demonstrate that a smart water grid is feasible, generating energy and water savings that vary in magnitude based on local climate and the level of community participation.

Dual Reticulation Networks
Only a fraction of water used for urban purposes needs to be potable quality, and reclaimed water can serve as an alternative water source for non-potable applications [18]. Reclaimed water is wastewater that has been treated to levels lower than potable water quality and can be used for nonpotable applications, including washing, cooling, gardening, toilet flushing, and lawn irrigation [19]. Reclaimed water can be provided to a large group of consumers through a dual reticulation system, which includes two parallel pipe networks: the primary water network distributes potable water, and the secondary network conveys reclaimed water [20]. A centralized utility typically manages water reclamation programs to ensure that treatment standards are met and to distribute reclaimed water. Dual reticulation programs have been implemented in cities in the United States, Japan, and Australia [21]. Reclaimed water products can help conserve high-quality water produced by utilities for essential purposes.
Dual reticulation systems impose high capital costs, but costs can be offset by a reduction in demands that are exerted on aquifers and surface water sources, leading to improved ecosystem health and drought resilience [22]. While it is difficult to quantify the externalities in a cost-benefit analysis of non-potable water systems [23,24], dual reticulation systems can offset the use of potable water, creating savings in utility energy costs for water treatment [25]. Energy savings can be sufficient to offset the capital costs required for building a dual pipe infrastructure [26]. Dual reticulation systems may also create benefits by reducing the need for infrastructure investment for the main potable system [27] and systematically encouraging conservation by adding new value to water. The cost-benefit analysis of dual reticulation systems, however, can vary widely based on the characteristics of a location, such as infrastructure design, topography, energy sources, quality of source water, and existing infrastructure [28]. The distance between users and a water reclamation plant and the amount of uphill pumping can limit the feasibility of dual systems. A study of four U.S. cities that recycle water found that there were significant economic barriers to implementing dual-reticulation systems. Challenges were cited, including diminishing returns, due to the lack of additional large consumers of nonpotable water near the treatment plant; commitments to return treated effluent for instream flows; more efficient options for selling recycled water for cooling and industrial processes; lack of clear and convergent regulations around water reuse programs [22].

Rainwater Harvesting Systems
Rainwater harvesting systems can be installed at the household level to capture roof runoff, providing an alternative source to meet non-potable water demands [29]. Harvesting rainwater is a millennia-old agricultural practice, with increasing implementation in modern cities with large population demands, including in Adelaide and Addis Ababa [29,30]. Rainwater harvesting is used widely because it provides easy collection with low cost, treatment, and maintenance requirements [31]. Captured rainwater can be applied on-site or on a larger scale for community purposes, and communal rainwater tanks may be economically feasible [32]. Rainwater harvesting may be feasible for individual users, subject to the specific water demand and roof area [31,33], but its economic feasibility may be limited for some households because it does not provide a continuous supply of water and needs to be supplemented with other sources [34]. As an alternative source, however, rainwater can provide significant volumes of water, and it is estimated that up to 80% of rainfall could be harvested from urban rooftops in the U.S. [35]. For example, a study of California water indicates that recycling irrigation runoff water (priced at ($0.43-1.21 per 1000 gallons) was a cost-effective alternative to using the region's municipal water ($2.39-2.91 per 1000 gallons) [36]. Rainwater harvesting has other benefits, and it can reduce stormwater infrastructure costs by reducing peak flows. Liang et al. [37] showed that implementing smart rainwater harvesting systems reduces peak system flows by 35% to 85%.
There are practical limitations and costs that prevent the transition to the wide-scale use of rainwater infrastructure. Rainwater harvesting is shown to have long payback periods before benefits outweigh costs, with economic returns that are very sensitive to local policy, water quality concerns, and government rebates [38,39]. Grants from local initiatives and environmental agencies can reduce capital costs. For example, rebates of $0.50 per gallon of installed tank capacity were used to incentivize rainwater harvesting in Barbados [38]. The costs and benefits indicate that green infrastructure solutions have market value and should be strongly considered, though the economics of purchasing tanks and pumps, as required in the smart water grid, may need economic incentives to encourage wide-spread adoption. The system that is proposed in this research creates a new efficiency in the use of rainwater by providing the means to share rainwater within a community and creating a reliable source of non-potable flows by integrating rainwater harvesting within a reclaimed water reticulation system.

Micro-Trading in Water Markets and Smart Technologies
Economists have argued that scarce water can be allocated more efficiently through water markets, rather than through centralized control [40]. Large-scale water rights markets have been operating for decades among utilities and agricultural users [41], and new markets that trade conserved water are emerging as a strategy for demand-side management to create value and new incentives around conservation activities [42,43]. Decentralization of water services is seen as an approach to support a sustainable future for urban water management [44,45], where water can be supplied or treated at small-scale plants, rather than at centralized locations. Efficiencies may be gained through decentralized systems because water or wastewater does not need to be transported over long distances, and resources can be re-used to meet demands on-site. A few studies explore decentralized markets for water supply that allow for trading among households. Haddad [46] proposed a cap-and-trade water program among residential end-users, where a cap is used to grant each customer with use-rights to available water. Water conservationists could sell or rent unused use-rights, and customers would be heavily penalized for using water in excess of their use-rights. Water customers would call a toll free number to execute transfers through a specially-trained broker. Haddad's micro-trading system was criticized based on the complexities of making initial allocation of use-rights to users; expected sizeable transaction costs; lack of household expertise and willingness to engage in a market; impact of a water-use market on economic development in the area [47,48]. More recently, a decentralized water supply system was developed in Western Australia, in which consumers contribute recycled water, including stormwater and greywater, to a groundwater resource through garden bores [49]. By contributing recycled water, consumers become prosumers and gain credits in their water use accounts. The program is enabled through smart meters, which record water consumption and contributions at 10-minute intervals, and the shallow aquifer provides a pathway in the urban water cycle among households and utility.
The viability of micro-trading has been enabled by the emergency of blockchain technology in water markets. Blockchain technology is an information and communications technology (ICT) capable of addressing some of the challenges in implementing peer-to-peer markets [50]. A blockchain is a distributed ledger that provides a platform for digital transactions without a trusted third-party organization [51,52]. Data structures are both immutable and cryptographically verifiable, promising security, accuracy, authentication and traceability of transactions [53]. Blockchain can also reduce transaction costs associated with third-party brokers, though some fees may be necessary to maintain a critical centralized infrastructure [8]. Smart contracts can be used with blockchain, where smart contracts work as simple scripts encoded on the blockchain that contain predefined directions for automating workflows on recorded data and finalizing the settlement of financial transactions between buyers and sellers [54]. Smart contracts automate micro-trading to allow for rapid reconciliation between consumers and prosumers and reduce the time and associated cost of trading, which may increase participation. As an emerging technology, blockchain has applications in water resources management, supporting data sharing among utilities with assurances of confidentiality and commercial sensitivity; linking flowmeter sensor data with water resources mapping, billing, and operations; facilitating trading and tracking of water credits among large-scale users; allowing households to buy water in a market of competitive water providers; serving as a stable currency to enhance security of water supply [55][56][57]. Blockchain provides a ledger system that can support peer-to-peer markets for micro-trading water, and a few examples exist to date. Melbourne, Australia, has proposed a rainwater micro-trading program that would be under-girded by blockchain technologies [55]. The program would assign apartments with a quota of free rainwater from a communal tank, and excess rainwater would be conveyed to a large water recycling plant to supply treated water for non-drinking uses [58,59]. In another example, a proof-of-concept model was developed to simulate blockchain-enabled trading of virtual water among homes, where water could be sold by low-consuming households to households that want to exceed a daily limit on water consumption [60]. Similar to Haddad's cap-and-trade system [46], customers would trade water rights. Whereas Haddad's program would allow customers to trade water on a monthly or seasonal basis, the market proposed by Alcarria et al. [60] relies on smart meters, blockchain, and smart contracts, and the functionality of these technologies would allow customers to make daily decisions about trading water.
The smart water grid proposed in this research would rely on smart connected technologies, similar to the systems described above. Smart water meters are needed to record the exact flow rate and time of consumed and produced water. Water that is available during times of peak demands is inherently of higher value than water that is available at times of low demand. Prosumers can invest in large tanks to store water and release it during periods of high consumption, and precise meters are needed to record high resolution of trades. Automated infrastructure components, such as digitally operated pumps and valves, are needed to update flows into the network from prosumers when a trade is negotiated. Blockchain and smart contract technologies are needed to support micro-trading. Unlike other micro-trading systems described above, however, the smart water grid relies on a centralized pipe network to convey traded rainwater among households, and the focus of this research in on a feasibility analysis to explore how the hydraulics of the pipe network would be affected by decentralized buying and selling of rainwater. The feasibility of a smart water grid will also be affected by the availability and functionality of smart technologies, including blockchain and smart contracts, and the effects of benefits and costs of infrastructure, new technologies, and water and energy savings on market efficiency. While market efficiency and smart technologies are not included in the modeling framework that is described in this research, they should be explored in future research to further test the feasibility of the smart water grid.

Agent-Based Modeling for Water Infrastructure
Agent-based modeling simulates the behaviors and micro-interactions of a population of autonomous and heterogenous agents to model and study system-level phenomena [9,10]. Agent-based modeling has been applied to simulate a range of water resources planning problems by representing water users, stakeholders, and decision-makers as agents to capture decisions and behaviors around water use, water supply, wastewater services, and stormwater runoff [11]. Agent-based models have been applied to represent a population of residential water users that adapt their water consumption based on economics, climate, policies, and social influence [61][62][63][64][65][66][67][68][69][70][71]. These models simulate household decisions to use water and reduce consumption by adopting water-efficient technologies and restricting water use. Some frameworks couple agent-based modeling with the water supply system to capture feedback between the availability of water resources and decisions to conserve water [64][65][66][67]70]. Other agent-based models couple a population of agents with the hydraulic simulation of a water distribution system to evaluate how network flows are impacted by changing demands. Models capture water use changes during a water supply contamination event, based on exposure to the contaminant, communication from public officials, and social influence of peers [12,13,[72][73][74][75][76][77]. Another set of studies uses agent-based modeling coupled with hydraulic simulation to evaluate how flows in a reclaimed water network and a potable water network change as customers adopt or resist water reuse programs [14,27,78]. Agent-based modeling has also been applied to model trading within natural resource markets, where agents use cost information to seek trades, negotiate, and adapt their preferences for trading permits with other agents. A few modeling studies couple an agent-based model with a water quality simulation model to assess water quality impacts of permit-trading strategies on river and estuary systems [11,15]. Other agent-based models capture the decisions of polluters to bid and sell permits in an emissions market, and these models are applied to assess the effect of trading on air quality [16,17]. More recently, an agent-based modeling was applied to simulate peer-to-peer markets by modeling households as agents that buy and sell energy in a residential smart energy grid [8]. In the research presented in this manuscript, agent-based modeling is loosely coupled with hydraulic simulation modeling to assess network performance metrics that are affected by agent behaviors to trade water. A simple market is simulated, where consumer agents buy rainwater when it is needed for irrigation, and prosumer agents meet demands when they have rainwater that is stored. The price of rainwater is not considered in this simulation, because the focus of the model is on the hydraulic feasibility of the network when trades are made. Additional research is needed to develop cost information and simulate how households make decisions to participate, bid, and execute micro-trades in a rainwater market.

Agent-Based Modeling Framework
The modeling framework presented in this research loosely couples an agent-based model with a hydraulic simulation model ( Figure 2). The agent-based model represents households as either consumers, which purchase water and withdraw it from the system, or prosumers, which pump collected rainwater into the network when a buyer has committed to purchase the water. Prosumer water input and consumer demands are used to modify an input file for the hydraulic simulation, which calculates water flows and pressures in the pipe network based on production and consumption of water at households. The agent-based model is described following the Overview Design Details (ODD) protocol [79]. The ODD protocol provides a clear and succinct approach to describe agent-based models by describing purpose, entities, state variables, and scales as part of the Overview; process overview and design concepts as part of the Design; input, initialization, implementation, and submodels as part of the Details.

Purpose
The purpose of the agent-based model is to simulate rainwater trading among consumer and prosumer agents facilitated through a reclaimed water network and to evaluate how water resources, energy consumption, and hydraulic performance of the network are affected by micro-trading.

Entities, State Variables, and Scales
Agents represent individual prosumer and consumer households. Each consumer agent is assigned a lawn area to calculate irrigation demand and is assigned a time of day for exerting demand. Prosumer agents are each assigned a rainwater tank volume capacity, a catchment area, and a small pump with a given exit pipe diameter, length, and roughness coefficient to add harvested rainwater to the hydraulic network. Parameters are used as input to the model (Table 1). State variables are updated dynamically (Table 2). For each prosumer, tank storage is updated due to precipitation, flushing requirements, and water released into the network. The model operates on an hourly time scale.
Three system-level state variables are used to represent the depth of hourly precipitation (P t ), total precipitation depth over the preceding 24-h period (BP 24 ), and the time step at which rain begins (TR).

Process Overview and Scheduling
The following steps are executed at each hourly time step, t, of the simulation. The execution time step is labeled t E . The agent-based model requires hourly precipitation (P t ) as input.
Step 1. Update system-level state variables. Based on the value of P t , the values for BP 24 and TR are updated. The precipitation over the preceding 24-h period (BP 24 ) is a binary variable that takes a value of one if there is a precipitation greater than zero in 24-h period before the execution time: where t is the time step and t E is the current execution time step. Rain time, TR, is the first time step when the precipitation is greater than zero if the precipitation over the preceding 24-h period is zero.
Step 2. Prosumer agents update rainwater storage values. Each prosumer agent g calculates rainwater storage volume, S t,g , at time t based on the runoff from the roof catchment and the volume of water flushed for the first flush diversion: where A is the roof area; V is the capacity of the rainwater tank; VF t,g is the volume of water flushed from the rainwater tank at time step t for agent g. Prosumers can accumulate a maximum volume of water equivalent to the capacity of the rainwater tank (V); any excess volume is released as runoff.
If no precipitation falls in the previous 24 hours before a distinct rain event begins, the prosumer agent is required to discard a first flush volume. The volume of rainwater that should be flushed (VF t,g ) ensures that a prosumer agent flushes a volume equal to F × A after the rain event begins, where F is the required first flush rate, and A is the roof area. The agent can flush the total volume (F × A) over multiple time steps, if needed.
The value of DI is calculated to initialize the model, as described in Section 3.4.1.
Step 4. Prosumer and consumer agents trade rainwater. Each consumer agent with non-zero demand at time step t is randomly paired with a prosumer agent with S t,g > 0. A consumer agent c receives traded water (TW t,c,g ) from prosumer agent g up to its demand, D t,c . If the consumer agent has a non-zero volume of unmet demand, it is randomly matched with other prosumer agents until the total volume of traded water it receives is equal to D t,c or until no prosumers have stored rainwater. For time steps when prosumers cannot meet consumer demands, consumer demands are met using water that was reclaimed through the centralized treatment plant. The flow (Q t,g ) that a prosumer pumps into the network at each time step is the sum of traded water (TW t,c,g ) that is purchased by consumer agents.
where C t,g is the number of consumers that prosumer g supplies at time step t. The total volume of water purchased by consumer agent c is supplemented by flows from the centralized system (CQ t,c ) at time step t to meet its demand: where G t,c is the number of prosumers that sell water to consumer agent c at time step t.
Step 5. Increase time step. In this step, t E = t E + 1. The agent-based model is executed to simulate trades for a total of T time steps to simulate a one-month period. If the simulation time is reached (e.g., t E = T) go to Step 6. Otherwise, go to Step 1.
Step 6. Execute hydraulic simulation model. The dataset of negative demands (Q t,g for all prosumers) and positive demands (D t,c for all consumers) are used as input for the hydraulic simulation model. Section 3.4.2 details the method for running the hydraulic simulation model.
Step 7. Calculate hydraulic effects and energy consumption for the infrastructure system. Methods for calculating energy consumption and water age are described in Sections 3.4.3 and 3.4.4, respectively.

Decision-Making
Agents use simple heuristics to make decisions. Prosumer agents are uniformly sampled to meet consumer water demands until consumer water demands are met or no prosumers have rainwater remaining in their tanks. Consumer agents do not use information about network location, amount of available water, or cost associated with purchasing water to select a prosumer agent for trading. Prosumers are simple reactive agents and release water when matched with consumer agents.

Stochasticity
There is little stochasticity in consumer and prosumer behaviors. Households in the network are randomly assigned as consumer and prosumer agents, and consumer agents select among prosumers with uniform probability to buy water.

Sensing
Consumer agents know the volume of water that is stored by each prosumer agent, and both consumer and prosumer agents have exact information about precipitation depths.

Interaction
Consumer and prosumer agents exchange water directly. Trades are not constrained by spatial location, and any prosumer agent can trade with any consumer agent. Consumer agents do not interact with other consumer agents, and prosumer agents do not interact with other prosumer agents.

Details: Initialization, Input, and Implementation
The agent-based model is initialized with 2016 households, using a pre-specified ratio of prosumers to consumers. Parameter values are specified in Table 1. Values for the first flush volume as reported in the literature (e.g., Gikas and Tsihrintzis [83]), and rainwater harvesting regulations [84,85], vary in the range of 0.11-1.02 L/m 2 . The value used in the prosumer model represents a conservative estimate of first flush. All tanks are empty at the beginning of the simulation, and the number of hours since the previous flush is set to 24, which forces prosumer agents to flush tanks before beginning trades. Each prosumer agent is assigned a household pump model, with a pump efficiency of 75%. Consumer households are each assigned a time of day to irrigate their lawns (TI c ), derived from the diurnal irrigation pattern for dual-reticulated systems reported by Willis et al. [80]. For each discrete value of TI c , Figure 3 specifies the number of consumer agents that are randomly selected from the pool of consumer agents without replacement and assigned the selected value for TI c . For example, if the consumer agent pool consists of 100 agents, then TI c = 19 for 21 randomly selected agents. The agent-based model requires hourly precipitation data as input, which are needed to calculate demands and trades at hourly intervals. The agent-based model is implemented in Multi-Agent Simulator Of Neighborhoods (MASON) [86], a Java-based discrete-event multi-agent simulation library. The code is published by Ramsey [87]. The output from MASON was used to create input for the hydraulic simulation submodel, which is described below.

Consumer Daily Irrigation Demand Submodel
The consumer daily demand volume, DI, is calculated using the outdoor water demand model [88].
where f is an irrigation factor indicating frequency of watering; L is the irrigable lawn area (m 2 ); k is a crop coefficient; ET is evapotranspiration (mm/month); r is effective rainfall (mm/month); days is the number of days per month. Effective rainfall represents the precipitation that penetrates the soil and thereby reduces the water demand of plants. It is calculated as a function of total measured monthly rainfall P month (mm/month) [88], as: The monthly demand value is converted and reported as a daily demand. The irrigation factor ( f ) is set at 1.0, because it is assumed all households that opt to connect to the system are frequent irrigators. The crop coefficient (k) is set as 0.7 to represent lawn. The value of L (irrigable lawn area) is calculated as where the household density is ρ (unit per m 2 ), roof area is represented as A (m 2 ), and the ratio of unpaved land is U (dimensionless).

Hydraulic Simulation Submodel
The pipe network is simulated using EPANET, which is a software application that calculates the movement and fate of drinking water constituents within water distribution systems [89]. Each household (consumer or prosumer agent) is represented in the network using three nodes: one node represents the street-level metered connection to the non-potable water network; a second node represents the irrigation demand node; a third node represents the negative demand node that allows a household to contribute rainwater to the network. The negative demand node represents an onsite rainwater harvesting tank and a pump that is used to put rainwater back into the network. The dataset of negative demands, or positive flows into the network (−Q p,t ), are placed at negative demand nodes, corresponding to each prosumer and time step. The dataset of positive demands (D c,t ) are placed at irrigation demand nodes, corresponding to each consumer and time step. Demands are used to modify the EPANET input file, and the hydraulic model is run for a one-month period to calculate network flows and pressure values.

Energy Consumption Submodel
Energy requirements for the water infrastructure network are based on three energy components: energy consumed by prosumers to pump rainwater into the network (E prosumers ), energy used to pump water from the centralized treatment plant (E system ), and energy required to treat wastewater (E treat ). The total energy required by the system (E total ) is the sum of the three components. Energy is reported in kilowatt hours (kWh).
The energy consumed by the prosumers to pump water into the network is calculated as: where γ is the specific weight of water (kN/m 3 ); Q t,g is the flow rate of pumped water from prosumer g, as defined above (m 3 /s); h t,g is the pressure head at the negative demand node for prosumer g at time step t, which is the head required by the pump (m); G is the number of prosumers in the system; T is the number of simulated time steps; ∆ t is the time step, or one hour in this application.
The energy consumed to pump water from the centralized system is calculated as: where Q S,t is the flow rate of water pumped from the reservoir to the system (m 3 /s); H t corresponds to the head (m) gained by the pump at time step t. The volume of reclaimed water that is offset by rainwater contributions can result in energy savings through a reduction in the volume of water that must be treated. Treating water to high standards is energy intensive, and supplementing the reclaimed water network with rainwater decreases the volume of wastewater that water treatment facilities need to process for household consumption. The energy required to treat wastewater can vary based on influent water quality, facility hydraulics, and treatment processes employed, and a value of 0.343 kWh/m 3 is adopted in this study [25]. The energy required to treat wastewater is calculated as: where V O is the total volume of treated water that is pumped into the system over the simulated time; e treat is the unit energy required to treat wastewater (0.343 kWh/m 3 ).

Water Age Submodel
The water age of the system is a surrogate metric for water quality [90]. Water age is calculated using water quality calculations in EPANET, which are executed at small time steps to reduce error. The weighted water age is calculated using Equation (14) at consumer nodes across the network.
where WA S is the weighted average water age above the limit for the system (hours). The acceptable limit for water age (WA lim ) is 48 h [90]. WA c,t represents the water age at consumer node c and time step t, reported in hours. The binary variable b c,t represents if the water age at node c and time step t exceeds the limit, where k c,t = 1 if the water age is greater than the limit, and k c,t = 0 otherwise. The time step for calculating water quality is 15 min, and the total number of time steps (T WA ) is 2880 for simulation of a 30-day month.

Virtual Network: Wolfpack City
"Wolfpack City" was developed as a virtual non-potable water distribution network (Figure 4) with realistic hydraulic design parameters and is used in this research to simulate a micro-trading program. It is assumed that each household receives potable water to meet high-quality end uses via a separate potable water system that is not modeled in this framework; simulations for Wolfpack City are specifically for non-potable water supply and demand. Wolfpack City represents a population of 2016 households, which exert irrigation demands based on rainfall and evapotranspiration. One demand is exerted as a constant flow (0.0078 m 3 /s or 125 GPM) to represent an industrial demand, such as a cooling process.

Non-Potable Network System
Household elevations in Wolfpack City range from 282 to 312 m ( Figure 4). The source represented by a reservoir with a head of 297 m is a reclaimed water treatment plant and pumps water to the network using a set of pumps and a tank. The pump station includes a main pump and eight additional parallel pumps that are controlled by the water level of the tank. The main pump delivers up to 0.0227 m 3 /s and a gained head of around 56 m. The parallel pumps operate to meet the intermittent demand exerted by consumers and deliver up to 0.050 m 3 /s each. The pump efficiency is simulated as 75%. The tank is initialized at full capacity.

Climate Data
Local climate data are needed to initialize rainwater harvesting tank storage and irrigation demand values for Wolfpack City. We selected the location of Wolfpack City based on the maximum potential rainwater yield at various locations across the U.S. using Equation (15) [91]: where Y is maximum potential rainwater harvesting yield; C is a runoff coefficient, assigned a value of 0.75 [91]; LA is land area; RT is the percentage of land cover which is rooftop; P ann is average annual precipitation. The percentage rooftop is calculated based on land area, housing density, and average roof size [81,92]. We estimated the potential rainwater harvesting yield at 10 locations that are spread across regions of the U.S. using publicly available land cover data [92] and  (Table A1). Seattle, Washington, was selected as a climate region for Wolfpack City, and observations of precipitation and evapotranspiration in April 2020 are used to create climate scenarios. The data used in this study were recorded at USGS Station 12113346 for Springbook Creek at Orillia, WA [92]. Over April 2020, evapotranspiration was recorded as 281.25 mm/month. Seattle's household density (ρ) is 721 housing units/km 2 , and other parameters needed for the agent-based model, such as roof size and ratio of unpaved land to total land area, are determined using national averages (Table 1) [81,92]. Using Equation (10), consumer irrigable lawn area (L I ) is calculated as 494.9 m 2 .

Modeling Scenarios
A set of scenarios are developed to explore the performance of the smart water grid for variations in model characteristics. This analysis explores changes in the number of households that join the market as prosumers to assess how many prosumers are needed to meet demands exerted by consumers. The participation of households as prosumers varies from 0% to 100% of the total number of households by increments of 5%. Households are randomly assigned as prosumer and consumer agents to meet the scenario definition. This analysis also explores changes in precipitation, as precipitation is expected to affect the amount of rainwater traded. Higher depths of rainfall and more frequent precipitation events lead to greater volumes of water stored, but reduce the amount of water needed for irrigation, as consumers do not exert demands immediately following precipitation events. Precipitation scenarios are explored where the depth of rainfall at each hourly time step is multiplied by a factor of 0.5, 1.0, 2.0, 3.0, 4.0, and 5.0. The total number of time steps with precipitation greater than zero is held constant to maintain consistency across simulations; for example, if 5.0 mm is recorded during the first hour of Seattle's April 2020 precipitation data, then a total of 15.0 mm falls during that time step in a scenario with a precipitation factor of 3P. Evapotranspiration (ET) values are held constant throughout all scenarios. According to the Blaney-Criddle equation, ET is correlated with temperature, wind, and daylight hours, which we assume as constant across all precipitation scenarios [94]. A total of 126 scenarios (six precipitation settings and 20 prosumer settings) are generated, and scenarios are labeled as the percentage of households that participate as prosumers in the market and the factor used to adjust rainfall depths. Each scenario was simulated over the one-month horizon using MASON, which required approximately 40 s to run using a 3.1 GHz Dual-Core Intel Core i5. Output from the agent-based model was used to create the input file depicting the demands of that scenario for EPANET, which required approximately 6.7 min when run using a 2.9 GHz 4-Core Intel Xeon W-2102.

Results
The results presented below demonstrate the dynamics of water storage, water consumption, energy consumption, and hydraulic performance for an example scenario. Subsequently, the performance of the ABM and the network across all scenarios are reported and explored.

Scenario 20% − 1P
Scenario 20% − 1P simulates rainfall using Seattle's April 2020 precipitation data (1P), and 20% of agents (403 of 2016 total agents) are initialized as prosumers. The time series plots of precipitation, irrigation demands and volume of traded rainwater pumped into the network are shown in Figure 5. The simulated horizon includes six distinct rainfall events of varying volumes, followed by a reduction in immediate irrigation demands. The reduction in irrigation demands represents that consumers do not exert irrigation demands within 24 h of a rainfall event. Traded rainwater injections into the reclaimed water network spike after this 24 h period. The highest peaks in irrigation demand each day correspond with the irrigation patterns shown in Figure 3, peaking at hour 19 (or 7:00 p.m.) each day. A total of 525 m 3 of harvested rainwater are pumped into the system during the simulation, which is the equivalent of the daily water demand exerted by 141 consumer households (8.7% of consumers). The volume of rainwater that is traded is a small fraction (less than 1%) of the total volume of water consumed, as shown in Table 3. The flows of water produced at the treatment plant and consumed at nodes for Scenario 20% − 1P are simulated using EPANET (Figure 6), demonstrating that the network satisfies exerted demands without significant excess production; the difference in water produced and water consumed is 7% of the water consumed (Table 3). For this scenario, six of the nine pumps are turned on to meet demands. The centralized system maintains a minimum production volume when consumer demands are zero to meet the constant demand of 0.0079 m 3 /s (or 20,477 m 3 over the one-month period).
The energy consumed for system-level pumping, reclaimed water treatment, and prosumer pumping for Scenario 20% − 1P are calculated and compared with the energy required for Scenario 0% − 1P (no prosumers) in Table 3 to allow for the examination of energy savings between scenarios with and without rainwater trading. The energy consumed by prosumers for household-level pumping increases by 41 kWh when 20% of households function as prosumers, compared with Scenario 0% − 1P. Residential demands are 20% lower in Scenario 20% − 1P, due to the number of consumers that switch to prosumers. The increase in energy for household pumping corresponds to a decrease in energy consumed by system-level pumping and treatment. There is a decrease of 2409 kWh in energy consumed by system-level pumps for Scenario 20% − 1P, and a total reduction in energy consumption of 11% when compared with Scenario 0% − 1P. Unit energy consumed is calculated as the total energy required per unit volume of water produced by both centralized and decentralized processes ( Table 3). Unit energy provides an assessment of the energy efficiency of the system. The unit energy for Scenarios 20% − 1P and 0% − 1P are the same value (0.37 kWh/m 3 ), and the the addition of 403 prosumers to the network does not impact energy efficiency of meeting demands. Pressure is affected by reductions in consumer demands and the injection of water at terminal nodes through household-level pumping. The maximum pressure in the network occurs when no demands are exerted and is the same value for Scenarios 0% − 1P and 20% − 1P. As shown in Table 3, the minimum pressure when 20% of households are prosumers is slightly increased, compared to Scenario 0% − 1P. The distribution of pressures at a time step with low pressures is shown in Figure 7. The time step shown is 9 p.m. on a day that is preceded by 24 h without rainfall, and pressures remain at or near the minimum (7 m). In the central area of the city, elevations cover a 30 m range, and the pressures are around 20 m at nodes that are located at high elevations. The southern section of the network is at a lower elevation, and pressures remain in the range of 25-35 m during this period of relatively low pressure.  Water age is calculated for Scenarios 20% − 1P and 0% − 1P using Equation (14), calculated over all irrigation nodes, and is reported to explore water quality. It is expected that the water age of Scenario 20% − 1P would be higher than the water age of Scenario 0% − 1P, because the injection of water at households may increase the residence time of water in the system, and there are fewer agents consuming water in the network. The water age of Scenario 20% − 1P is marginally less than the water age of Scenario 0% − 1P (a difference of less than 1 h). This difference may be due to the process of calculation. The water age is calculated only at consumer nodes, and there are fewer households acting as consumers in Scenario 20% − 1P, leading to a marginal reduction in water age. In addition, the age of water entering the system due to household-level pumping is initialized at zero hours, which does not account for the time that the water resides in the household-level rainwater harvesting tank.

Performance Analysis across All Scenarios
The total volume of traded rainwater, total number of trades, and percentage of irrigation demand met for each of the 126 scenarios (six levels of precipitation and 21 levels of prosumers) are shown in Figure 8. For all scenarios where no agents are prosumers (0%) or all households are prosumers (100%), no trades occur because of the homogeneity of agents. For all other scenarios, an increase in rainfall volume corresponds to an increase in volumes of trades (Figure 8a) and number of trades (Figure 8b). During higher precipitation volume scenarios, prosumer agents can harvest higher volumes of rainwater, which allows some consumer agents to satisfy demands through trading. For higher precipitation, the peaks in volume and number of trades correspond with lower percentages of prosumer agents. During scenarios with precipitation volume 1P, for example, the maximum volume of traded rainwater corresponds with a prosumer ratio of 80%, compared to 50% for precipitation volume 4P. This is because for lower rainfall depths, a higher number of prosumers are needed to participate in the market to offset the demand exerted by a consumer. The highest number of trades occur for scenarios with precipitation volume 1P. Consumer agents buy rainwater from multiple prosumers at each time step to meet demands, leading to a high number of trades (Figure 8b). At low precipitation depth, 0.5P, the number of trades is relatively low, because prosumer agents are unable to harvest higher volumes of rainwater, resulting in reduced ability to trade. The volume of rainwater that is traded decreases for higher numbers of prosumer agents because fewer agents are consumers to exert demands. The system does not meet total irrigation demands for any of the 126 scenarios (Figure 8c), however, because irrigation demands of consumers are substantially higher than harvested rainwater volumes. Across all precipitation volumes, the highest percentage of demand that is met through trading occurs when 95% of agents are prosumers.  EPANET simulations were used to evaluate energy consumption, pressure, and water age. The amount of energy consumed by household-level pumping (Figure 9a) follows the same pattern as the volume of traded rainwater (Figure 8a) with the highest consumption of energy at high rainfall depths and around 50% prosumers. Scenarios with lower percentages of prosumer agents and low rainfall volumes require more system-level energy consumption (Figure 9b). System-level energy is orders of magnitude greater than energy consumed by household-level pumping, and there is a large reduction in system-level energy requirements for higher numbers of prosumers. This trend emerges because prosumer agents do not irrigate, which reduces the energy requirements of pumping from decentralized locations. Energy consumed for treatment is high for this system, approximately twice the energy required for pumping. Treating wastewater to non-potable standards is an energy-intensive activity, and these numbers reflect that cost. In this research, we assume that the volume of wastewater is treated to match the unmet demands in the systems, and the energy cost of treating excess wastewater that is not needed for reuse is not included in this framework. However, wastewater that is released to the environment or used for other recycling purposes would also need to be treated, and a holistic assessment of the interconnections between water, wastewater, and reclaimed water systems may use an alternative approach to holistically account for energy costs. Based on the sum of energy requirements for the smart water grid system (Figure 9d), a higher number of prosumers leads to higher savings in energy.  The system's unit energy is calculated as the energy consumed by three processes (household-level pumping, system-level pumping, and treatment) per unit volume of water produced by the centralized system and prosumer pumping ( Figure 10). Unit energy is used to represent the efficiency of the system in meeting demands. For scenarios of high percentages of prosumers and high precipitation depths, the water contributed by prosumers reduces the amount of water required by the centralized system, leading to higher energy efficiency. For example, unit energy generally increases across 1P scenarios, which corresponds with the reduction in treatment and pumping energy shown in Figure 9b,c. Household-level pumps inject water in the network at peak demand times, which offsets the need to use the additional pumps that operate in parallel to the main pump. As a result, the number of pumps that operate to provide water from the centralized system decreases with increasing numbers of prosumers (nine pumps are needed for 0-5% prosumers; seven pumps: 10-15%; six pumps: 20-25%; five pumps: 30-40%; four pumps: 45-60%; three pumps: 65-80%; two pumps: 85-95%; one pump: 100%). Further, pumping water from terminal nodes in the network requires less energy than pumping from the centralized treatment plant, as there is less head loss to overcome when the water is pumped from near-by terminal nodes.
Unit energy does not increase monotonically across the 1P scenarios, however, because of the infrastructure complexities of water production. For some 1P scenarios, water production exceeds demands on the centralized system by up to 18%, while in others, water production drops to 91% of the demand exerted on the centralized system (that is, total demand minus the demands that are met by household-level pumping). In cases where the water demanded exceeds the water produced by the centralized system, the water storage tanks meet the remaining demand because they are initialized at full capacity. At 80% prosumers, the system reaches a minimum unit energy, and, subsequently, the energy required per unit volume increases with increasing percentages of prosumers. This trend mirrors the change in volume of traded rainwater across scenarios of increasing numbers of prosumers, shown in Figure 8a, which reaches a peak at 80% prosumers for the 1P scenario. When consumers comprise less than 20% of agents, they demand less water than prosumers produce when tanks are full. Because low volumes of water are traded and the bulk of demand is at the constant demand, which is met by the centralized system, the system requires higher unit energy. Higher precipitation depths (2P, 3P, 4P, and 5P scenarios) lead to improved energy efficiency because prosumers can produce more water to offset demands. Increasing the volume of water that can be provided by prosumers increases benefits to both water and energy savings through the smart water grid. Figure 10. Energy consumed per unit volume of water produced. Energy is calculated as the sum of all three energy expenditures: household-level pumping, centralized pumping, and treatment. Produced water is calculated as the sum of water produced by the centralized system and the water produced by prosumer agents.
The minimum and maximum pressure across all consumer irrigation nodes and over all time steps are reported for each scenario. The minimum pressure across the scenarios varies between 5.0 and 30 m of head (Figure 11), while the maximum pressure is approximately the same at around 50 m for all scenarios. The minimum pressure is low at high numbers of consumers (low percentage of prosumers). Scenarios where the minimum pressure values fall below 7 m (approximately 10 psi) may be considered as infeasible because the pressure is not high enough to meet irrigation purposes. For 1P rainfall scenarios, scenarios are infeasible until the percentage of prosumer agents reaches around 30%. When the number of prosumers is lower than 30%, consumers require a large volume of water from the centralized system, and pressures in the central part of the system drop to values less than 7 m. With higher precipitation depths, the amount of water that is provided by prosumer agents increases, resulting in relatively higher minimum pressure values. For higher precipitation scenarios, prosumers contribute high volumes of water, leading to increasing pressure. For example, for 5P rainfall scenarios, approximately 15% of agents need to be prosumers to ensure a feasible system. As the number of prosumers increases, there are benefits in energy savings and meeting pressure requirements, as shown above. There is, however, an expected drop in water quality based on the residence time of water in the network. As the system has intermittent consumption for irrigation purposes, water age increases in scenarios with high precipitation values and high percentages of prosumers ( Figure 12). Water age values represent the average number of hours exceeding the water age requirement of 48 h, and this number is between 20 and 30 h when the percentage of prosumers is less than 80%. The effect on water age does not grow significantly until the percentage of prosumers reaches 80%, and water age increases dramatically with additional prosumers. Tradeoffs among water age, energy consumption, and pressure may govern how a water micro-trading market should be designed. Results show for 1P scenarios, that water saving is at a maximum at 80%; unit energy is minimum at 80%; pressure requirements constrain the network to function only if 30% or more households join as prosumers; water age requirements may constrain the percentage of prosumers to less than 80%.

Discussion
This study proposes and tests the hydraulic feasibility of a smart water grid for micro-trading rainwater through a peer-to-peer non-potable water market that allows residential households to capture, use, sell, and buy rainwater within a network of water users. In this research, we explore the impact of the depth of rainfall and the distribution of consumers and prosumers on the performance metrics that are used to evaluate the hydraulic feasibility of the smart water grid. In related research, an agent-based modeling framework was developed to explore how the numbers of prosumers and consumers affect performance of a peer-to-peer household-level energy trading market, and results demonstrated that the presence of too many prosumers in the market led to market inefficiencies [8].
In the smart water grid, however, the volume of water that is required by consumers for irrigation is much higher than the volume of water that is produced by prosumers. Prosumers could not completely satisfy consumer demands for any of the simulated scenarios, and production from the centralized system was required to meet demands.
The volume of water that is produced by prosumers drives the performance of the smart water grid, with respect to both water and energy savings. The total volume of traded water increases and the energy required to pump demands decreases for scenarios with higher numbers of prosumers and higher rainfall depths, leading to a more energy efficient system. The energy requirements at households to pump water from rainwater tanks is lower than the energy required at the system level to pump the same volume of water from the water treatment plant. Pumping water from the central treatment plant requires the operation of extra parallel pumps, which are not needed when prosumers contribute water to the system. In addition, water that is pumped into the network at terminal nodes by prosumers does not need to overcome headlosses or elevation losses when consumer nodes are located nearby. Energy savings are also associated with treating smaller volumes of wastewater to nonpotable standards. In this model, the efficiencies of household pumps and systems were assumed to be equal (75%). Household pumps, however, may more realistically have lower efficiency than large pumps, which would change the analysis of energy consumption. The model developed in this research does not account for energy requirements of onsite treatment that could be required at prosumer households to treat rainwater. It is expected, however, that treatment of rainwater to meet nonpotable standards would require much less energy than treatment of wastewater. Pressure and water quality constraints are also explored in this research, as they are affected by increased trading and show tradeoffs based on the number of prosumers. For the simulations conducted in this research, consumer and prosumer agents are assigned randomly at nodes across the network, and the results are specific to one random realization. Further research can explore how clustering of consumer or prosumer agents at nodes in the network could affect pressure, energy, and water age through multiple realizations of initializing consumer and prosumer agents.
In this research, rainfall and evapotranspiration the data that are used to simulate demands are from the Seattle, WA, USA area, and we explore how higher precipitation can lead to a more efficient market. The modeling framework presented in this manuscript uses the theoretical outdoor water demand model, which may overestimate the amount of water required by households. Other climates may lead to differences in rainwater exchanges, and new methods for estimating irrigation may be needed to more accurately represent household behaviors.

Smart Technologies
The system that is conceptualized in this research would be possible through smart technologies that can record and account for water flows and peer-to-peer transactions in real-time. Smart water flow meters are needed to sense and record water contributed to and withdrawn from the water network at each household on sub-hourly time steps. AMI that includes smart water flow sensors can allow urban water managers to accurately and continuously account for non-potable water use and pumping [95]. Blockchain technologies can be applied to create a ledger to record transactions between peers, and smart contracts can be built on top of a distributed ledger to facilitate the settlement of water trades. Automated valves and pumps would be needed to automatically execute trades by releasing water at the household into the network. The integration of these technologies creates a smart water grid that enables new water and energy savings through decentralized water sources. These technologies were not modeled as functioning entities in this framework, and future research can explore how these technologies would be adopted and would function in a smart water grid.
Introducing this array of new technologies can create new vulnerabilities to failure that may occur due to internet disruption, power outages, and malfunctioning controllers. Fail-safe protocols and technological solutions are needed to account for loss of water or trades that are not fulfilled.

Semi-Centralized Infrastructure
The smart water grid is a semi-centralized system and relies on both decentralized and centralized infrastructure to provide diverse sources of non-potable water. A pre-existing dual reticulation system is required as part of the envisioned system to circulate non-potable water that is generated at lower water quality for end uses such as irrigation and flushing toilets. Constructing a secondary pipe network within an existing water supply system is typically cost-prohibitive, and implementation of the smart water grid may be better incorporated into new systems, such as the network that is conceptualized for Fisherman's Bend near Melbourne, Australia [59]. A smart water grid for micro-trading rainwater could also be implemented using a shared aquifer [49] or water trucks to provide conveyance of traded water. Micro-trading rainwater can also use a water rights structure, where households buy the rights to use rainwater from a community source. Rainwater harvesting provides a sustainable source of water by recycling runoff; however, rainwater is an unreliable source, and it is likely that rainwater would be unavailable at times when irrigation water is needed most, such as during droughts. By taking a semi-decentralized approach that incorporates rainwater tanks into a reclaimed water network, diverse sources are utilized to meet potable demands. Diverse portfolios of water sources can lead to reliable water supply systems [96], and the smart water grid would meet demands during low rainfall by circulating reclaimed water and reusing rainwater when it is available. Other benefits of decentralized water management associated with a smart water grid may include offsetting household energy costs [97] and reducing stormwater flows [37].

Peer-to-Peer Markets and Cost-Benefit Analysis
Criticisms of Haddad's early depiction of micro-trading [46] argued that households may not have the expertise, interest, or time to trade water [47]. Haddad argued that households regularly make complex decisions around finances and could readily bid on water prices [48]. A smart water grid would involve transaction costs and costs associated with rainwater tanks and smart meters, creating considerable economic barriers. Research around a peer-to-peer energy trading market found that households were engaged in bidding on energy, but they became disengaged due to the structure of transaction costs that created market inefficiency [8]. The buy-in for consumers to invest in rainwater cisterns and pumps could contribute to challenges in implementing a smart grid, as researchers have demonstrated that the payback period of rainwater harvesting systems alone can be 20-30 years [31,98]. Water resources are projected to become increasingly scarce [1], however, and a study conducted in India suggests that people, particularly in drought-prone areas, may be willing to invest in rainwater harvesting systems or other creative and environmentally-friendly water alternatives [99]. As described above, rainwater harvesting alone provides an intermittent source of water, and the cost-benefit analysis of purchasing a rainwater harvesting tank and pump to join a smart grid would be altered, because participants are granted access to continuous water supply. It is expected that micro-trading could function as an efficient market in a water-scarce urban environment. Further analysis is needed to explore the cost and benefits associated with the economics of the infrastructure and participation in the water market. The agent-based model can be extended in further research to capture economic decisions of households to join the market and to buy and sell water. New modeling mechanisms can be included in the framework to capture the interplay among demands, climate, trading adaptations, and infrastructure performance.

Water Quality
Water reuse programs have historically been challenged in garnering public support, due to the "yuck factor", or perception that treated wastewater is dirty or unsafe [100,101]. Water quality of water withdrawn through the smart water grid should be managed to mitigate public health risks and enhance positive perceptions of water quality. The quality of rainwater is generally accepted as high enough for irrigation and toilet flushing, especially when first flushing is used to remove contaminants that are washed off of roofs [38,83]. The quality of harvested water is expected to degrade, however, as the water moves through a pipe network and is stored in a tank. We include a first flush diversion that would improve the quality of water entering the network, but further research is needed to better represent the quality of water that is pumped from rainwater harvesting tanks and the fate and transport of contaminants in the network. Filtration and treatment systems can be installed at the point-of-entry, and research is needed to explore how to enhance household expertise in the operation and maintenance of treatment technology. For example, new research explores how real time control of the operation of biofilters can improve microbial removal from stormwater [102].

Conclusions
Smart water sensors can be integrated with water distribution infrastructure, distributed ledger technology, smart contracts, and automated control to support novel decentralized water markets to improve water savings in urban environments. This research demonstrates how a semi-decentralized water supply system can create water and energy savings by deploying existing smart city technologies and decentralized infrastructure within a centralized reclaimed water distribution system. In this research, we report the feasibility of a reclaimed water system that is augmented by prosumers, who pump harvested rainwater into the network at decentralized nodes. We construct an all-pipe hydraulic model for a hypothetical community to simulate demands exerted for non-potable uses at households and to evaluate hydraulics in the dual reticulation network. An agent-based modeling approach is developed to simulate household behaviors, including storing, pumping, trading, and withdrawing non-potable water. The agent-based model is loosely coupled with hydraulic modeling, and negative and positive demands of prosumers and consumers are used to modify input to the pipe network model. The simulation framework is applied using climate parameters for a location in the northwest U.S., which was selected based on the potential yield expected from rainwater harvesting, and a theoretical outdoor water demand model is used to simulate irrigation demands at households. Multiple scenarios are explored to demonstrate the feasibility of peer-to-peer non-potable water trading, and tradeoffs among the volume of traded water, energy savings, satisfaction of pressure constraints, and water quality are explored. The smart water grid is a complex system, and energy outcomes emerge based on reductions in the volume of water required by households, the volume of water provided by prosumers, and the dynamics of centralized water distribution infrastructure. The water and energy efficiency of scenarios depends on the reduction in the volume of water that is provided by the centralized system through traded rainwater. Higher volumes of water produced by prosumers increases both water and energy savings. Analysis demonstrates that there is a lower bound on the number of households that should participate as prosumers to meet pressure requirements, and an upper bound on prosumers to protect water quality. This research develops a novel water management system designed to further the use of decentralized infrastructure and smart city technologies in improving the sustainability of the built environment.

Conflicts of Interest:
The authors declare no conflicts of interest.