# Population Plan for 4540 residents
Pop = 4540  # residents

# per capita water usage in Northeastern Illinois
PCPW = 80  # From NEEF (gallons per day per capita)

# Breakdown of water usage percentages
w = 0.16  # washer
s = 0.20  # shower
f = 0.20  # faucets
b = 0.03  # bath
dw = 0.02 # dishwasher
t = 0.24  # toilets
l = 0.13  # leaks
o = 0.02  # other, adjusted down 1% for rounding error in paper

# Assuming all washers and toilets use non-potable water
PCPW2 = int(PCPW * (s + f + b + dw + o))  # Excludes washer and toilet
print("Current Household Water Use =", PCPW, "gpd/capita")
print("Adjusted Household Water Use (Non-Potable) =", PCPW2, "gpd/capita")

# Percent water savings (non-potable use for washer and toilet)
PWS = (1 - PCPW2 / PCPW) * 100  # %
print(f"Percent Water Savings (Non-Potable) = {PWS:.2f}%")

# Assume low-flow showers, faucets, and toilets:
# Showers reduced flow from 5gpm to 2.5gpm; Faucets reduced similarly; Toilets reduced from ~3.5 to 1.28 (HETs)
sred = 0.5  # 50% reduction in shower flow
fred = 0.5  # 50% reduction in faucet flow
tred = 0.66  # ~66% reduction in toilet flow

s2 = (1 - sred) * s
f2 = (1 - fred) * f
t2 = (1 - tred) * t
print("Adjusted toilet water use factor (t2) =", t2)

# New water consumption model with low-flow fixtures
PCPW3 = int(PCPW * (s2 + f2 + b + dw + o))  # Adjusted potable water per capita
RPT = PCPW3 * Pop  # Total residential potable demand

print("Adjusted Household Water Use (Low-Flow + Non-Potable) =", PCPW3, "gpd/capita")
print("Total Residential Potable Demand =", RPT, "gpd")

# Percent water savings (low-flow + non-potable)
PWS2 = (1 - PCPW3 / PCPW) * 100
print(f"Percent Water Savings (Low-flow + Non-Potable) = {PWS2:.2f}%")

# Commercial Water Demand
# Assumes target of 30% reduction from 20 gal/sf/year
CA = 292624  # Commercial area in square feet
InitialWaterIntensity = 20/365 # gallons per square foot per day
ReductionPercentage = 0.30 # target reduction of 30%

# Initial Commercial Water Demand
InitialComWD = CA * InitialWaterIntensity  # gallons per day
print("Initial Commercial Water Demand =", int(InitialComWD), "gpd")

# Reduced Commercial Water Demand (with reduction target applied)
ReducedComWD = InitialComWD * (1 - ReductionPercentage)  # gallons per day
print("Reduced Commercial Water Demand =", int(ReducedComWD), "gpd")

# Comparison
ReductionSavings = InitialComWD - ReducedComWD  # gallons saved per day
print("Reduction Savings =", int(ReductionSavings), "gpd")
print(f"Percent Reduction Achieved = {ReductionPercentage * 100:.2f}%")

# Greywater generated (excludes toilet water use)
greywater = PCPW3  # Adjusted per capita potable water use (shower, faucets, bath, dishwasher, other)
greywaterT = greywater * Pop  # Total greywater generated

print("Greywater Generated per Capita =", greywater, "gpd/capita")
print("Total Greywater Generated =", greywaterT, "gpd")

##PART 2###

#Daily Onsite Household Water Consumption

# Daily Onsite Household Water Consumption
DN = PCPW * Pop  # Do nothing alternative
Alt1 = PCPW2 * Pop  # Use non-potable water for laundry and toilets, eliminate leaks
Alt2 = PCPW3 * Pop  # Alt1 plus low-flow faucets and showerheads

# Print results
print("Water Demand Alternatives for Household Potable Water Consumption:")
print(f"Do Nothing = {DN:,} gallons/day (gpd)")
print(f"Non-Potable = {Alt1:,} gallons/day (gpd)")
print(f"Low-Flow + Non-Pot = {Alt2:,} gallons/day (gpd)")

# Calculate percent reductions
Reduction1 = (1 - Alt1 / DN) * 100
Reduction2 = (1 - Alt2 / DN) * 100

print(f"Reduction from Do Nothing to Non-Potable: {Reduction1:.2f}%")
print(f"Reduction from Do Nothing to Low-Flow + Non-Pot: {Reduction2:.2f}%")

##PART 3###

#Gray / Stormwater diversion 
# Parameters
roof_area = 607965.29  # sq ft
pavement_area = 107847.60  # sq ft
green_area = 2602784.00  # sq ft
daily_rainfall_in = 0.1048387097  # inches, based on avg 3.25" per month
daily_rainfall_ft = daily_rainfall_in / 12  # convert to feet
runoff_coeff_roof = 0.5 
runoff_coeff_pavement = 0.6
runoff_coeff_green = 0.1

# Graywater calculations
graywater_fraction = s2 + f2 + b + dw  # Shower, faucets, bath, dishwasher
graywater_generated_per_capita = PCPW * graywater_fraction
graywater_total = graywater_generated_per_capita * Pop

print(f"Graywater Generated per Capita = {graywater_generated_per_capita:.2f} gpd")
print(f"Total Graywater Generated = {graywater_total:,.0f} gpd")

# Stormwater diversion calculations
stormwater_diversion_roof = daily_rainfall_ft * roof_area * runoff_coeff_roof
stormwater_diversion_pavement = daily_rainfall_ft * pavement_area * runoff_coeff_pavement
stormwater_diversion_green = daily_rainfall_ft * green_area * runoff_coeff_green
stormwater_total = stormwater_diversion_roof + stormwater_diversion_pavement + stormwater_diversion_green

print(f"Stormwater Diversion from (Green) Roofs = {stormwater_diversion_roof:,.0f} gallons/day")
print(f"Stormwater Diversion from Pavement = {stormwater_diversion_pavement:,.0f} gallons/day")
print(f"Stormwater Diversion from Green Areas = {stormwater_diversion_green:,.0f} gallons/day")
print(f"Total Stormwater Diversion = {stormwater_total:,.0f} gallons/day")

<aside> <img src="/icons/light-bulb_yellow.svg" alt="/icons/light-bulb_yellow.svg" width="40px" />

Outputs:

Current Household Water Use = 80 gpd/capita Adjusted Household Water Use (Non-Potable) = 37 gpd/capita Percent Water Savings (Non-Potable) = 53.75% Adjusted toilet water use factor (t2) = 0.08159999999999999 Adjusted Household Water Use (Low-Flow + Non-Potable) = 21 gpd/capita Total Residential Potable Demand = 95340 gpd Percent Water Savings (Low-flow + Non-Potable) = 73.75% Initial Commercial Water Demand = 16034 gpd Reduced Commercial Water Demand = 11223 gpd Reduction Savings = 4810 gpd Percent Reduction Achieved = 30.00% Greywater Generated per Capita = 21 gpd/capita Total Greywater Generated = 95340 gpd

Water Demand Alternatives for Household Potable Water Consumption: Do Nothing = 363,200 gallons/day (gpd) Non-Potable = 167,980 gallons/day (gpd) Low-Flow + Non-Pot = 95,340 gallons/day (gpd) Reduction from Do Nothing to Non-Potable: 53.75% Reduction from Do Nothing to Low-Flow + Non-Pot: 73.75%

*Specific Greywater outputs moved to spreadsheet

</aside>