Module: PrototypeBuilding::LargeHotel

Defined in:
lib/openstudio-standards/prototypes/Prototype.large_hotel.rb

Class Method Summary collapse

Class Method Details

.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model) ⇒ Object



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
# File 'lib/openstudio-standards/prototypes/Prototype.large_hotel.rb', line 117

def self.custom_hvac_tweaks(building_type, template, climate_zone, prototype_input, model)
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Started building type specific adjustments')

  # Add Exhaust Fan
  space_type_map = define_space_type_map(building_type, template, climate_zone)
  exhaust_fan_space_types = []
  case template
  when '90.1-2004', '90.1-2007'
    exhaust_fan_space_types = ['Kitchen', 'Laundry']
  else
    exhaust_fan_space_types = ['Banquet', 'Kitchen', 'Laundry']
  end

  exhaust_fan_space_types.each do |space_type_name|
    space_type_data = model.find_object($os_standards['space_types'], 'template' => template, 'building_type' => building_type, 'space_type' => space_type_name)
    if space_type_data.nil?
      OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "Unable to find space type #{template}-#{building_type}-#{space_type_name}")
      return false
    end

    exhaust_schedule = model.add_schedule(space_type_data['exhaust_schedule'])
    if exhaust_schedule.class.to_s == 'NilClass'
      OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "Unable to find Exhaust Schedule for space type #{template}-#{building_type}-#{space_type_name}")
      return false
    end

    balanced_exhaust_schedule = model.add_schedule(space_type_data['balanced_exhaust_fraction_schedule'])

    space_names = space_type_map[space_type_name]
    space_names.each do |space_name|
      space = model.getSpaceByName(space_name).get
      thermal_zone = space.thermalZone.get

      zone_exhaust_fan = OpenStudio::Model::FanZoneExhaust.new(model)
      zone_exhaust_fan.setName(space.name.to_s + ' Exhaust Fan')
      zone_exhaust_fan.setAvailabilitySchedule(exhaust_schedule)
      zone_exhaust_fan.setFanEfficiency(space_type_data['exhaust_fan_efficiency'])
      zone_exhaust_fan.setPressureRise(space_type_data['exhaust_fan_pressure_rise'])
      maximum_flow_rate = OpenStudio.convert(space_type_data['exhaust_fan_maximum_flow_rate'], 'cfm', 'm^3/s').get

      zone_exhaust_fan.setMaximumFlowRate(maximum_flow_rate)
      if balanced_exhaust_schedule.class.to_s != 'NilClass'
        zone_exhaust_fan.setBalancedExhaustFractionSchedule(balanced_exhaust_schedule)
      end
      zone_exhaust_fan.setEndUseSubcategory('Zone Exhaust Fans')
      zone_exhaust_fan.addToThermalZone(thermal_zone)

      if !space_type_data['exhaust_fan_power'].nil? && space_type_data['exhaust_fan_power'].to_f.nonzero?
        # Create the electric equipment definition
        exhaust_fan_equip_def = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
        exhaust_fan_equip_def.setName("#{space_name} Electric Equipment Definition")
        exhaust_fan_equip_def.setDesignLevel(space_type_data['exhaust_fan_power'].to_f)
        exhaust_fan_equip_def.setFractionLatent(0)
        exhaust_fan_equip_def.setFractionRadiant(0)
        exhaust_fan_equip_def.setFractionLost(1)

        # Create the electric equipment instance and hook it up to the space type
        exhaust_fan_elec_equip = OpenStudio::Model::ElectricEquipment.new(exhaust_fan_equip_def)
        exhaust_fan_elec_equip.setName("#{space_name} Exhaust Fan Equipment")
        exhaust_fan_elec_equip.setSchedule(exhaust_schedule)
        exhaust_fan_elec_equip.setSpaceType(space.spaceType.get)
      end
    end
  end

  # Update Sizing Zone
  zone_sizing = model.getSpaceByName('Kitchen_Flr_6').get.thermalZone.get.sizingZone
  zone_sizing.setCoolingMinimumAirFlowFraction(0.7)

  zone_sizing = model.getSpaceByName('Laundry_Flr_1').get.thermalZone.get.sizingZone
  zone_sizing.setCoolingMinimumAirFlow(0.23567919336)

  OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished building type specific adjustments')

  return true
