Module: FullServiceRestaurant

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#add_door_infiltration(climate_zone, model) ⇒ Boolean

add door infiltration

Parameters:

  • climate_zone (String)

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

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



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

def add_door_infiltration(climate_zone, model)
  # add extra infiltration for dining room door and attic (there is no attic in 'DOE Ref Pre-1980')
  return false if template == 'DOE Ref 1980-2004' || template == 'DOE Ref Pre-1980' || template == 'NECB2011'

  dining_space = model.getSpaceByName('Dining').get
  attic_space = model.getSpaceByName('Attic').get
  infiltration_diningdoor = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
  infiltration_attic = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
  infiltration_diningdoor.setName('Dining door Infiltration')
  infiltration_per_zone_diningdoor = 0
  infiltration_per_zone_attic = 0.2378
  case template
  when '90.1-2004'
    infiltration_per_zone_diningdoor = 0.614474994
    infiltration_diningdoor.setSchedule(model_add_schedule(model, 'RestaurantSitDown DOOR_INFIL_SCH'))
  when '90.1-2007'
    case climate_zone
      when 'ASHRAE 169-2006-0A',
           'ASHRAE 169-2006-1A',
           'ASHRAE 169-2006-2A',
           'ASHRAE 169-2006-2B',
           'ASHRAE 169-2006-3A',
           'ASHRAE 169-2006-3B',
           'ASHRAE 169-2006-3C',
           'ASHRAE 169-2006-4A',
           'ASHRAE 169-2006-4B',
           'ASHRAE 169-2006-4C',
           'ASHRAE 169-2013-0A',
           'ASHRAE 169-2013-1A',
           'ASHRAE 169-2013-2A',
           'ASHRAE 169-2013-2B',
           'ASHRAE 169-2013-3A',
           'ASHRAE 169-2013-3B',
           'ASHRAE 169-2013-3C',
           'ASHRAE 169-2013-4A',
           'ASHRAE 169-2013-4B',
           'ASHRAE 169-2013-4C'
        infiltration_per_zone_diningdoor = 0.614474994
        infiltration_diningdoor.setSchedule(model_add_schedule(model, 'RestaurantSitDown DOOR_INFIL_SCH'))
      else
        infiltration_per_zone_diningdoor = 0.389828222
        infiltration_diningdoor.setSchedule(model_add_schedule(model, 'RestaurantSitDown VESTIBULE_DOOR_INFIL_SCH'))
    end
  when '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
    case climate_zone
      when 'ASHRAE 169-2006-0A',
           'ASHRAE 169-2006-1A',
           'ASHRAE 169-2006-2A',
           'ASHRAE 169-2006-2B',
           'ASHRAE 169-2006-3A',
           'ASHRAE 169-2006-3B',
           'ASHRAE 169-2006-3C',
           'ASHRAE 169-2013-0A',
           'ASHRAE 169-2013-1A',
           'ASHRAE 169-2013-2A',
           'ASHRAE 169-2013-2B',
           'ASHRAE 169-2013-3A',
           'ASHRAE 169-2013-3B',
           'ASHRAE 169-2013-3C'
        infiltration_per_zone_diningdoor = 0.614474994
        infiltration_diningdoor.setSchedule(model_add_schedule(model, 'RestaurantSitDown DOOR_INFIL_SCH'))
      else
        infiltration_per_zone_diningdoor = 0.389828222
        infiltration_diningdoor.setSchedule(model_add_schedule(model, 'RestaurantSitDown VESTIBULE_DOOR_INFIL_SCH'))
    end
  end
  infiltration_diningdoor.setDesignFlowRate(infiltration_per_zone_diningdoor)
  infiltration_diningdoor.setSpace(dining_space)
  infiltration_attic.setDesignFlowRate(infiltration_per_zone_attic)
  infiltration_attic.setSchedule(model_add_schedule(model, 'Always On'))
  infiltration_attic.setSpace(attic_space)
  return true
end

#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



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

