Dual Benefit of Rainwater Harvesting—High Temporal -Resolution Stochastic Modelling

The objective of the presented study was to develop a high-temporal-resolution stochastic rainwater harvesting (RWH) model for assessing the dual benefits of RWH: potable water savings and runoff reduction. Model inputs of rainfall and water demand are used in a stochastic manner, maintaining their natural pattern, while generating realistic noise and temporal variability. The dynamic model solves a mass-balance equation for the rainwater tank, while logging all inflows and outflows from it for post-simulation analysis. The developed model can simulate various building sizes, roof areas, rainwater tank volumes, controlled release policies, and time periods, providing a platform for assessing shortand long-term benefits. Standard passive rainwater harvesting operation and real-time control policies (controlled release) are demonstrated for a 40-apartment building with rainfall data typical for a Mediterranean climate, showing the system’s ability to supply water for non-potable uses, while reducing runoff volumes and flows, with the latter significantly improved when water is intentionally released from the tank prior to an expected overflow. The model could be used to further investigate the effects of rainwater harvesting on the urban water cycle, by coupling it with an urban drainage model and simulating the operation of a distributed network of micro-reservoirs that supply water and mitigate floods.


Introduction
Rainwater harvesting (RWH) has gained interest in recent years, as researchers and engineers find that it has positive effects on urban water infrastructure even in developed countries with functioning water supply systems [1]. Collection of water from rooftops, before it reaches street level, yields of water in relatively good quality which can diversify cities' water sources [2,3]. Hence, it can enhance the sustainability of urban water use, while reducing the abstraction and conveyance costs of the water. Moreover, with less rainwater reaching street-level, urban drainage systems are expected to experience reduced peak flows and runoff volumes.
As rainfall patterns, water demands and stormwater management systems vary greatly between different climatic, socioeconomic and geographic regions, the field of RWH modeling has developed in order to assess the expected gains from such systems prior to installation [1]. Owing to these variations, different RWH models have been set up by many research groups in a variety of locations around the world [4].
Traditionally, these models have focused on potable water saving, and by applying continuous mass-balance simulations on rainwater storage tanks, strive to gain insights into the optimal sizing of these tanks [5,6], quantify the water saving potential or the financial viability of installing RWH systems at the examined location [7,8], or include energy savings and carbon emission reduction [9].
Today, many research groups have shifted their focus to more elaborate and dataintensive models, which can simulate and assess the effects of RWH implementation on related water infrastructure. As rainwater is collected from the impervious surface of rooftops, storing it and preventing its continuous flow, alleviates stress on local drainage systems [10] and reduces the recurrence of floods and damages recurrence [11]. The study of possible effects of RWH systems on urban drainage systems in their vicinity is a field which has gaind increasing interest since it was introduced by several research groups in the early 2000's [12].
The benefits of RWH systems as part of sustainable drainage networks are being studied at two levels: volumetric runoff reduction and reduction of peak flows. Volumetric runoff reduction is important especially in cities that have combined sewer system, as it helps to minimize the detrimental effects of releasing a mixture of urban drainage water and foul sewage to the receiving waterbodies through CSOs (combined sewers overflows) [13]. Volumetric approach studies usually compare runoff volumes generated in a watershed before and after the extensive implementation of RWH systems.
The peak flow reduction approach allows for significant insights, as drainage system design is focused on dealing with peak momentary flows rather than on the total volume of water that is conveyed through the network. In order to yield reliable estimations of the effect of RWH on peak flows reduction, simulations have to be conducted in a high temporal resolution (i.e., short timesteps). While in models aimed at optimizing tank size or assessing potable water savings daily timesteps usually suffice [6], a sub-hourly timestep is required in order to enable the use of a simulation's output as part of urban drainage models [14,15]. In such high-temporal resolution, rainfall and water demand data can be difficult to acquire and need to be synthesized or assumed to be deterministic [16].
Although the widespread implementation of RWH system in urban environments is by definition an addition of significant stormwater detention volume to the local drainage system, the decentralized nature of these systems carries an inherent shortcoming when examining their ability to mitigate peak drainage flows: during long and/or intense rain events, reasonably sized storage tanks fill up at some point during the storm and remain full or mostly full throughout the rest of the storm, as the demand for the stored water is usually lower than the rainwater flows from the roof. With a full tank, any additional rainfall immediately causes overflow [17]. A possible method of overcoming this drawback is by releasing water from the storage tank prior to a predicted overflow, thus freeing storage volume for the expected storm. Both empirical studies [18] and model-based predictions [19,20] suggest that incorporating remote sensing and real-time control (RTC), which generate controlled release policies based on rain forecasts and the water level in the tanks, yield significant improvement in peak-flow reduction with only a minor negative effect on potable water savings. This new approach of controlling the operation of the RWH systems, rather than just optimizing their design, has moved the field of RWH into the control optimization domain where multiple decentralized RWH systems are controlled in parallel (centralized control), as demonstrated by [21]. RWH systems control is quite similar to the field of optimal operation of multi-reservoir systems, a field which is both well-established [22] and evolving [23]. Using knowledge and methods from the latter with essential adaptations such as simulation timestep and reservoir volume [24] could increase the efficiency of a network of RWH systems in saving potable water and mitigating peak runoff flows, which often are competing objectives.
Only few RWH models capable of evaluate both water saving potential and peak flow reduction have been set up so far for a Mediterranean climate. Muklada et al. [25] evaluated the water saving potential of installing RWH in buildings with a varied number of residents and roof areas while using stochastic daily rainfall input based on rainfall data from the Israeli city of Haifa and constant demands per capita. Nachshon et al. [26] estimated the runoff volume reduction efficiency (i.e., the reduction in annual runoff generated from the roof, see "Efficiency Estimators" below) of buildings with RWH systems installed in buildings in Tel Aviv city (Israel) as 0.8-80% of the annual rainfall volume. This water could be harvested and used. However, this research focused on aquifer recharge rather than non-potable domestic use of rainwater. Furthermore, the estimation was not backed up by simulations but rather adapted from previous research. RWH estimations for Jordan, Israel's neighboring country to the east, were made by [7,27] for different regions, including ones having a Mediterranean climate and average annual rainfall of 500-550 mm. These estimations used annual or monthly rainfall and demand data, and provided water supply and financial estimation for implementing RWH, without considering runoff mitigation.
The above works used medium (daily) to large (monthly or annual) timesteps, and thus provide only a rough approximation of the runoff mitigation ability of RWH systems, if this issue was addressed at all. Due to the stochastic nature of both rainfall and domestic water demands in short timescales (minutes), more detailed models are needed. Moreover, in order to couple RWH models with urban drainage models and estimate their effect, short timesteps are required.
The goal of this study was to develop a high-temporal resolution stochastic RWH model as a tool for the assessment of both the water savings and runoff reduction (peak flow and total volume) of a RWH system installed in a residential building. The RWH model developed is a dynamic simulation model, which uses real-life rainfall and water demand data. The model is fully parameterized and can simulate various buildings and climatic conditions. To examine the model's outputs and operation, short timestep rainfall intensity and domestic water demand data from Israeli databases were used as input to evaluate the RWH potential for a Mediterranean climate. To demonstrate the suggested modeling framework and to evaluate its outputs, a typical Israeli multiple apartment building was modeled and the benefits from installing a RWH system in it were evaluated and compared with outputs from existing models with the appropriate adaptations such as tank sizes, water demand, and rainfall data.