end

.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model) ⇒ Object



203
204
205
# File 'lib/openstudio-standards/prototypes/Prototype.large_hotel.rb', line 203

def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
  return true
end

.define_hvac_system_map(building_type, template, climate_zone) ⇒ Object



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
# File 'lib/openstudio-standards/prototypes/Prototype.large_hotel.rb', line 47

def self.define_hvac_system_map(building_type, template, climate_zone)
  system_to_space_map = [
    {
      'type' => 'VAV',
      'name' => 'VAV WITH REHEAT',
      'space_names' =>
        ['Basement', 'Retail_1_Flr_1', 'Retail_2_Flr_1', 'Mech_Flr_1', 'Storage_Flr_1', 'Laundry_Flr_1', 'Cafe_Flr_1', 'Lobby_Flr_1', 'Corridor_Flr_3', 'Banquet_Flr_6', 'Dining_Flr_6', 'Corridor_Flr_6', 'Kitchen_Flr_6']
    },
    {
      'type' => 'DOAS',
      'space_names' =>
        ['Room_1_Flr_3', 'Room_2_Flr_3', 'Room_3_Mult19_Flr_3', 'Room_4_Mult19_Flr_3', 'Room_5_Flr_3', 'Room_6_Flr_3', 'Room_1_Flr_6', 'Room_2_Flr_6', 'Room_3_Mult9_Flr_6']
    },
    {
      'type' => 'Refrigeration',
      'case_type' => 'Walkin Freezer',
      'cooling_capacity_per_length' => 367.0,
      'length' => 7.32,
      'evaporator_fan_pwr_per_length' => 34.0,
      'lighting_per_length' => 16.4,
      'lighting_sch_name' => 'HotelLarge BLDG_LIGHT_SCH',
      'defrost_pwr_per_length' => 273.0,
      'restocking_sch_name' => 'HotelLarge Kitchen_Flr_6_Case:1_WALKINFREEZER_WalkInStockingSched',
      'cop' => 1.5,
      'cop_f_of_t_curve_name' => 'RACK1_RackCOPfTCurve',
      'condenser_fan_pwr' => 350.0,
      'condenser_fan_pwr_curve_name' => 'RACK1_RackCondFanCurve2',
      'space_names' =>
        [
          'Kitchen_Flr_6'
        ]
    },
    {
      'type' => 'Refrigeration',
      'case_type' => 'Display Case',
      'cooling_capacity_per_length' => 734.0,
      'length' => 3.66,
      'evaporator_fan_pwr_per_length' => 55.0,
      'lighting_per_length' => 33.0,
      'lighting_sch_name' => 'HotelLarge BLDG_LIGHT_SCH',
      'defrost_pwr_per_length' => 0.0,
      'restocking_sch_name' => 'HotelLarge Kitchen_Flr_6_Case:2_SELFCONTAINEDDISPLAYCASE_CaseStockingSched',
      'cop' => 3.0,
      'cop_f_of_t_curve_name' => 'RACK2_RackCOPfTCurve',
      'condenser_fan_pwr' => 750.0,
      'condenser_fan_pwr_curve_name' => 'RACK1_RackCondFanCurve2',
      'space_names' =>
        [
          'Kitchen_Flr_6'
        ]
    }
  ]
  return system_to_space_map
end

.define_space_multiplierObject



102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/openstudio-standards/prototypes/Prototype.large_hotel.rb', line 102