def add_extra_equip_kitchen(model)
  kitchen_space = model.getSpaceByName('Kitchen')
  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.5)
        elec_equip_def2.setDesignLevel(570)
      elsif template == '90.1-2019'
        elec_equip_def1.setDesignLevel(277.5)
        elec_equip_def2.setDesignLevel(313.3)
      else
        elec_equip_def1.setDesignLevel(515.917)
        elec_equip_def2.setDesignLevel(851.67)
      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, 'RestaurantSitDown ALWAYS_ON'))
      elec_equip2.setSchedule(model_add_schedule(model, 'RestaurantSitDown ALWAYS_ON'))
    when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
      elec_equip_def1.setDesignLevel(699)
      elec_equip_def1.setFractionLatent(0)
      elec_equip_def1.setFractionRadiant(0)
      elec_equip_def1.setFractionLost(1)
      # Create the electric equipment instance and hook it up to the space type
      elec_equip1 = OpenStudio::Model::ElectricEquipment.new(elec_equip_def1)
      elec_equip1.setName('Kitchen_ExhFan_Equip')
      elec_equip1.setSpaceType(kitchen_space_type)
      elec_equip1.setSchedule(model_add_schedule(model, 'RestaurantSitDown Kitchen_Exhaust_SCH'))
  end
  return true
end

#add_zone_mixing(model) ⇒ Boolean

add zone_mixing between kitchen and dining

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb', line 142

def add_zone_mixing(model)
  # @todo remove zone mixing objects, transfer air is the should be the same for all stds, exhaust flow varies
  space_kitchen = model.getSpaceByName('Kitchen').get
  zone_kitchen = space_kitchen.thermalZone.get
  space_dining = model.getSpaceByName('Dining').get
  zone_dining = space_dining.thermalZone.get
  zone_mixing_kitchen = OpenStudio::Model::ZoneMixing.new(zone_kitchen)
  zone_mixing_kitchen.setSchedule(model_add_schedule(model, 'RestaurantSitDown Hours_of_operation'))
  case template
    when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
      zone_mixing_kitchen.setDesignFlowRate(1.828)
    when '90.1-2007', '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
      zone_mixing_kitchen.setDesignFlowRate(1.33143208)
    when '90.1-2004'
      zone_mixing_kitchen.setDesignFlowRate(2.64397817)
  end
  zone_mixing_kitchen.setSourceZone(zone_dining)
  zone_mixing_kitchen.setDeltaTemperature(0)
  return true
end

#adjust_clg_setpoint(climate_zone, model) ⇒ Boolean

adjust cooling setpoint

Parameters:

  • climate_zone (String)

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

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



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

def adjust_clg_setpoint(climate_zone, model)
  ['Dining', 'Kitchen'].each do |space_name|
    space_type_name = model.getSpaceByName(space_name).get.spaceType.get.name.get
    thermostat_name = "#{space_type_name} Thermostat"
    thermostat = model.getThermostatSetpointDualSetpointByName(thermostat_name).get
    case template
      when '90.1-2004', '90.1-2007', '90.1-2010'
        case climate_zone
        when 'ASHRAE 169-2006-0B',
             'ASHRAE 169-2006-1B',
             'ASHRAE 169-2006-2B',
             'ASHRAE 169-2006-3B',
             'ASHRAE 169-2013-0B',
             'ASHRAE 169-2013-1B',
             'ASHRAE 169-2013-2B',
             'ASHRAE 169-2013-3B'
          case space_name
            when 'Dining'
              thermostat.setCoolingSetpointTemperatureSchedule(model_add_schedule(model, 'RestaurantSitDown CLGSETP_SCH_NO_OPTIMUM'))
            when 'Kitchen'
              thermostat.setCoolingSetpointTemperatureSchedule(model_add_schedule(model, 'RestaurantSitDown CLGSETP_KITCHEN_SCH_NO_OPTIMUM'))
          end
        end
    end
  end
  return true
end

#model_custom_daylighting_tweaks(building_type, climate_zone, prototype_input, model) ⇒ Object



32
33
34
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb', line 32

def model_custom_daylighting_tweaks(building_type, climate_zone, prototype_input, model)
  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