Model Framework
At the base of most RWH models is a simple mass balance equation which yields the rainwater volume in the storage tank [28]: where t is the current timestep; S is volume of water stored in the tank; R is inflow from rainfall; Y is yield or demands satisfied by rainwater; O is overflow; and CR is the controlled release flow of water from the tank (see below "real-time control (RTC)"). The model solves this equation for each timestep. The calculation method of inflows (R t ) and yields (Y t ) usually differentiate models from each other. Inflows are a function of rainfall and collection surface. Rainfall data are unique for each location, and could be used as-is if their attributes (timestep and number of records) is sufficient (e.g., [20]). Rainfall data could also be synthesized [16], or generated stochastically [25].
Yields are a function of water demands and the current volume of water in the tank. Yields could serve both indoor demand (toilet flushing, laundry) [29] and/or irrigation [10].
The algorithm of the presented model is described below, and its flowchart is presented in Figure S1 of the Supplementary Material. The model was coded and run with MATLAB by Mathworks.
In a timestep with recorded rain, a conceptual depression losses tank fills up ( Figure 1). This "tank" simulates the wetting and depression losses of the rooftop. It gains volume by rainfall and loses it by evaporation, both are inputs from the meteorological database. When the depression loses tank is filled, the main rainwater tank begins to receive inflows minus some system loses which represent first flush and leakages from the building's gutter system. Inflow R t to the main rainwater tank is given by: where DL is the depression losses tank depth (m); D t is rain depth (m); DL max is the maximum depth of the depression losses tank (m); η is gutter system losses (−); and A roof is the roof area (m 2 ). over a full rain season). Nevertheless, the model can simulate any length of rainfall data and could also be used to simulate specific rain events.
The single-building model allows simulations of a customizable number of apartment (and the consequential number of residents) and roof area. For tank design purposes, simulations of different tank sizes for the same building (same roof area and same number of apartments) are available in order to examine the RHW system performance as a function of the storage tank volume.
For long-term performance assessment, it is possible to simulate a succession of randomly selected rain seasons with changing demand patterns, which are derived by a stochastic generator (see below). All the water fluxes presented in Figure 1 were logged to enable any desired post-simulation analysis. Figure 1. Modeling framework of a rainwater harvesting system. The conceptual depression losses tank needs to overflow to initiate inflows to the main rainwater tank. The rainwater tank is gaining Figure 1. Modeling framework of a rainwater harvesting system. The conceptual depression losses tank needs to overflow to initiate inflows to the main rainwater tank. The rainwater tank is gaining water when R t > 0, and lose water due to overflows, yield (demands) or controlled release (if the latter is modeled).
The intended use simulated in this study is toilet flushing, as this necessitates minimal treatment (if at all), but other uses (e.g., laundry) can also be simulated. Independently from rainwater fluxes, a demand module creates toilet flushing usage pattern and supplies from the rainwater tank if enough water is available, and partially or fully by potable water otherwise.
The YAS (yield after spillage) approach was chosen as it was found to be more conservative for assessing the water yield for a given storage tank volume [28,30]. According to YAS, if inflows from the roof plus the existing rainwater volume in the tank before demands exceed the capacity of the rainwater tank, overflow occurs. This overflow equals to: where S max is the tank capacity.
When O t > 0, S t is set to S max , and the timestep is completed after demands are fulfilled. By default, the program simulates full rain seasons (i.e., one simulation run is a run over a full rain season). Nevertheless, the model can simulate any length of rainfall data and could also be used to simulate specific rain events.
The single-building model allows simulations of a customizable number of apartment (and the consequential number of residents) and roof area. For tank design purposes, simulations of different tank sizes for the same building (same roof area and same number of apartments) are available in order to examine the RHW system performance as a function of the storage tank volume.
For long-term performance assessment, it is possible to simulate a succession of randomly selected rain seasons with changing demand patterns, which are derived by a stochastic generator (see below). All the water fluxes presented in Figure 1 were logged to enable any desired post-simulation analysis.

