openstudio-standards 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/standards/OpenStudio_Standards.xlsx +0 -0
- data/lib/openstudio-standards/btap/compliance.rb +17 -7
- data/lib/openstudio-standards/btap/hvac.rb +6 -5
- data/lib/openstudio-standards/btap/measures.rb +137 -102
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +2 -2
- data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +1 -1
- data/lib/openstudio-standards/prototypes/Prototype.Model.rb +96 -31
- data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +1 -1
- data/lib/openstudio-standards/prototypes/Prototype.building_specific_methods.rb +163 -0
- data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +54 -52
- data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +28 -26
- data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +41 -39
- data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +19 -17
- data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +16 -13
- data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +13 -11
- data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +33 -31
- data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +66 -64
- data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +8 -88
- data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +54 -52
- data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +13 -11
- data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +15 -13
- data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +11 -9
- data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +13 -11
- data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +7 -5
- data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +18 -13
- data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +11 -9
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +23 -12
- data/lib/openstudio-standards/standards/Standards.Fan.rb +7 -4
- data/lib/openstudio-standards/standards/Standards.Model.rb +4 -4
- data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +9 -4
- data/lib/openstudio-standards/utilities/simulation.rb +6 -1
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.Model.rb +1 -1
- metadata +3 -2
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
|
-
#
|
3
|
-
|
4
|
-
|
2
|
+
# Modules for building-type specific methods
|
3
|
+
module PrototypeBuilding
|
4
|
+
module SecondarySchool
|
5
|
+
def self.define_space_type_map(building_type, template, climate_zone)
|
5
6
|
space_type_map = nil
|
6
7
|
|
7
8
|
case template
|
@@ -25,7 +26,7 @@ class OpenStudio::Model::Model
|
|
25
26
|
space_type_map = {
|
26
27
|
'Audience - auditorium' => ['Auditorium_ZN_1_FLR_1'],
|
27
28
|
'Gym - play' => ['Aux_Gym_ZN_1_FLR_1', 'Gym_ZN_1_FLR_1'],
|
28
|
-
|
29
|
+
"Washroom-sch-#{sch}" => ['Bathrooms_ZN_1_FLR_1', 'Bathrooms_ZN_1_FLR_2'],
|
29
30
|
'Conf./meet./multi-purpose' => ['Cafeteria_ZN_1_FLR_1'],
|
30
31
|
'Classroom/lecture/training' => ['Corner_Class_1_Pod_1_ZN_1_FLR_1', 'Corner_Class_1_Pod_1_ZN_1_FLR_2', 'Corner_Class_1_Pod_2_ZN_1_FLR_1', 'Corner_Class_1_Pod_2_ZN_1_FLR_2', 'Corner_Class_1_Pod_3_ZN_1_FLR_1', 'Corner_Class_1_Pod_3_ZN_1_FLR_2', 'Corner_Class_2_Pod_1_ZN_1_FLR_1', 'Corner_Class_2_Pod_1_ZN_1_FLR_2', 'Corner_Class_2_Pod_2_ZN_1_FLR_1', 'Corner_Class_2_Pod_2_ZN_1_FLR_2', 'Corner_Class_2_Pod_3_ZN_1_FLR_1', 'Corner_Class_2_Pod_3_ZN_1_FLR_2', 'Mult_Class_1_Pod_1_ZN_1_FLR_1', 'Mult_Class_1_Pod_1_ZN_1_FLR_2', 'Mult_Class_1_Pod_2_ZN_1_FLR_1', 'Mult_Class_1_Pod_2_ZN_1_FLR_2', 'Mult_Class_1_Pod_3_ZN_1_FLR_1', 'Mult_Class_1_Pod_3_ZN_1_FLR_2', 'Mult_Class_2_Pod_1_ZN_1_FLR_1', 'Mult_Class_2_Pod_1_ZN_1_FLR_2', 'Mult_Class_2_Pod_2_ZN_1_FLR_1', 'Mult_Class_2_Pod_2_ZN_1_FLR_2', 'Mult_Class_2_Pod_3_ZN_1_FLR_1', 'Mult_Class_2_Pod_3_ZN_1_FLR_2'],
|
31
32
|
"Corr. >= 2.4m wide-sch-#{sch}" => ['Corridor_Pod_1_ZN_1_FLR_1', 'Corridor_Pod_1_ZN_1_FLR_2', 'Corridor_Pod_2_ZN_1_FLR_1', 'Corridor_Pod_2_ZN_1_FLR_2', 'Corridor_Pod_3_ZN_1_FLR_1', 'Corridor_Pod_3_ZN_1_FLR_2', 'Main_Corridor_ZN_1_FLR_1', 'Main_Corridor_ZN_1_FLR_2'],
|
@@ -54,7 +55,7 @@ class OpenStudio::Model::Model
|
|
54
55
|
return space_type_map
|
55
56
|
end
|
56
57
|
|
57
|
-
def define_hvac_system_map(building_type, template, climate_zone)
|
58
|
+
def self.define_hvac_system_map(building_type, template, climate_zone)
|
58
59
|
system_to_space_map = nil
|
59
60
|
|
60
61
|
case template
|
@@ -337,12 +338,12 @@ class OpenStudio::Model::Model
|
|
337
338
|
return system_to_space_map
|
338
339
|
end
|
339
340
|
|
340
|
-
def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
|
341
|
+
def self.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model)
|
341
342
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started building type specific adjustments')
|
342
343
|
|
343
|
-
getSpaces.each do |space|
|
344
|
+
model.getSpaces.each do |space|
|
344
345
|
if space.name.get.to_s == 'Mech_ZN_1_FLR_1'
|
345
|
-
add_elevator(template,
|
346
|
+
model.add_elevator(template,
|
346
347
|
space,
|
347
348
|
prototype_input['number_of_elevators'],
|
348
349
|
prototype_input['elevator_type'],
|
@@ -358,7 +359,8 @@ class OpenStudio::Model::Model
|
|
358
359
|
return true
|
359
360
|
end
|
360
361
|
|
361
|
-
def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
|
362
|
+
def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
|
362
363
|
return true
|
363
364
|
end
|
364
365
|
end
|
366
|
+
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
|
-
#
|
3
|
-
|
4
|
-
|
2
|
+
# Modules for building-type specific methods
|
3
|
+
module PrototypeBuilding
|
4
|
+
module SmallHotel
|
5
|
+
def self.define_space_type_map(building_type, template, climate_zone)
|
5
6
|
space_type_map = nil
|
6
7
|
|
7
8
|
case template
|
@@ -90,7 +91,7 @@ class OpenStudio::Model::Model
|
|
90
91
|
return space_type_map
|
91
92
|
end
|
92
93
|
|
93
|
-
def define_hvac_system_map(building_type, template, climate_zone)
|
94
|
+
def self.define_hvac_system_map(building_type, template, climate_zone)
|
94
95
|
system_to_space_map = nil
|
95
96
|
|
96
97
|
case template
|
@@ -469,7 +470,7 @@ class OpenStudio::Model::Model
|
|
469
470
|
return system_to_space_map
|
470
471
|
end
|
471
472
|
|
472
|
-
def define_building_story_map(building_type, template, climate_zone)
|
473
|
+
def self.define_building_story_map(building_type, template, climate_zone)
|
473
474
|
building_story_map = nil
|
474
475
|
|
475
476
|
building_story_map = {
|
@@ -486,14 +487,14 @@ class OpenStudio::Model::Model
|
|
486
487
|
return building_story_map
|
487
488
|
end
|
488
489
|
|
489
|
-
def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
|
490
|
+
def self.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model)
|
490
491
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started building type specific adjustments')
|
491
492
|
|
492
493
|
# add extra infiltration for corridor1 door
|
493
|
-
corridor_space = getSpaceByName('CorridorFlr1')
|
494
|
+
corridor_space = model.getSpaceByName('CorridorFlr1')
|
494
495
|
corridor_space = corridor_space.get
|
495
496
|
unless template == 'DOE Ref 1980-2004' || template == 'DOE Ref Pre-1980'
|
496
|
-
infiltration_corridor = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(
|
497
|
+
infiltration_corridor = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
|
497
498
|
infiltration_corridor.setName('Corridor1 door Infiltration')
|
498
499
|
infiltration_per_zone = 0
|
499
500
|
infiltration_per_zone = if template == '90.1-2010' || template == '90.1-2007'
|
@@ -502,13 +503,13 @@ class OpenStudio::Model::Model
|
|
502
503
|
0.91557718
|
503
504
|
end
|
504
505
|
infiltration_corridor.setDesignFlowRate(infiltration_per_zone)
|
505
|
-
infiltration_corridor.setSchedule(add_schedule('HotelSmall INFIL_Door_Opening_SCH'))
|
506
|
+
infiltration_corridor.setSchedule(model.add_schedule('HotelSmall INFIL_Door_Opening_SCH'))
|
506
507
|
infiltration_corridor.setSpace(corridor_space)
|
507
508
|
end
|
508
509
|
|
509
510
|
# hardsize corridor1. put in standards in the future #TODO
|
510
511
|
unless template == 'DOE Ref 1980-2004' || template == 'DOE Ref Pre-1980'
|
511
|
-
getZoneHVACPackagedTerminalAirConditioners.sort.each do |ptac|
|
512
|
+
model.getZoneHVACPackagedTerminalAirConditioners.sort.each do |ptac|
|
512
513
|
zone = ptac.thermalZone.get
|
513
514
|
if zone.spaces.include?(corridor_space)
|
514
515
|
ptac.setSupplyAirFlowRateDuringCoolingOperation(0.13)
|
@@ -528,7 +529,8 @@ class OpenStudio::Model::Model
|
|
528
529
|
return true
|
529
530
|
end
|
530
531
|
|
531
|
-
def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
|
532
|
+
def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
|
532
533
|
return true
|
533
534
|
end
|
534
535
|
end
|
536
|
+
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
2
|
# Extend the class to add Small Office specific stuff
|
3
|
-
|
4
|
-
|
3
|
+
module PrototypeBuilding
|
4
|
+
module SmallOffice
|
5
|
+
def self.define_space_type_map(building_type, template, climate_zone)
|
5
6
|
space_type_map = nil
|
6
7
|
|
7
8
|
space_type_map = case template
|
@@ -20,7 +21,7 @@ class OpenStudio::Model::Model
|
|
20
21
|
return space_type_map
|
21
22
|
end
|
22
23
|
|
23
|
-
def define_hvac_system_map(building_type, template, climate_zone)
|
24
|
+
def self.define_hvac_system_map(building_type, template, climate_zone)
|
24
25
|
system_to_space_map = [
|
25
26
|
{
|
26
27
|
'type' => 'PSZ-AC',
|
@@ -67,11 +68,12 @@ class OpenStudio::Model::Model
|
|
67
68
|
return system_to_space_map
|
68
69
|
end
|
69
70
|
|
70
|
-
def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
|
71
|
+
def self.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model)
|
71
72
|
return true
|
72
73
|
end
|
73
74
|
|
74
|
-
def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
|
75
|
+
def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
|
75
76
|
return true
|
76
77
|
end
|
77
78
|
end
|
79
|
+
end
|
@@ -145,14 +145,8 @@ end
|
|
145
145
|
# @param [Double] COP
|
146
146
|
# @return [Double] Seasonal Energy Efficiency Ratio
|
147
147
|
def cop_to_seer(cop)
|
148
|
-
|
149
|
-
|
150
|
-
# First convert COP to EER
|
151
|
-
eer = cop_to_eer(cop)
|
152
|
-
|
153
|
-
# Next convert from EER to SEER
|
154
|
-
delta = 1.1088**2 - 4.0 * 0.0182 * eer
|
155
|
-
seer = (-delta**0.5 + 1.1088) / (2.0 * 0.0182)
|
148
|
+
delta = 0.3796**2 - 4.0 * 0.0076 * cop
|
149
|
+
seer = (-delta**0.5 + 0.3796) / (2.0 * 0.0076)
|
156
150
|
|
157
151
|
return seer
|
158
152
|
end
|
@@ -202,14 +196,25 @@ end
|
|
202
196
|
#
|
203
197
|
# @param [Double] COP
|
204
198
|
# @return [Double] Energy Efficiency Ratio (EER)
|
205
|
-
def cop_to_eer(cop)
|
199
|
+
def cop_to_eer(cop, capacity_w = nil)
|
206
200
|
eer = nil
|
207
201
|
|
208
|
-
|
209
|
-
|
210
|
-
|
202
|
+
if capacity_w.nil?
|
203
|
+
# The PNNL Method.
|
204
|
+
# r is the ratio of supply fan power to total equipment power at the rating condition,
|
205
|
+
# assumed to be 0.12 for the reference buildngs per PNNL.
|
206
|
+
r = 0.12
|
207
|
+
|
208
|
+
eer = 3.413 * (cop * (1 - r) - r)
|
211
209
|
|
212
|
-
|
210
|
+
else
|
211
|
+
|
212
|
+
# The 90.1-2013 method
|
213
|
+
|
214
|
+
# Convert the capacity to Btu/hr
|
215
|
+
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
216
|
+
eer = cop / (7.84E-8 * capacity_btu_per_hr + 0.338)
|
217
|
+
end
|
213
218
|
|
214
219
|
return eer
|
215
220
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
|
-
#
|
3
|
-
|
4
|
-
|
2
|
+
# Modules for building-type specific methods
|
3
|
+
module PrototypeBuilding
|
4
|
+
module Warehouse
|
5
|
+
def self.define_space_type_map(building_type, template, climate_zone)
|
5
6
|
space_type_map = nil
|
6
7
|
|
7
8
|
space_type_map = case template
|
@@ -23,7 +24,7 @@ class OpenStudio::Model::Model
|
|
23
24
|
return space_type_map
|
24
25
|
end
|
25
26
|
|
26
|
-
def define_hvac_system_map(building_type, template, climate_zone)
|
27
|
+
def self.define_hvac_system_map(building_type, template, climate_zone)
|
27
28
|
case template
|
28
29
|
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
|
29
30
|
system_to_space_map = [
|
@@ -90,23 +91,24 @@ class OpenStudio::Model::Model
|
|
90
91
|
return system_to_space_map
|
91
92
|
end
|
92
93
|
|
93
|
-
def custom_hvac_tweaks(building_type, template, climate_zone, prototype_input)
|
94
|
+
def self.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model)
|
94
95
|
return true
|
95
96
|
end
|
96
97
|
|
97
|
-
def update_waterheater_loss_coefficient(template)
|
98
|
+
def self.update_waterheater_loss_coefficient(template, model)
|
98
99
|
case template
|
99
100
|
when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', 'NECB 2011'
|
100
|
-
getWaterHeaterMixeds.sort.each do |water_heater|
|
101
|
+
model.getWaterHeaterMixeds.sort.each do |water_heater|
|
101
102
|
water_heater.setOffCycleLossCoefficienttoAmbientTemperature(0.798542707)
|
102
103
|
water_heater.setOnCycleLossCoefficienttoAmbientTemperature(0.798542707)
|
103
104
|
end
|
104
105
|
end
|
105
106
|
end
|
106
107
|
|
107
|
-
def custom_swh_tweaks(building_type, template, climate_zone, prototype_input)
|
108
|
-
update_waterheater_loss_coefficient(template)
|
108
|
+
def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
|
109
|
+
PrototypeBuilding::Warehouse.update_waterheater_loss_coefficient(template, model)
|
109
110
|
|
110
111
|
return true
|
111
112
|
end
|
112
113
|
end
|
114
|
+
end
|
@@ -44,7 +44,7 @@ class OpenStudio::Model::AirLoopHVAC
|
|
44
44
|
def apply_standard_controls(template, climate_zone)
|
45
45
|
# Energy Recovery Ventilation
|
46
46
|
if energy_recovery_ventilator_required?(template, climate_zone)
|
47
|
-
apply_energy_recovery_ventilator
|
47
|
+
apply_energy_recovery_ventilator(template)
|
48
48
|
end
|
49
49
|
|
50
50
|
# Economizers
|
@@ -1787,7 +1787,7 @@ class OpenStudio::Model::AirLoopHVAC
|
|
1787
1787
|
# @param (see #economizer_required?)
|
1788
1788
|
# @return [Bool] Returns true if required, false if not.
|
1789
1789
|
# @todo Add exception logic for systems serving parking garage, warehouse, or multifamily
|
1790
|
-
def apply_energy_recovery_ventilator
|
1790
|
+
def apply_energy_recovery_ventilator(template)
|
1791
1791
|
# Get the oa system
|
1792
1792
|
oa_system = nil
|
1793
1793
|
if airLoopHVACOutdoorAirSystem.is_initialized
|
@@ -1800,14 +1800,25 @@ class OpenStudio::Model::AirLoopHVAC
|
|
1800
1800
|
# Create an ERV
|
1801
1801
|
erv = OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent.new(model)
|
1802
1802
|
erv.setName("#{name} ERV")
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1803
|
+
if template == 'NECB 2011'
|
1804
|
+
erv.setSensibleEffectivenessat100HeatingAirFlow(0.5)
|
1805
|
+
erv.setLatentEffectivenessat100HeatingAirFlow(0.5)
|
1806
|
+
erv.setSensibleEffectivenessat75HeatingAirFlow(0.5)
|
1807
|
+
erv.setLatentEffectivenessat75HeatingAirFlow(0.5)
|
1808
|
+
erv.setSensibleEffectivenessat100CoolingAirFlow(0.5)
|
1809
|
+
erv.setLatentEffectivenessat100CoolingAirFlow(0.5)
|
1810
|
+
erv.setSensibleEffectivenessat75CoolingAirFlow(0.5)
|
1811
|
+
erv.setLatentEffectivenessat75CoolingAirFlow(0.5)
|
1812
|
+
else
|
1813
|
+
erv.setSensibleEffectivenessat100HeatingAirFlow(0.7)
|
1814
|
+
erv.setLatentEffectivenessat100HeatingAirFlow(0.6)
|
1815
|
+
erv.setSensibleEffectivenessat75HeatingAirFlow(0.7)
|
1816
|
+
erv.setLatentEffectivenessat75HeatingAirFlow(0.6)
|
1817
|
+
erv.setSensibleEffectivenessat100CoolingAirFlow(0.75)
|
1818
|
+
erv.setLatentEffectivenessat100CoolingAirFlow(0.6)
|
1819
|
+
erv.setSensibleEffectivenessat75CoolingAirFlow(0.75)
|
1820
|
+
erv.setLatentEffectivenessat75CoolingAirFlow(0.6)
|
1821
|
+
end
|
1811
1822
|
erv.setSupplyAirOutletTemperatureControl(true)
|
1812
1823
|
erv.setHeatExchangerType('Rotary')
|
1813
1824
|
erv.setFrostControlType('ExhaustOnly')
|
@@ -2599,9 +2610,9 @@ class OpenStudio::Model::AirLoopHVAC
|
|
2599
2610
|
def apply_vav_damper_action(template)
|
2600
2611
|
damper_action = nil
|
2601
2612
|
case template
|
2602
|
-
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004'
|
2613
|
+
when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004'
|
2603
2614
|
damper_action = 'Single Maximum'
|
2604
|
-
when '90.1-2007', '90.1-2010', '90.1-2013'
|
2615
|
+
when '90.1-2007', '90.1-2010', '90.1-2013', 'NECB 2011'
|
2605
2616
|
damper_action = 'Dual Maximum'
|
2606
2617
|
end
|
2607
2618
|
|
@@ -73,10 +73,10 @@ module Fan
|
|
73
73
|
# Get design supply air flow rate (whether autosized or hard-sized)
|
74
74
|
dsn_air_flow_m3_per_s = 0
|
75
75
|
dsn_air_flow_m3_per_s = if to_FanZoneExhaust.empty?
|
76
|
-
if
|
77
|
-
autosizedMaximumFlowRate.get
|
78
|
-
else
|
76
|
+
if maximumFlowRate.is_initialized
|
79
77
|
maximumFlowRate.get
|
78
|
+
else
|
79
|
+
autosizedMaximumFlowRate.get
|
80
80
|
end
|
81
81
|
else
|
82
82
|
maximumFlowRate.get
|
@@ -190,7 +190,7 @@ module Fan
|
|
190
190
|
# TODO check COMNET and T24 ACM and PNNL 90.1 doc
|
191
191
|
fan_impeller_eff = 0.65
|
192
192
|
|
193
|
-
if small_fan?
|
193
|
+
if small_fan? && template != 'NECB 2011'
|
194
194
|
fan_impeller_eff = 0.55
|
195
195
|
end
|
196
196
|
|
@@ -225,6 +225,7 @@ module Fan
|
|
225
225
|
# Assuming all fan motors are 4-pole ODP
|
226
226
|
template_mod = template.dup
|
227
227
|
if template == 'NECB 2011'
|
228
|
+
|
228
229
|
if self.class.name == 'OpenStudio::Model::FanConstantVolume'
|
229
230
|
template_mod += '-CONSTANT'
|
230
231
|
elsif self.class.name == 'OpenStudio::Model::FanVariableVolume'
|
@@ -247,6 +248,8 @@ module Fan
|
|
247
248
|
setFanPowerCoefficient2(power_vs_flow_curve.coefficient2x)
|
248
249
|
setFanPowerCoefficient3(power_vs_flow_curve.coefficient3xPOW2)
|
249
250
|
setFanPowerCoefficient4(power_vs_flow_curve.coefficient4xPOW3)
|
251
|
+
else
|
252
|
+
raise("")
|
250
253
|
end
|
251
254
|
end
|
252
255
|
|
@@ -156,7 +156,7 @@ class OpenStudio::Model::Model
|
|
156
156
|
# Run a sizing run to calculate VLT for layer-by-layer windows.
|
157
157
|
# Only necessary for 90.1-2010 daylighting control determination.
|
158
158
|
if template == '90.1-2010'
|
159
|
-
if runSizingRun("#{sizing_run_dir}/
|
159
|
+
if runSizingRun("#{sizing_run_dir}/SRVLT") == false
|
160
160
|
return false
|
161
161
|
end
|
162
162
|
end
|
@@ -249,7 +249,7 @@ class OpenStudio::Model::Model
|
|
249
249
|
apply_prm_sizing_parameters
|
250
250
|
|
251
251
|
# Run sizing run with the HVAC equipment
|
252
|
-
if runSizingRun("#{sizing_run_dir}/
|
252
|
+
if runSizingRun("#{sizing_run_dir}/SR1") == false
|
253
253
|
return false
|
254
254
|
end
|
255
255
|
|
@@ -286,7 +286,7 @@ class OpenStudio::Model::Model
|
|
286
286
|
|
287
287
|
# Run sizing run with the new chillers, boilers, and
|
288
288
|
# cooling towers to determine capacities
|
289
|
-
if runSizingRun("#{sizing_run_dir}/
|
289
|
+
if runSizingRun("#{sizing_run_dir}/SR2") == false
|
290
290
|
return false
|
291
291
|
end
|
292
292
|
|
@@ -3899,7 +3899,7 @@ class OpenStudio::Model::Model
|
|
3899
3899
|
surface.subSurfaces.sort.each do |ss|
|
3900
3900
|
# Reduce the size of the subsurface
|
3901
3901
|
red = 1.0 - mult
|
3902
|
-
ss.
|
3902
|
+
ss.reduce_area_by_percent_by_shrinking_toward_centroid(red)
|
3903
3903
|
end
|
3904
3904
|
end
|
3905
3905
|
end
|
@@ -96,7 +96,7 @@ class OpenStudio::Model::WaterHeaterMixed
|
|
96
96
|
|
97
97
|
when 'NECB 2011'
|
98
98
|
volume_l_per_s = volume_m3 * 1000
|
99
|
-
if capacity_btu_per_hr <= OpenStudio.convert(12, 'kW', 'Btu/hr')
|
99
|
+
if capacity_btu_per_hr <= OpenStudio.convert(12, 'kW', 'Btu/hr').get
|
100
100
|
# Fixed water heater efficiency per PNNL
|
101
101
|
water_heater_eff = 1
|
102
102
|
# Calculate the max allowable standby loss (SL)
|
@@ -129,7 +129,7 @@ class OpenStudio::Model::WaterHeaterMixed
|
|
129
129
|
base_ef, vol_drt = case template
|
130
130
|
when '90.1-2004', '90.1-2007'
|
131
131
|
[0.62, 0.0019]
|
132
|
-
when '90.1-2010'
|
132
|
+
when '90.1-2010', 'NECB 2011'
|
133
133
|
[0.67, 0.0019]
|
134
134
|
when '90.1-2013'
|
135
135
|
[0.67, 0.0005]
|
@@ -152,12 +152,11 @@ class OpenStudio::Model::WaterHeaterMixed
|
|
152
152
|
et = 0.8
|
153
153
|
# Calculate the max allowable standby loss (SL)
|
154
154
|
cap_adj, vol_drt = case template
|
155
|
-
when '90.1-2004', '90.1-2007', '90.1-2010'
|
155
|
+
when '90.1-2004', '90.1-2007', '90.1-2010', 'NECB 2011'
|
156
156
|
[800, 110]
|
157
157
|
when '90.1-2013'
|
158
158
|
[799, 16.6]
|
159
159
|
end
|
160
|
-
|
161
160
|
sl_btu_per_hr = (capacity_btu_per_hr / cap_adj + vol_drt * Math.sqrt(volume_gal))
|
162
161
|
# Calculate the skin loss coefficient (UA)
|
163
162
|
ua_btu_per_hr_per_f = (sl_btu_per_hr * et) / 70
|
@@ -186,6 +185,12 @@ class OpenStudio::Model::WaterHeaterMixed
|
|
186
185
|
# self.setOffCycleParasiticFuelConsumptionRate(??)
|
187
186
|
setOffCycleParasiticHeatFractiontoTank(0.8)
|
188
187
|
|
188
|
+
# set part-load performance curve
|
189
|
+
if template == 'NECB 2011' && fuel_type == 'NaturalGas'
|
190
|
+
plf_vs_plr_curve = model.add_curve('SWH-EFFFPLR-NECB2011')
|
191
|
+
setPartLoadFactorCurve(plf_vs_plr_curve)
|
192
|
+
end
|
193
|
+
|
189
194
|
# Append the name with standards information
|
190
195
|
setName("#{name} #{water_heater_eff.round(3)} Therm Eff")
|
191
196
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.WaterHeaterMixed', "For #{template}: #{name}; thermal efficiency = #{water_heater_eff.round(3)}, skin-loss UA = #{ua_btu_per_hr_per_f.round}Btu/hr")
|
@@ -82,7 +82,12 @@ class OpenStudio::Model::Model
|
|
82
82
|
OpenStudio.logFree(OpenStudio::Debug, 'openstudio.model.Model', 'Running with OS 2.x WorkflowJSON.')
|
83
83
|
|
84
84
|
# Copy the weather file to this directory
|
85
|
-
|
85
|
+
begin
|
86
|
+
FileUtils.copy(epw_path.to_s, "#{run_dir}/in.epw")
|
87
|
+
rescue
|
88
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "Due to limitations on Windows file path lengths, this measure won't work unless your project is located in a directory whose filepath is less than 90 characters long, including slashes.")
|
89
|
+
return false
|
90
|
+
end
|
86
91
|
|
87
92
|
workflow.setSeedFile(File.absolute_path(osm_path.to_s))
|
88
93
|
workflow.setWeatherFile(epw_path)
|