From 9d5eee7af355ed25f94eb9577536f8f8658d08d4 Mon Sep 17 00:00:00 2001 From: Doris Han Date: Fri, 21 Apr 2017 18:01:19 -0400 Subject: [PATCH 1/5] add weatherstripping saving calcuations --- bpeng/ecmsavingscal/weatherstripping_class.py | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 bpeng/ecmsavingscal/weatherstripping_class.py diff --git a/bpeng/ecmsavingscal/weatherstripping_class.py b/bpeng/ecmsavingscal/weatherstripping_class.py new file mode 100644 index 0000000..45c7fb6 --- /dev/null +++ b/bpeng/ecmsavingscal/weatherstripping_class.py @@ -0,0 +1,132 @@ +""" +Calculate the savings from Weatherstripping + +""" +import pandas as pd + + +''' +The overall efficiency of Heating system should be paased from utility bill and energy plus simulation result +The default value is listing below: +heating_system_overall_eff = float(0.5) +fuel_price = 12 + +''' + + +''' +Estimated costs for install a single window weahterstripping(3'*6') - for $48 +''' +''' +window_weatherstripping_costs = 48 +single_window_area = 18 +existing_air_leakage_rating_window = 0.6 #cfm/sq ft +proposed_air_leakage_rating_window = 0.25 # cfm/ sq ft +''' + +##FIXME + +class ecms_weatherstripping: + ''' + ecms - + savings calucation + weatherstripping for door, window, ac + ''' + hs_overall_eff = 0.5 + fuel_price = 12 # MMBTU + + + + def weatherstripping_window_doors(hs_overall_eff,fuel_price,cost,T_indoor,existing_air_leakage_rating,proposed_air_leakage_rating): + ''' + weather data for the average monthly temperature in New York + ''' + df2 = '' + weather_data = pd.read_csv('new-york-monthly-avg-temp-wind.csv') + heating_season = weather_data[['JAN','FEB','MAR','APR','OCT','NOV','DEC']] + df2 = heating_season.T + + ''' + Assumptions: + Indoor Temperature = 24 'C + Air density = 0.0765 #lb/(cu ft) + Heat capacity of Air = 0.24 # btu/lb F + Air flow rate reduction for eache weatherstripped AC = 13 cfm - from the SWA study + ''' + + + density_air = 0.0765 #lb/(cu ft) + capacity_air = 0.24 # btu/lb F + + inflitration_reduce = existing_air_leakage_rating - proposed_air_leakage_rating + df2['monthly loss'] = '' + + for i in range(len(df2)): + df2['monthly loss'][i] = inflitration_reduce * (60 * 24 * 30.5 ) * density_air * capacity_air * (T_indoor - df2[0][i]) + + annual_loss = sum(df2['monthly loss'])/1000000 #MMBTU + annual_saving = annual_loss/ hs_overall_eff * fuel_price + payback = cost / annual_saving + + print('Annual heating demand reduction per sq ft (kBtu):',round(annual_loss,3)) + print('Savings/yr($):', round(annual_saving,3)) + print ('Simple payback:', round(payback,3)) + + return annual_loss,annual_saving,payback + + + + ''' + ''' + ac_weatherstripping_costs = 25 + + def weatherstripping_ac(hs_overall_eff,fuel_price, estimated_costs): + ''' + weather data for the average monthly temperature in New York + ''' + df2 = '' + weather_data = pd.read_csv('new-york-monthly-avg-temp-wind.csv') + heating_season = weather_data[['JAN','FEB','MAR','APR','OCT','NOV','DEC']] + df2 = heating_season.T + + ''' + the function is to calcuate the savings for a single weatherstripped AC unit + + ''' + + ''' + Assumptions: + Indoor Temperature = 24 'C + Air density = 0.0765 #lb/(cu ft) + Heat capacity of Air = 0.24 # btu/lb F + Air flow rate reduction for eache weatherstripped AC = 13 cfm - from the SWA study + ''' + + Tindoor = 24 + density_air = 0.0765 + capacity_air = 0.24 + + + + df2['air flow rate'] = '' + df2['monthly loss'] = '' + + for i in range(len(df2)): + + df2['air flow rate'][i] = 13 + df2['monthly loss'][i] = df2['air flow rate'][i] * (60 * 24 * 30.5 ) * density_air * capacity_air * (Tindoor - df2[0][i]) + + print(df2) + + + annual_loss = sum(df2['monthly loss'])/1000000 #MMBTU + annual_saving = annual_loss/ hs_overall_eff * fuel_price + payback = estimated_costs / annual_saving + + + print('Annual heating demand reduction (MMBtu):', round(annual_loss,3)) + print('Savings/yr($):', round(annual_saving,3)) + print ('Simple payback:', round(payback,3)) + + return annual_loss, annual_saving,payback + -- GitLab From 53f74d7ca020432bd1bf8e6322b269c59639fccf Mon Sep 17 00:00:00 2001 From: Doris Han Date: Wed, 26 Apr 2017 19:03:59 -0400 Subject: [PATCH 2/5] 2nd iteration of weatherstipping savings cal; delete the class just using function --- bpeng/ecm/weatherstripping.py | 84 +++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 bpeng/ecm/weatherstripping.py diff --git a/bpeng/ecm/weatherstripping.py b/bpeng/ecm/weatherstripping.py new file mode 100644 index 0000000..a044c10 --- /dev/null +++ b/bpeng/ecm/weatherstripping.py @@ -0,0 +1,84 @@ +""" +Calculate the savings from Weatherstripping + +""" + +import pandas as pd + + +def weatherstripping_window_doors(weather, hs_overall_eff, fuel_price, cost, + T_indoor, existing_air_leakage_rating, + proposed_air_leakage_rating): + + weather_data = pd.DataFrame(weather, index=[0]) + heating_season = weather_data[[ + 'JAN', 'FEB', 'MAR', 'APR', 'OCT', 'NOV', 'DEC' + ]] + df2 = heating_season.T + + density_air = 0.0765 #lb/(cu ft) + capacity_air = 0.24 # btu/lb F + + inflitration_reduce = existing_air_leakage_rating - proposed_air_leakage_rating + df2['monthly loss'] = '' + + for i in range(len(df2)): + df2['monthly loss'][i] = inflitration_reduce * ( + 60 * 24 * 30.5) * density_air * capacity_air * ( + T_indoor - df2[0][i]) + + annual_loss = sum(df2['monthly loss']) / 1000000 #MMBTU + annual_saving = annual_loss / hs_overall_eff * fuel_price + payback = cost / annual_saving + + print('Annual heating demand reduction per sq ft (kBtu):', + round(annual_loss, 3)) + print('Savings/yr($):', round(annual_saving, 3)) + print('Simple payback:', round(payback, 3)) + + return annual_loss, annual_saving, payback + + + +def weatherstripping_ac(weather, hs_overall_eff, fuel_price, estimated_costs,Tindoor): + + """ + the function is to calcuate the savings for a single weatherstripped AC unit + + Assumptions: + weather data for the average monthly temperature in New York + Air density = 0.0765 #lb/(cu ft) + Heat capacity of Air = 0.24 # btu/lb F + Air flow rate reduction for eache weatherstripped AC = 13 cfm - from the SWA study + """ + + weather_data = pd.DataFrame(weather,index=[0]) + heating_season = weather_data[[ + 'JAN', 'FEB', 'MAR', 'APR', 'OCT', 'NOV', 'DEC' + ]] + df2=heating_season.T + + density_air = 0.0765 + capacity_air = 0.24 + + df2['air flow rate'] = '' + df2['monthly loss'] = '' + + + for i in range(len(df2)): + + df2['air flow rate'][i] = 13 + df2['monthly loss'][i] = df2['air flow rate'][i] * ( + 60 * 24 * 30.5) * density_air * capacity_air * ( + Tindoor - df2[0][i]) + + annual_loss = sum(df2['monthly loss']) / 1000000 + annual_saving = annual_loss / hs_overall_eff * fuel_price # + payback = estimated_costs / annual_saving + + print('Annual heating demand reduction (MMBtu):', round( + annual_loss, 3)) + print('Savings/yr($):', round(annual_saving, 3)) + print('Simple payback:', round(payback, 3)) + + return annual_loss, annual_saving, payback -- GitLab From 4e0a5b7ed1281ad7f2c380b11dc10faab9523ab4 Mon Sep 17 00:00:00 2001 From: Doris Han Date: Wed, 26 Apr 2017 19:06:24 -0400 Subject: [PATCH 3/5] Removed old weatherstripping file --- bpeng/ecmsavingscal/weatherstripping_class.py | 132 ------------------ 1 file changed, 132 deletions(-) delete mode 100644 bpeng/ecmsavingscal/weatherstripping_class.py diff --git a/bpeng/ecmsavingscal/weatherstripping_class.py b/bpeng/ecmsavingscal/weatherstripping_class.py deleted file mode 100644 index 45c7fb6..0000000 --- a/bpeng/ecmsavingscal/weatherstripping_class.py +++ /dev/null @@ -1,132 +0,0 @@ -""" -Calculate the savings from Weatherstripping - -""" -import pandas as pd - - -''' -The overall efficiency of Heating system should be paased from utility bill and energy plus simulation result -The default value is listing below: -heating_system_overall_eff = float(0.5) -fuel_price = 12 - -''' - - -''' -Estimated costs for install a single window weahterstripping(3'*6') - for $48 -''' -''' -window_weatherstripping_costs = 48 -single_window_area = 18 -existing_air_leakage_rating_window = 0.6 #cfm/sq ft -proposed_air_leakage_rating_window = 0.25 # cfm/ sq ft -''' - -##FIXME - -class ecms_weatherstripping: - ''' - ecms - - savings calucation - weatherstripping for door, window, ac - ''' - hs_overall_eff = 0.5 - fuel_price = 12 # MMBTU - - - - def weatherstripping_window_doors(hs_overall_eff,fuel_price,cost,T_indoor,existing_air_leakage_rating,proposed_air_leakage_rating): - ''' - weather data for the average monthly temperature in New York - ''' - df2 = '' - weather_data = pd.read_csv('new-york-monthly-avg-temp-wind.csv') - heating_season = weather_data[['JAN','FEB','MAR','APR','OCT','NOV','DEC']] - df2 = heating_season.T - - ''' - Assumptions: - Indoor Temperature = 24 'C - Air density = 0.0765 #lb/(cu ft) - Heat capacity of Air = 0.24 # btu/lb F - Air flow rate reduction for eache weatherstripped AC = 13 cfm - from the SWA study - ''' - - - density_air = 0.0765 #lb/(cu ft) - capacity_air = 0.24 # btu/lb F - - inflitration_reduce = existing_air_leakage_rating - proposed_air_leakage_rating - df2['monthly loss'] = '' - - for i in range(len(df2)): - df2['monthly loss'][i] = inflitration_reduce * (60 * 24 * 30.5 ) * density_air * capacity_air * (T_indoor - df2[0][i]) - - annual_loss = sum(df2['monthly loss'])/1000000 #MMBTU - annual_saving = annual_loss/ hs_overall_eff * fuel_price - payback = cost / annual_saving - - print('Annual heating demand reduction per sq ft (kBtu):',round(annual_loss,3)) - print('Savings/yr($):', round(annual_saving,3)) - print ('Simple payback:', round(payback,3)) - - return annual_loss,annual_saving,payback - - - - ''' - ''' - ac_weatherstripping_costs = 25 - - def weatherstripping_ac(hs_overall_eff,fuel_price, estimated_costs): - ''' - weather data for the average monthly temperature in New York - ''' - df2 = '' - weather_data = pd.read_csv('new-york-monthly-avg-temp-wind.csv') - heating_season = weather_data[['JAN','FEB','MAR','APR','OCT','NOV','DEC']] - df2 = heating_season.T - - ''' - the function is to calcuate the savings for a single weatherstripped AC unit - - ''' - - ''' - Assumptions: - Indoor Temperature = 24 'C - Air density = 0.0765 #lb/(cu ft) - Heat capacity of Air = 0.24 # btu/lb F - Air flow rate reduction for eache weatherstripped AC = 13 cfm - from the SWA study - ''' - - Tindoor = 24 - density_air = 0.0765 - capacity_air = 0.24 - - - - df2['air flow rate'] = '' - df2['monthly loss'] = '' - - for i in range(len(df2)): - - df2['air flow rate'][i] = 13 - df2['monthly loss'][i] = df2['air flow rate'][i] * (60 * 24 * 30.5 ) * density_air * capacity_air * (Tindoor - df2[0][i]) - - print(df2) - - - annual_loss = sum(df2['monthly loss'])/1000000 #MMBTU - annual_saving = annual_loss/ hs_overall_eff * fuel_price - payback = estimated_costs / annual_saving - - - print('Annual heating demand reduction (MMBtu):', round(annual_loss,3)) - print('Savings/yr($):', round(annual_saving,3)) - print ('Simple payback:', round(payback,3)) - - return annual_loss, annual_saving,payback - -- GitLab From 5db515f32d8201acb6f5dbec9ce0f094d12abffc Mon Sep 17 00:00:00 2001 From: Doris Han Date: Thu, 27 Apr 2017 00:25:03 -0400 Subject: [PATCH 4/5] change the temp from C to F --- bpeng/ecm/weatherstripping.py | 42 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/bpeng/ecm/weatherstripping.py b/bpeng/ecm/weatherstripping.py index a044c10..93b7a07 100644 --- a/bpeng/ecm/weatherstripping.py +++ b/bpeng/ecm/weatherstripping.py @@ -16,8 +16,8 @@ def weatherstripping_window_doors(weather, hs_overall_eff, fuel_price, cost, ]] df2 = heating_season.T - density_air = 0.0765 #lb/(cu ft) - capacity_air = 0.24 # btu/lb F + density_air = 0.0765 # lb/(cu ft) + capacity_air = 0.24 # btu/lb F inflitration_reduce = existing_air_leakage_rating - proposed_air_leakage_rating df2['monthly loss'] = '' @@ -27,20 +27,19 @@ def weatherstripping_window_doors(weather, hs_overall_eff, fuel_price, cost, 60 * 24 * 30.5) * density_air * capacity_air * ( T_indoor - df2[0][i]) - annual_loss = sum(df2['monthly loss']) / 1000000 #MMBTU - annual_saving = annual_loss / hs_overall_eff * fuel_price - payback = cost / annual_saving + annual_loss = (sum(df2['monthly loss']) / 1000000) # MMBTU + annual_saving = (annual_loss / hs_overall_eff * fuel_price) + payback = (cost / annual_saving) - print('Annual heating demand reduction per sq ft (kBtu):', - round(annual_loss, 3)) - print('Savings/yr($):', round(annual_saving, 3)) - print('Simple payback:', round(payback, 3)) + # print('Annual heating demand reduction per sq ft (kBtu):', + # annual_loss) + # print('Savings/yr($):', round(annual_saving, 2)) + # print('Simple payback:', round(payback, 2)) return annual_loss, annual_saving, payback - -def weatherstripping_ac(weather, hs_overall_eff, fuel_price, estimated_costs,Tindoor): +def weatherstripping_ac(weather, hs_overall_eff, fuel_price, estimated_costs, T_indoor): """ the function is to calcuate the savings for a single weatherstripped AC unit @@ -52,11 +51,11 @@ def weatherstripping_ac(weather, hs_overall_eff, fuel_price, estimated_costs,Tin Air flow rate reduction for eache weatherstripped AC = 13 cfm - from the SWA study """ - weather_data = pd.DataFrame(weather,index=[0]) + weather_data = pd.DataFrame(weather, index=[0]) heating_season = weather_data[[ 'JAN', 'FEB', 'MAR', 'APR', 'OCT', 'NOV', 'DEC' ]] - df2=heating_season.T + df2 = heating_season.T density_air = 0.0765 capacity_air = 0.24 @@ -64,21 +63,20 @@ def weatherstripping_ac(weather, hs_overall_eff, fuel_price, estimated_costs,Tin df2['air flow rate'] = '' df2['monthly loss'] = '' - for i in range(len(df2)): df2['air flow rate'][i] = 13 df2['monthly loss'][i] = df2['air flow rate'][i] * ( 60 * 24 * 30.5) * density_air * capacity_air * ( - Tindoor - df2[0][i]) + T_indoor - df2[0][i]) - annual_loss = sum(df2['monthly loss']) / 1000000 - annual_saving = annual_loss / hs_overall_eff * fuel_price # - payback = estimated_costs / annual_saving + annual_loss = sum(df2['monthly loss']) / 1000000 # MMBTU + annual_saving = annual_loss / hs_overall_eff * fuel_price # $ + payback = estimated_costs / annual_saving # simple payback - print('Annual heating demand reduction (MMBtu):', round( - annual_loss, 3)) - print('Savings/yr($):', round(annual_saving, 3)) - print('Simple payback:', round(payback, 3)) + # print('Annual heating demand reduction (MMBtu):', round( + # annual_loss, 2)) + # print('Savings/yr($):', round(annual_saving, 2)) + # print('Simple payback:', round(payback, 2)) return annual_loss, annual_saving, payback -- GitLab From 9f1fb63fadb2adea7683c6ae4ddcaa499949b48c Mon Sep 17 00:00:00 2001 From: Doris Han Date: Thu, 27 Apr 2017 00:26:39 -0400 Subject: [PATCH 5/5] test file for weatherstripping savings cal --- bpeng/tests/test_ecmsavings.py | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 bpeng/tests/test_ecmsavings.py diff --git a/bpeng/tests/test_ecmsavings.py b/bpeng/tests/test_ecmsavings.py new file mode 100644 index 0000000..b0b29d1 --- /dev/null +++ b/bpeng/tests/test_ecmsavings.py @@ -0,0 +1,67 @@ +from bpeng.ecm.weatherstripping import weatherstripping_ac, weatherstripping_window_doors + + +""" +The overall efficiency of Heating system should be paased from utility bill and energy plus simulation result +The default value is listing below: + +heating_system_overall_eff = float(0.5) +fuel_price = 12 + +Estimated costs for install a single window weahterstripping(3'*6') - for $48 + +window_weatherstripping_costs = 48 +single_window_area = 18 +existing_air_leakage_rating_window = 0.6 #cfm/sq ft +proposed_air_leakage_rating_window = 0.25 # cfm/ sq ft + +""" + +avg_temp = { + "JAN": 32.9, + "FEB": 34.7, + "MAR": 42.8, + "APR": 52.7, + "MAY": 62.6, + "JUN": 71.6, + "JUL": 76.1, + "AUG": 75.2, + "SEP": 77.0, + "OCT": 57.2, + "NOV": 47.3, + "DEC": 37.4 + } + +T_indoor = 75 # F +ac_weatherstripping_costs = 25 # $ +hs_overall_eff = 0.5 +fuel_price = 12 # per MMBTU + +""" weatherstripping for windows """ +window_costs = 2.8 # $/ sq ft +existing_air_leakage_rating_window = 0.6 # cfm/ sq ft +proposed_air_leakage_rating_window = 0.25 # cfm/ sq ft + +""" weatherstripping for exterior door """ +door_costs = 3 # $/ sq ft +existing_air_leakage_rating_door = 0.8 # cfm/ sq ft# +proposed_air_leakage_rating_door = 0.45 # cfm/ sq ft + + +def test_weatherstripping(): + + result_ac = weatherstripping_ac(avg_temp, hs_overall_eff, fuel_price, ac_weatherstripping_costs, T_indoor) + + result_window = weatherstripping_window_doors(avg_temp, hs_overall_eff, fuel_price, + window_costs, T_indoor, + existing_air_leakage_rating_window, + proposed_air_leakage_rating_window) + + result_door = weatherstripping_window_doors(avg_temp, hs_overall_eff, fuel_price, + door_costs, T_indoor, + existing_air_leakage_rating_door, + proposed_air_leakage_rating_door) + + print('weatherstripping AC', result_ac) + print('weatherstripping windows', result_window) + print('weatherstripping door', result_door) -- GitLab