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
-
.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.
-
.create_default_surface_constructions(model, name, wall, floor, roof) ⇒ Object
This creates a new construction set of wall, floor and roof/ceiling objects.
-
.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).
-
.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.
-
.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.
-
.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.
-
.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.
-
.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.
-
.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.
-
.get_construction_set_from_library(construction_library_file, construction_set_name) ⇒ Boolean
This method gets construction set object from external library.
-
.get_construction_set_info(default_surface_construction_set) ⇒ String
This method creates a default construction set.
-
.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.
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.
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1387 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.
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1297 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)
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1321 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.
1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1226 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.
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1160 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.
1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 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 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1083 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
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1024 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 customized ground 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.
1278 1279 1280 1281 1282 1283 1284 1285 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1278 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.
1260 1261 1262 1263 1264 1265 1266 1267 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1260 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
1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1357 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.
1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 1418 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.
969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 |
# File 'lib/openstudio-standards/btap/envelope.rb', line 969 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.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 |