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) ⇒ Object

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


52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb', line 52

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'
      elec_equip.setSchedule(model_add_schedule(model, 'HotelSmall ELEV_LIGHT_FAN_SCH_ADD_DF'))
    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_hvac_tweaks(building_type, climate_zone, prototype_input, model) ⇒ Object


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

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

  # hardsize corridor1. put in standards in the future  #TODO
  unless template == 'DOE Ref 1980-2004' || template == 'DOE Ref Pre-1980'
    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
  end

  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) ⇒ Object


72
73
74
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb', line 72

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