openstudio-standards 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/standards/OpenStudio_Standards.xlsx +0 -0
- data/data/standards/OpenStudio_Standards_boilers.json +62 -4
- data/data/standards/OpenStudio_Standards_chillers.json +778 -68
- data/data/standards/OpenStudio_Standards_construction_sets.json +52 -93
- data/data/standards/OpenStudio_Standards_curve_biquadratics.json +36 -36
- data/data/standards/OpenStudio_Standards_curve_quadratics.json +3 -3
- data/data/standards/OpenStudio_Standards_heat_pumps.json +840 -0
- data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +352 -0
- data/data/standards/OpenStudio_Standards_heat_rejection.json +48 -0
- data/data/standards/OpenStudio_Standards_motors.json +270 -0
- data/data/standards/OpenStudio_Standards_space_types.json +10390 -2824
- data/data/standards/OpenStudio_Standards_unitary_acs.json +794 -18
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.ddy +538 -0
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.stat +493 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.ddy +536 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.stat +554 -0
- data/data/weather/envelope_info.csv +6 -0
- data/lib/openstudio-standards.rb +10 -11
- data/lib/openstudio-standards/btap/compliance.rb +251 -969
- data/lib/openstudio-standards/btap/envelope.rb +1 -1
- data/lib/openstudio-standards/btap/fileio.rb +37 -5
- data/lib/openstudio-standards/btap/geometry.rb +27 -17
- data/lib/openstudio-standards/btap/hvac.rb +80 -27
- data/lib/openstudio-standards/hvac_sizing/{HVACSizing.CoilHeatingDXMultiSpeed.rb → Siz.CoilHeatingDXMultiSpeed.rb} +0 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +30 -4
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +61 -5
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +37 -7
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +27 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +27 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +55 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +55 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +51 -9
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +99 -17
- data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +1 -1
- data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +29 -6
- data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +16 -0
- data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +43 -48
- data/lib/openstudio-standards/prototypes/Prototype.ControllerWaterCoil.rb +5 -9
- data/lib/openstudio-standards/prototypes/Prototype.Fan.rb +68 -0
- data/lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb +39 -43
- data/lib/openstudio-standards/prototypes/Prototype.FanOnOff.rb +49 -51
- data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +55 -61
- data/lib/openstudio-standards/prototypes/Prototype.FanZoneExhaust.rb +8 -10
- data/lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +15 -20
- data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +330 -322
- data/lib/openstudio-standards/prototypes/Prototype.Model.rb +501 -446
- data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +221 -230
- data/lib/openstudio-standards/prototypes/Prototype.add_objects.rb +0 -2
- data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +130 -137
- data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +374 -291
- data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +146 -193
- data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +1315 -1113
- data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +65 -88
- data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +101 -156
- data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +46 -96
- data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +113 -123
- data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +356 -345
- data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +48 -103
- data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +115 -123
- data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +30 -39
- data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +32 -45
- data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +98 -258
- data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +429 -474
- data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +28 -36
- data/lib/openstudio-standards/prototypes/Prototype.strip_model.rb +7 -7
- data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +172 -146
- data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +46 -53
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +885 -707
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +48 -57
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +24 -31
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +80 -93
- data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +69 -0
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +60 -72
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +104 -108
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +190 -198
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +134 -146
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +56 -60
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +151 -161
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +30 -34
- data/lib/openstudio-standards/standards/Standards.Construction.rb +116 -132
- data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +138 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +11 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +11 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +16 -0
- data/lib/openstudio-standards/standards/Standards.Fan.rb +190 -236
- data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +168 -14
- data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +33 -0
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +83 -0
- data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +22 -0
- data/lib/openstudio-standards/standards/Standards.Model.rb +2385 -1622
- data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +83 -35
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +805 -395
- data/lib/openstudio-standards/standards/Standards.Pump.rb +139 -119
- data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +16 -15
- data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +35 -0
- data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +7 -13
- data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +144 -59
- data/lib/openstudio-standards/standards/Standards.Space.rb +1509 -1326
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +254 -262
- data/lib/openstudio-standards/standards/Standards.SubSurface.rb +105 -105
- data/lib/openstudio-standards/standards/Standards.Surface.rb +27 -31
- data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +882 -157
- data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +179 -69
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +75 -0
- data/lib/openstudio-standards/utilities/logging.rb +31 -38
- data/lib/openstudio-standards/utilities/simulation.rb +118 -82
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.Model.rb +382 -390
- data/lib/openstudio-standards/weather/Weather.stat_file.rb +159 -78
- metadata +59 -6
@@ -1,289 +1,280 @@
|
|
1
1
|
|
2
2
|
# open the class to add methods to size all HVAC equipment
|
3
3
|
class OpenStudio::Model::Model
|
4
|
+
def add_swh(building_type, template, climate_zone, prototype_input)
|
5
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started Adding Service Water Heating')
|
4
6
|
|
5
|
-
def add_swh(building_type, building_vintage, climate_zone, prototype_input)
|
6
|
-
|
7
|
-
OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started Adding Service Water Heating')
|
8
|
-
|
9
7
|
# Add the main service water heating loop, if specified
|
10
8
|
unless prototype_input['main_water_heater_volume'].nil?
|
11
|
-
|
9
|
+
|
12
10
|
# Add the main service water loop
|
13
|
-
main_swh_loop =
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
11
|
+
main_swh_loop = add_swh_loop(template,
|
12
|
+
'Main Service Water Loop',
|
13
|
+
nil,
|
14
|
+
OpenStudio.convert(prototype_input['main_service_water_temperature'], 'F', 'C').get,
|
15
|
+
prototype_input['main_service_water_pump_head'],
|
16
|
+
prototype_input['main_service_water_pump_motor_efficiency'],
|
17
|
+
OpenStudio.convert(prototype_input['main_water_heater_capacity'], 'Btu/hr', 'W').get,
|
18
|
+
OpenStudio.convert(prototype_input['main_water_heater_volume'], 'gal', 'm^3').get,
|
19
|
+
prototype_input['main_water_heater_fuel'],
|
20
|
+
OpenStudio.convert(prototype_input['main_service_water_parasitic_fuel_consumption_rate'], 'Btu/hr', 'W').get,
|
21
|
+
building_type) unless building_type == 'RetailStripmall' && template != 'NECB 2011'
|
22
|
+
|
25
23
|
# Attach the end uses if specified in prototype inputs
|
26
24
|
# TODO remove special logic for large office SWH end uses
|
27
25
|
# TODO remove special logic for stripmall SWH end uses and service water loops
|
28
26
|
# TODO remove special logic for large hotel SWH end uses
|
29
|
-
if building_type == 'LargeOffice'
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
elsif building_type == 'RetailStripmall' and building_vintage != 'NECB 2011'
|
27
|
+
if building_type == 'LargeOffice' && template != 'NECB 2011'
|
28
|
+
|
29
|
+
# Only the core spaces have service water
|
30
|
+
['Core_bottom', 'Core_mid', 'Core_top'].each do |space_name|
|
31
|
+
add_swh_end_uses(template,
|
32
|
+
'Main',
|
33
|
+
main_swh_loop,
|
34
|
+
OpenStudio.convert(prototype_input['main_service_water_peak_flowrate'], 'gal/min', 'm^3/s').get,
|
35
|
+
prototype_input['main_service_water_flowrate_schedule'],
|
36
|
+
OpenStudio.convert(prototype_input['main_water_use_temperature'], 'F', 'C').get,
|
37
|
+
space_name,
|
38
|
+
building_type)
|
39
|
+
end
|
44
40
|
|
45
|
-
|
41
|
+
elsif building_type == 'RetailStripmall' && template != 'NECB 2011'
|
42
|
+
|
43
|
+
return true if template == 'DOE Ref Pre-1980' || template == 'DOE Ref 1980-2004'
|
46
44
|
|
47
45
|
# Create a separate hot water loop & water heater for each space in the list
|
48
|
-
swh_space_names = [
|
49
|
-
swh_sch_names = [
|
50
|
-
|
51
|
-
|
46
|
+
swh_space_names = ['LGstore1', 'SMstore1', 'SMstore2', 'SMstore3', 'LGstore2', 'SMstore5', 'SMstore6']
|
47
|
+
swh_sch_names = ['RetailStripmall Type1_SWH_SCH', 'RetailStripmall Type1_SWH_SCH', 'RetailStripmall Type2_SWH_SCH',
|
48
|
+
'RetailStripmall Type2_SWH_SCH', 'RetailStripmall Type3_SWH_SCH', 'RetailStripmall Type3_SWH_SCH',
|
49
|
+
'RetailStripmall Type3_SWH_SCH']
|
52
50
|
rated_use_rate_gal_per_min = 0.03 # in gal/min
|
53
|
-
rated_flow_rate_m3_per_s = OpenStudio.convert(rated_use_rate_gal_per_min,'gal/min','m^3/s').get
|
51
|
+
rated_flow_rate_m3_per_s = OpenStudio.convert(rated_use_rate_gal_per_min, 'gal/min', 'm^3/s').get
|
54
52
|
|
55
53
|
# Loop through all spaces
|
56
54
|
swh_space_names.zip(swh_sch_names).each do |swh_space_name, swh_sch_name|
|
57
|
-
swh_thermal_zone =
|
58
|
-
main_swh_loop =
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
self.add_swh_end_uses(building_vintage,
|
72
|
-
'Main',
|
73
|
-
main_swh_loop,
|
74
|
-
rated_flow_rate_m3_per_s,
|
75
|
-
swh_sch_name,
|
76
|
-
OpenStudio.convert(prototype_input['main_water_use_temperature'],'F','C').get,
|
77
|
-
swh_space_name,
|
78
|
-
building_type)
|
55
|
+
swh_thermal_zone = getSpaceByName(swh_space_name).get.thermalZone.get
|
56
|
+
main_swh_loop = add_swh_loop(template,
|
57
|
+
"#{swh_thermal_zone.name} Service Water Loop",
|
58
|
+
swh_thermal_zone,
|
59
|
+
OpenStudio.convert(prototype_input['main_service_water_temperature'], 'F', 'C').get,
|
60
|
+
prototype_input['main_service_water_pump_head'],
|
61
|
+
prototype_input['main_service_water_pump_motor_efficiency'],
|
62
|
+
OpenStudio.convert(prototype_input['main_water_heater_capacity'], 'Btu/hr', 'W').get,
|
63
|
+
OpenStudio.convert(prototype_input['main_water_heater_volume'], 'gal', 'm^3').get,
|
64
|
+
prototype_input['main_water_heater_fuel'],
|
65
|
+
OpenStudio.convert(prototype_input['main_service_water_parasitic_fuel_consumption_rate'], 'Btu/hr', 'W').get,
|
66
|
+
building_type)
|
79
67
|
|
68
|
+
add_swh_end_uses(template,
|
69
|
+
'Main',
|
70
|
+
main_swh_loop,
|
71
|
+
rated_flow_rate_m3_per_s,
|
72
|
+
swh_sch_name,
|
73
|
+
OpenStudio.convert(prototype_input['main_water_use_temperature'], 'F', 'C').get,
|
74
|
+
swh_space_name,
|
75
|
+
building_type)
|
80
76
|
end
|
81
77
|
|
82
|
-
|
83
|
-
elsif building_type == 'LargeHotel'
|
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
|
-
|
78
|
+
#
|
79
|
+
# elsif building_type == 'LargeHotel'
|
80
|
+
#
|
81
|
+
# # Add water use equipment to each space
|
82
|
+
# guess_room_water_use_schedule = "HotelLarge GuestRoom_SWH_Sch"
|
83
|
+
# kitchen_water_use_schedule = "HotelLarge BLDG_SWH_SCH"
|
84
|
+
#
|
85
|
+
# water_end_uses = []
|
86
|
+
# space_type_map = self.define_space_type_map(building_type, template, climate_zone)
|
87
|
+
# space_multipliers = define_space_multiplier
|
88
|
+
#
|
89
|
+
# kitchen_space_types = ['Kitchen']
|
90
|
+
# kitchen_space_use_rate = 2.22 # gal/min, from PNNL prototype building
|
91
|
+
#
|
92
|
+
# guess_room_water_use_rate = 0.020833333 # gal/min, Reference: NREL Reference building report 5.1.6
|
93
|
+
#
|
94
|
+
# # Create a list of water use rates and associated room multipliers
|
95
|
+
# case template
|
96
|
+
# when "90.1-2004", "90.1-2007", "90.1-2010", "90.1-2013"
|
97
|
+
# guess_room_space_types =['GuestRoom','GuestRoom2','GuestRoom3','GuestRoom4']
|
98
|
+
# else
|
99
|
+
# guess_room_space_types =['GuestRoom','GuestRoom3']
|
100
|
+
# guess_room_space_types1 = ['GuestRoom2']
|
101
|
+
# guess_room_space_types2 = ['GuestRoom4']
|
102
|
+
# guess_room_water_use_rate1 = 0.395761032 # gal/min, Reference building
|
103
|
+
# guess_room_water_use_rate2 = 0.187465752 # gal/min, Reference building
|
104
|
+
#
|
105
|
+
# laundry_water_use_schedule = "HotelLarge LaundryRoom_Eqp_Elec_Sch"
|
106
|
+
# laundry_space_types = ['Laundry']
|
107
|
+
# laundry_room_water_use_rate = 2.6108244 # gal/min, Reference building
|
108
|
+
#
|
109
|
+
# guess_room_space_types1.each do |space_type|
|
110
|
+
# space_names = space_type_map[space_type]
|
111
|
+
# space_names.each do |space_name|
|
112
|
+
# space_multiplier = 1
|
113
|
+
# space_multiplier= space_multipliers[space_name].to_i if space_multipliers[space_name] != nil
|
114
|
+
# water_end_uses.push([space_name, guess_room_water_use_rate1 * space_multiplier,guess_room_water_use_schedule])
|
115
|
+
# end
|
116
|
+
# end
|
117
|
+
#
|
118
|
+
# guess_room_space_types2.each do |space_type|
|
119
|
+
# space_names = space_type_map[space_type]
|
120
|
+
# space_names.each do |space_name|
|
121
|
+
# space_multiplier = 1
|
122
|
+
# space_multiplier= space_multipliers[space_name].to_i if space_multipliers[space_name] != nil
|
123
|
+
# water_end_uses.push([space_name, guess_room_water_use_rate2 * space_multiplier,guess_room_water_use_schedule])
|
124
|
+
# end
|
125
|
+
# end
|
126
|
+
#
|
127
|
+
# laundry_space_types.each do |space_type|
|
128
|
+
# space_names = space_type_map[space_type]
|
129
|
+
# space_names.each do |space_name|
|
130
|
+
# space_multiplier = 1
|
131
|
+
# space_multiplier= space_multipliers[space_name].to_i if space_multipliers[space_name] != nil
|
132
|
+
# water_end_uses.push([space_name, laundry_room_water_use_rate * space_multiplier,laundry_water_use_schedule])
|
133
|
+
# end
|
134
|
+
# end
|
135
|
+
# end
|
136
|
+
#
|
137
|
+
# guess_room_space_types.each do |space_type|
|
138
|
+
# space_names = space_type_map[space_type]
|
139
|
+
# space_names.each do |space_name|
|
140
|
+
# space_multiplier = 1
|
141
|
+
# space_multiplier= space_multipliers[space_name].to_i if space_multipliers[space_name] != nil
|
142
|
+
# water_end_uses.push([space_name, guess_room_water_use_rate * space_multiplier,guess_room_water_use_schedule])
|
143
|
+
# end
|
144
|
+
# end
|
145
|
+
#
|
146
|
+
# kitchen_space_types.each do |space_type|
|
147
|
+
# space_names = space_type_map[space_type]
|
148
|
+
# space_names.each do |space_name|
|
149
|
+
# space_multiplier = 1
|
150
|
+
# space_multiplier= space_multipliers[space_name].to_i if space_multipliers[space_name] != nil
|
151
|
+
# water_end_uses.push([space_name, kitchen_space_use_rate * space_multiplier,kitchen_water_use_schedule])
|
152
|
+
# end
|
153
|
+
# end
|
154
|
+
#
|
155
|
+
# # Connect the water use equipment to the loop
|
156
|
+
# water_end_uses.each do |water_end_use|
|
157
|
+
# space_name = water_end_use[0]
|
158
|
+
# use_rate = water_end_use[1] # in gal/min
|
159
|
+
# use_schedule = water_end_use[2]
|
160
|
+
#
|
161
|
+
# self.add_swh_end_uses(template,
|
162
|
+
# 'Main',
|
163
|
+
# main_swh_loop,
|
164
|
+
# OpenStudio.convert(use_rate,'gal/min','m^3/s').get,
|
165
|
+
# use_schedule,
|
166
|
+
# OpenStudio.convert(prototype_input['main_water_use_temperature'],'F','C').get,
|
167
|
+
# space_name,
|
168
|
+
# building_type)
|
169
|
+
# end
|
121
170
|
|
122
|
-
|
123
|
-
space_names = space_type_map[space_type]
|
124
|
-
space_names.each do |space_name|
|
125
|
-
space_multiplier = 1
|
126
|
-
space_multiplier= space_multipliers[space_name].to_i if space_multipliers[space_name] != nil
|
127
|
-
water_end_uses.push([space_name, guess_room_water_use_rate2 * space_multiplier,guess_room_water_use_schedule])
|
128
|
-
end
|
129
|
-
end
|
171
|
+
elsif prototype_input['main_service_water_peak_flowrate']
|
130
172
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
173
|
+
# Attaches the end uses if specified as a lump value in the prototype_input
|
174
|
+
add_swh_end_uses(template,
|
175
|
+
'Main',
|
176
|
+
main_swh_loop,
|
177
|
+
OpenStudio.convert(prototype_input['main_service_water_peak_flowrate'], 'gal/min', 'm^3/s').get,
|
178
|
+
prototype_input['main_service_water_flowrate_schedule'],
|
179
|
+
OpenStudio.convert(prototype_input['main_water_use_temperature'], 'F', 'C').get,
|
180
|
+
nil,
|
181
|
+
building_type)
|
140
182
|
|
141
|
-
|
142
|
-
space_names = space_type_map[space_type]
|
143
|
-
space_names.each do |space_name|
|
144
|
-
space_multiplier = 1
|
145
|
-
space_multiplier= space_multipliers[space_name].to_i if space_multipliers[space_name] != nil
|
146
|
-
water_end_uses.push([space_name, guess_room_water_use_rate * space_multiplier,guess_room_water_use_schedule])
|
147
|
-
end
|
148
|
-
end
|
183
|
+
else
|
149
184
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
space_multiplier = 1
|
154
|
-
space_multiplier= space_multipliers[space_name].to_i if space_multipliers[space_name] != nil
|
155
|
-
water_end_uses.push([space_name, kitchen_space_use_rate * space_multiplier,kitchen_water_use_schedule])
|
156
|
-
end
|
157
|
-
end
|
158
|
-
|
159
|
-
# Connect the water use equipment to the loop
|
160
|
-
water_end_uses.each do |water_end_use|
|
161
|
-
space_name = water_end_use[0]
|
162
|
-
use_rate = water_end_use[1] # in gal/min
|
163
|
-
use_schedule = water_end_use[2]
|
164
|
-
|
165
|
-
self.add_swh_end_uses(building_vintage,
|
166
|
-
'Main',
|
167
|
-
main_swh_loop,
|
168
|
-
OpenStudio.convert(use_rate,'gal/min','m^3/s').get,
|
169
|
-
use_schedule,
|
170
|
-
OpenStudio.convert(prototype_input['main_water_use_temperature'],'F','C').get,
|
171
|
-
space_name,
|
172
|
-
building_type)
|
173
|
-
end
|
174
|
-
=end
|
175
|
-
|
176
|
-
elsif prototype_input['main_service_water_peak_flowrate']
|
177
|
-
|
178
|
-
# Attaches the end uses if specified as a lump value in the prototype_input
|
179
|
-
self.add_swh_end_uses(building_vintage,
|
180
|
-
'Main',
|
181
|
-
main_swh_loop,
|
182
|
-
OpenStudio.convert(prototype_input['main_service_water_peak_flowrate'],'gal/min','m^3/s').get,
|
183
|
-
prototype_input['main_service_water_flowrate_schedule'],
|
184
|
-
OpenStudio.convert(prototype_input['main_water_use_temperature'],'F','C').get,
|
185
|
-
nil,
|
186
|
-
building_type)
|
187
|
-
|
188
|
-
else
|
189
|
-
|
190
|
-
# Attaches the end uses if specified by space type
|
191
|
-
|
192
|
-
if building_vintage == 'NECB 2011'
|
185
|
+
# Attaches the end uses if specified by space type
|
186
|
+
|
187
|
+
if template == 'NECB 2011'
|
193
188
|
building_type = 'Space Function'
|
194
189
|
end
|
195
|
-
|
196
|
-
space_type_map =
|
190
|
+
|
191
|
+
space_type_map = define_space_type_map(building_type, template, climate_zone)
|
197
192
|
space_type_map.each do |space_type_name, space_names|
|
198
193
|
search_criteria = {
|
199
|
-
'template' =>
|
194
|
+
'template' => template,
|
200
195
|
'building_type' => get_lookup_name(building_type),
|
201
196
|
'space_type' => space_type_name
|
202
197
|
}
|
203
|
-
data = find_object($os_standards['space_types'],search_criteria)
|
204
|
-
|
198
|
+
data = find_object($os_standards['space_types'], search_criteria)
|
199
|
+
|
205
200
|
# Skip space types with no data
|
206
201
|
next if data.nil?
|
207
|
-
|
202
|
+
|
208
203
|
# Skip space types with no water use, unless it is a NECB archetype (these do not have peak flow rates defined)
|
209
|
-
next
|
204
|
+
next unless template == 'NECB 2011' || !data['service_water_heating_peak_flow_rate'].nil?
|
210
205
|
|
211
206
|
# Add a service water use for each space
|
212
207
|
space_names.each do |space_name|
|
213
|
-
|
214
|
-
space = self.getSpaceByName(space_name).get
|
208
|
+
space = getSpaceByName(space_name).get
|
215
209
|
space_multiplier = space.multiplier
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
210
|
+
add_swh_end_uses_by_space(get_lookup_name(building_type),
|
211
|
+
template,
|
212
|
+
climate_zone,
|
213
|
+
main_swh_loop,
|
214
|
+
space_type_name,
|
215
|
+
space_name,
|
216
|
+
space_multiplier)
|
223
217
|
end
|
224
|
-
|
225
218
|
end
|
226
219
|
|
227
|
-
end
|
220
|
+
end
|
228
221
|
|
229
222
|
end
|
230
|
-
|
223
|
+
|
231
224
|
# Add the booster water heater, if specified
|
232
225
|
unless prototype_input['booster_water_heater_volume'].nil?
|
233
|
-
|
226
|
+
|
234
227
|
# Add the booster water loop
|
235
|
-
swh_booster_loop =
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
228
|
+
swh_booster_loop = add_swh_booster(template,
|
229
|
+
main_swh_loop,
|
230
|
+
OpenStudio.convert(prototype_input['booster_water_heater_capacity'], 'Btu/hr', 'W').get,
|
231
|
+
OpenStudio.convert(prototype_input['booster_water_heater_volume'], 'gal', 'm^3').get,
|
232
|
+
prototype_input['booster_water_heater_fuel'],
|
233
|
+
OpenStudio.convert(prototype_input['booster_water_temperature'], 'F', 'C').get,
|
234
|
+
0,
|
235
|
+
nil,
|
236
|
+
building_type)
|
237
|
+
|
245
238
|
# Attach the end uses
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
239
|
+
add_booster_swh_end_uses(template,
|
240
|
+
swh_booster_loop,
|
241
|
+
OpenStudio.convert(prototype_input['booster_service_water_peak_flowrate'], 'gal/min', 'm^3/s').get,
|
242
|
+
prototype_input['booster_service_water_flowrate_schedule'],
|
243
|
+
OpenStudio.convert(prototype_input['booster_water_use_temperature'], 'F', 'C').get,
|
244
|
+
building_type)
|
252
245
|
|
253
246
|
end
|
254
|
-
|
247
|
+
|
255
248
|
# Add the laundry water heater, if specified
|
256
249
|
unless prototype_input['laundry_water_heater_volume'].nil?
|
257
|
-
|
250
|
+
|
258
251
|
# Add the laundry service water heating loop
|
259
|
-
laundry_swh_loop =
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
252
|
+
laundry_swh_loop = add_swh_loop(template,
|
253
|
+
'Laundry Service Water Loop',
|
254
|
+
nil,
|
255
|
+
OpenStudio.convert(prototype_input['laundry_service_water_temperature'], 'F', 'C').get,
|
256
|
+
prototype_input['laundry_service_water_pump_head'],
|
257
|
+
prototype_input['laundry_service_water_pump_motor_efficiency'],
|
258
|
+
OpenStudio.convert(prototype_input['laundry_water_heater_capacity'], 'Btu/hr', 'W').get,
|
259
|
+
OpenStudio.convert(prototype_input['laundry_water_heater_volume'], 'gal', 'm^3').get,
|
260
|
+
prototype_input['laundry_water_heater_fuel'],
|
261
|
+
OpenStudio.convert(prototype_input['laundry_service_water_parasitic_fuel_consumption_rate'], 'Btu/hr', 'W').get,
|
262
|
+
building_type)
|
263
|
+
|
271
264
|
# Attach the end uses if specified in prototype inputs
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
265
|
+
add_swh_end_uses(template,
|
266
|
+
'Laundry',
|
267
|
+
laundry_swh_loop,
|
268
|
+
OpenStudio.convert(prototype_input['laundry_service_water_peak_flowrate'], 'gal/min', 'm^3/s').get,
|
269
|
+
prototype_input['laundry_service_water_flowrate_schedule'],
|
270
|
+
OpenStudio.convert(prototype_input['laundry_water_use_temperature'], 'F', 'C').get,
|
271
|
+
nil,
|
272
|
+
building_type)
|
280
273
|
|
281
274
|
end
|
282
275
|
|
283
|
-
OpenStudio
|
284
|
-
|
276
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished adding Service Water Heating')
|
277
|
+
|
285
278
|
return true
|
286
|
-
|
287
|
-
end #add swh
|
288
|
-
|
279
|
+
end # add swh
|
289
280
|
end
|