Efficiency Estimators
To evaluate the RWH system performance for potable water saving and runoff reduction, three efficiency estimators are calculated: water-supply efficiency (WSE), peak-flow reduction (PFR) and overall overflow volume reduction efficiency (VRE).
WSE is the fraction of demands satisfied by rainwater from the overall annual demands. WSE is calculated for each simulated year by summing the yields and demands of all timesteps [10,25]: where d t is the is water demand of the designated use (toilet flushing in this study) for timestep t. PFR is the reduction of the maximum roof runoff per simulated year when RWH is implemented. In other words, PFR compares the maximum flow of water from the roof with and without the RWH system. As it is possible that the RTC module will trigger a controlled release while overflow occurs (see "real-time control"), the sum of both flows for each timestep is taken into consideration when calculating PFR [24]: where max(O t + CR t ) is the maximum sum of overflow and controlled release for a specific timestep from the storage tank recorded in a certain year, and max(O t , S max = 0) is the maximal recorded overflow for the same year where the tank volume (S max ) is 0, i.e., the maximum roof runoff (with no RWH system). VRE is the reduction of the annual runoff volume generated from the roof. VRE also quantifies the efficiency of the RWH system for using the available annual rainwater (identical to RUE: rainwater use efficiency in [25]). For example, a VRE of 1 means that all annual rainwater volume was supplied, and none overflowed or were released to the urban drainage system:

Real-Time Control (RTC)
A RTC module was set up based on [20]. The module enables examining different strategies of controlled release from the storage tank: the residual volume of water to be left in the tank is the decision parameter α. The model allows several values to be examined in parallel, from 0 (complete emptying of the tank) to 1 (no intentional water release).
Twice a day, at 12:00 and 24:00, the RTC module obtains a forecast for the total predicted amount of rain for the next 24 h. For the current simulation purposes, it was assumed that the forecast is 100% accurate as it is derived from the rainfall data. It should be noted that this could be changed in the future to allow for uncertainty and errors in rainfall forecasts. Based on this forecast, the module determines whether overflow from the storage tank is predicted during the next 24 h, i.e., the expected rainfall volume (R t ) plus the current volume of water in the tank (S t ) exceed the overall tank volume. If so, the module simulates the opening of a valve (conceptually installed at the bottom part of the tank) for releasing water in a controlled manner. The release flowrate is a function of the current water level in the tank and the orifice's cross-sectional area: where Q CRt is the controlled release rate of flow, C d is the coefficient of discharge, A is the orifice's cross-sectional area, g is the gravitational acceleration and h is the height of water column above the orifice. The total volume of the released rainwater CR t is calculated by implementing the numerical midpoint method and multiplying the resulting controlled release flow with the timestep duration.
If inflows are smaller than the controlled release, Q CR declines with time, as the height of the water above the release valve decreases. To investigate different release policies, a release decision parameter α ranging from 0 to 1 is introduced, and the valve will remain open and release water until the following term is satisfied: or until the next forecast predicts no overflow in the following 24 h. In this manner, high α values mean favoring water supply over runoff mitigation, as more water is kept in the tank and available for supply, but less free volume is available for receiving the roof runoff and preventing overflows from the tank.

