Module: LargeHotel

Defined in:
lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb

Overview

Custom changes for the LargeHotel prototype. These are changes that are inconsistent with other prototype building types.

AirTerminalSingleDuctVAVReheat collapse

Instance Method Summary collapse

Instance Method Details

#add_extra_equip_kitchen(model) ⇒ Boolean

add extra equipment for kitchen

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



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
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 151

def add_extra_equip_kitchen(model)
  kitchen_space = model.getSpaceByName('Kitchen_Flr_6')
  kitchen_space = kitchen_space.get
  kitchen_space_type = kitchen_space.spaceType.get
  elec_equip_def1 = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
  elec_equip_def2 = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
  elec_equip_def1.setName('Kitchen Electric Equipment Definition1')
  elec_equip_def2.setName('Kitchen Electric Equipment Definition2')
  case template
    when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
      elec_equip_def1.setFractionLatent(0)
      elec_equip_def1.setFractionRadiant(0.25)
      elec_equip_def1.setFractionLost(0)
      elec_equip_def2.setFractionLatent(0)
      elec_equip_def2.setFractionRadiant(0.25)
      elec_equip_def2.setFractionLost(0)
      if template == '90.1-2013' || template == '90.1-2016'
        elec_equip_def1.setDesignLevel(457.7)
        elec_equip_def2.setDesignLevel(285)
      elsif template == '90.1-2019'
        elec_equip_def1.setDesignLevel(277.5)
        elec_equip_def2.setDesignLevel(156.7)
      else
        elec_equip_def1.setDesignLevel(515.917)
        elec_equip_def2.setDesignLevel(425.8)
      end
      # Create the electric equipment instance and hook it up to the space type
      elec_equip1 = OpenStudio::Model::ElectricEquipment.new(elec_equip_def1)
      elec_equip2 = OpenStudio::Model::ElectricEquipment.new(elec_equip_def2)
      elec_equip1.setName('Kitchen_Reach-in-Freezer')
      elec_equip2.setName('Kitchen_Reach-in-Refrigerator')
      elec_equip1.setSpaceType(kitchen_space_type)
      elec_equip2.setSpaceType(kitchen_space_type)
      elec_equip1.setSchedule(model_add_schedule(model, 'HotelLarge ALWAYS_ON'))
      elec_equip2.setSchedule(model_add_schedule(model, 'HotelLarge ALWAYS_ON'))
    # elec_equip2.setSchedule(model.alwaysOnDiscreteSchedule)
    # elec_equip2.setSchedule(model.alwaysOffDiscreteSchedule)
  end
  return true
end

#air_loop_hvac_supply_air_temperature_reset_type(air_loop_hvac) ⇒ String

Type of SAT reset for this building type

Parameters:

  • air_loop_hvac (OpenStudio::Model::AirLoopHVAC)

    air loop

Returns:

  • (String)

    Returns type of SAT reset



270
271
272
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 270

def air_loop_hvac_supply_air_temperature_reset_type(air_loop_hvac)
  return 'oa'
end

#air_terminal_single_duct_vav_reheat_apply_initial_prototype_damper_position(air_terminal_single_duct_vav_reheat, zone_oa_per_area) ⇒ Boolean

Set the initial minimum damper position based on OA rate of the space and the template. Zones with low OA per area get lower initial guesses. Final position will be adjusted upward as necessary by Standards.AirLoopHVAC.apply_minimum_vav_damper_positions

Parameters:

  • air_terminal_single_duct_vav_reheat (OpenStudio::Model::AirTerminalSingleDuctVAVReheat)

    the air terminal object

  • zone_oa_per_area (Double)

    the zone outdoor air per area in m^3/s*m^2

Returns:

  • (Boolean)

    returns true if successful, false if not



257
258
259
260
261
262
263
264
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 257

def air_terminal_single_duct_vav_reheat_apply_initial_prototype_damper_position(air_terminal_single_duct_vav_reheat, zone_oa_per_area)
  min_damper_position = template == '90.1-2010' || template == '90.1-2013' || template == '90.1-2016' || template == '90.1-2019' ? 0.2 : 0.3

  # Set the minimum flow fraction
  air_terminal_single_duct_vav_reheat.setConstantMinimumAirFlowFraction(min_damper_position)

  return true
end

#model_add_daylighting_controls(model) ⇒ Boolean

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

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



196
197
198
199
200
201
202
203
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 196

