-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
275 lines (266 loc) · 12.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link href="styles.css" rel="stylesheet">
<title>Will a Heat Pump Save Money?</title>
</head>
<body>
<div class="container">
<h1>Will a Heat Pump Save Money?</h1>
<hr/>
<h2>Is using a heat pump cheaper than other sources of heat?</h2>
<form>
<div class="mb-3">
<label for="existing" class="form-label">Heating Method</label>
<select aria-label="" class="form-select" id="existing" onchange="setExisting()">
<option value="" selected></option>
<option value="3">Electric Resistance</option>
<option value="0">Natural Gas</option>
<option value="2">Oil</option>
<option value="1">Propane</option>
</select>
</div>
<div class="row mb-3" id="existingPrice">
<div class="col">
<label for="price" class="form-label">Price per unit of fuel</label>
<input type="text" class="form-control" id="price" aria-describedby="priceHelp"
oninput="calculateCOP()"
>
<div id="priceHelp" class="form-text">Enter price in dollars.</div>
</div>
<div class="col">
<label for="unit" class="form-label">Unit</label>
<select id="unit" class="form-select" aria-label=""
onchange="calculateCOP()">
<option class="hidden" id="emptyOption" selected></option>
<option class="hidden" id="m3" value="m3">Cubic Meter (m³)</option>
<option class="hidden" id="therm" value="therm">Therm</option>
<option class="hidden" id="ft3" value="ft3">Cubic foot (ft³)</option>
<option class="hidden" id="L" value="L">Litre</option>
<option class="hidden" id="gal" value="gal">US gallon</option>
</select>
</div>
</div>
<div class="mb-3" id="existingFurnace">
<label for="efficiency" class="form-label">Furnace Efficiency (%)</label>
<input type="text" class="form-control" id="efficiency" aria-describedby="efficiencyHelp"
oninput="calculateCOP()">
<div id="efficiencyHelp" class="form-text">For example 95%</div>
</div>
<hr>
<div class="mb-3">
<label for="electricity_price" class="form-label">Electricity Price</label>
<input type="text" class="form-control" id="electricity_price" aria-describedby="electricity_priceHelp"
oninput="calculateCOP()">
<div id="electricity_priceHelp" class="form-text">Enter price in dollars. Ex. $0.10 per kWh</div>
</div>
<div class="row">
<div class="col">
<label for="seer2" class="form-label">Current Air Conditioner SEER/SEER2</label>
<input type="text" class="form-control" id="seer2" aria-describedby="seer2Help"
oninput="calculateCOP()">
<div id="seer2Help" class="form-text">Seasonal energy efficiency ratio.</div>
</div>
</div>
<div class="row">
<div class="col">
<label for="heatPumpSEER2" class="form-label">New Heat Pump Cooling Performance</label>
<input type="text" class="form-control" id="heatPumpSEER2" aria-describedby="heatPumpSEER2Help" oninput="calculateCOP()">
<div id="heatPumpSEER2Help" class="form-text">Heat pump specification used to calculate cooling output.</div>
</div>
<div class="col">
<label for="heatPumpSEER2Unit" class="form-label">Unit</label>
<select id="heatPumpSEER2Unit" class="form-select" aria-label="" onchange="calculateCOP()">
<option selected></option>
<option value="COP">COP</option>
<option value="SEER2">SEER/SEER2</option>
</select>
</div>
</div>
<div class="row">
<div class="col">
<label for="heatPump" class="form-label">New Heat Pump Heating Performance</label>
<input type="text" class="form-control" id="heatPump" aria-describedby="heatPumpHelp" oninput="calculateCOP()">
<div id="heatPumpHelp" class="form-text">Heat pump specification used to calculate heat output.</div>
</div>
<div class="col">
<label for="heatPumpUnit" class="form-label">Unit</label>
<select id="heatPumpUnit" class="form-select" aria-label="" onchange="calculateCOP()">
<option selected></option>
<option value="COP">COP</option>
<option value="HSPF">HSPF</option>
</select>
</div>
</div>
<div class="row">
<p>Cooling from the heat pump will cost <span id="acCostMultiplier" class="fw-bold"></span>.</p>
<p>Heat from the heat pump will cost <span id="costMultiplier" class="fw-bold"></span>.</p>
<p>The heat pump is cheaper as long as the COP is larger than <span id="cop" class="fw-bold"></span>.</p>
<p>Check at which temperature the heat pump has a larger COP.</p>
</div>
<h2>But that's per unit of heat, how much heat do I need? How much will I actually save?</h2>
<div class="row">
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="fuelUsageTab" data-bs-toggle="tab" href="#fuelUsage" role="tab" aria-controls="fuelUsage" aria-selected="true">
Fuel Usage
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="heatLossTab" data-bs-toggle="tab" href="#heatLossTabContent" role="tab" aria-controls="heatLossTabContent" aria-selected="false">
Heat Loss
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="fuelUsage" role="tabpanel" aria-labelledby="fuelUsageTab">
<div class="row">
<div class="col">
<label for="fuelUsed" class="form-label">Amount of fuel used last winter</label>
<input type="text" class="form-control" id="fuelUsed" aria-describedby="fuelUsedHelp"
oninput="calculateCOP()">
<div id="fuelUsedHelp" class="form-text">
This is using the same unit as selected above.
</div>
</div>
</div>
<div class="row">
<span id="seasonalSavings" class="fw-bold"></span>
</div>
</div>
<div class="tab-pane fade show" id="heatLossTabContent" role="tabpanel" aria-labelledby="heatLossTab">
<div class="row">
<div class="col">
<label for="heatLoss" class="form-label">Heat Loss</label>
<input type="text" class="form-control" id="heatLoss" aria-describedby="heatLossHelp"
oninput="calculateCOP()">
<div id="heatLossHelp" class="form-text">
The amount of heat the building loses every hour at the design temperature.
Or the amount of heat that needs to be produced every hour at the design temperature.
Design temperature is the coldest temperature that will be seen for 1% of the year or 88 hours on average.
99% of the time it will be warmer than this.
</div>
</div>
<div class="col">
<label for="heatLossUnit" class="form-label">Unit</label>
<select id="heatLossUnit" class="form-select" aria-label="" onchange="calculateCOP()">
<option selected></option>
<option value="kWh">kWh</option>
<option value="BTUh">BTUh</option>
</select>
</div>
</div>
<div class="row">
<p>Hourly Savings: $<span id="hourlyDifference"></span></p>
<p>Monthly Savings: $<span id="monthlyDifference"></span></p>
</div>
<div class="row">
<label for="city" class="form-label">City</label>
<input class="form-control" list="cityOptions" id="city" placeholder="Type to search city..." oninput="calculateCOP()">
<datalist id="cityOptions">
</datalist>
</div>
<div class="row">
<table class="table table-sm">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Average Temperature</th>
<th scope="col">Heating?</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td id="m_0"></td>
<td id="mh_0"></td>
</tr>
<tr>
<td>February</td>
<td id="m_1"></td>
<td id="mh_1"></td>
</tr>
<tr>
<td>March</td>
<td id="m_2"></td>
<td id="mh_2"></td>
</tr>
<tr>
<td>April</td>
<td id="m_3"></td>
<td id="mh_3"></td>
</tr>
<tr>
<td>May</td>
<td id="m_4"></td>
<td id="mh_4"></td>
</tr>
<tr>
<td>June</td>
<td id="m_5"></td>
<td id="mh_5"></td>
</tr>
<tr>
<td>July</td>
<td id="m_6"></td>
<td id="mh_6"></td>
</tr>
<tr>
<td>August</td>
<td id="m_7"></td>
<td id="mh_7"></td>
</tr>
<tr>
<td>September</td>
<td id="m_8"></td>
<td id="mh_8"></td>
</tr>
<tr>
<td>October</td>
<td id="m_9"></td>
<td id="mh_9"></td>
</tr>
<tr>
<td>November</td>
<td id="m_10"></td>
<td id="mh_10"></td>
</tr>
<tr>
<td>December</td>
<td id="m_11"></td>
<td id="mh_11"></td>
</tr>
</tbody>
</table>
<div class="form-text">Temperature data is from https://www.kaggle.com/datasets/swapnilbhange/average-temperature-of-cities</div>
</div>
<div class="row">
<p>Number of Heating Months: <span id="numHeatingMonths"></span></p>
<p>Yearly Savings: $<span id="yearlyDifference"></span></p>
</div>
</div>
</div>
</div>
<div class="row">
<label for="heatPumpCost" class="form-label">Heat Pump Installation Cost</label>
<input type="text" class="form-control" id="heatPumpCost" aria-describedby="heatPumpCostHelp" oninput="calculateCOP()">
<div id="heatPumpCostHelp" class="form-text">Cost to install heat pump.</div>
</div>
<div class="row">
<label for="otherCost" class="form-label">Other Heating Installation Cost</label>
<input type="text" class="form-control" id="otherCost" aria-describedby="otherCostHelp" oninput="calculateCOP()">
<div id="otherCostHelp" class="form-text">Cost to install other heating source (ex. furnance).</div>
</div>
<div class="row">
<p id="breakEvenParagraph">After <span id="breakEvenYear" class="fw-bold"></span> years the cost of the heat pump will break even, after that you are saving money. Will the heat pump last that long?</p>
</div>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<script src="temperatureDataSet.js"></script>
<script src="calc.js"></script>
</body>
</html>