Water Demand
Excluding irrigation, toilet flushing is the most significant non-potable domestic water consumer [31,32]. Toilet flushing demand data was adapted from [33], and includes water demands from 15 households for a period of 3 weeks each. Measurements were taken at 1-s temporal resolution and are classified by water appliance. Data were aggregated to 10-min temporal resolution to fit the timestep of the model. The modeling framework was built under the assumption that Israeli households rarely irrigate during winter (see Section 2.5 below), let alone during and shortly after rain events. As such, demands from the rainwater tank were set to include only toilet flushing.

Meteorological Data of the Case Study
As one of the goals of the model is to assess RWH effects on urban drainage flows, the model must rely on sub-hourly input data both for inflows (rainfall) and outflows (water demands). The Israeli Meteorological Service's (IMS) longest recording rain gauge of subhourly timesteps is located at Bet Dagan meteorological station at Israel's central coastal plain (32.0 N, 34.8 E), and could be seen to represent the rainfall patterns of the country's major urban center. The Israel coastal has a hot-summer-Mediterranean climate (Csa under the Köppen climate classification), with precipitation occurring only from September to May, and mainly from November to March. Summer (June to August) is literally dry. During winter, rain events are sporadic with long dry periods between consecutive events.
The case study weather input includes rainfall measurements of 22 winter seasons from Bet Dagan weather station in 10-min timesteps; 20 consecutive seasons from 1999 until 2019 plus the 1993-1994 and 1994-1995 winters, and the corresponding evaporation data in daily timesteps, with the latter used to simulate wetting loses (see modeling framework above).
Missing records were infilled using neighboring weather stations (if available) or linear interpolation, so that the cumulative 10-min timestep rain depth would sum up to the measured daily rain depth.
The annual average rainfall of the dataset was 507 mm, slightly below the long-term average of the Bet Dagan station (524 mm). The 25-75 percentiles were 405 and 595 mm, respectively, with median value of 479 mm (Figure 2a). The 22 recorded seasons had, on average 21.5 rain events per season, where a rain event is defined as rainfall of at least 1 mm with 24 h of preceding dry weather. The average rain event in the recorded dataset had 23.5 mm falling in 32.5 h. The average dry period between consecutive rain events (excluding the long dry summer) lasted 160 h, or 6.67 days (Figure 2c).

Stochastic Modelling Framework
To produce rainfall and demand inputs using the available data, a stochastic approach was taken using sampling with replacement; randomly choosing one dataset for each rain season and for each day of the simulation.
At the beginning of each simulated year, a random dataset representing one rain season (from the meteorological data described above) is selected from the pool of available data. This rain season's records will be used for the entire simulated year alongside its corresponding evaporation data.
To produce sufficient demand data series in an appropriate temporal resolution at a household-scale, a method of generating stochastic water use patterns was adapted from [34]. Using sampling with the replacement of each apartment in the modeled building enables simulating long time periods with short timesteps, while producing demand patterns which correspond with realistic diurnal patterns of toilet flushing.
Given that most people have daily routines, residential water demand, and toilet flushing in particular follow a diurnal pattern [35,36]. To produce this typical shape while using the available demand data, each apartment of the modeled building was assigned randomly to one of the 15 households from Shteynberg's measured data [33]. Then, for each modeled apartment, a whole day of toilet flushing demands was drawn randomly at the beginning of each simulated day (00:00 h) from the relevant real-life data. This random drawing was repeated for each apartment at the beginning of each simulated day. In this way, even if the modeled building is larger than 15 apartments (the number of households in the real-life database) and some apartments in the simulated building are assigned the same real-life household, each day of demands of the entire building is different, demands are not degenerated into deterministic values, and the overall diurnal pattern is kept. As the demand patterns on weekdays and weekend days differ, at 00:00 h the model determines whether the upcoming day is weekday or weekend day (Friday or Saturday in Israel) and draws an appropriate day of demands for each apartment.
This manner of drawing datasets ensures the integrity of the data as well as its uniqueness; while each recorded year of rain data is used several times during the simulation, it meets different set of demands each time. The same principle is applied to the smaller loop of drawing demands; the daily demand dataset i for apartment j in Shteynberg's data is used several times during each simulation for different apartments in the modeled building, but each time it combines with different demand datasets to produce a unique day of demands for the entire modeled building.

