3.4.2. 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 (−*Qp*,*t*), are placed at negative demand nodes, corresponding to each prosumer and time step. The dataset of positive demands (*Dc*,*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.

## 3.4.3. 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 (*Eprosumers*), energy used to pump water from the centralized treatment plant (*Esystem*), and energy required to treat wastewater (*Etreat*). The total energy required by the system (*Etotal*) 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:

$$E\_{\text{prosumers}} = \sum\_{\mathcal{S}=1}^{G} \sum\_{t=1}^{T} \gamma \times Q\_{t,\mathcal{S}} \times h\_{t,\mathcal{S}} \times \Delta\_{\mathcal{t}} \tag{11}$$

where *γ* is the specific weight of water (kN/m3); *Qt*,*<sup>g</sup>* is the flow rate of pumped water from prosumer *g*, as defined above (m3/s); *ht*,*<sup>g</sup>* 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; Δ*<sup>t</sup>* is the time step, or one hour in this application.

The energy consumed to pump water from the centralized system is calculated as:

$$E\_{system} = \sum\_{t=1}^{T} \gamma \times Q\_{S,t} \times H\_t \times \Delta\_t \tag{12}$$

where *QS*,*<sup>t</sup>* is the flow rate of water pumped from the reservoir to the system (m3/s); *Ht* 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<sup>3</sup> is adopted in this study [25]. The energy required to treat wastewater is calculated as:

$$E\_{\text{treat}} = \mathfrak{e}\_{\text{treat}} \times V\_{\text{O}} \tag{13}$$

where *VO* is the total volume of treated water that is pumped into the system over the simulated time; *etreat* is the unit energy required to treat wastewater (0.343 kWh/m3).