330
331
332
333
334
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb', line 330

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
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.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 adjustments')

  # add extra equipment for kitchen
  add_extra_equip_kitchen(model)
  # add extra infiltration for dining room door and attic
  add_door_infiltration(climate_zone, model)
  # add zone_mixing between kitchen and dining
  add_zone_mixing(model)
  # Update Sizing Zone
  update_sizing_zone(model)
  # adjust the cooling setpoint
  adjust_clg_setpoint(climate_zone, model)
  # reset the design OA of kitchen
  reset_kitchen_oa(model)

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

  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



317
318
319
320
321
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb', line 317

def model_custom_swh_tweaks(model, building_type, climate_zone, prototype_input)
  update_waterheater_ambient_parameters(model)

  return true
end

#model_update_exhaust_fan_efficiency(model) ⇒ Boolean

update exhuast fan efficiency

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb', line 119

def model_update_exhaust_fan_efficiency(model)
  case template
    when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
      model.getFanZoneExhausts.sort.each do |exhaust_fan|
        fan_name = exhaust_fan.name.to_s
        if fan_name.include? 'Dining'
          exhaust_fan.setFanEfficiency(1)
          exhaust_fan.setPressureRise(0)
        end
      end
    when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
      model.getFanZoneExhausts.sort.each do |exhaust_fan|
        exhaust_fan.setFanEfficiency(1)
        exhaust_fan.setPressureRise(0.000001)
      end
  end
  return true
end

#reset_kitchen_oa(model) ⇒ Boolean

In order to provide sufficient OSA to replace exhaust flow through kitchen hoods (3,300 cfm), modeled OSA to kitchen is different from OSA determined based on ASHRAE 62.1. It takes into account the available OSA in dining as transfer air.

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb', line 279

def reset_kitchen_oa(model)
  space_kitchen = model.getSpaceByName('Kitchen').get
  ventilation = space_kitchen.designSpecificationOutdoorAir.get
  ventilation.setOutdoorAirFlowperPerson(0)
  ventilation.setOutdoorAirFlowperFloorArea(0)
  case template
    when '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
      ventilation.setOutdoorAirFlowRate(1.21708392)
    when '90.1-2007'
      ventilation.setOutdoorAirFlowRate(1.50025792)
    when '90.1-2004'
      ventilation.setOutdoorAirFlowRate(1.87711831)
  end
  return true
end

#update_sizing_zone(model) ⇒ Boolean

update zone sizing information

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb', line 220

def update_sizing_zone(model)
  case template
    when '90.1-2007', '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
      zone_sizing = model.getSpaceByName('Dining').get.thermalZone.get.sizingZone
      zone_sizing.setCoolingDesignAirFlowMethod('DesignDayWithLimit')
      zone_sizing.setCoolingMinimumAirFlowperZoneFloorArea(0.003581176)
      zone_sizing = model.getSpaceByName('Kitchen').get.thermalZone.get.sizingZone
      zone_sizing.setCoolingDesignAirFlowMethod('DesignDayWithLimit')
      zone_sizing.setCoolingMinimumAirFlowperZoneFloorArea(0)
    when '90.1-2004'
      zone_sizing = model.getSpaceByName('Dining').get.thermalZone.get.sizingZone
      zone_sizing.setCoolingDesignAirFlowMethod('DesignDayWithLimit')
      zone_sizing.setCoolingMinimumAirFlowperZoneFloorArea(0.007111554)
      zone_sizing = model.getSpaceByName('Kitchen').get.thermalZone.get.sizingZone
      zone_sizing.setCoolingDesignAirFlowMethod('DesignDayWithLimit')
      zone_sizing.setCoolingMinimumAirFlowperZoneFloorArea(0)
  end
  return true
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



299
300
301
302
303
304
305
306
307
308
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb', line 299

def update_waterheater_ambient_parameters(model)
  model.getWaterHeaterMixeds.sort.each do |water_heater|
    if water_heater.name.to_s.include?('Booster')
      water_heater.resetAmbientTemperatureSchedule
      water_heater.setAmbientTemperatureIndicator('ThermalZone')
      water_heater.setAmbientTemperatureThermalZone(model.getThermalZoneByName('Kitchen ZN').get)
    end
  end
  return true
end