Module: BTAP::Resources::Envelope::ConstructionSets

Defined in:
lib/openstudio-standards/btap/envelope.rb

Overview

This module contains methods for creating ConstructionSets.

Defined Under Namespace

Classes: ConstructionsSetTests

Class Method Summary collapse

Class Method Details

.create_default_construction_set(model, name, exterior_construction_set, interior_construction_set, ground_construction_set, subsurface_exterior_construction_set, subsurface_interior_construction_set) ⇒ Object

This method creates a default construction set. A construction set for exterior, interior,ground and subsurface must be created prior to populate this object.

Parameters:

  • model (OpenStudio::Model::Model)
  • name (String)
  • exterior_construction_set
  • interior_construction_set
  • ground_construction_set
  • subsurface_exterior_construction_set
  • subsurface_interior_construction_set

Returns:

  • (Object)

    set

Author:



1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
# File 'lib/openstudio-standards/btap/envelope.rb', line 1410

def self.create_default_construction_set(
    model,
    name,
    exterior_construction_set,
    interior_construction_set,
    ground_construction_set,
    subsurface_exterior_construction_set,
    subsurface_interior_construction_set)
  exterior_construction_set = BTAP::Common::validate_array(model,exterior_construction_set,"DefaultSurfaceConstructions").first
  interior_construction_set = BTAP::Common::validate_array(model,interior_construction_set,"DefaultSurfaceConstructions").first
  ground_construction_set   = BTAP::Common::validate_array(model,ground_construction_set,"DefaultSurfaceConstructions").first
  subsurface_exterior_construction_set =  BTAP::Common::validate_array(model,subsurface_exterior_construction_set,"DefaultSubSurfaceConstructions").first
  subsurface_interior_construction_set  = BTAP::Common::validate_array(model,subsurface_interior_construction_set,"DefaultSubSurfaceConstructions").first


  set = OpenStudio::Model::DefaultConstructionSet.new(model)
  set.setDefaultExteriorSurfaceConstructions(exterior_construction_set) unless exterior_construction_set.nil?
  set.setDefaultGroundContactSurfaceConstructions(ground_construction_set) unless ground_construction_set.nil?
  set.setDefaultInteriorSurfaceConstructions(interior_construction_set) unless interior_construction_set.nil?
  set.setDefaultExteriorSubSurfaceConstructions(subsurface_exterior_construction_set) unless subsurface_exterior_construction_set.nil?
  set.setDefaultInteriorSubSurfaceConstructions(subsurface_interior_construction_set) unless subsurface_interior_construction_set.nil?
  set.setName( name)
  return set
end

.create_default_surface_constructions(model, name, wall, floor, roof) ⇒ Object

This creates a new construction set of wall, floor and roof/ceiling objects.

Parameters:

Returns:

  • (Object)

    set

Author:



1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
# File 'lib/openstudio-standards/btap/envelope.rb', line 1320

def self.create_default_surface_constructions(model,name,wall,floor,roof)
  wall = BTAP::Common::validate_array(model,wall,"Construction").first
  floor = BTAP::Common::validate_array(model,floor,"Construction").first
  roof = BTAP::Common::validate_array(model,roof,"Construction").first
  set = OpenStudio::Model::DefaultSurfaceConstructions.new(model)
  set.setFloorConstruction(floor)
  set.setWallConstruction(wall)
  set.setRoofCeilingConstruction(roof)
  set.setName( name)
  return set
end

.create_subsurface_construction_set(model, fixedWindowConstruction, operableWindowConstruction, setDoorConstruction, setGlassDoorConstruction, overheadDoorConstruction, skylightConstruction, tubularDaylightDomeConstruction, tubularDaylightDiffuserConstruction) ⇒ Object

This method creates a subsurface construction set (windows, doors, skylights, etc)

Parameters:

Returns:

  • (Object)

    set

Author:



1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
# File 'lib/openstudio-standards/btap/envelope.rb', line 1344