Stochastic Modelling Framework
To produce rainfall and demand inputs using the available data, a stochastic approach was taken using sampling with replacement; randomly choosing one dataset for each rain season and for each day of the simulation.
At the beginning of each simulated year, a random dataset representing one rain season (from the meteorological data described above) is selected from the pool of available data. This rain season's records will be used for the entire simulated year alongside its corresponding evaporation data.
To produce sufficient demand data series in an appropriate temporal resolution at a household-scale, a method of generating stochastic water use patterns was adapted from [34]. Using sampling with the replacement of each apartment in the modeled building enables simulating long time periods with short timesteps, while producing demand patterns which correspond with realistic diurnal patterns of toilet flushing.
Given that most people have daily routines, residential water demand, and toilet flushing in particular follow a diurnal pattern [35,36]. To produce this typical shape while using the available demand data, each apartment of the modeled building was assigned randomly to one of the 15 households from Shteynberg's measured data [33]. Then, for each modeled apartment, a whole day of toilet flushing demands was drawn randomly at the beginning of each simulated day (00:00 h) from the relevant real-life data. This random drawing was repeated for each apartment at the beginning of each simulated day. In this way, even if the modeled building is larger than 15 apartments (the number of households in the real-life database) and some apartments in the simulated building are assigned the same real-life household, each day of demands of the entire building is different, demands are not degenerated into deterministic values, and the overall diurnal pattern is kept. As the demand patterns on weekdays and weekend days differ, at 00:00 h the model determines whether the upcoming day is weekday or weekend day (Friday or Saturday in Israel) and draws an appropriate day of demands for each apartment.
This manner of drawing datasets ensures the integrity of the data as well as its uniqueness; while each recorded year of rain data is used several times during the simulation, it meets different set of demands each time. The same principle is applied to the smaller loop of drawing demands; the daily demand dataset i for apartment j in Shteynberg's data is used several times during each simulation for different apartments in the modeled building, but each time it combines with different demand datasets to produce a unique day of demands for the entire modeled building.
The example of a generated demand pattern for a 40-apartment building is presented in Figure 3. Although the demands for each 10-min timestep are erratic (as would be the case in a real building), smoothing the raw data with a 3-h moving average reveals a typical residential diurnal pattern of toilet flushing [35,36]. The average consumption for toilet flushing is 33 L/(person·d), which corroborates the average value in [36].
Water 2021, 13, x FOR PEER REVIEW 8 of 16 The example of a generated demand pattern for a 40-apartment building is presented in Figure 3. Although the demands for each 10-min timestep are erratic (as would be the case in a real building), smoothing the raw data with a 3-h moving average reveals a typical residential diurnal pattern of toilet flushing [35,36]. The average consumption for toilet flushing is 33 L/(person·d), which corroborates the average value in [36].

Results and Discussion
In this section, the model's output is presented, and possible analyses of the output are demonstrated, including rainwater tank volume examination, creating efficiency curves, and investigating possible controlled release policies (RTC). The parameters used in the simulations are presented in Table 1.

Storage Tank Sizing
For the simulated building, the WSE (water supply efficiency) demonstrates a logistic growth pattern, showing that increasing the tank size above 30 m 3 carries little benefit. PFR (peak-flow reduction) values grow linearly and are scattered along the y axis from 0 to 1. The VRE (volume reduction efficiency) values suggest that a significant portion of the annual rainfall could be harvested and used even with relatively small tanks.
One of the common uses of RWH models is to evaluate different system designs, mainly the sizing of rainwater tanks. The modeling framework allows simulating different tank volumes for the same building and demand patterns. A 40-apartment building with a roof area of 840 m 2 was modeled. The model was executed for 100 randomly selected rain seasons. WSE, PFR, and VRE were calculated (Figure 4).
Mean annual demands were summed to 1930 m 3 /year, and the mean annual rainwater volume harvested (i.e., annual rain X roof area minus depression losses minus transfer losses; Equation (2)) was 341 m 3 . This corresponds with [7], who estimated the annual

Results and Discussion
In this section, the model's output is presented, and possible analyses of the output are demonstrated, including rainwater tank volume examination, creating efficiency curves, and investigating possible controlled release policies (RTC). The parameters used in the simulations are presented in Table 1.

Storage Tank Sizing
For the simulated building, the WSE (water supply efficiency) demonstrates a logistic growth pattern, showing that increasing the tank size above 30 m 3 carries little benefit. PFR (peak-flow reduction) values grow linearly and are scattered along the y axis from 0 to 1. The VRE (volume reduction efficiency) values suggest that a significant portion of the annual rainfall could be harvested and used even with relatively small tanks.
One of the common uses of RWH models is to evaluate different system designs, mainly the sizing of rainwater tanks. The modeling framework allows simulating different tank volumes for the same building and demand patterns. A 40-apartment building with a roof area of 840 m 2 was modeled. The model was executed for 100 randomly selected rain seasons. WSE, PFR, and VRE were calculated (Figure 4).
Mean annual demands were summed to 1930 m 3 /year, and the mean annual rainwater volume harvested (i.e., annual rain X roof area minus depression losses minus transfer losses; Equation (2)) was 341 m 3 . This corresponds with [7], who estimated the annual available rainwater volume from a 850 m 2 roof in an areas of Jordan with average rainfall of 500 mm per year to be 360 m 3 .

