Module: SmallHotel

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#add_extra_equip_elevator_coreflr1(model) ⇒ Boolean

add this for elevator lights/fans (elevator lift is implemented through standard lookup)

Parameters:

  • model (OpenStudio::Model::Model)

    OpenStudio model object

Returns:

  • (Boolean)

    returns true if successful, false if not



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

def add_extra_equip_elevator_coreflr1(model)
  elevator_coreflr1 = model.getSpaceByName('ElevatorCoreFlr1').get
  elec_equip_def = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
  elec_equip_def.setName('Elevator CoreFlr1 Electric Equipment Definition')
  elec_equip_def.setFractionLatent(0)
  elec_equip_def.setFractionRadiant(0.5)
  elec_equip_def.setFractionLost(0.0)
  elec_equip_def.setDesignLevel(125)
  elec_equip = OpenStudio::Model::ElectricEquipment.new(elec_equip_def)
  elec_equip.setName('Elevator Coreflr1 Elevator Lights/Fans Equipment')
  elec_equip.setSpace(elevator_coreflr1)
  case template
    when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
      # add elevator lift motor (not found in small hotel)
      elec_equip_def2 = OpenStudio::Model::ElectricEquipmentDefinition.new(model)
      elec_equip_def2.setName('Elevator CoreFlr1 Electric Equipment Definition2')
      elec_equip_def2.setFractionLatent(0)
      elec_equip_def2.setFractionRadiant(0.5)
      elec_equip_def2.setFractionLost(0.0)
      elec_equip_def2.setDesignLevel(32110)
      elec_equip2 = OpenStudio::Model::ElectricEquipment.new(elec_equip_def2)
      elec_equip2.setName('Elevator Coreflr1 Elevator Equipment')
      elec_equip2.setSpace(elevator_coreflr1)
      elec_equip2.setSchedule(model_add_schedule(model, 'HotelSmall BLDG_ELEVATORS'))

      case template
      when '90.1-2004', '90.1-2007'
        elec_equip.setSchedule(model_add_schedule(model, 'HotelSmall ELEV_LIGHT_FAN_SCH_24_7'))
      when '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
        elec_equip.setSchedule(model_add_schedule(model, 'HotelSmall ELEV_LIGHT_FAN_SCH_ADD_DF'))
      end

    when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004'
      elec_equip.setSchedule(model_add_schedule(model, 'HotelSmall ELEV_LIGHT_FAN_SCH_ADD_DF'))
  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)

    uilding_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



146
147
148
149
150
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb', line 146

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, 90.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)

    uilding_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
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.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 elevator for the elevator coreflr1  (the elevator lift already added via standard spreadsheet)
  add_extra_equip_elevator_coreflr1(model)

  # add extra infiltration for corridor1 door
  corridor_space = model.getSpaceByName('CorridorFlr1')
  corridor_space = corridor_space.get
  unless template == 'DOE Ref 1980-2004' || template == 'DOE Ref Pre-1980'
    infiltration_corridor = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
    infiltration_corridor.setName('Corridor1 door Infiltration')
    infiltration_per_zone = 0
    infiltration_per_zone = if template == '90.1-2010' || template == '90.1-2007'
                              0.591821538
                            else
                              0.91557718
                            end
    infiltration_corridor.setDesignFlowRate(infiltration_per_zone)
    infiltration_corridor.setSchedule(model_add_schedule(model, 'HotelSmall INFIL_Door_Opening_SCH'))
    infiltration_corridor.setSpace(corridor_space)
  end

  unless template == 'DOE Ref 1980-2004' || template == 'DOE Ref Pre-1980'
    # hardsize corridor1. put in standards in the future
    # @todo
    model.getZoneHVACPackagedTerminalAirConditioners.sort.each do |ptac|
      zone = ptac.thermalZone.get
      if zone.spaces.include?(corridor_space)
        ptac.setSupplyAirFlowRateDuringCoolingOperation(0.13)
        ptac.setSupplyAirFlowRateDuringHeatingOperation(0.13)
        ptac.setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(0.13)
        ccoil = ptac.coolingCoil
        if ccoil.to_CoilCoolingDXSingleSpeed.is_initialized
          ccoil.to_CoilCoolingDXSingleSpeed.get.setRatedTotalCoolingCapacity(2638) # Unit: W
          ccoil.to_CoilCoolingDXSingleSpeed.get.setRatedAirFlowRate(0.13)
        end
      end
    end

    # add HotelSmall SAC_Econ_MaxOAFrac_Sch
    oa_controller = model.getControllerOutdoorAirByName('ExerciseCenterFlr1 ZN - EmployeeLoungeFlr1 ZN - RestroomFlr1 ZN SAC OA System Controller').get
    oa_controller.setMaximumFractionofOutdoorAirSchedule(model_add_schedule(model, 'HotelSmall SAC_Econ_MaxOAFrac_Sch'))
  end

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

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

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

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

  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)

    uilding_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



134
135
136
137
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb', line 134

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



116
117
118
119
120
121
122
123
124
125
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb', line 116

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