Module: RetailStandalone

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

Overview

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

Instance Method Summary collapse

Instance Method Details

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



115
116
117
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStandalone.rb', line 115

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)

    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



137
138
139
140
141
142
143
144
145
146
147
148
149
150
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
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStandalone.rb', line 137

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)

  OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.Model', 'Adjusting geometry input')
  case template
  when '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
    case climate_zone
    when 'ASHRAE 169-2006-6A',
        'ASHRAE 169-2006-6B',
        'ASHRAE 169-2006-7A',
        'ASHRAE 169-2006-8A',
        'ASHRAE 169-2013-6A',
        'ASHRAE 169-2013-6B',
        'ASHRAE 169-2013-7A',
        'ASHRAE 169-2013-8A'
      # Remove existing skylights
      model.getSubSurfaces.each do |subsurf|
        if subsurf.subSurfaceType.to_s == 'Skylight'
          subsurf.remove
        end
      end
      # Load older geometry corresponding to older code versions
      old_geo = load_geometry_osm('geometry/ASHRAE90120042007RetailStandalone.osm')
      # Clone the skylights from the older geometry
      old_geo.getSubSurfaces.each do |subsurf|
        if subsurf.subSurfaceType.to_s == 'Skylight'
          new_skylight = subsurf.clone(model).to_SubSurface.get
          old_roof = subsurf.surface.get
          # Assign surfaces to skylights
          model.getSurfaces.each do |model_surf|
            if model_surf.name.to_s == old_roof.name.to_s
              new_skylight.setSurface(model_surf)
            end
          end
        end
      end
    end
  end
  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



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

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 the door infiltration for template 2004,2007,2010,2013,2016,2019
  case template
  when '90.1-2004'
    entry_space = model.getSpaceByName('Front_Entry').get
    infiltration_entry = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
    infiltration_entry.setName('Entry door Infiltration')
    infiltration_per_zone = 1.418672682
    infiltration_entry.setDesignFlowRate(infiltration_per_zone)
    infiltration_entry.setSchedule(model_add_schedule(model, 'RetailStandalone INFIL_Door_Opening_SCH'))
    infiltration_entry.setSpace(entry_space)

    # temporal solution for CZ dependent door infiltration rate.  In fact other standards need similar change as well
  when '90.1-2007', '90.1-2010', '90.1-2013', '90.1-2016', '90.1-2019'
    entry_space = model.getSpaceByName('Front_Entry').get
    infiltration_entry = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(model)
    infiltration_entry.setName('Entry door Infiltration')
    case climate_zone
    when 'ASHRAE 169-2006-0A',
        'ASHRAE 169-2006-1A',
        'ASHRAE 169-2006-0B',
        'ASHRAE 169-2006-1B',
        'ASHRAE 169-2006-2A',
        'ASHRAE 169-2006-2B',
        'ASHRAE 169-2013-0A',
        'ASHRAE 169-2013-1A',
        'ASHRAE 169-2013-0B',
        'ASHRAE 169-2013-1B',
        'ASHRAE 169-2013-2A',
        'ASHRAE 169-2013-2B'
      infiltration_per_zone = 1.418672682
      infiltration_entry.setSchedule(model_add_schedule(model, 'RetailStandalone INFIL_Door_Opening_SCH'))
    else
      infiltration_per_zone = 0.937286742
      infiltration_entry.setSchedule(model_add_schedule(model, 'RetailStandalone INFIL_Door_Opening_SCH_2013'))
    end
    infiltration_entry.setDesignFlowRate(infiltration_per_zone)
    infiltration_entry.setSpace(entry_space)
  end

  # add these additional coefficient inputs
  if infiltration_entry
    infiltration_entry.setConstantTermCoefficient(1.0)
    infiltration_entry.setTemperatureTermCoefficient(0.0)
    infiltration_entry.setVelocityTermCoefficient(0.0)
    infiltration_entry.setVelocitySquaredTermCoefficient(0.0)
  end

  case template
  when '90.1-2013', '90.1-2016', '90.1-2019'
    # Add EMS for controlling the system serving the front entry zone
    oa_sens = OpenStudio::Model::EnergyManagementSystemSensor.new(model, 'Site Outdoor Air Drybulb Temperature')
    oa_sens.setName('OAT_F')
    oa_sens.setKeyName('Environment')

    model.getFanConstantVolumes.each do |fan|
      if fan.name.to_s.include?('Front') && fan.name.to_s.include?('Entry')
        frt_entry_avail_fan_sch = fan.availabilitySchedule
        frt_entry_fan = OpenStudio::Model::EnergyManagementSystemActuator.new(frt_entry_avail_fan_sch, 'Schedule:Year', 'Schedule Value')
        frt_entry_fan.setName('FrontEntry_Fan')
      end
    end

    model.getCoilHeatingGass.each do |coil|
      if coil.name.to_s.include?('Front') && coil.name.to_s.include?('Entry')
        frt_entry_avail_coil_sch = coil.availabilitySchedule
        frt_entry_coil = OpenStudio::Model::EnergyManagementSystemActuator.new(frt_entry_avail_coil_sch, 'Schedule:Year', 'Schedule Value')
        frt_entry_coil.setName('FrontEntry_Coil')
      end
    end

    frt_entry_prg = OpenStudio::Model::EnergyManagementSystemProgram.new(model)
    frt_entry_prg.setName('FrontEntry_HeaterControl')
    frt_entry_prg_body = <<-EMS
    SET OAT_F = (OAT_F*1.8)+32
    IF OAT_F > 45
      SET FrontEntry_Coil = 0
      SET FrontEntry_Fan = 0
    ELSE
    SET FrontEntry_Coil = 1
    SET FrontEntry_Fan = 1
    ENDIF
    EMS
    frt_entry_prg.setBody(frt_entry_prg_body)

    prg_mgr = OpenStudio::Model::EnergyManagementSystemProgramCallingManager.new(model)
    prg_mgr.setName('FrontEntry_HeaterManager')
    prg_mgr.setCallingPoint('BeginTimestepBeforePredictor')
    prg_mgr.addProgram(frt_entry_prg)
  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) ⇒ 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



126
127
128
# File 'lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStandalone.rb', line 126

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