Efficiency Curves
Another possible use of the model is to create efficiency curves for expected WSE, PFR and VRE as was suggested by [38] and adapted by [39]. These curves enable the assessment of the efficiency estimators' values for a wide range of buildings, and examining the effects of different tank designs in an accessible manner. For the efficiency curves presented here, 100 different apartment buildings with roof areas of 400 to 900 m 2 and an apartment number of 30-60 were modelled under similar 100 rain-season simulation, resulting in 100 PFR, WSE and VRE results per building. Contour plots of the mean values of the estimators were charted as a function of storage tank volume and the normalized roof area (roof area (m 2 ) divided by mean annual demands (m 3 ); Figure 5).
These curves can be used to estimate the benefit of installing RWH systems in different buildings. To demonstrate this, let our designated building be the abovementioned 40-apartment building with a roof area of 840 m 2 , and an estimated annual toilet flushing water use of 1930 m 3 (the latter can be estimated by multiplying the number of tenants by the expected annual water use for toilet flushing per capita). This building has a roof area to annual demand ratio of 0.45 m −1 . For the purpose of this demonstration, the main objective of installing the RWH system in this building is to reduce the expected peak flow from the roof by 40%. By examining the PFR curves, it can be deducted that a rainwater tank of 35 m 3 would reduce the annual peak flows by 40% (on average) and would be able to supply about 17% of the annual toilet flushing water demand (WSE). If the desired PFR is 0.5, a tank of 45 m 3 would be needed for the same building. A tank of such volume would supply 18% of the annual demand for toilet-flushing, and reduce by 90% the annual overflow volume (VRE) of the system. The WSE shows typical saturation growth curve, with the marginal utility diminishing as the storage tank size increases. For a 50 m 3 storage tank, the median WSE reaches 0.18 (25-75 percentiles from 0.16 to 0.22) of the total annual demand (including the rainy winter and the dry summer), which corresponds with the findings of [29] on RWH feasibility in apartment buildings. Another simulation was conducted on a building with 16 apartments with a roof area of 400 m 2 , similar to a building modeled by [25]. The results show similar correlations between WSE and tank volume, with WSE reaching a maximum value of 0.19 with a tank volume of 35 m 3 or above. Muklada's results showed a maximum value of 0.2 for WSE for the same tank volume while also supplying rainwater for laundry. It should be noted that in Muklada's study demand data were deterministic, and the model was executed on a daily timestep. These differences could have caused the difference in the maximum WSE between the current study and Muklada's findings.
A building with 16 apartments and a 800 m 2 roof was simulated to check the model's correspondence with the findings of Palla et al. [37], who examined the WSE of RWH systems in Catania, Italy (590 mm mean annual rainfall). According to Palla et al. a building with a 50 m 3 tank and similar annual rainwater volume to annual demands ratio would reach WSE of 0.4, while the present model estimated a WSE of 0.35. This difference could be explained by the fact that rainfall in Israel characterized by short and intense storms, scattered mainly from November to March. This is causes more frequent overflows and less rainwater availability to satisfy demands. The modeled building with a 50 m 3 tank is able to collect 75% of the annual rainwater while the rest overflows, compared with a building with the same attributes in Catania, which is expected to collect more than 90% of the annual rainfall according to Palla et al. In comparison to the limited growth of WSE values, PFR median values (Figure 4b) increase linearly with increasing modeled storage volume. This difference could be explained by the fact that the annual rainfall is able to supply a limited fraction from the total annual toilet flushing demands. However, it is possible (although probably not economically viable) to install a tank large enough to hold all the annual rainfall and decrease overflow to 0, thus resulting in a PFR value of 1.
Like WSE, VRE shows logistic growth with increasing tank size (Figure 4c). It was demonstrated that even the smallest 5 m 3 tank is capable to capture 54% of the annual rainfall. Therefore, 50 m 3 tanks can collect 95% (median value, 25-75 percentiles from 89% to 99%) of the annual rainfall, and all tank sizes larger than 25 m 3 enable the use of at least 80% (median value) of the annual rainfall, or in other words, an at least 80% reduction of the annual overflow volume.

Efficiency Curves
Another possible use of the model is to create efficiency curves for expected WSE, PFR and VRE as was suggested by [38] and adapted by [39]. These curves enable the assessment of the efficiency estimators' values for a wide range of buildings, and examining the effects of different tank designs in an accessible manner. For the efficiency curves presented here, 100 different apartment buildings with roof areas of 400 to 900 m 2 and an apartment number of 30-60 were modelled under similar 100 rain-season simulation, resulting in 100 PFR, WSE and VRE results per building. Contour plots of the mean values of the estimators were charted as a function of storage tank volume and the normalized roof area (roof area (m 2 ) divided by mean annual demands (m 3 ); Figure 5).

