Module: PrototypeBuilding::RetailStripmall

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

Class Method Summary collapse

Class Method Details

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



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

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')

  system_to_space_map = PrototypeBuilding::RetailStripmall.define_hvac_system_map(building_type, template, climate_zone)

  # Add infiltration door opening
  # Spaces names to design infiltration rates (m3/s)
  case template
  when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
    door_infiltration_map = { ['LGstore1', 'LGstore2'] => 0.388884328,
                              ['SMstore1', 'SMstore2', 'SMstore3', 'SMstore4', 'SMstore5', 'SMstore6', 'SMstore7', 'SMstore8'] => 0.222287037 }

    door_infiltration_map.each_pair do |space_names, infiltration_design_flowrate|
      space_names.each do |space_name|
        space = model.getSpaceByName(space_name).get
        # Create the infiltration object and hook it up to the space type
        infiltration = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
        infiltration.setName("#{space_name} Door Open Infiltration")
        infiltration.setSpace(space)
        infiltration.setDesignFlowRate(infiltration_design_flowrate)
        infiltration_schedule = model.add_schedule('RetailStripmall INFIL_Door_Opening_SCH')
        if infiltration_schedule.nil?
          OpenStudio.logFree(OpenStudio::Error, 'openstudio.model.Model', "Can't find schedule (RetailStripmall INFIL_Door_Opening_SCH).")
          return false
        else
          infiltration.setSchedule(infiltration_schedule)
        end
      end
    end
  end

  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



133
134
135
136
137
# File 'lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb', line 133

def self.custom_swh_tweaks(building_type, template, climate_zone, prototype_input, model)
  PrototypeBuilding::RetailStripmall.update_waterheater_loss_coefficient(template, model)

  return true
end

.define_hvac_system_map(building_type, template, climate_zone) ⇒ Object



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

def self.define_hvac_system_map(building_type, template, climate_zone)
  system_to_space_map = [
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_1',
      'space_names' => ['LGSTORE1'],
      'hvac_op_sch_index' => 1
    },
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_2',
      'space_names' => ['SMstore1'],
      'hvac_op_sch_' => 1
    },
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_3',
      'space_names' => ['SMstore2'],
      'hvac_op_sch_index' => 2
    },
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_4',
      'space_names' => ['SMstore3'],
      'hvac_op_sch_index' => 2
    },
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_5',
      'space_names' => ['SMstore4'],
      'hvac_op_sch_index' => 2
    }, {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_6',
      'space_names' => ['LGSTORE2'],
      'hvac_op_sch_index' => 3
    },
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_7',
      'space_names' => ['SMstore5'],
      'hvac_op_sch_index' => 3
    },
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_8',
      'space_names' => ['SMstore6'],
      'hvac_op_sch_index' => 3
    },
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_9',
      'space_names' => ['SMstore7'],
      'hvac_op_sch_index' => 3
    },
    {
      'type' => 'PSZ-AC',
      'name' => 'PSZ-AC_10',
      'space_names' => ['SMstore8']
    }
  ]
  return system_to_space_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
# File 'lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb', line 5

def self.define_space_type_map(building_type, template, climate_zone)
  space_type_map = nil
  case template

  when 'NECB 2011'
    sch = 'C'
    space_type_map = {
      'Retail - sales' => ['LGstore1', 'LGstore2', 'SMstore1', 'SMstore2', 'SMstore3', 'SMstore4', 'SMstore5', 'SMstore6', 'SMstore7', 'SMstore8']
    }
  else
    space_type_map = {
      'Strip mall - type 1' => ['LGstore1', 'SMstore1'],
      'Strip mall - type 2' => ['SMstore2', 'SMstore3', 'SMstore4'],
      'Strip mall - type 3' => ['LGstore2', 'SMstore5', 'SMstore6', 'SMstore7', 'SMstore8']
    }
  end
  return space_type_map
end

.update_waterheater_loss_coefficient(template, model) ⇒ Object

add hvac



123
124
125
126
127
128
129
130
131
# File 'lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb', line 123

def self.update_waterheater_loss_coefficient(template, model)
  case template
  when '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013', 'NECB 2011'
    model.getWaterHeaterMixeds.sort.each do |water_heater|
      water_heater.setOffCycleLossCoefficienttoAmbientTemperature(1.205980747)
      water_heater.setOnCycleLossCoefficienttoAmbientTemperature(1.205980747)
    end
  end
end