def model_add_daylighting_controls(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(space, false, false)
  end
  return true
end

#model_custom_geometry_tweaks(model, building_type, climate_zone, prototype_input) ⇒ Boolean

geometry adjustments specific to the prototype model

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

  • building_type (String)

    the building type

  • climate_zone (String)

    ASHRAE climate zone, e.g. ‘ASHRAE 169-2013-4A’

  • prototype_input (Hash)

    hash of prototype inputs

Returns:

  • (Boolean)

    returns true if successful, false if not



243
244
245
246
247
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 243

def model_custom_geometry_tweaks(model, building_type, climate_zone, prototype_input)
  # Set original building North axis
  OpenstudioStandards::Geometry.model_set_building_north_axis(model, 0.0)
  return true
end

#model_custom_hvac_tweaks(model, building_type, climate_zone, prototype_input) ⇒ Boolean

hvac adjustments specific to the prototype model

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

  • building_type (String)

    the building type

  • climate_zone (String)

    ASHRAE climate zone, e.g. ‘ASHRAE 169-2013-4A’

  • prototype_input (Hash)

    hash of prototype inputs

Returns:

  • (Boolean)

    returns true if successful, false if not



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
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 11

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

  # add transformer
  # efficiency based on a 150 kVA transformer
  case template
  when '90.1-2004', '90.1-2007'
    transformer_efficiency = 0.971
  when '90.1-2010', '90.1-2013'
    transformer_efficiency = 0.983
  when '90.1-2016', '90.1-2019'
    transformer_efficiency = 0.988
  else
    transformer_efficiency = nil
  end
  return true unless !transformer_efficiency.nil?

  model_add_transformer(model,
                        wired_lighting_frac: 0.0352,
                        transformer_size: 150000,
                        transformer_efficiency: transformer_efficiency)

  # add extra equipment for kitchen
  add_extra_equip_kitchen(model)

  # Add Exhaust Fan
  space_type_map = define_space_type_map(building_type, 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 = standards_lookup_table_first(table_name: 'space_types', search_criteria: { '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(model, space_type_data['exhaust_availability_schedule'])
    unless exhaust_schedule
      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(model, 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

  # adjust VAV system sizing
  model.getAirLoopHVACs.each do |air_loop|
    if air_loop.name.to_s.include? 'VAV WITH REHEAT'
      # economizer type
      oa_system = air_loop.airLoopHVACOutdoorAirSystem.get
      oa_intake_controller = oa_system.getControllerOutdoorAir
      oa_intake_controller.setEconomizerControlType('DifferentialEnthalpy')

      # zone sizing
      rht_sa_temp_c = OpenStudio.convert(90.0, 'F', 'C').get
      air_loop.thermalZones.each do |zone|
        air_terminal = zone.airLoopHVACTerminal
        if air_terminal.is_initialized
          air_terminal = air_terminal.get
          if air_terminal.to_AirTerminalSingleDuctVAVReheat.is_initialized
            air_terminal = air_terminal.to_AirTerminalSingleDuctVAVReheat.get
            air_terminal.setMaximumReheatAirTemperature(rht_sa_temp_c)
            reheat_coil = air_terminal.reheatCoil
            reheat_coil = reheat_coil.to_CoilHeatingWater.get
            reheat_coil.setRatedOutletAirTemperature(rht_sa_temp_c)
          end
        end
      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')

  # Guestroom vacancy controls
  model_add_guestroom_vacancy_controls(model, 'LargeHotel')

  # Guestroom temperature reset schedule delay reduction from 30 min to 20 min
  model_reduce_setback_sch_delay(model, 'LargeHotel')

  # Guestroom ventilation availability schedule setup
  model_add_guestroom_vent_sch(model, 'LargeHotel')

  return true
end

#model_custom_swh_tweaks(model, building_type, climate_zone, prototype_input) ⇒ Boolean

swh adjustments specific to the prototype model

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

  • building_type (String)

    the building type

  • climate_zone (String)

    ASHRAE climate zone, e.g. ‘ASHRAE 169-2013-4A’

  • prototype_input (Hash)

    hash of prototype inputs

Returns:

  • (Boolean)

    returns true if successful, false if not



231
232
233
234
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 231

def model_custom_swh_tweaks(model, building_type, climate_zone, prototype_input)
  update_waterheater_ambient_parameters(model)
  return true
end

#model_transfer_air_target_and_source_zones(model) ⇒ Hash

List transfer air target and source zones, and airflow (cfm) code_sections [90.1-2019_6.5.7.1], [90.1-2016_6.5.7.1]

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Hash)

    target zones (key) and source zones (value) and air flow (value)



279
280
281
282
283
284
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 279

def model_transfer_air_target_and_source_zones(model)
  model_transfer_air_target_and_source_zones_hash = {
    'Laundry_Flr_1 ZN' => ['Lobby_Flr_1 ZN', 500.0]
  }
  return model_transfer_air_target_and_source_zones_hash
end

#update_waterheater_ambient_parameters(model) ⇒ Boolean

update water heater ambient conditions

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb', line 209

def update_waterheater_ambient_parameters(model)
  model.getWaterHeaterMixeds.sort.each do |water_heater|
    if water_heater.name.to_s.include?('300gal')
      water_heater.resetAmbientTemperatureSchedule
      water_heater.setAmbientTemperatureIndicator('ThermalZone')
      water_heater.setAmbientTemperatureThermalZone(model.getThermalZoneByName('Basement ZN').get)
    elsif water_heater.name.to_s.include?('6.0gal')
      water_heater.resetAmbientTemperatureSchedule
      water_heater.setAmbientTemperatureIndicator('ThermalZone')
      water_heater.setAmbientTemperatureThermalZone(model.getThermalZoneByName('Kitchen_Flr_6 ZN').get)
    end
  end
  return true
end