RTC Policies
Except for a policy of completely emptying the storage tank prior to expected overflows, applying RTC improves PFR significantly with minor impacts on WSE.
For the same 40-apartment building and simulation parameters used for tank design purposes, different values of release decision parameter α were examined (see Section 2.3 above)for a 20 m 3 tank. The simulation included 100 years, and a total of 11 systems were simulated. Each RWH system was modelled with similar rain seasons and supplied water to the same building with identical demands, with the only difference being the value of α (α = 0, 0.1, 0.2,…, 1).
The results show that setting α to 0, meaning complete discharge of stored water prior to a storm where overflow is predicted to occur, carries significant impact for the WSE, with only 5% of demands (median value) satisfied by rainwater (Figure 6a). Slightly increasing α to 0.1 (water is released from the tank until storage is 10% of the full tank capacity) more than doubled the supply efficiency to 11% (median value). For an α between 0.1 and 1, the median values of WSE increase linearly with α, peaking at 14% of demands when α = 1; no water is released prior to rain events. These curves can be used to estimate the benefit of installing RWH systems in different buildings. To demonstrate this, let our designated building be the abovementioned 40-apartment building with a roof area of 840 m 2 , and an estimated annual toilet flushing water use of 1930 m 3 (the latter can be estimated by multiplying the number of tenants by the expected annual water use for toilet flushing per capita). This building has a roof area to annual demand ratio of 0.45 m −1 . For the purpose of this demonstration, the main objective of installing the RWH system in this building is to reduce the expected peak flow from the roof by 40%. By examining the PFR curves, it can be deducted that a rainwater tank of 35 m 3 would reduce the annual peak flows by 40% (on average) and would be able to supply about 17% of the annual toilet flushing water demand (WSE). If the desired PFR is 0.5, a tank of 45 m 3 would be needed for the same building. A tank of such volume would supply 18% of the annual demand for toilet-flushing, and reduce by 90% the annual overflow volume (VRE) of the system.

RTC Policies
Except for a policy of completely emptying the storage tank prior to expected overflows, applying RTC improves PFR significantly with minor impacts on WSE.
For the same 40-apartment building and simulation parameters used for tank design purposes, different values of release decision parameter α were examined (see Section 2.3 above)for a 20 m 3 tank. The simulation included 100 years, and a total of 11 systems were simulated. Each RWH system was modelled with similar rain seasons and supplied water to the same building with identical demands, with the only difference being the value of α (α = 0, 0.1, 0.2,. . . , 1).
The results show that setting α to 0, meaning complete discharge of stored water prior to a storm where overflow is predicted to occur, carries significant impact for the WSE, with only 5% of demands (median value) satisfied by rainwater (Figure 6a). Slightly increasing α to 0.1 (water is released from the tank until storage is 10% of the full tank capacity) more than doubled the supply efficiency to 11% (median value). For an α between 0.1 and 1, the median values of WSE increase linearly with α, peaking at 14% of demands when α = 1; no water is released prior to rain events. In comparison, after a significant decrease of the median PFR (39% decrease) when increasing α from 0 to 0.1 (from 0.67 to 0.41), there is only a 32% drop in PFR values when α increases from 0.1 to 1 (the maximum possible value), where the PFR median is 0.28. This phenomenon could be explained by the fact that PFR refers to the maximum values of overflow for a simulated year, which are a result of one specific maximal rain event per rain season that cannot be contained other than by complete discharge of the tank.
Setting α to 0 significantly diminishes the system's rainfall use efficiency, as the VRE drops to 0.4, meaning that only 40% of the available water is used while 60% is released or overflows to the urban drainage system as the tank is fully emptied when overflow is expected. Increasing α to only 0.1 is enough to raise VRE substantially, to 0.57 (median value), and a further increase in α results in linear growth of VRE up to 0.75, with no controlled release (α = 1).
As VRE accounts for water losses due to overflows and controlled release, further examination of these flows was conducted. For each value of α, each loss (overflows and controlled release) was summed annually and the fraction of each from the total water losses (overflows plus controlled releases) was calculated. To achieve this the simulation was executed for the 40-apartment building with a RWH tank of 20 m 3 and run for 100 years (as before). In comparison, after a significant decrease of the median PFR (39% decrease) when increasing α from 0 to 0.1 (from 0.67 to 0.41), there is only a 32% drop in PFR values when α increases from 0.1 to 1 (the maximum possible value), where the PFR median is 0.28. This phenomenon could be explained by the fact that PFR refers to the maximum values of overflow for a simulated year, which are a result of one specific maximal rain event per rain season that cannot be contained other than by complete discharge of the tank.
Setting α to 0 significantly diminishes the system's rainfall use efficiency, as the VRE drops to 0.4, meaning that only 40% of the available water is used while 60% is released or overflows to the urban drainage system as the tank is fully emptied when overflow is expected. Increasing α to only 0.1 is enough to raise VRE substantially, to 0.57 (median value), and a further increase in α results in linear growth of VRE up to 0.75, with no controlled release (α = 1).
As VRE accounts for water losses due to overflows and controlled release, further examination of these flows was conducted. For each value of α, each loss (overflows and controlled release) was summed annually and the fraction of each from the total water losses (overflows plus controlled releases) was calculated. To achieve this the simulation was executed for the 40-apartment building with a RWH tank of 20 m 3 and run for 100 years (as before).
For the simulated building, equilibrium (i.e., equal overflow and controlled release volumes, Figure 7) was observed at α values of 0.7-0.8, where the median values of VRE, PRF and WSE were 0.7, 0.3, and 0.13, respectively. When α = 1 the VRE, PFR and WSE medians were 0.75, 0.28 and 0.14 respectively. When α is reduced to 0.5, 65% of the total water losses are through controlled release, while 35% is through overflow (median values), and the median values of WSE, PFR and VRE are 0.13, 0.34 and 0.65, respectively. These findings correspond with those of [20], who found that implementing controlled release could have significant effects on PFR, with minor impact on WSE, and estimated a decrease of 10% in WSE when using a real-time controlled orifice to handle overflows from rainwater tanks. Such results from applying a simple RTC policy suggest that more sophisticated policies should be explored as they can potentially yield even better dual objectives performance of RWH systems for reducing potable water demand and minimizing overflows to urban drainage systems. Overflow and controlled release as fractions of the total loss flow (overflows + controlled release). As more water is released from the tank, the fraction of the released water from the overall outflows increases.