def self.create_subsurface_construction_set(
    model,
    fixedWindowConstruction,
    operableWindowConstruction,
    setDoorConstruction,
    setGlassDoorConstruction,
    overheadDoorConstruction,
    skylightConstruction,
    tubularDaylightDomeConstruction,
    tubularDaylightDiffuserConstruction)
  fixedWindowConstruction = BTAP::Common::validate_array(model,fixedWindowConstruction,"Construction").first
  operableWindowConstruction = BTAP::Common::validate_array(model,operableWindowConstruction,"Construction").first
  setDoorConstruction =  BTAP::Common::validate_array(model,setDoorConstruction,"Construction").first
  setGlassDoorConstruction =  BTAP::Common::validate_array(model,setGlassDoorConstruction,"Construction").first
  overheadDoorConstruction  = BTAP::Common::validate_array(model,overheadDoorConstruction,"Construction").first
  skylightConstruction=  BTAP::Common::validate_array(model,skylightConstruction,"Construction").first
  tubularDaylightDomeConstruction =  BTAP::Common::validate_array(model,tubularDaylightDomeConstruction,"Construction").first
  tubularDaylightDiffuserConstruction = BTAP::Common::validate_array(model,tubularDaylightDiffuserConstruction,"Construction").first

  set = OpenStudio::Model::DefaultSubSurfaceConstructions.new(model)
  set.setFixedWindowConstruction(             fixedWindowConstruction) unless fixedWindowConstruction.nil?
  set.setOperableWindowConstruction(          operableWindowConstruction) unless operableWindowConstruction.nil?
  set.setDoorConstruction(                    setDoorConstruction) unless setDoorConstruction.nil?
  set.setGlassDoorConstruction(               setGlassDoorConstruction) unless setGlassDoorConstruction.nil?
  set.setOverheadDoorConstruction(            overheadDoorConstruction) unless overheadDoorConstruction.nil?
  set.setSkylightConstruction(                skylightConstruction) unless skylightConstruction.nil?
  set.setTubularDaylightDomeConstruction(     tubularDaylightDomeConstruction) unless tubularDaylightDomeConstruction.nil?
  set.setTubularDaylightDiffuserConstruction( tubularDaylightDiffuserConstruction) unless tubularDaylightDiffuserConstruction.nil?
  return set
end

.customize_default_sub_surface_constructions_conductance(model, name, subsurface_set, fixed_window_conductance = nil, fixed_wind_solar_trans = nil, fixed_wind_vis_trans = nil, operable_window_conductance = nil, operable_wind_solar_trans = nil, operable_wind_vis_trans = nil, door_construction_conductance = nil, glass_door_conductance = nil, glass_door_solar_trans = nil, glass_door_vis_trans = nil, overhead_door_conductance = nil, skylight_conductance = nil, skylight_solar_trans = nil, skylight_vis_trans = nil, tubular_daylight_dome_conductance = nil, tubular_daylight_dome_solar_trans = nil, tubular_daylight_dome_vis_trans = nil, tubular_daylight_diffuser_conductance = nil, tubular_daylight_diffuser_solar_trans = nil, tubular_daylight_diffuser_vis_trans = nil) ⇒ Object

This will customize default subsurface construction conductances.