def self.define_space_multiplier
  # This map define the multipliers for spaces with multipliers not equals to 1
  space_multiplier_map = {
    'Room_1_Flr_3' => 4,
    'Room_2_Flr_3' => 4,
    'Room_3_Mult19_Flr_3' => 76,
    'Room_4_Mult19_Flr_3' => 76,
    'Room_5_Flr_3' => 4,
    'Room_6_Flr_3' => 4,
    'Corridor_Flr_3' => 4,
    'Room_3_Mult9_Flr_6' => 9
  }
  return space_multiplier_map
end

.define_space_type_map(building_type, template, climate_zone) ⇒ Object



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
# File 'lib/openstudio-standards/prototypes/Prototype.large_hotel.rb', line 5

def self.define_space_type_map(building_type, template, climate_zone)
  space_type_map = nil
  case template
  when 'NECB 2011'
    # Building Schedule
    sch = 'E'
    space_type_map = {
      'Hotel/Motel - dining' => ['Banquet_Flr_6', 'Dining_Flr_6'],
      'Storage area' => ['Basement', 'Storage_Flr_1'],
      'Retail - mall concourse' => ['Cafe_Flr_1'],
      "Corr. >= 2.4m wide-sch-#{sch}" => ['Corridor_Flr_3', 'Corridor_Flr_6'],
      'Food preparation' => ['Kitchen_Flr_6'],
      'Hospital - laundry/washing' => ['Laundry_Flr_1'],
      'Hotel/Motel - lobby' => ['Lobby_Flr_1'],
      "Electrical/Mechanical-sch-#{sch}" => ['Mech_Flr_1'],
      'Retail - sales' => ['Retail_1_Flr_1', 'Retail_2_Flr_1'],
      'Hotel/Motel - rooms' => ['Room_1_Flr_3', 'Room_1_Flr_6', 'Room_2_Flr_3', 'Room_2_Flr_6', 'Room_3_Mult19_Flr_3', 'Room_3_Mult9_Flr_6', 'Room_4_Mult19_Flr_3', 'Room_5_Flr_3', 'Room_6_Flr_3']
    }
  else
    space_type_map = {
      'Banquet' => ['Banquet_Flr_6', 'Dining_Flr_6'],
      'Basement' => ['Basement'],
      'Cafe' => ['Cafe_Flr_1'],
      'Corridor' => ['Corridor_Flr_6'],
      'Corridor2' => ['Corridor_Flr_3'],
      'GuestRoom' => ['Room_1_Flr_3', 'Room_2_Flr_3', 'Room_5_Flr_3', 'Room_6_Flr_3'],
      'GuestRoom2' => ['Room_3_Mult19_Flr_3', 'Room_4_Mult19_Flr_3'],
      'GuestRoom3' => ['Room_1_Flr_6', 'Room_2_Flr_6'],
      'GuestRoom4' => ['Room_3_Mult9_Flr_6'],
      'Kitchen' => ['Kitchen_Flr_6'],
      'Laundry' => ['Laundry_Flr_1'],
      'Lobby' => ['Lobby_Flr_1'],
      'Mechanical' => ['Mech_Flr_1'],
      'Retail' => ['Retail_1_Flr_1'],
      'Retail2' => ['Retail_2_Flr_1'],
      'Storage' => ['Storage_Flr_1']
    }
  end

  return space_type_map
end

.large_hotel_add_daylighting_controls(template, model) ⇒ Object

Add the daylighting controls for lobby, cafe, dinning and banquet



195
196
197
198
199
200
201
# File 'lib/openstudio-standards/prototypes/Prototype.large_hotel.rb', line 195

def self.large_hotel_add_daylighting_controls(template, model)
  space_names = ['Banquet_Flr_6', 'Dining_Flr_6', 'Cafe_Flr_1', 'Lobby_Flr_1']
  space_names.each do |space_name|
    space = model.getSpaceByName(space_name).get
    space.add_daylighting_controls(template, false, false)
  end
end