Conclusions
A high-temporal resolution stochastic RWH model aimed at assessing potable water savings and runoff reduction was developed using real-life water demand and rainfall data. The presented model does not include tank size optimization, as such process requires a cost-benefit analysis which was beyond the scope of this study. Such a cost benefit analysis addressing the dual benefit of RWH, supplying water while reducing drainage flows, is expected to be site specific with a high dependency on the characteristics of the local drainage system and the urban watershed.
Model attributes include: • The model enables simulation of various buildings (varying in the number of apartments and dwellers), collection surface (roof) areas, rainwater tank volumes and time periods; from single rain events up to multi-seasonal simulations • Model inputs (rainfall and demands) are used in a stochastic manner (sampling with replacement), which maintains their natural pattern while generating realistic noise and temporal variability. In this way, creating rainfall and demand data series does Overflow and controlled release as fractions of the total loss flow (overflows + controlled release). As more water is released from the tank, the fraction of the released water from the overall outflows increases.
In general, when excluding the complete discharge policy (α = 0), PFR is more sensitive than WSE to changes in α. When reducing α from 1 (no controlled release) to 0.1, the WSE median drops by 23% from 0.137 to 0.106, while PFR increases by 48%, from 0.276 to 0.408. This difference in sensitivity is further enhanced when examining a mid-range α value. For example, when applying RTC and setting α = 0.3, the PFR median value increases by 45% in comparison to α = 1 (no controlled release) from 0.275 to 0.4, respectively. Under this RTC policy, the WSE median value decreases by 15% (from 0.137 to 0.116). When considering that the mean annual demands for the modeled building are 1930 m 3 /year, this decrease reduces the total volume of supplied rainwater by 40 m 3 . When setting α = 0.3, the VRE median value decreases by 19% (from 0.75 to 0.61).
These findings correspond with those of [20], who found that implementing controlled release could have significant effects on PFR, with minor impact on WSE, and estimated a decrease of 10% in WSE when using a real-time controlled orifice to handle overflows from rainwater tanks. Such results from applying a simple RTC policy suggest that more sophisticated policies should be explored as they can potentially yield even better dual objectives performance of RWH systems for reducing potable water demand and minimizing overflows to urban drainage systems.

Conclusions
A high-temporal resolution stochastic RWH model aimed at assessing potable water savings and runoff reduction was developed using real-life water demand and rainfall data. The presented model does not include tank size optimization, as such process requires a cost-benefit analysis which was beyond the scope of this study. Such a cost benefit analysis addressing the dual benefit of RWH, supplying water while reducing drainage flows, is expected to be site specific with a high dependency on the characteristics of the local drainage system and the urban watershed.
Model attributes include: • The model enables simulation of various buildings (varying in the number of apartments and dwellers), collection surface (roof) areas, rainwater tank volumes and time periods; from single rain events up to multi-seasonal simulations • Model inputs (rainfall and demands) are used in a stochastic manner (sampling with replacement), which maintains their natural pattern while generating realistic noise and temporal variability. In this way, creating rainfall and demand data series does not require rigorous data analysis on the one hand, and does not degenerate input data to constant or deterministic values on the other.
The model could be used for: • Estimating the short term benefits such as runoff reduction for specific storms, as well as long term evaluations of peak runoff flow reduction, overall annual overflow volume reduction, and rainwater supply efficiencies.

•
Comparing the performances of different tank sizes under the same conditions • Drawing design curves for a range of tank sizes and roof areas for specific rainfall data • Inspecting different RTC policies and their effects on the system's efficiency.
This modeling framework can serve as the basis for studying the effects of RWH on urban drainage, as it could be easily adjusted to simulate different buildings or residential clusters. The influences of different system design, spatial distributions of the rainwater tanks, or different and more elaborate controlled release policies could be estimated when the suggested model is coupled with a drainage model of the desired urban watershed. Future work will include developing such combined RWH harvesting-Drainage models for several case studies, where overflows from the presented framework will serve as part of the input for the drainage models.  Data Availability Statement: Rainwater data were taken from Israel Meteorological Service https: //ims.data.gov.il/ims/7 (in Hebrew).