Parameters:

  • model (OpenStudio::Model::Model)
  • name (String)
  • subsurface_set (Array)
  • fixed_window_conductance (Float) (defaults to: nil)

    nil

  • fixed_wind_solar_trans (Float) (defaults to: nil)

    nil

  • fixed_wind_vis_trans (Float) (defaults to: nil)

    nil

  • operable_window_conductance (Float) (defaults to: nil)

    nil

  • operable_wind_solar_trans (Float) (defaults to: nil)

    nil

  • operable_wind_vis_trans (Float) (defaults to: nil)

    nil

  • door_construction_conductance (Float) (defaults to: nil)

    nil

  • glass_door_conductance (Float) (defaults to: nil)

    nil

  • glass_door_solar_trans (Float) (defaults to: nil)

    nil

  • glass_door_vis_trans (Float) (defaults to: nil)

    nil

  • overhead_door_conductance (Float) (defaults to: nil)

    nil

  • skylight_conductance (Float) (defaults to: nil)

    nil

  • skylight_solar_trans (Float) (defaults to: nil)

    nil

  • skylight_vis_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_dome_conductance (Float) (defaults to: nil)

    nil

  • tubular_daylight_dome_solar_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_dome_vis_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_conductance (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_solar_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_vis_trans (Float) (defaults to: nil)

    nil

Returns:

  • (Object)

    set

Author:



1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
# File 'lib/openstudio-standards/btap/envelope.rb', line 1248

def self.customize_default_sub_surface_constructions_conductance(
    model,
    name,
    subsurface_set,
    fixed_window_conductance = nil, fixed_wind_solar_trans = nil , fixed_wind_vis_trans = nil,
    operable_window_conductance = nil, operable_wind_solar_trans = nil , operable_wind_vis_trans = nil,
    door_construction_conductance = nil,
    glass_door_conductance = nil,  glass_door_solar_trans = nil , glass_door_vis_trans = nil,
    overhead_door_conductance = nil,
    skylight_conductance = nil,  skylight_solar_trans = nil , skylight_vis_trans = nil,
    tubular_daylight_dome_conductance = nil,  tubular_daylight_dome_solar_trans = nil , tubular_daylight_dome_vis_trans = nil,
    tubular_daylight_diffuser_conductance = nil, tubular_daylight_diffuser_solar_trans = nil , tubular_daylight_diffuser_vis_trans = nil
  )
  set = OpenStudio::Model::DefaultSubSurfaceConstructions.new(model)
  set.setName( name )
  set.setFixedWindowConstruction( BTAP::Resources::Envelope::Constructions::customize_fenestration_construction(model, subsurface_set.fixedWindowConstruction.get, fixed_window_conductance, fixed_wind_solar_trans, fixed_wind_vis_trans) )
  set.setOperableWindowConstruction( BTAP::Resources::Envelope::Constructions::customize_fenestration_construction(model, subsurface_set.operableWindowConstruction.get, operable_window_conductance, operable_wind_solar_trans, operable_wind_vis_trans) )
  set.setDoorConstruction( BTAP::Resources::Envelope::Constructions::customize_opaque_construction(model, subsurface_set.doorConstruction.get, door_construction_conductance) )
  set.setGlassDoorConstruction( BTAP::Resources::Envelope::Constructions::customize_fenestration_construction(model, subsurface_set.glassDoorConstruction.get, glass_door_conductance, glass_door_solar_trans, glass_door_vis_trans) )
  set.setOverheadDoorConstruction( BTAP::Resources::Envelope::Constructions::customize_opaque_construction(model, subsurface_set.overheadDoorConstruction.get, overhead_door_conductance) )
  set.setSkylightConstruction( BTAP::Resources::Envelope::Constructions::customize_fenestration_construction(model, subsurface_set.skylightConstruction.get, skylight_conductance, skylight_solar_trans, skylight_vis_trans) )
  set.setTubularDaylightDomeConstruction( BTAP::Resources::Envelope::Constructions::customize_fenestration_construction(model, subsurface_set.tubularDaylightDomeConstruction.get, tubular_daylight_dome_conductance, tubular_daylight_dome_solar_trans, tubular_daylight_dome_vis_trans) )
  set.setTubularDaylightDiffuserConstruction( BTAP::Resources::Envelope::Constructions::customize_fenestration_construction(model, subsurface_set.tubularDaylightDiffuserConstruction.get, tubular_daylight_diffuser_conductance, tubular_daylight_diffuser_solar_trans, tubular_daylight_diffuser_vis_trans) )
  return set
end

.customize_default_sub_surface_constructions_rsi(model, name, subsurface_set, fixed_window_rsi = nil, fixed_wind_solar_trans = nil, fixed_wind_vis_trans = nil, operable_window_rsi = nil, operable_wind_solar_trans = nil, operable_wind_vis_trans = nil, door_construction_rsi = nil, glass_door_rsi = nil, glass_door_solar_trans = nil, glass_door_vis_trans = nil, overhead_door_rsi = nil, skylight_rsi = nil, skylight_solar_trans = nil, skylight_vis_trans = nil, tubular_daylight_dome_rsi = nil, tubular_daylight_dome_solar_trans = nil, tubular_daylight_dome_vis_trans = nil, tubular_daylight_diffuser_rsi = nil, tubular_daylight_diffuser_solar_trans = nil, tubular_daylight_diffuser_vis_trans = nil) ⇒ Object

This will customize default surface construction.

Parameters:

  • model (OpenStudio::Model::Model)
  • name (String)
  • subsurface_set (Float)

    nil

  • fixed_window_rsi (Float) (defaults to: nil)

    nil

  • fixed_wind_solar_trans (Float) (defaults to: nil)

    nil

  • fixed_wind_vis_trans (Float) (defaults to: nil)

    nil,

  • operable_window_rsi (Float) (defaults to: nil)

    nil

  • operable_wind_solar_trans (Float) (defaults to: nil)

    nil

  • operable_wind_vis_trans (Float) (defaults to: nil)

    nil

  • door_construction_rsi (Float) (defaults to: nil)

    nil

  • glass_door_rsi (Float) (defaults to: nil)

    nil

  • glass_door_solar_trans (Float) (defaults to: nil)

    nil

  • glass_door_vis_trans (Float) (defaults to: nil)

    nil

  • overhead_door_rsi (Float) (defaults to: nil)

    nil

  • skylight_rsi (Float) (defaults to: nil)

    nil

  • skylight_solar_trans (Float) (defaults to: nil)

    nil

  • skylight_vis_trans (Float) (defaults to: nil)

    nil,

  • tubular_daylight_dome_rsi (Float) (defaults to: nil)

    nil

  • tubular_daylight_dome_solar_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_dome_vis_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_rsi (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_solar_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_vis_trans (Float) (defaults to: nil)

    nil

Author:



1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
# File 'lib/openstudio-standards/btap/envelope.rb', line 1182

def self.customize_default_sub_surface_constructions_rsi(
    model,
    name,
    subsurface_set,
    fixed_window_rsi = nil, fixed_wind_solar_trans = nil , fixed_wind_vis_trans = nil,
    operable_window_rsi = nil, operable_wind_solar_trans = nil , operable_wind_vis_trans = nil,
    door_construction_rsi = nil,
    glass_door_rsi = nil,  glass_door_solar_trans = nil , glass_door_vis_trans = nil,
    overhead_door_rsi = nil,
    skylight_rsi = nil,  skylight_solar_trans = nil , skylight_vis_trans = nil,
    tubular_daylight_dome_rsi = nil,  tubular_daylight_dome_solar_trans = nil , tubular_daylight_dome_vis_trans = nil,
    tubular_daylight_diffuser_rsi = nil, tubular_daylight_diffuser_solar_trans = nil , tubular_daylight_diffuser_vis_trans = nil
  )

  fixed_window_rsi.nil? ? fixed_window_conductance = nil : fixed_window_conductance = 1.0 / fixed_window_rsi
  operable_window_rsi.nil? ? operable_window_conductance = nil : operable_window_conductance = 1.0 / operable_window_rsi
  door_construction_rsi.nil? ? door_construction_conductance = nil : door_construction_conductance = 1.0 / door_construction_rsi
  glass_door_rsi.nil? ? glass_door_conductance = nil : glass_door_conductance = 1.0 / glass_door_rsi
  overhead_door_rsi.nil? ? overhead_door_conductance = nil : overhead_door_conductance = 1.0 / overhead_door_rsi
  skylight_rsi.nil? ? skylight_conductance = nil : skylight_conductance = 1.0 / skylight_rsi
  tubular_daylight_dome_rsi.nil? ? tubular_daylight_dome_conductance = nil : tubular_daylight_dome_conductance = 1.0 / tubular_daylight_dome_rsi
  tubular_daylight_diffuser_rsi.nil? ? tubular_daylight_diffuser_conductance = nil : tubular_daylight_diffuser_conductance = 1.0 / tubular_daylight_diffuser_rsi

  self.customize_default_sub_surface_constructions_conductance(
    model,
    name,
    subsurface_set,
    fixed_window_conductance, fixed_wind_solar_trans  , fixed_wind_vis_trans ,
    operable_window_conductance , operable_wind_solar_trans  , operable_wind_vis_trans ,
    door_construction_conductance ,
    glass_door_conductance ,  glass_door_solar_trans  , glass_door_vis_trans ,
    overhead_door_conductance ,
    skylight_conductance ,  skylight_solar_trans  , skylight_vis_trans ,
    tubular_daylight_dome_conductance ,  tubular_daylight_dome_solar_trans  , tubular_daylight_dome_vis_trans ,
    tubular_daylight_diffuser_conductance , tubular_daylight_diffuser_solar_trans  , tubular_daylight_diffuser_vis_trans
  )

end

.customize_default_surface_construction_set_costs(default_surface_construction_set, ext_wall_cost = nil, ext_floor_cost = nil, ext_roof_cost = nil, ground_wall_cost = nil, ground_floor_cost = nil, ground_roof_cost = nil, fixed_window_cost = nil, operable_window_cost = nil, door_construction_cost = nil, glass_door_cost = nil, overhead_door_cost = nil, skylight_cost = nil, tubular_daylight_dome_cost = nil, tubular_daylight_diffuser_cost = nil, total_building_construction_set_cost = nil) ⇒ Object

This will remove all associated construction costs for each construction type associated with the construction set. Unless the value is set to nil, in which case it will do nothing.

Parameters:

  • default_surface_construction_set (String)
  • ext_wall_cost (Float) (defaults to: nil)

    nil

  • ext_floor_cost (Float) (defaults to: nil)

    nil

  • ext_roof_cost (Float) (defaults to: nil)

    nil

  • ground_wall_cost (Float) (defaults to: nil)

    nil

  • ground_floor_cost (Float) (defaults to: nil)

    nil

  • ground_roof_cost (Float) (defaults to: nil)

    nil

  • fixed_window_cost (Float) (defaults to: nil)

    nil

  • operable_window_cost (Float) (defaults to: nil)

    nil

  • door_construction_cost (Float) (defaults to: nil)

    nil

  • glass_door_cost (Float) (defaults to: nil)

    nil

  • overhead_door_cost (Float) (defaults to: nil)

    nil

  • skylight_cost (Float) (defaults to: nil)

    nil

  • tubular_daylight_dome_cost (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_cost (Float) (defaults to: nil)

    nil

  • total_building_construction_set_cost (Float) (defaults to: nil)

    nil

Author:



1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
# File 'lib/openstudio-standards/btap/envelope.rb', line 1105

def self.customize_default_surface_construction_set_costs(default_surface_construction_set,
    ext_wall_cost = nil,
    ext_floor_cost = nil,
    ext_roof_cost = nil,
    ground_wall_cost = nil,
    ground_floor_cost = nil,
    ground_roof_cost = nil,
    fixed_window_cost = nil,
    operable_window_cost = nil,
    door_construction_cost = nil,
    glass_door_cost = nil,
    overhead_door_cost = nil,
    skylight_cost = nil,
    tubular_daylight_dome_cost = nil,
    tubular_daylight_diffuser_cost = nil,
    total_building_construction_set_cost = nil
  )

  constructions_and_cost = [
    ["ext_wall_cost_m3",ext_wall_cost, default_surface_construction_set.defaultExteriorSurfaceConstructions.get.wallConstruction.get],
    ["ext_floor_cost_m3", ext_floor_cost, default_surface_construction_set.defaultExteriorSurfaceConstructions.get.floorConstruction.get],
    ["ext_roof_cost_m3",ext_roof_cost, default_surface_construction_set.defaultExteriorSurfaceConstructions.get.roofCeilingConstruction.get],
    ["ground_wall_cost_m3",ground_wall_cost, default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.wallConstruction.get],
    ["ground_floor_cost_m3",ground_floor_cost, default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.floorConstruction.get],
    ["ground_roof_cost_m3",ground_roof_cost, default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.roofCeilingConstruction.get],
    ["fixed_window_cost_m3",fixed_window_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.fixedWindowConstruction.get],
    ["operable_window_cost_m3",operable_window_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.operableWindowConstruction.get],
    ["door_construction_cost_m3",door_construction_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.doorConstruction.get],
    ["glass_door_cost_m3",glass_door_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.glassDoorConstruction.get],
    ["overhead_door_cost_m3",overhead_door_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.overheadDoorConstruction.get],
    ["skylight_cost_m3",skylight_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.skylightConstruction.get],
    ["tubular_daylight_dome_cost_m3",tubular_daylight_dome_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.tubularDaylightDomeConstruction.get],
    ["tubular_daylight_diffuser_cost_m3" ,tubular_daylight_diffuser_cost , default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.tubularDaylightDiffuserConstruction.get]
  ]


  #Assign cost to each construction.
  constructions_and_cost.each do |item|
    unless item[1].nil?
      item[2].removeLifeCycleCosts()
      raise("Could not remove LCC info from construction #{item[2]}") unless item[2].lifeCycleCosts.size == 0
      construction_cost_object = OpenStudio::Model::LifeCycleCost.new(item[2])
      construction_cost_object.setName(item[0])
      construction_cost_object.setCost(item[1])
      construction_cost_object.setCostUnits("CostPerArea")
    end
  end
  #create building total construction cost if needed.
  building = default_surface_construction_set.model.building.get
  BTAP::Resources::Economics::object_cost(building, "Builing Contruction Set Whole Building Capital Cost", total_building_construction_set_cost, "CostPerEach")
end

.customize_default_surface_construction_set_rsi!(model, name, default_surface_construction_set, ext_wall_rsi = nil, ext_floor_rsi = nil, ext_roof_rsi = nil, ground_wall_rsi = nil, ground_floor_rsi = nil, ground_roof_rsi = nil, fixed_window_rsi = nil, fixed_wind_solar_trans = nil, fixed_wind_vis_trans = nil, operable_window_rsi = nil, operable_wind_solar_trans = nil, operable_wind_vis_trans = nil, door_construction_rsi = nil, glass_door_rsi = nil, glass_door_solar_trans = nil, glass_door_vis_trans = nil, overhead_door_rsi = nil, skylight_rsi = nil, skylight_solar_trans = nil, skylight_vis_trans = nil, tubular_daylight_dome_rsi = nil, tubular_daylight_dome_solar_trans = nil, tubular_daylight_dome_vis_trans = nil, tubular_daylight_diffuser_rsi = nil, tubular_daylight_diffuser_solar_trans = nil, tubular_daylight_diffuser_vis_trans = nil) ⇒ Object

This method customizes default surface construction and sets RSI

Parameters:

  • model (OpenStudio::Model::Model)
  • name (String)
  • default_surface_construction_set (String)
  • ext_wall_rsi (Float) (defaults to: nil)

    nil

  • ext_floor_rsi (Float) (defaults to: nil)

    nil

  • ext_roof_rsi (Float) (defaults to: nil)

    nil

  • ground_wall_rsi (Float) (defaults to: nil)

    nil

  • ground_floor_rsi (Float) (defaults to: nil)

    nil

  • ground_roof_rsi (Float) (defaults to: nil)

    nil

  • fixed_window_rsi (Float) (defaults to: nil)

    nil

  • fixed_wind_solar_trans (Float) (defaults to: nil)

    nil

  • fixed_wind_vis_trans (Float) (defaults to: nil)

    nil

  • operable_window_rsi (Float) (defaults to: nil)

    nil

  • operable_wind_solar_trans (Float) (defaults to: nil)

    nil

  • operable_wind_vis_trans (Float) (defaults to: nil)

    nil

  • door_construction_rsi (Float) (defaults to: nil)

    nil

  • glass_door_rsi (Float) (defaults to: nil)

    nil

  • glass_door_solar_trans (Float) (defaults to: nil)

    nil

  • glass_door_vis_trans (Float) (defaults to: nil)

    nil

  • overhead_door_rsi (Float) (defaults to: nil)

    nil

  • skylight_rsi (Float) (defaults to: nil)

    nil

  • skylight_solar_trans (Float) (defaults to: nil)

    nil

  • skylight_vis_trans (Float) (defaults to: nil)

    nil,

  • tubular_daylight_dome_rsi (Float) (defaults to: nil)

    nil

  • tubular_daylight_dome_solar_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_dome_vis_trans (Float) (defaults to: nil)

    nil,

  • tubular_daylight_diffuser_rsi (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_solar_trans (Float) (defaults to: nil)

    nil

  • tubular_daylight_diffuser_vis_trans (Float) (defaults to: nil)

    nil

Author:



1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
# File 'lib/openstudio-standards/btap/envelope.rb', line 1045

def self.customize_default_surface_construction_set_rsi!(model,name,default_surface_construction_set,
    ext_wall_rsi = nil, ext_floor_rsi = nil, ext_roof_rsi = nil,
    ground_wall_rsi = nil, ground_floor_rsi = nil, ground_roof_rsi = nil,
    fixed_window_rsi = nil, fixed_wind_solar_trans = nil , fixed_wind_vis_trans = nil,
    operable_window_rsi = nil, operable_wind_solar_trans = nil , operable_wind_vis_trans = nil,
    door_construction_rsi = nil,
    glass_door_rsi = nil,  glass_door_solar_trans = nil , glass_door_vis_trans = nil,
    overhead_door_rsi = nil,
    skylight_rsi = nil,  skylight_solar_trans = nil , skylight_vis_trans = nil,
    tubular_daylight_dome_rsi = nil,  tubular_daylight_dome_solar_trans = nil , tubular_daylight_dome_vis_trans = nil,
    tubular_daylight_diffuser_rsi = nil, tubular_daylight_diffuser_solar_trans = nil , tubular_daylight_diffuser_vis_trans = nil
  )
  #Change name if required.
  default_surface_construction_set.setName( name) unless name.nil?
  ext_surface_set = default_surface_construction_set.defaultExteriorSurfaceConstructions.get
  new_ext_surface_set = self.customize_default_surface_constructions_rsi(model, name, ext_surface_set, ext_wall_rsi, ext_floor_rsi, ext_roof_rsi)
  raise ("Could not customized exterior constructionset") unless default_surface_construction_set.setDefaultExteriorSurfaceConstructions(new_ext_surface_set)

  ground_surface_set = default_surface_construction_set.defaultGroundContactSurfaceConstructions.get
  
  new_ground_surface_set = self.customize_default_surface_constructions_rsi(model, name, ground_surface_set, ground_wall_rsi, ground_floor_rsi, ground_roof_rsi)
  raise ("Could not customized ground constructionset") unless default_surface_construction_set.setDefaultGroundContactSurfaceConstructions(new_ground_surface_set)

  ext_subsurface_set = default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get
  new_ext_subsurface_set = self.customize_default_sub_surface_constructions_rsi(
    model,
    name,
    ext_subsurface_set,
    fixed_window_rsi, fixed_wind_solar_trans , fixed_wind_vis_trans,
    operable_window_rsi, operable_wind_solar_trans, operable_wind_vis_trans,
    door_construction_rsi,
    glass_door_rsi,  glass_door_solar_trans, glass_door_vis_trans,
    overhead_door_rsi,
    skylight_rsi,  skylight_solar_trans, skylight_vis_trans,
    tubular_daylight_dome_rsi,  tubular_daylight_dome_solar_trans, tubular_daylight_dome_vis_trans,
    tubular_daylight_diffuser_rsi, tubular_daylight_diffuser_solar_trans, tubular_daylight_diffuser_vis_trans
  )
  raise ("Could not customize subsurface constructionset") unless default_surface_construction_set.setDefaultExteriorSubSurfaceConstructions(new_ext_subsurface_set)
end

.customize_default_surface_constructions_conductance(model, name, default_surface_constructions, wall_conductance = nil, floor_conductance = nil, roof_conductance = nil) ⇒ Object

This will customize default surface construction conductance.

Parameters:

  • model (OpenStudio::Model::Model)
  • name (String)

    nil

  • default_surface_constructions (Float)

    nil

  • wall_conductance (Float) (defaults to: nil)

    nil

  • floor_conductance (Float) (defaults to: nil)

    nil

  • roof_conductance (Float) (defaults to: nil)

    nil

Returns:

  • (Object)

    set

Author:



1300
1301
1302
1303
1304
1305
1306
1307
1308
# File 'lib/openstudio-standards/btap/envelope.rb', line 1300

def self.customize_default_surface_constructions_conductance(model,name,default_surface_constructions,wall_conductance = nil, floor_conductance = nil, roof_conductance = nil)
  
  set = OpenStudio::Model::DefaultSurfaceConstructions.new(model)
  set.setName( name)
  set.setFloorConstruction(Resources::Envelope::Constructions::customize_opaque_construction(model, default_surface_constructions.floorConstruction.get, floor_conductance)) unless floor_conductance.nil?
  set.setWallConstruction(Resources::Envelope::Constructions::customize_opaque_construction(model, default_surface_constructions.wallConstruction.get, wall_conductance)) unless wall_conductance.nil?
  set.setRoofCeilingConstruction(Resources::Envelope::Constructions::customize_opaque_construction(model, default_surface_constructions.roofCeilingConstruction.get, roof_conductance)) unless roof_conductance.nil?
  return set
end

.customize_default_surface_constructions_rsi(model, name, default_surface_constructions, wall_rsi = nil, floor_rsi = nil, roof_rsi = nil) ⇒ Object

This will customize default surface construction rsi.

Parameters:

  • model (OpenStudio::Model::Model)
  • name (String)

    nil

  • default_surface_constructions (Float)

    nil

  • wall_rsi (Float) (defaults to: nil)

    nil

  • floor_rsi (Float) (defaults to: nil)

    nil

  • roof_rsi (Float) (defaults to: nil)

    nil

Author:



1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/openstudio-standards/btap/envelope.rb', line 1282

def self.customize_default_surface_constructions_rsi(model,name,default_surface_constructions,wall_rsi = nil, floor_rsi = nil, roof_rsi = nil)

  wall_rsi.nil? ? wall_conductance  = nil  : wall_conductance  = 1.0 / wall_rsi
  floor_rsi.nil? ? floor_conductance = nil : floor_conductance = 1.0 / floor_rsi
  roof_rsi.nil? ? roof_conductance  = nil  : roof_conductance  = 1.0 / roof_rsi

  self.customize_default_surface_constructions_conductance(model,name,default_surface_constructions,wall_conductance , floor_conductance, roof_conductance)
end

.get_construction_set_from_library(construction_library_file, construction_set_name) ⇒ Boolean

This method gets construction set object from external library

Parameters:

  • construction_library_file (String)
  • construction_set_name (String)

Returns:

  • (Boolean)

    optional_construction_set

Author:



1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
# File 'lib/openstudio-standards/btap/envelope.rb', line 1380

def self.get_construction_set_from_library( construction_library_file, construction_set_name )
  #Load Contruction osm library.
  if File.exists?(construction_library_file) 
    construction_lib = BTAP::FileIO::load_osm( construction_library_file )
    #Get construction set.. 
    optional_construction_set = construction_lib.getDefaultConstructionSetByName(construction_set_name)
    if optional_construction_set.empty?
      raise("#{construction_set_name} does not exist in #{construction_library_file} library ")
    else
      return optional_construction_set.get
    end
  else
    raise("Error : Construction Lib #{construction_library_file} does not exist!")
  end
  return false
end

.get_construction_set_info(default_surface_construction_set) ⇒ String

This method creates a default construction set. A construction set for exterior, interior,ground and subsurface must be created prior to populate this object.

Parameters:

  • default_surface_construction_set (Object)

Returns:

Author:



1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
# File 'lib/openstudio-standards/btap/envelope.rb', line 1441

def self.get_construction_set_info(default_surface_construction_set)
  #######################
  constructions_and_cost = [
    ["ext_wall",default_surface_construction_set.defaultExteriorSurfaceConstructions.get.wallConstruction.get],
    ["ext_floor", default_surface_construction_set.defaultExteriorSurfaceConstructions.get.floorConstruction.get],
    ["ext_roof",default_surface_construction_set.defaultExteriorSurfaceConstructions.get.roofCeilingConstruction.get],
    ["ground_wall",default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.wallConstruction.get],
    ["ground_floor", default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.floorConstruction.get],
    ["ground_roof",default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.roofCeilingConstruction.get],
    ["fixed_window", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.fixedWindowConstruction.get],
    ["operable_window", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.operableWindowConstruction.get],
    ["door_construction", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.doorConstruction.get],
    ["glass_door", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.glassDoorConstruction.get],
    ["overhead_door", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.overheadDoorConstruction.get],
    ["skylight", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.skylightConstruction.get],
    ["tubular_daylight_dome", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.tubularDaylightDomeConstruction.get],
    ["tubular_daylight_diffuser" , default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.tubularDaylightDiffuserConstruction.get]
  ]
  default_surface_construction_set.name
  table = "construction,rsi,cost_m3\n"
  constructions_and_cost.each do |item|
    cost_item = OpenStudio::Model::getLifeCycleCostByName(default_surface_construction_set.model,"#{item[0]}_cost_m3")
    #ensure it exists
    cost = "NA"
    cost = cost_item.cost unless cost_item.empty?
    rsi = BTAP::Resources::Envelope::Constructions::get_rsi(item[1])
    table << "#{item[0]},#{rsi},#{cost}\n"
  end
  return table
end

.set_construction_set_by_file(model, construction_library_file, construction_set_name, runner = nil) ⇒ Object

This method set the default construction set from an OSM library file and the construction set name. params construction_library_file [String] Path to osm file that contains the contruction set to be used. params construction_set_name [String] Name of the construction set to be used.



990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
# File 'lib/openstudio-standards/btap/envelope.rb', line 990

def self.set_construction_set_by_file(model, construction_library_file, construction_set_name,runner = nil)
  BTAP::runner_register("Info","set_construction_set_by_file(#{construction_library_file}, #{construction_set_name})")
  #check if file exists
  unless File.exist?(construction_library_file) == true
    BTAP::runner_register("Error", "Could not find #{construction_library_file}", runner) 
    return false
  end
  construction_set = BTAP::Resources::Envelope::ConstructionSets::get_construction_set_from_library( construction_library_file, construction_set_name )
  #check if construction set name exists and can apply to the model. 
  unless model.building.get.setDefaultConstructionSet( construction_set.clone( model ).to_DefaultConstructionSet.get ) 
    BTAP::runner_register("Error", "Could not use default construction set #{construction_set_name} from #{construction_library_file} ", runner) 
    return false
  end
  #sets all surfaces to use default constructions except adiabatic, where it does a hard assignment of the interior wall construction type. 
  model.getPlanarSurfaces.sort.each { |item| item.resetConstruction }
  #if the default construction set is defined..try to assign the interior wall to the adiabatic surfaces
  BTAP::Resources::Envelope::assign_interior_surface_construction_to_adiabatic_surfaces( model, runner)
  BTAP::runner_register("Info","set_construction_set_by_file(#{construction_library_file}, #{construction_set_name}) Completed Sucessfully.")
  return true
end