-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
1105 lines (1065 loc) · 59.9 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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<script type="text/javascript" src="openBEM/datasets.js?v=3"></script>
<script type="text/javascript" src="openBEM/openBEM.js?v=4"></script>
<script type="text/javascript" src="topgraphic/topgraphic.js?v=3"></script>
<link rel="stylesheet" type="text/css" href="style.css?v=4" />
<html lang="en">
<meta charset="utf-8">
<body>
<div class="page">
<i>See linked resources at the bottom for more information on how to use this tool</i>
<br><br>
<div class='section'>
<div class='section-heading'>
<b>SAPjs</b>
<button class="btn save">Save</button>
<button class="btn open" onclick="document.getElementById('open').click()">Open</button>
<input type="file" id="open" style="display:none" accept="application/json"/>
<button class="btn new">New</button>
</div>
</div>
<div class='section'>
<div class="room-elements">
<div id="topgraphic"></div>
</div>
</div>
<div id="sap">
<div id="heatloss">
<!------------------------------------------------------------------------------------>
<!-- Location -->
<!------------------------------------------------------------------------------------>
<div class='section'>
<div class='section-heading' @click="toggleSection('LDO')"><b>Location, Dimensions and Occupancy</b></div>
<div class="room-elements hide" name="LDO">
<table style="margin-bottom: 5px;">
<tr><td>Project Name</td><td><input type="text" v-model="data.project_name" ></td></tr>
</table>
<table>
<tr>
<td>Region</td>
<td>
<select v-model="data.region" @change="update">
<option v-for="(region,index) in datasets.regions" v-bind:value="index">{{ region }}</option>
</select>
</td>
</tr>
<tr>
<td>Altitude</td>
<td style="width: 120px;"><input style="width: 60%" v-model.number="data.altitude" @change="update" /><span class="unit">m</span></td>
</tr>
</table>
<br>
<table>
<tr>
<th>Name</th>
<th>Area</th>
<th>Height</th>
<th>Volume</th>
<th style="width:20px"></th>
</tr>
<tr v-for="(floor,index) in data.floors">
<td><input style="width:200px" v-model="floor.name" @change="update" /> </td>
<td><input style="width:60px" v-model.number="floor.area" @change="update" /> <span class="unit">m2</span></td>
<td><input style="width:60px" v-model.number="floor.height" @change="update" /> <span class="unit">m</span></td>
<td>{{ floor.volume | toFixed(1) }} <span class="unit">m3</span></td>
<td><img src="icons/glyphicons-17-bin.png" class="icon" @click="deleteFloor(index)" /></td>
</tr>
<tr>
<td><div style="cursor:pointer" @click="addFloor"><img src="icons/glyphicons-191-plus-sign.png" class="icon" />Add Floor</div></td>
</tr>
</table>
<br>
<table>
<tr><td>Total floor area</td><td style="width: 120px;">{{ data.TFA | toFixed(1) }} <span class="unit">m2</span></td></tr>
<tr><td>Total volume</td><td style="width: 120px;">{{ data.volume | toFixed(1) }} <span class="unit">m3</span></td></tr>
</table>
<br>
<table>
<tr>
<td>Floor area based occupancy</td>
<td style="width: 120px;">{{ data.sap_occupancy | toFixed(2) }} <span class="unit">people</span></td>
</tr>
<tr>
<td>Use custom occupancy</td>
<td>
<input type="checkbox" v-model="data.use_custom_occupancy" @change="update" style="width:auto">
</td>
</tr>
<tr>
<td>Custom occupancy</td>
<td style="width: 120px;"><input style="width:35px" v-model.number="data.custom_occupancy" @change="update" /><span class="unit">people</span></td>
</tr>
</table>
</div>
</div>
<!------------------------------------------------------------------------------------>
<!-- Fabric -->
<!------------------------------------------------------------------------------------>
<div class='section'>
<div class='section-heading' @click="toggleSection('fabric')"><b>Fabric</b></div>
<div class="room-elements hide" name="fabric">
<!------------------------------------------------->
<table style="width:70%">
<tr>
<th>Element type</th>
<th>Category</th>
<th title="Thermal transmittance (W/m2K)">U-value</th>
<th title="Heat capacity factor (kJ/m2.K) p138-140">K</th>
<th title="Window solar energy transmittance p162">g⊥</th>
<th title="Window light transmittance p162">gL</th>
<th title="Window frame factor p162">ff</th>
<th style="width:17px"></th>
</tr>
<tr v-for="(item,key) in data.fabric.library">
<td>{{ key }}</td>
<td><select v-model="item.type" @change="update">
<option v-for="type in ['wall','party_wall','floor','loft','window']">{{ type }}</option>
</select></td>
<td><input style="width:35px" v-model.number="item.uvalue" @change="update" /></td>
<td><input style="width:35px" v-model.number="item.kvalue" @change="update" /></td>
<td><input style="width:35px" v-model.number="item.g" @change="update" v-if="item.type=='window'" /></td>
<td><input style="width:35px" v-model.number="item.gL" @change="update" v-if="item.type=='window'" /></td>
<td><input style="width:35px" v-model.number="item.ff" @change="update" v-if="item.type=='window'" /></td>
<td><img src="icons/glyphicons-17-bin.png" class="icon" @click="deleteFabricLibraryItem(key)" /></td>
</tr>
<tr>
<td><input v-model="tmp.new_element_type_name" style="width:120px" placeholder="Element type..." /></td>
<td><div style="cursor:pointer" @click="addFabricLibraryItem"><img src="icons/glyphicons-191-plus-sign.png" class="icon" />Add Element Type</div></td>
</tr>
</table>
<br>
<table>
<tr>
<th style="width:0">ID</th>
<th>Type</th>
<th>Length</th>
<th>Height</th>
<th title="Net area (After subtracting windows if applicable)">Area</th>
<th title="Subtract window from wall (Windows only)" class="center"><img src="icons/window.png" class="icon" style="padding:0px; width:18px" /></th>
<th title="Perimeter (Floors only)" class="center"><img src="icons/perimeter.png" class="icon" style="padding:0px; width:18px" /></th>
<th title="Orientation (Windows only)" class="center"><img src="icons/compass2.png" class="icon" style="padding:0px; width:18px" /></th>
<th title="Overshading (Windows only)" class="center"><img src="icons/overshading.png" class="icon" style="padding:0px; width:18px" /></th>
<th title="U-value">U</th>
<th title="Heat loss rate">W/K</th>
<th style="width:20px"></th>
</tr>
<tr v-for="(element,index) in data.fabric.elements">
<td><input style="width:120px" v-model="element.id" @change="update" /></td>
<td><select v-model="element.lib" @change="update">
<option v-for="(item,key) in data.fabric.library">{{ key }}</option>
</select></td>
<td><input style="width:35px" v-model.number="element.l" @change="update" /> <span class="unit">m</span></td>
<td><input style="width:35px" v-model.number="element.h" @change="update" /> <span class="unit">m</span></td>
<td>{{ element.netarea | toFixed(1) }} <span class="unit">m2</span></td>
<td><select v-if="element.type=='window'" v-model="element.subtractfrom" @change="update">
<option v-for="item in data.fabric.elements" v-if="item.type=='wall' || item.type=='roof' || item.type=='loft'">{{ item.id }}</option>
</select></td>
<td><span v-if="element.type=='floor'"><input style="width:35px" v-model.number="element.perimeter" @change="update" /> <span class="unit">m</span></span></td>
<!-- Orientation -->
<td><select class="center" v-if="element.type=='window'" v-model="element.orientation" @change="update">
<option v-for="(item,index) in ['(N)','(NE/NW)','(E/W)','(SE/SW)','(S)']" v-bind:value="index">{{ item }}</option>
</select></td>
<!-- Overshading -->
<td><select class="center" v-if="element.type=='window'" v-model="element.overshading" @change="update">
<option v-for="(item,index) in {'0':'>80%','1':'60%-80%','2':'20%-60%','3':'<20%'}" v-bind:value="index">{{ item }}</option>
</select></td>
<td>{{ element.uvalue }}</td>
<td>{{ element.wk | toFixed(1) }} <span class="unit">W/K</span></td>
<td><img src="icons/glyphicons-17-bin.png" class="icon" @click="deleteFabricElement(index)" /></td>
</tr>
<tr>
<td><div style="cursor:pointer" @click="addFabricElement" v-if="Object.keys(data.fabric.library).length>0"><img src="icons/glyphicons-191-plus-sign.png" class="icon" />Add Element</div></td>
</tr>
</table>
<br>
<div class="heading">Thermal Mass Parameter (TMP)</div>
<table>
<tr>
<td width="65%">Use global TMP value (ignore the k value of individual elements)</td>
<td><input type="checkbox" v-model="data.fabric.global_TMP" @change="update"></td>
<td v-if="data.fabric.global_TMP">
<select v-model="data.fabric.global_TMP_value">
<option value="100">Low TMP</option>
<option value="250">Medium TMP</option>
<option value="450">High TMP</option>
</select>
</td>
</tr>
</table>
<br>
<div class="heading">Thermal Bridging</div>
<table>
<tr>
<td width="65%">Total External Area</td>
<td>{{ data.fabric.total_external_area | toFixed(2) }} <span class="unit">m2</span></td>
</tr>
<tr>
<td>Thermal bridging heat loss factor (y) p76</td>
<td><input style="width:40px" v-model.number="data.fabric.thermal_bridging_yvalue" @change="update" /> <span class="unit">W/m2.K</span></td>
</tr>
<tr>
<td>Thermal bridging heat loss</td>
<td>{{ data.fabric.thermal_bridging_heat_loss | toFixed(2) }} <span class="unit">W/K</span></td>
</tr>
</table>
<br>
<div class="heading">Totals</div>
<table>
<tr><td width="65%">Total fabric heat loss</td><td>{{ data.fabric.total_heat_loss_WK | toFixed(2) }} <span class="unit">W/K</span></td></tr>
<tr><td>Ventilation heat loss</td><td>{{ data.ventilation.average_WK | toFixed(2) }} <span class="unit">W/K</span></td></tr>
<tr><td>Total W/K heat loss</td><td>{{ data.totalWK | toFixed(2) }}</span> <span class="unit">W/K</span></td></tr>
<tr><td>Total fabric thermal capacity</td><td>{{ data.fabric.total_thermal_capacity | toFixed(2) }} <span class="unit">kJ/K.m3</span></td></tr>
<tr><td>Annual solar gains</td><td>{{ data.fabric.annual_solar_gain | toFixed(2) }} W ({{ data.fabric.annual_solar_gain_kwh | toFixed(2) }} <span class="unit">kWh</span>)</td></tr>
</table>
</div>
</div>
<!------------------------------------------------------------------------------------>
<!-- Ventilation -->
<!------------------------------------------------------------------------------------>
<div class='section'>
<div class='section-heading' @click="toggleSection('ventilation')"><b>Ventilation</b></div>
<div class="room-elements hide" name="ventilation">
<table style="width:50%; float:left">
<tr>
<td style="width:60%">Ventilation Type</td>
<td>
<select v-model="data.ventilation.ventilation_type" @change="update">
<option v-for="(name,index) in datasets.ventilation_types" v-bind:value="index">{{ name }}</option>
</select>
</td>
</tr>
<tr>
<td>Dwelling construction</td>
<td>
<select v-model="data.ventilation.dwelling_construction" @change="update">
<option value="masonry">Masonry (+0.35 ACH)</option>
<option value="timberframe">Timber frame (+0.25 ACH)</option>
</select>
</td>
</tr>
<tr>
<td>Suspended wooden floor</td>
<td>
<select v-model="data.ventilation.suspended_wooden_floor" @change="update">
<option value="0">n/a</option>
<option value="sealed">Sealed (+0.1 ACH)</option>
<option value="unsealed">Unsealed (0.2 ACH)</option>
</select>
</td>
</tr>
<tr>
<td>Draught lobby</td>
<td>
<input type="checkbox" v-model="data.ventilation.draught_lobby" @change="update" style="width:auto">
</td>
</tr>
<tr>
<td>Percentage draught proofed</td>
<td><input style="width:35px" v-model.number="data.ventilation.percentage_draught_proofed" @change="update" /> <span class="unit">%</span></td>
</tr>
<tr>
<td>Structural infiltration</td>
<td>{{ data.ventilation.structural_infiltration | toFixed(2) }} <span class="unit">ACH</span></td>
</tr>
<tr>
<td>Number of sides sheltered</td>
<td><input style="width:35px" v-model.number="data.ventilation.number_of_sides_sheltered" @change="update" /> <span class="unit">sides</span></td>
</tr>
<tr><td>Shelter factor:</td><td>{{ data.ventilation.shelter_factor | toFixed(3) }}</td></tr>
</table>
<table style="width:40%; margin-left:20px; float:left">
<tr>
<td>Use air permeability test result</td>
<td>
<input type="checkbox" v-model="data.ventilation.air_permeability_test" @change="update" style="width:auto">
</td>
</tr>
<tr>
<td>Air permeability value</td>
<td><input style="width:35px" v-model.number="data.ventilation.air_permeability_value" @change="update" /> <span class="unit"></span></td>
</tr>
</div>
<table style="width:40%; margin-left:20px; margin-top:20px; float:left" v-if="data.ventilation.ventilation_type=='DEV' || data.ventilation.ventilation_type=='MV' || data.ventilation.ventilation_type=='MEV' || data.ventilation.ventilation_type=='MVHR'">
<tr>
<td>System air change rate</td>
<td><input style="width:35px" v-model.number="data.ventilation.system_air_change_rate" @change="update" /> <span class="unit">AC/h</span></td>
</tr>
<tr>
<td>Balanced heat recovery efficiency</td>
<td><input style="width:35px" v-model.number="data.ventilation.balanced_heat_recovery_efficiency" @change="update" /> <span class="unit">%</span></td>
</tr>
<tr>
<td>System specific fan power</td>
<td><input style="width:35px" v-model.number="data.ventilation.system_specific_fan_power" @change="update" /> <span class="unit">W/m3</span></td>
</tr>
</table>
<div style="clear:both"></div>
<br>
<div class="heading">Intentional vents and flues</div>
<table>
<tr>
<th>Name</th>
<th>Ventilation rate (p10, section 2)</th>
<th style="width:20px"></th>
</tr>
<tr v-for="(item,index) in data.ventilation.IVF">
<td><input v-model="item.name" @change="update" /></td>
<td><input style="width:60px" v-model.number="item.ventilation_rate" @change="update" /> <span class="unit"></span></td>
<td><img src="icons/glyphicons-17-bin.png" class="icon" @click="deleteIVF(index)" /></td>
</tr>
<tr>
<td><div style="cursor:pointer" @click="addIVF"><img src="icons/glyphicons-191-plus-sign.png" class="icon" />Add ventilation point</div></td>
</tr>
</table>
<div v-if="data.ventilation.ventilation_type=='NV' || data.ventilation.ventilation_type=='IE' || data.ventilation.ventilation_type=='PS'">
<br>
<div class="heading">Extract ventilation points</div>
<table>
<tr>
<th>Name</th>
<th>Ventilation rate (p10, section 2)</th>
<th style="width:20px"></th>
</tr>
<tr v-for="(item,index) in data.ventilation.EVP">
<td><input v-model="item.name" @change="update" /></td>
<td><input style="width:60px" v-model.number="item.ventilation_rate" @change="update" /> <span class="unit"></span></td>
<td><img src="icons/glyphicons-17-bin.png" class="icon" @click="deleteEVP(index)" /></td>
</tr>
<tr>
<td><div style="cursor:pointer" @click="addEVP"><img src="icons/glyphicons-191-plus-sign.png" class="icon" />Add ventilation point</div></td>
</tr>
</table>
</div>
<br>
<table>
<tr><td>Infiltration rate:</td><td>{{ data.ventilation.infiltration_rate | toFixed(2) }} <span class="unit">ACH</span></td></tr>
<tr><td>Infiltration rate incorporating shelter factor:</td><td>{{ data.ventilation.infiltration_rate_incorp_shelter_factor | toFixed(2) }} <span class="unit">ACH</span></td></tr>
</table>
<br>
<div class="heading">Wind modified (ACH x wind speed / 4.0)</div>
<table>
<tr><th style="width:100px"></th><th>Jan</th><th>Feb</th><th>Mar</th><th>Apr</th><th>May</th><th>Jun</th><th>Jul</th><th>Aug</th><th>Sep</th><th>Oct</th><th>Nov</th><th>Dec</th><th>Annual</th></tr>
<tr>
<td>Wind speeds</td>
<td v-for="item in data.ventilation.wind_speeds">{{ item | toFixed(2) }} <span class="unit">m/s</span></td>
</tr>
<tr>
<td>Effective air change rate</td>
<td v-for="item in data.ventilation.effective_air_change_rate">{{ item | toFixed(2) }} <span class="unit">ACH</span></td>
</tr>
</table>
</div>
</div>
<!------------------------------------------------------------------------------------>
<!-- Space heating -->
<!------------------------------------------------------------------------------------>
<div class='section'>
<div class='section-heading' @click="toggleSection('Temperature')"><b>Space heating</b></div>
<div class="room-elements hide" name="Temperature">
<table>
<tr>
<td style="width:50%">Target temperature</td>
<td><input v-model.number="data.temperature.target" @change="update" style="width:50px"> <span class="unit">C</span></td>
</tr>
<tr>
<td>Living area</td>
<td><input v-model.number="data.temperature.living_area" @change="update" style="width:50px"> <span class="unit">m2</span></td>
</tr>
<tr>
<td>Heating hours off weekday</td>
<td><input v-model="data.temperature.hours_off.weekday" @change="update_hoursoff" style="width:50px"> <span class="unit"></span></td>
</tr>
<tr>
<td>Heating hours off weekend</td>
<td><input v-model="data.temperature.hours_off.weekend" @change="update_hoursoff" style="width:50px"> <span class="unit"></span></td>
</tr>
<tr>
<td>Heating off during summer</td>
<td>
<input type="checkbox" v-model="data.space_heating.heating_off_summer" @change="update" style="width:auto">
</td>
</tr>
<tr>
<td>Use utilisation factor for gains</td>
<td>
<input type="checkbox" v-model="data.space_heating.use_utilfactor_forgains" @change="update" style="width:auto">
</td>
</tr>
<tr>
<td>Enter custom monthly internal temperature values:</td>
<td>
<input type="checkbox" v-model="data.use_custom_internal_temperature" @change="update" style="width:auto">
</td>
</tr>
<tr>
<td>Enter custom monthly external temperature values:</td>
<td>
<input type="checkbox" v-model="data.use_custom_external_temperature" @change="update" style="width:auto">
</td>
</tr>
</table>
<br>
<div class="heading">Monthly temperatures</div>
<table>
<tr><th style="width:100px"></th><th>Jan</th><th>Feb</th><th>Mar</th><th>Apr</th><th>May</th><th>Jun</th><th>Jul</th><th>Aug</th><th>Sep</th><th>Oct</th><th>Nov</th><th>Dec</th><th>Annual</th></tr>
<tr style="background-color:#ffeeed" v-if="!data.use_custom_internal_temperature">
<td>Living area</td>
<td v-for="item in data.mean_internal_temperature.m_i_t_living_area">{{ item | toFixed(1) }} <span class="unit">°C</span></td>
<td>{{ data.annual_m_i_t_living_area | toFixed(1) }} <span class="unit">°C</span></td>
</tr>
<tr style="background-color:#fff5f2" v-if="!data.use_custom_internal_temperature">
<td>Whole house</td>
<td v-for="item in data.internal_temperature">{{ item | toFixed(1) }} <span class="unit">°C</span></td>
<td>{{ data.annual_internal_temperature | toFixed(1) }} <span class="unit">°C</span></td>
</tr>
<tr style="background-color:#ffeeed" v-else>
<td>Whole house</td>
<td v-for="(item,m) in data.custom_internal_temperature"><input type="text" v-model:value="data.custom_internal_temperature[m]" @change="update" style="width:85%"/></td>
<td>{{ data.annual_internal_temperature | toFixed(1) }} <span class="unit">°C</span></td>
</tr>
<tr style="background-color:#f2f6ff" v-if="!data.use_custom_external_temperature">
<td>Outside</td>
<td v-for="item in data.external_temperature">{{ item | toFixed(1) }} <span class="unit">°C</span></td>
<td>{{ data.annual_external_temperature | toFixed(1) }} <span class="unit">°C</span></td>
</tr>
<tr style="background-color:#f2f6ff" v-else>
<td>Outside</td>
<td v-for="(item,m) in data.custom_external_temperature"><input type="text" v-model:value="data.custom_external_temperature[m]" @change="update" style="width:85%"/></td>
<td>{{ data.annual_external_temperature | toFixed(1) }} <span class="unit">°C</span></td>
</tr>
<tr>
<td>Heat demand</td>
<td v-for="item in data.space_heating.heat_demand_kwh">{{ item | toFixed(0) }} <span class="unit">kWh</span></td>
<td>{{ data.space_heating.annual_heating_demand | toFixed(0) }} <span class="unit">kWh</span></td>
</tr>
</table>
<p>Space heating energy requirement: {{ data.space_heating.annual_heating_demand | toFixed(0) }} kWh</p>
</div>
</div>
<!------------------------------------------------------------------------------------>
<!-- Water heating -->
<!------------------------------------------------------------------------------------>
<div class='section'>
<div class='section-heading' @click="toggleSection('waterheating')"><b>Water Heating</b></div>
<div class="room-elements hide" name="waterheating">
<table>
<tr>
<td>Override annual energy content</td>
<td><input type="checkbox" v-model="data.water_heating.override_annual_energy_content" @change="update" style="width:auto"></td>
</tr>
<tr>
<td>Annual energy content</td>
<td>
<span v-if="data.water_heating.override_annual_energy_content">
<input v-model.number="data.water_heating.annual_energy_content" @change="update"> <span class="unit">kWh</span>
</span>
<span v-else>
{{ data.water_heating.annual_energy_content | toFixed(1) }} <span class="unit">kWh</span>
</span>
</td>
</tr>
<tr>
<td>Low water use design</td>
<td><input type="checkbox" v-model="data.water_heating.low_water_use_design" @change="update" style="width:auto"></td>
</tr>
</table>
<br>
<div v-if="!data.water_heating.all_instantaneous">
<div class="heading">Hot water storage</div>
<table>
<tr>
<td>Storage volume</td>
<td>
<input v-model.number="data.water_heating.storage_type.storage_volume" @change="update"> <span class="unit">L</span>
</td>
</tr>
<tr v-if="data.water_heating.primary_circuit_loss_flag">
<td>Hot water control type</td>
<td>
<select v-model="data.water_heating.hot_water_control_type" @change="update">
<option value="no_cylinder_thermostat">No cylinder thermostat</option>
<option>Cylinder thermostat, water heating not separately timed</option>
<option>Cylinder thermostat, water heating separately timed</option>
</select>
</td>
</tr>
<tr v-if="data.water_heating.primary_circuit_loss_flag">
<td>Pipework insulation</td>
<td>
<select v-model="data.water_heating.pipework_insulation" @change="update">
<option>Uninsulated primary pipework</option>
<option>First 1m from cylinder insulated</option>
<option>All accesible piperwok insulated</option>
<option>Fully insulated primary pipework</option>
</select>
</td>
</tr>
<tr>
<td>Storage loss factor known</td>
<td><input type="checkbox" v-model="data.water_heating.storage_type.declared_loss_factor_known" @change="update" style="width:auto"></td>
</tr>
<tr v-if="data.water_heating.storage_type.declared_loss_factor_known">
<td>Manufacturer loss factor (kWh/day)</td>
<td>
<input v-model.number="data.water_heating.storage_type.manufacturer_loss_factor" @change="update"><span class="unit">kWh/d</span>
</td>
</tr>
<tr v-if="data.water_heating.storage_type.declared_loss_factor_known">
<td>Temperature factor A (Table 2b, p139)</td>
<td>
<input v-model.number="data.water_heating.storage_type.temperature_factor_a" @change="update">
</td>
</tr>
<tr v-if="!data.water_heating.storage_type.declared_loss_factor_known">
<td>Loss factor (kWh/litre/day, Table 2, p138)</td>
<td>
<input v-model.number="data.water_heating.storage_type.loss_factor_b" @change="update">
</td>
</tr>
<tr v-if="!data.water_heating.storage_type.declared_loss_factor_known">
<td>Volume factor (Table 2a, p138)</td>
<td>
<input v-model.number="data.water_heating.storage_type.volume_factor_b" @change="update">
</td>
</tr>
<tr v-if="!data.water_heating.storage_type.declared_loss_factor_known">
<td>Temperature factor (Table 2b, p139)</td>
<td>
<input v-model.number="data.water_heating.storage_type.temperature_factor_b" @change="update">
</td>
</tr>
<tr>
<td>Contains dedicated solar storage or WWHRSs</td>
<td><input type="checkbox" v-model="data.water_heating.contains_dedicated_solar_storage_or_WWHRSs" @change="update" style="width:auto"></td>
</tr>
<tr>
<td>Solar water heating</td>
<td><input type="checkbox" v-model="data.water_heating.solar_water_heating" @change="update" style="width:auto"></td>
</tr>
<tr>
<td>Hot water store in dwelling</td>
<td><input type="checkbox" v-model="data.water_heating.hot_water_store_in_dwelling" @change="update" style="width:auto"></td>
</tr>
<tr>
<td>Community heating</td>
<td><input type="checkbox" v-model="data.water_heating.community_heating" @change="update" style="width:auto"></td>
</tr>
</table>
</div>
<p>Hot water energy requirement: {{ data.water_heating.annual_waterheating_demand | toFixed(0) }} kWh</p>
</div>
</div>
<!------------------------------------------------------------------------------------>
<!-- Heating Systems -->
<!------------------------------------------------------------------------------------>
<div class='section'>
<div class='section-heading' @click="toggleSection('heatingsystems')"><b>Heating Systems</b></div>
<div class="room-elements hide" name="heatingsystems">
<div v-for="(item,index) in data.heating_systems">
<div style="padding:10px; border:1px solid #ccc">
<div style="float:right"><img src="icons/glyphicons-17-bin.png" class="icon" @click="deleteHeatingSystem(index)" /></div>
<div class="heading">Heating system {{ index+1 }}</div>
<table style="width:48%; float:left">
<tr>
<th>Efficiency, fraction & fuel</th>
<th></th>
<tr>
<td>Name</td>
<td><input v-model="item.name" @change="update" style="width:150px"/></td>
</tr>
<tr>
<td>Provides</td>
<td><select v.model="item.provides" style="width:150px">
<option value="heating_and_water">Heating and hot water</option>
<option value="heating">Heating only</option>
<option value="water">Hot water only</option>
</select></td>
</tr>
<tr>
<td>Fraction of space heat provided (0-1)</td>
<td><input v-model.number="item.fraction_space" @change="update" style="width:30px"/></td>
</tr>
<tr>
<td>Fraction of water heat provided (0-1)</td>
<td><input v-model.number="item.fraction_water_heating" @change="update" style="width:30px"/></td>
</tr>
<tr>
<td>Summer/water efficiency</td>
<td><input v-model.number="item.summer_efficiency" @change="update" style="width:30px"/> <span class="unit">%</span></td>
</tr>
<tr>
<td>Winter/space efficiency</td>
<td><input v-model.number="item.winter_efficiency" @change="update" style="width:30px"/> <span class="unit">%</span></td>
</tr>
<tr>
<td>Fuel</td>
<td><select v-model="item.fuel" @change="update" style="width:150px">
<option v-for="(fuel,fuel_index) in data.fuels">{{ fuel_index }}</option>
</select></td>
</tr>
</table>
<table style="width:48%; float:left; margin-left:20px">
<tr>
<th>Temperature and Controls</th>
<th></th>
<tr>
<tr>
<td>Main space heating system</td>
<td><select v.model="item.main_space_heating_system" style="width:150px">
<option value="mainHS1">Main heating system</option>
<option value="mainHS2_whole_house">Secondary heating system whole house</option>
<option value="mainHS2_part_of_the_house">Secondary heating system part of house</option>
</select></td>
</tr>
<tr>
<td>Responsiveness<br>(0: low, 1: high, SAP:Table 4d)</td>
<td><input v-model.number="item.responsiveness" @change="update" style="width:30px"/></td>
</tr>
<tr>
<td>Controls (1, 2 or 3, see: SAP:Table 4e)</td>
<td><input v-model.number="item.heating_controls" @change="update" style="width:30px"/></td>
</tr>
<tr>
<td>Temperature Adjustment (SAP:Table 4e)</td>
<td><input v-model.number="item.temperature_adjustment" @change="update" style="width:30px"/> <span class="unit">C</span></td>
</tr>
</table>
<table style="width:48%; float:left; margin-left:20px; margin-top:20px">
<tr>
<td>Instantaneous water heating</td>
<td><input type="checkbox" v-model="item.instantaneous_water_heating" @change="update" style="width:auto"></td>
</tr>
<tr>
<td>Warm air system</td>
<td><input type="checkbox" v-model="item.warm_air_system" @change="update" style="width:auto"></td>
</tr>
</table>
<div style="clear:both"></div>
<br>
<table style="width:48%">
<tr>
<th>Other energy requirements & losses</th>
<th></th>
<tr>
<tr>
<td>Central heating pump<br><i>(If not already included in efficiency)</i></td>
<td><input v-model.number="item.central_heating_pump" @change="update" style="width:30px"/> <span class="unit">kWh/year</span></td>
</tr>
<tr v-if="item.central_heating_pump>0">
<td>Central heating pump inside</td>
<td><input type="checkbox" v-model="item.central_heating_pump_inside" @change="update" style="width:auto"></td>
</tr>
<tr v-if="item.warm_air_system">
<td>Warm air system specific fan power</td>
<td><input v-model.number="item.sfp" @change="update" style="width:30px"/> <span class="unit">W(litre/sec)</span></td>
</tr>
<tr v-else>
<td>Fans and supply pumps<br><i>(If not already included in efficiency)</td>
<td><input v-model.number="item.fans_and_supply_pumps" @change="update" style="width:30px"/> <span class="unit">kWh/year</span></td>
</tr>
<tr>
<td>Combi loss</td>
<td><select v-model="item.combi_loss" @change="update" style="width:150px">
<option value="0">n/a</option>
<option>Instantaneous, without keep hot-facility</option>
<option>Instantaneous, with keep-hot facility controlled by time clock</option>
<option>Instantaneous, with keep-hot facility not controlled by time clock</option>
<option>Storage combi boiler >= 55 litres</option>
<option>Storage combi boiler < 55 litres</option>
</select></td>
</tr>
<tr>
<td>Primary circuit loss</td>
<td><input type="checkbox" v-model="item.primary_circuit_loss" @change="update" style="width:auto"></td>
</tr>
</table>
</div>
</div>
<div style="cursor:pointer;" @click="addHeatingSystem"><img src="icons/glyphicons-191-plus-sign.png" class="icon" />Add Heating System</div>
</div>
</div>
<!------------------------------------------------------------------------------------>
<!-- Lighting, Appliances & Cooking -->
<!------------------------------------------------------------------------------------>
<div class='section'>
<div class='section-heading' @click="toggleSection('LAC')"><b>Lighting, Appliances & Cooking</b></div>
<div class="room-elements hide" name="LAC">
<table>
<tr>
<th>Calculation type: </th>
<td style="width:33%"><select v-model="data.LAC_calculation_type" @change="update">
<option value="SAP">SAP</option>
<option value="detailedlist">Detailed appliance List</option>
</select></td>
</tr>
</table>
<br>
<div v-if="data.LAC_calculation_type=='SAP'">
<div class="heading">Lighting</div>
<table>
<tr>
<td>The total number of fixed lighting outlets (L)</td>
<td style="width:33%"><input v-model.number="data.LAC.L" @change="update"></td>
</tr>
<tr>
<td>The number of fixed low energy lighting outlets (LLE)</td>
<td><input v-model.number="data.LAC.LLE" @change="update"></td>
</tr>
<tr>
<td>Reduced internal heat gains for lighting:</td>
<td><input type="checkbox" v-model="data.LAC.reduced_heat_gains_lighting" @change="update" style="width:auto"></td>
</tr>
<tr v-if="data.energy_requirements.lighting">
<td>Annual energy use:</td>
<td>{{ data.energy_requirements.lighting.quantity | toFixed(2) }} <span class="unit">kWh/year</span></td>
</tr>
</table>
<br>
<table>
<tr>
<th>Lighting Fuel</th>
<th>Fraction</th>
<th style="width:33%">Fuel input</th>
</tr>
<tr v-for="(item,index) in data.LAC.fuels_lighting">
<td><select v-model="item.fuel" @change="update">
<option v-for="(fuel,fuel_index) in data.fuels">{{ fuel_index }}</option>
</select></td>
<td><input v-model.number="item.fraction" @change="update" style="width:60px"></td>
<td>{{ item.fuel_input | toFixed(2) }} kWh/year</td>
</tr>
</table>
<br>
<div class="heading">Appliances</div>
<table>
<tr>
<td>Energy efficient appliances and reduced internal heat gains:</td>
<td style="width:33%"><input type="checkbox" v-model="data.LAC.energy_efficient_appliances" @change="update" style="width:auto"></td>
</tr>
<tr v-if="data.energy_requirements.appliances">
<td>Annual energy use:</td>
<td>{{ data.energy_requirements.appliances.quantity | toFixed(2) }} <span class="unit">kWh/year</span></td>
</tr>
</table>
<br>
<table>
<tr>
<th>Appliances Fuel</th>
<th>Fraction</th>
<th style="width:33%">Fuel input</th>
</tr>
<tr v-for="(item,index) in data.LAC.fuels_appliances">
<td><select v-model="item.fuel" @change="update">
<option v-for="(fuel,fuel_index) in data.fuels">{{ fuel_index }}</option>
</select></td>
<td><input v-model.number="item.fraction" @change="update" style="width:60px"></td>
<td>{{ item.fuel_input | toFixed(2) }} kWh/year</td>
</tr>
</table>
<br>
<div class="heading">Cooking</div>
<table>
<tr>
<td>Reduced internal heat gains for cooking:</td>
<td style="width:33%"><input type="checkbox" v-model="data.LAC.energy_efficient_cooking" @change="update" style="width:auto"></td>
</tr>
<tr v-if="data.energy_requirements.cooking">
<td>Annual energy use:</td>
<td>{{ data.energy_requirements.cooking.quantity | toFixed(2) }} <span class="unit">kWh/year</span></td>
</tr>
</table>
<br>
<table>
<tr>
<th>Cooking Fuels</th>
<th>Fraction</th>
<th style="width:33%">Fuel input</th>
</tr>
<tr v-for="(item,index) in data.LAC.fuels_cooking">
<td><select v-model="item.fuel" @change="update">
<option v-for="(fuel,fuel_index) in data.fuels">{{ fuel_index }}</option>
</select></td>
<td><input v-model.number="item.fraction" @change="update" style="width:60px"></td>
<td>{{ item.fuel_input | toFixed(2) }} kWh/year</td>
</tr>
</table>
</div>
<div v-if="data.LAC_calculation_type=='detailedlist'">
<table>
<tr>
<th>Category</th>
<th>Name</th>
<th>Power</th>
<th>Hours</th>
<th>kWh/d</th>
<th>kWh/y</th>
<th>Fuel</th>
<th>Efficiency</th>
</tr>
<tr v-for="(item,index) in data.appliancelist.list">
<td>
<select v-model="item.category" @change="update">
<option value="lighting">Lighting</option>
<option value="appliances">Appliances</option>
<option value="cooking">Cooking</option>
</select>
</td>
<td><input v-model="item.name" @change="update" style="width:120px"></td>
<td><input v-model.number="item.power" @change="update" style="width:60px"> <span class="unit">W</span></td>
<td><input v-model.number="item.hours" @change="update" style="width:60px"> <span class="unit">hrs</span></td>
<td><input v-model.number="item.kwhd" @change="update" style="width:60px"> <span class="unit">kWh</span></td>
<td><input v-model.number="item.kwhy" @change="update" style="width:60px"> <span class="unit">kWh</span></td>
<td><select v-model="item.fuel" @change="update">
<option v-for="(fuel,fuel_index) in data.fuels">{{ fuel_index }}</option>
</select></td>
<td><input v-model.number="item.efficiency" @change="update" style="width:60px"></td>
<td><img src="icons/glyphicons-17-bin.png" class="icon" @click="deleteLACitem(index)" /></td>
</tr>
<tr>
<td><div style="cursor:pointer" @click="addLACitem"><img src="icons/glyphicons-191-plus-sign.png" class="icon" />Add item</div></td>
</tr>
</table>
</div>
</div>
</div>
<!------------------------------------------------------------------------------------>
<!-- Solar hot water -->
<!------------------------------------------------------------------------------------>
<div class='section' v-if="data.water_heating.solar_water_heating">
<div class='section-heading' @click="toggleSection('shw')"><b>Solar hot water</b></div>
<div class="room-elements hide" name="shw">
<table>
<tr>
<td>Aperture area of solar collector, m2</td>
<td style="width:25%"><input v-model.number="data.SHW.A" @change="update"></td>
</tr>
<tr>
<td>Zero-loss collector efficiency, η0, from test certificate or Table H1</td>
<td><input v-model.number="data.SHW.n0" @change="update"></td>
</tr>
<tr>
<td>Collector linear heat loss coefficient, a1, from test certificate</td>
<td><input v-model.number="data.SHW.a1" @change="update"></td>
</tr>
<tr>
<td>Collector 2nd order heat loss coefficient, a2, from test certificate</td>
<td><input v-model.number="data.SHW.a2" @change="update"></td>
</tr>
<tr>
<td>Collector Orientation</td>
<td><select v-model="data.SHW.orientation" @change="update">
<option v-for="(item,index) in ['North','NE/NW','East/West','SE/SW','South']" v-bind:value="index">{{ item }}</option>
</select></td>
</tr>
<tr>
<td>Collector Inclination (degrees i.e 35 degrees)</td>
<td><input v-model.number="data.SHW.inclination" @change="update"></td>
</tr>
<tr>
<td>Annual solar radiation per m2 from U3.3 in Appendix U for the orientation and tilt of the collector</td>
<td>{{ data.SHW.annual_solar | toFixed(0) }} <span class="unit">kWh</span></td>
</tr>
<tr>
<td>Overshading</td>
<td><select v-model="data.SHW.overshading" @change="update">
<option v-for="(item,index) in {'0.5':'>80%','0.65':'60%-80%','0.8':'20%-60%','1':'<20%'}" v-bind:value="index">{{ item }}</option>
</select></td>
</tr>
<tr>
<th>Solar energy available</th>
<th>{{ data.SHW.solar_energy_available | toFixed(0) }} <span class="unit">kWh</span></th>
</tr>
<tr>
<td>Solar water heating pump</td>
<td><select v-model="data.SHW.pump" @change="update">
<option value="PV">PV powered</option>
<option value="electric">Electrically powered</option>
</select></td>
</tr>
</table>
<p><b>Monthly solar energy available</b></p>
<table>
<tr><th style="width:100px"></th><th>Jan</th><th>Feb</th><th>Mar</th><th>Apr</th><th>May</th><th>Jun</th><th>Jul</th><th>Aug</th><th>Sep</th><th>Oct</th><th>Nov</th><th>Dec</th></tr>
<tr>
<td>Monthly output</td>
<td v-for="item in data.SHW.monthly_solar_energy_available">{{ item | toFixed(0) }} <span class="unit">kWh</span></td>
</tr>
</table>
<p><b>Note:</b> The overall performance of solar water systems depends on how the hot water system is used, e.g. daily draw-off patterns and the use of other water heating devices such as a boiler or an immersion. The procedure described here is not suitable for detailed design in a particular case. It is intended to give a representative value of the solar contribution to domestic water heating over a range of users.</p>
<table>
<tr>
<td>Dedicated solar storage volume, Vs, (litres)</td>
<td style="width:25%"><input v-model.number="data.SHW.combined_cylinder_volume" @change="update" style="width:30px"> <span class="unit">L</span></td>
</tr>
<tr>
<td>If combined cylinder, total volume of cylinder (litres)</td>
<td><input v-model.number="data.SHW.Vs" @change="update" style="width:30px"> <span class="unit">L</span></td>
</tr>
<tr>
<th>Utilised annual solar input</th>
<th>{{ data.SHW.Qs | toFixed(0) }} <span class="unit">kWh</span></th>
</tr>
</table>
</div>
</div>
<!------------------------------------------------------------------------------------>
<!-- Onsite Generation -->
<!------------------------------------------------------------------------------------>
<div class='section'>
<div class='section-heading' @click="toggleSection('generation')"><b>Onsite Generation</b></div>
<div class="room-elements hide" name="generation">
<table style="width:50%">
<tr>
<td>Use Solar PV calculator</td>
<td><input type="checkbox" v-model="data.generation.use_PV_calculator" @change="update" style="width:auto"></td>
</tr>
<tr v-if="data.generation.use_PV_calculator">
<td>kWp installed</td>
<td><input v-model.number="data.generation.solarpv_kwp_installed" @change="update"/> kW</td>
</tr>
<tr v-if="data.generation.use_PV_calculator">
<td>Orientation</td>
<td><select v-model="data.generation.solarpv_orientation" @change="update">
<option v-for="(item,index) in ['North','NE/NW','East/West','SE/SW','South']" v-bind:value="index">{{ item }}</option>
</select></td>
</tr>
<tr v-if="data.generation.use_PV_calculator">
<td>Inclination</td>
<td><input v-model.number="data.generation.solarpv_inclination" @change="update"/> degrees</td>
</tr>
<tr v-if="data.generation.use_PV_calculator">
<td>Overshading</td>
<td><select v-model="data.generation.solarpv_overshading" @change="update">
<option v-for="(item,index) in {'0.5':'>80%','0.65':'60%-80%','0.8':'20%-60%','1':'<20%'}" v-bind:value="index">{{ item }}</option>
</select></td>
</tr>
</table>
<br>
<table>
<tr>
<th style="width:120px"></th>
<th>Annual Generation</th>
<th>Fraction used on-site</th>
<th>Feed in tariff<br>Generation (£/kWh)</th>
<th>Feed in tariff<br>Export (£/kWh)</th>
</tr>
<tr>
<td>Solar PV</td>
<td v-if="data.generation.use_PV_calculator">{{ data.generation.solar_annual_kwh | toFixed(0) }}</td>
<td v-if="!data.generation.use_PV_calculator"><input v-model.number="data.generation.solar_annual_kwh" @change="update"/></td>
<td><input v-model.number="data.generation.solar_fraction_used_onsite" @change="update"/></td>
<td><input v-model.number="data.generation.solar_FIT" @change="update"/></td>
<td><input v-model.number="data.generation.solar_export_FIT" @change="update"/></td>
</tr>
<tr>
<td>Wind</td>
<td><input v-model.number="data.generation.wind_annual_kwh" @change="update"/></td>
<td><input v-model.number="data.generation.wind_fraction_used_onsite" @change="update"/></td>
<td><input v-model.number="data.generation.wind_FIT" @change="update"/></td>
<td><input v-model.number="data.generation.wind_export_FIT" @change="update"/></td>
</tr>
<tr>
<td>Hydro</td>
<td><input v-model.number="data.generation.hydro_annual_kwh" @change="update"/></td>
<td><input v-model.number="data.generation.hydro_fraction_used_onsite" @change="update"/></td>
<td><input v-model.number="data.generation.hydro_FIT" @change="update"/></td>
<td><input v-model.number="data.generation.hydro_export_FIT" @change="update"/></td>