diff --git a/bpeng/ecm/__init__.py b/bpeng/ecm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/bpeng/ecm/low_flow.py b/bpeng/ecm/low_flow.py index c06d296d2b58e70788bc6614b1e41751460e3e78..7fcd6f4187478d15572af6a00d8c2afed2814346 100644 --- a/bpeng/ecm/low_flow.py +++ b/bpeng/ecm/low_flow.py @@ -1,4 +1,80 @@ """ - This module calculates the water usage and energy savings for low flow fixtures (toilets, faucets, and showerheads) +This module calculates the water usage and energy savings for +low flow fixtures (toilets, faucets, and showerheads). The +algorithm is adapted from the EPA WaterSense calculation +method. + +https://www.epa.gov/watersense/how-watersense-calculator-works """ +DAYS_PER_YEAR = 365 # number of days in a year +HEAT_CAP_H2O = 1 # [BTU] energy required to raise one pound of water 1 degree F +RHO_H2O = 8.34 # [lb/US gal] density of water, assumed at 50F + + +def toilet_usage_save(old_flush, new_flush, resident_count=2.6, flush_count=5.05, day_span=365): + """ + Calculate annual savings on water usage from low-flow toilet replacement + + Args: + old_flush (float): gallons of water per flush of existing toilet + new_flush (float): gallons of water per flush of new toilet + resident_count (int): number of individuals in the building, defaults to 2.6 (EPA avg) + flush_count (float): number of flushes per day, defaults to 5.05 (EPA avg) + day_span (int): number of days in savings period, default gives annual + + Returns: + float: annual water savings [gallons] + """ + gal_save = (old_flush - new_flush) * flush_count * resident_count * day_span + + return gal_save + + +def heated_fix_save(old_flow, new_flow, resident_count, run_time): + """ + Calculate savings on water usage from fixtures that use hot water, such + as showerheads and faucets. + + Args: + old_flow (float): flow rate [gal/min] of existing fixture + new_flow (float): flow rate [gal/min] of new fixture + resident_count (int): number of individuals in the building + run_time (float): time [min/person] fixture is dispensing water + + Returns: + float: water savings [gallons] + """ + gal_save = (new_flow - old_flow) * run_time * resident_count + + return gal_save + + +def heat_fix_energy(gallons, supply_temp=120, fresh_temp=55, hot_ratio=.73): + """ + Calculate energy savings from fixtures that use hot water, such + as showerheads and faucets. + + Args: + + gallons (float) + gallons of water used + + supply_temp (int, optional) + temperature of heated water supplied to building, typically 120F. + + fresh_temp (int, optional) + temperature of fresh water to be heated, defaults to 55F + + hot_ratio (float, optional) + fraction of fixture water usage assumed to be heated, defaults to .73 + + Returns: + + float: energy [MMBTU] used to heat water + + """ + + heat_used = (supply_temp - fresh_temp) * HEAT_CAP_H2O * RHO_H2O * gallons * hot_ratio * 0.000001 + + return heat_used