openstudio-standards 0.8.5 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/test_performance_expected_dd_results.csv +90 -90
  3. data/lib/openstudio-standards/btap/activity.rb +858 -61
  4. data/lib/openstudio-standards/btap/attributes.rb +297 -103
  5. data/lib/openstudio-standards/btap/bridging.rb +1335 -593
  6. data/lib/openstudio-standards/btap/btap.rb +60 -181
  7. data/lib/openstudio-standards/btap/carbon/btap_carbon.rb +199 -142
  8. data/lib/openstudio-standards/btap/common/constructions.json +1275 -0
  9. data/lib/openstudio-standards/btap/common/costs.csv +1969 -0
  10. data/lib/openstudio-standards/btap/common/costs_local_factors.csv +2315 -0
  11. data/lib/openstudio-standards/btap/common/materials_glazing.csv +61 -0
  12. data/lib/openstudio-standards/btap/{common_resources → common}/materials_hvac.csv +1685 -1685
  13. data/lib/openstudio-standards/btap/{common_resources → common}/materials_lighting.csv +266 -266
  14. data/lib/openstudio-standards/btap/common/materials_opaque.csv +214 -0
  15. data/lib/openstudio-standards/btap/common/necb_building_types.csv +35 -0
  16. data/lib/openstudio-standards/btap/common/necb_space_types.csv +110 -0
  17. data/lib/openstudio-standards/btap/common/thermal_bridging.csv +73 -0
  18. data/lib/openstudio-standards/btap/costing/btap_costing.rb +346 -429
  19. data/lib/openstudio-standards/btap/costing/database.rb +104 -0
  20. data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +356 -344
  21. data/lib/openstudio-standards/btap/costing/dcv_costing.rb +282 -296
  22. data/lib/openstudio-standards/btap/costing/envelope_costing.rb +179 -192
  23. data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +2477 -2316
  24. data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +127 -142
  25. data/lib/openstudio-standards/btap/costing/lighting_costing.rb +216 -198
  26. data/lib/openstudio-standards/btap/costing/nv_costing.rb +522 -523
  27. data/lib/openstudio-standards/btap/costing/pv_ground_costing.rb +649 -649
  28. data/lib/openstudio-standards/btap/costing/shw_costing.rb +626 -625
  29. data/lib/openstudio-standards/btap/costing/thermal_bridging_costing.rb +72 -0
  30. data/lib/openstudio-standards/btap/costing/ventilation_costing.rb +2363 -2361
  31. data/lib/openstudio-standards/btap/deprecated.rb +1033 -0
  32. data/lib/openstudio-standards/btap/envelope.rb +313 -572
  33. data/lib/openstudio-standards/btap/fileio.rb +152 -1070
  34. data/lib/openstudio-standards/btap/geometry.rb +486 -766
  35. data/lib/openstudio-standards/btap/linear_regression.rb +130 -0
  36. data/lib/openstudio-standards/btap/paths.rb +46 -0
  37. data/lib/openstudio-standards/btap/qaqc/analysis.rb +163 -0
  38. data/lib/openstudio-standards/btap/qaqc/data.rb +2293 -0
  39. data/lib/openstudio-standards/btap/qaqc/datapoint.rb +641 -0
  40. data/lib/openstudio-standards/btap/schedules.rb +11 -611
  41. data/lib/openstudio-standards/btap/structure.rb +574 -189
  42. data/lib/openstudio-standards/constructions/materials/information.rb +1 -1
  43. data/lib/openstudio-standards/create_typical/create_typical.rb +1 -1
  44. data/lib/openstudio-standards/exterior_lighting/create.rb +135 -85
  45. data/lib/openstudio-standards/exterior_lighting/data/typical_exterior_lighting.json +20 -0
  46. data/lib/openstudio-standards/exterior_lighting/information.rb +23 -2
  47. data/lib/openstudio-standards/geometry/create.rb +7 -3
  48. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +3 -2
  49. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +3 -2
  50. data/lib/openstudio-standards/prototypes/common/data/thermostat_schedule_lookup.json +84 -84
  51. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +4 -4
  52. data/lib/openstudio-standards/refrigeration/create_walkin.rb +45 -5
  53. data/lib/openstudio-standards/refrigeration/data/refrigerated_walkins.csv +75 -75
  54. data/lib/openstudio-standards/schedules/parametric.rb +6 -0
  55. data/lib/openstudio-standards/service_water_heating/create_typical.rb +10 -3
  56. data/lib/openstudio-standards/service_water_heating/create_water_heating_loop.rb +30 -14
  57. data/lib/openstudio-standards/service_water_heating/information.rb +4 -1
  58. data/lib/openstudio-standards/sql_file/unmet_hours.rb +2 -1
  59. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +3 -1
  60. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +3 -1
  61. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.boilers.json +12 -0
  62. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_properties.json +18432 -3072
  63. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.boilers.json +26 -0
  64. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_properties.json +8532 -1422
  65. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.boilers.json +26 -0
  66. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_properties.json +8532 -1422
  67. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.boilers.json +16 -0
  68. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.computer_room_acs.json +30 -30
  69. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_properties.json +7560 -1260
  70. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +1 -2
  71. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.boilers.json +16 -0
  72. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.construction_properties.json +7560 -1260
  73. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +3 -3
  74. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +1 -2
  75. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.boilers.json +22 -0
  76. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.construction_properties.json +7236 -1206
  77. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.furnaces.json +223 -19
  78. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.schedules.json +37 -1
  79. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.boilers.json +3 -0
  80. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.construction_properties.json +6900 -1150
  81. data/lib/openstudio-standards/standards/cbes/data/cbes.schedules.json +1 -1
  82. data/lib/openstudio-standards/standards/deer/data/deer.schedules.json +1 -1
  83. data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/data/surface_thermal_transmittance.json +76 -40
  84. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/surface_thermal_transmittance.json +76 -40
  85. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +6 -4
  86. data/lib/openstudio-standards/standards/necb/NECB2011/NECB2011_QAQC.json +2988 -0
  87. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +25 -3
  88. data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +672 -534
  89. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Hospital.osm +1791 -1792
  90. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPMultiTower.osm +7 -1
  91. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPTownHouse.osm +7 -1
  92. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LargeHotel.osm +5 -6
  93. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LargeOffice.osm +8 -9
  94. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernEducation.osm +10 -4
  95. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernHealthCare.osm +14 -15
  96. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Outpatient.osm +7 -1
  97. data/lib/openstudio-standards/standards/necb/NECB2011/data/surface_thermal_transmittance.json +76 -40
  98. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +14 -6
  99. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +542 -130
  100. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +30 -63
  101. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +7 -2
  102. data/lib/openstudio-standards/standards/necb/NECB2015/data/surface_thermal_transmittance.json +90 -0
  103. data/lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb +8 -6
  104. data/lib/openstudio-standards/standards/necb/NECB2017/data/surface_thermal_transmittance.json +76 -40
  105. data/lib/openstudio-standards/standards/necb/NECB2017/necb_2017.rb +2 -1
  106. data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +0 -117
  107. data/lib/openstudio-standards/standards/necb/NECB2020/data/surface_thermal_transmittance.json +76 -45
  108. data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +218 -0
  109. data/lib/openstudio-standards/standards/necb/common/construction_defaults.osm +12 -7
  110. data/lib/openstudio-standards/standards/standard.rb +1 -1
  111. data/lib/openstudio-standards/version.rb +1 -1
  112. data/lib/openstudio-standards.rb +9 -4
  113. metadata +59 -66
  114. data/data/inventory/thermal_bridging.csv +0 -90
  115. data/data/standards/OpenStudio_Standards-ashrae_90_1-ALL-comstock(space_types).xlsx +0 -0
  116. data/data/standards/openstudio_standards_duplicates_log.csv +0 -7962
  117. data/lib/openstudio-standards/btap/NECB_building_types.csv +0 -35
  118. data/lib/openstudio-standards/btap/NECB_space_types.csv +0 -109
  119. data/lib/openstudio-standards/btap/WeatherData1.json +0 -2110
  120. data/lib/openstudio-standards/btap/WeatherData1.xlsx +0 -0
  121. data/lib/openstudio-standards/btap/btap_result.rb +0 -1144
  122. data/lib/openstudio-standards/btap/btap_test_helper.rb +0 -86
  123. data/lib/openstudio-standards/btap/common_paths.rb +0 -81
  124. data/lib/openstudio-standards/btap/common_resources/ConstructionProperties.csv +0 -52
  125. data/lib/openstudio-standards/btap/common_resources/Constructions.csv +0 -37
  126. data/lib/openstudio-standards/btap/common_resources/construction_sets.csv +0 -1270
  127. data/lib/openstudio-standards/btap/common_resources/constructions_glazing.csv +0 -121
  128. data/lib/openstudio-standards/btap/common_resources/constructions_opaque.csv +0 -2256
  129. data/lib/openstudio-standards/btap/common_resources/costs.csv +0 -1897
  130. data/lib/openstudio-standards/btap/common_resources/costs_local_factors.csv +0 -2315
  131. data/lib/openstudio-standards/btap/common_resources/materials_glazing.csv +0 -35
  132. data/lib/openstudio-standards/btap/common_resources/materials_opaque.csv +0 -164
  133. data/lib/openstudio-standards/btap/costing/btap_measure_helper.rb +0 -359
  134. data/lib/openstudio-standards/btap/costing/btap_workflow.rb +0 -117
  135. data/lib/openstudio-standards/btap/costing/copy_test_results_files_to_expected_results.rb +0 -11
  136. data/lib/openstudio-standards/btap/costing/cost_building_from_file.rb +0 -136
  137. data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +0 -173
  138. data/lib/openstudio-standards/btap/costing/dummy.epw +0 -8768
  139. data/lib/openstudio-standards/btap/costing/dummy.osm +0 -5320
  140. data/lib/openstudio-standards/btap/costing/neb_end_use_prices.csv +0 -42
  141. data/lib/openstudio-standards/btap/costing/necb_2011_spacetype_info.csv +0 -225
  142. data/lib/openstudio-standards/btap/costing/necb_reference_runs.csv +0 -28705
  143. data/lib/openstudio-standards/btap/costing/parallel_tests.rb +0 -92
  144. data/lib/openstudio-standards/btap/costing/test_list.txt +0 -15
  145. data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +0 -27
  146. data/lib/openstudio-standards/btap/costing/test_run_costing_tests.rb +0 -80
  147. data/lib/openstudio-standards/btap/necb_2011_spacetype_info.csv +0 -225
  148. data/lib/openstudio-standards/btap/utilities/Add_template_field_to_json.rb +0 -22
  149. data/lib/openstudio-standards/btap/utilities/convert_surfaces_to_adiabatic_necb_8426.rb +0 -204
  150. data/lib/openstudio-standards/btap/utilities/generate_space_types.rb +0 -8
  151. data/lib/openstudio-standards/btap/utilities/necb_to_epw_map.rb +0 -50
  152. data/lib/openstudio-standards/btap/utilities/os_sim_extract.rb +0 -48
  153. data/lib/openstudio-standards/btap/utilities/rename_surfaces.rb +0 -24
  154. data/lib/openstudio-standards/btap/utilities/round_surf_coords.rb +0 -32
  155. data/lib/openstudio-standards/btap/utilities/sched_create.rb +0 -145
  156. data/lib/openstudio-standards/btap/utilities/set_mult_to_adiabatic.rb +0 -53
  157. data/lib/openstudio-standards/btap/utilities/space_type.rb +0 -78
  158. data/lib/openstudio-standards/btap/utilities/weatherData1_xlsx_to_json.rb +0 -56
  159. data/lib/openstudio-standards/btap/vintagizer.rb +0 -161
  160. data/lib/openstudio-standards/btap/visualization.rb +0 -72
  161. data/lib/openstudio-standards/standards/necb/NECB2011/data/necb_2011_spacetype_info.csv +0 -225
  162. data/lib/openstudio-standards/standards/necb/common/btap_analysis.rb +0 -79
  163. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +0 -2656
  164. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +0 -653
  165. data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +0 -28705
  166. data/lib/openstudio-standards/standards/necb/common/utility_pricing_2025-02-20.csv +0 -92
  167. /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_frame.csv +0 -0
  168. /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_glazing.csv +0 -0
  169. /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_opaque.csv +0 -0
  170. /data/lib/openstudio-standards/btap/{common_resources → common}/hvac_vent_ahu.csv +0 -0
  171. /data/lib/openstudio-standards/btap/{common_resources → common}/lighting.csv +0 -0
  172. /data/lib/openstudio-standards/btap/{common_resources → common}/lighting_sets.csv +0 -0
  173. /data/lib/openstudio-standards/btap/{common_resources → common}/locations.csv +0 -0
  174. /data/lib/openstudio-standards/btap/{costing → common}/mech_sizing.json +0 -0
@@ -17,21 +17,23 @@
17
17
  # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
  # **********************************************************************/
19
19
 
20
- require "#{File.dirname(__FILE__)}/btap"
21
-
22
20
  module BTAP
23
- module Resources #Resources
24
- # This module contains methods that relate to Materials, Constructions and Construction Sets
25
- module Envelope #Resources::Envelope
26
- #This method assignes interior surface construction to adiabatic surfaces from model.
27
- #@author phylroy.lopez@nrcan.gc.ca
28
- #@param model [OpenStudio::Model::Model] A model object
21
+ module Resources
22
+ module Envelope
23
+
24
+ # This method assignes interior surface construction to adiabatic surfaces
25
+ # from model.
26
+ # @author phylroy.lopez@nrcan.gc.ca
27
+ # @param model [OpenStudio::Model::Model] A model object
29
28
  def self.assign_interior_surface_construction_to_adiabatic_surfaces(model, runner = nil)
30
29
  BTAP::runner_register("Info", "assign_interior_surface_construction_to_adiabatic_surfaces", runner)
31
30
  unless model.building.get.defaultConstructionSet.empty? or model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.empty? or model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.get.wallConstruction.empty?
32
- #Give adiabatic surfaces a construction. Does not matter what. This is a bug in OpenStudio that leave these surfaces unassigned by the default construction set.
33
31
 
34
- all_adiabatic_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(model.getSurfaces, "Adiabatic")
32
+ # Give adiabatic surfaces a construction. Does not matter what. This
33
+ # is a bug in OpenStudio that leave these surfaces unassigned by the
34
+ # default construction set.
35
+ all_adiabatic_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(
36
+ model.getSurfaces, "Adiabatic")
35
37
 
36
38
  unless all_adiabatic_surfaces.empty?
37
39
  wall_construction = model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.get.wallConstruction.get
@@ -47,9 +49,9 @@ module BTAP
47
49
  return true
48
50
  end
49
51
 
50
- #This method removes all envelope information from model.
51
- #@author phylroy.lopez@nrcan.gc.ca
52
- #@param model [OpenStudio::Model::Model] A model object
52
+ # This method removes all envelope information from model.
53
+ # @author phylroy.lopez@nrcan.gc.ca
54
+ # @param model [OpenStudio::Model::Model] A model object
53
55
  def self.remove_all_envelope_information(model)
54
56
  model.getDefaultConstructionSets.each(&:remove)
55
57
  model.building.get.resetDefaultConstructionSet
@@ -62,79 +64,34 @@ module BTAP
62
64
  model.getInternalMasss(&:remove)
63
65
  end
64
66
 
65
- #This module contains methods dealing with the creation and modification of constructions.
66
- module Constructions #Resources::Envelope::Constructions
67
- #Test Constructions Module
68
- if __FILE__ == $0
69
- require 'test/unit'
70
- class ConstructionsTests < Test::Unit::TestCase
71
-
72
- #This method sets up the model.
73
- #@author Phylroy A. Lopez <plopez@nrcan.gc.ca>
74
- def setup
75
- @model = OpenStudio::Model::Model.new()
76
- #Create opaque layers from defaults
77
- @insulation = OpenStudio::Model::StandardOpaqueMaterial.new(@model, 'Smooth', 0.1, 0.001, 0.1, 0.1)
78
- @opaque = OpenStudio::Model::StandardOpaqueMaterial.new(@model, 'Smooth', 0.1, 0.1, 0.1, 100)
79
- @massless = OpenStudio::Model::MasslessOpaqueMaterial.new(@model, 'Smooth', 0.1)
80
- #Create fenestration layer from defaults.
81
- @simple = OpenStudio::Model::SimpleGlazing.new(@model, 0.1, 0.1)
82
- @simple.setThickness(0.005)
83
- @simple.setVisibleTransmittance(0.8)
84
- @standard = OpenStudio::Model::StandardGlazing.new(@model, 'SpectralAverage', 0.003)
85
- @opaque_construction = BTAP::Resources::Envelope::Constructions::create_construction(@model, "test construction", [@opaque, @insulation, @massless, @opaque], @insulation)
86
- @fenestration_construction = BTAP::Resources::Envelope::Constructions::create_construction(@model, "test construction", [@simple, @standard])
87
-
88
- array = [@opaque, "insulation"]
89
- BTAP::Common::validate_array(@model, array, "Material")
90
- end
91
-
92
- #This method will create a test opaque construction.
93
- #@author Phylroy A. Lopez <plopez@nrcan.gc.ca>
94
- def test_create_opaque_construction()
95
- construction = BTAP::Resources::Envelope::Constructions::create_construction(@model, "test construction", [@opaque, @insulation, @massless, @opaque], @insulation)
96
- #Check that the construction was created
97
- assert(!(construction.to_Construction.empty?))
98
- #check that all layers were entered
99
- assert_equal(5, construction.layers.size)
100
- #check insulation was set.
101
- assert(construction.insulation().get == @insulation)
102
- end
103
-
104
- #This method will test creation of fenestration construction.
105
- #@author Phylroy A. Lopez <plopez@nrcan.gc.ca>
106
- def test_create_fenestration_construction()
107
- construction = BTAP::Resources::Envelope::Constructions::create_construction(@model, "test construction", [@simple, @standard])
108
- assert_equal(6, construction.layers.size)
109
- assert(!(construction.to_Construction.empty?))
110
- end
67
+ # This module contains methods dealing with the creation and modification
68
+ # of constructions.
69
+ module Constructions # Resources::Envelope::Constructions
70
+
71
+ # TODO: These are temporary values for uMIN and uMAX that reflect the
72
+ # current maximum and minimum assemblies for the construction database
73
+ # from `nrcan_476`.
74
+ @uMIN = 0.08
75
+ @uMAX = 2.69
76
+ class << self
77
+ attr_reader :uMIN
78
+ attr_reader :uMAX
79
+ end
111
80
 
112
- #This method will create new construction based on exisiting.
113
- #@author Phylroy A. Lopez <plopez@nrcan.gc.ca>
114
- def test_create_new_construction_based_on_exisiting()
115
- # opaque
116
- new_construction = BTAP::Resources::Envelope::Constructions::customize_opaque_construction(@model, @opaque_construction, 0.05)
117
- assert_in_delta(0.05, new_construction.thermalConductance.to_f, 0.00001)
118
- # fenestration
119
- new_construction = BTAP::Resources::Envelope::Constructions::customize_fenestration_construction(@model, @fenestration_construction, 0.5, nil, nil, 0.0)
120
- assert_in_delta(0.5, OpenstudioStandards::Constructions.construction_get_conductance(new_construction).to_f, 0.00001)
121
- end
122
- end
123
- end # End Test Constructions
124
-
125
- #This method will create a new construction based on self and a new conductance value.
126
- #It will check to see if a similar construction has already been created by this method
127
- #if so it will return the existing construction. If you wish to keep some of the properties, enter the
128
- #string "default" instead of a numerical value.
129
- #@author Phylroy A. Lopez <plopez@nrcan.gc.ca>
130
- #@param model [OpenStudio::Model::Model]
131
- #@param construction <String>
132
- #@param conductance [Fixnum]
133
- #@return [<String]OpenStudio::Model::getConstructionByName] new_construction
81
+ # This method will create a new construction based on self and a new
82
+ # conductance value. It will check to see if a similar construction has
83
+ # already been created by this method if so it will return the existing
84
+ # construction. If you wish to keep some of the properties, enter the
85
+ # string "default" instead of a numerical value.
86
+ # @author Phylroy A. Lopez <plopez@nrcan.gc.ca>
87
+ # @param model [OpenStudio::Model::Model]
88
+ # @param construction <String>
89
+ # @param conductance [Fixnum]
90
+ # @return [<String]OpenStudio::Model::getConstructionByName] new_construction
134
91
  def self.customize_opaque_construction(model, construction, conductance)
135
- #Will convert from a string identifier to an object if required.
92
+
93
+ # Will convert from a string identifier to an object if required.
136
94
  construction = BTAP::Common::validate_array(model, construction, "Construction").first
137
- #If it is Opaque
138
95
  raise ("This construction is not opaque :#{construction.name}") unless (construction.isOpaque)
139
96
  minimum_resistance = 0
140
97
  base_cons_name = construction.name.to_s
@@ -143,32 +100,34 @@ module BTAP
143
100
  end
144
101
  name_prefix = "#{base_cons_name}:U-#{conductance}"
145
102
 
146
- #Check to see if we already made one like this.
103
+ # Check to see if we already made one like this.
147
104
  existing_construction = OpenStudio::Model::getConstructionByName(construction.model, name_prefix)
148
105
  if not existing_construction.empty?
149
- # if so, return existing construction
150
106
  return existing_construction.get
151
107
  end
152
108
 
153
- #create a copy
109
+ # Create a copy.
154
110
  new_construction = OpenstudioStandards::Constructions.construction_deep_copy(construction)
155
111
 
156
- #Change Construction name in clone
112
+ # Change Construction name in clone.
157
113
  new_construction.setName(name_prefix)
158
114
 
159
115
  if conductance.kind_of?(Float)
160
- #re-find insulation layer
116
+ # Re-find insulation layer.
161
117
  OpenstudioStandards::Constructions.construction_find_and_set_insulation_layer(new_construction)
162
118
 
163
- #Determine how low the resistance can be set. Subtract exisiting insulation
164
- #Values from the total resistance to see how low we can go.
119
+ # Determine how low the resistance can be set. Subtract exisiting
120
+ # insulation Values from the total resistance to see how low we
121
+ # can go.
165
122
  minimum_resistance = (1 / new_construction.thermalConductance.to_f) - (1.0 / new_construction.insulation.get.thermalConductance.to_f)
166
123
 
167
- #Check if the requested resistance is smaller than the minimum
124
+ # Check if the requested resistance is smaller than the minimum
168
125
  # resistance. If so, revise the construction layers.
169
126
  if minimum_resistance > (1 / conductance)
170
- # Changing the insulation layer will not be enough so either start removing layers or modify them to get
171
- # to the required conductance.
127
+
128
+ # Changing the insulation layer will not be enough so either
129
+ # start removing layers or modify them to get to the required
130
+ # conductance.
172
131
  new_construction = adjust_opaque_construction(construction: new_construction, req_conductance: conductance.to_f)
173
132
  else
174
133
  unless new_construction.setConductance(conductance)
@@ -179,20 +138,25 @@ module BTAP
179
138
  return new_construction
180
139
  end
181
140
 
182
- # This removes construction layers if the required conductance for a construction is higher than the maximum
183
- # conductance that construction can have. Otherwise it modifies existing layers to set their thickness or
184
- # resistance values (depending on what is in the layer) to achieve the required conductance.
141
+ # This removes construction layers if the required conductance for a
142
+ # construction is higher than the maximum conductance that construction
143
+ # can have. Otherwise it modifies existing layers to set their thickness
144
+ # or resistance values (depending on what is in the layer) to achieve
145
+ # the required conductance.
185
146
  # @author Chris Kirney <chris.kirney@canada.ca>
186
147
  # @param construction <String> the construction we are modifying
187
148
  # @param req_conductance [Fixnum] the conductance we are trying to reach
188
149
  # @return [<String]OpenStudio::Model::getConstructionByName] the final construction after modification
189
150
  def self.adjust_opaque_construction(construction:, req_conductance:)
190
151
  layer_comp = []
191
- # Extract the thickness, conductivity, resistance of each layer of the construction. If the material is
192
- # "No Mass", or "Air gap" set the conductivity (how well the material conducts heat) and conductance (how well
193
- # the material with a given thickness conducts heat) to the inverse of the resistance. This is because
194
- # No Mass and Air gap materials do not have a thickness value. Also, include which layer index the material
195
- # has and the material object itself.
152
+
153
+ # Extract the thickness, conductivity, resistance of each layer of the
154
+ # construction. If the material is "No Mass", or "Air gap" set the
155
+ # conductivity (how well the material conducts heat) and conductance
156
+ # (how well the material with a given thickness conducts heat) to
157
+ # the inverse of the resistance. This is because No Mass and Air gap
158
+ # materials do not have a thickness value. Also, include which layer
159
+ # index the material has and the material object itself.
196
160
  construction.layers.each_with_index do |layer, layer_index|
197
161
  mat_type = layer.iddObjectType.valueName.to_s
198
162
  case mat_type
@@ -228,37 +192,51 @@ module BTAP
228
192
  }
229
193
  end
230
194
  end
231
- # Sort the above layers by the conductivity of the layers. The lowest conductivity layers first followed by
232
- # layers with progressively higher conductivities.
195
+
196
+ # Sort the above layers by the conductivity of the layers. The lowest
197
+ # conductivity layers first followed by layers with progressively
198
+ # higher conductivities.
233
199
  sorted_layers = layer_comp.sort { |a, b| b[:conductivity_SI] <=> a[:conductivity_SI] }
234
200
  index = 0
235
201
  total_conductance = construction.thermalConductance.to_f
236
- # The following loop steps through the array of layers, sorted form highest conductivity to lowest. It
237
- # deletes a layer in the construction if the conductance for the layer is not enough to reach the total
238
- # conductance for the construction that we are trying to reach. If modifies the thickness or resistance
239
- # (depending on the layer material type) of a layer if doing so will reach the overall construction
240
- # conductance target. The total conductance of the construction is rounded because the conductance never seems
241
- # to be set precisely enough.
242
202
 
203
+ # The following loop steps through the array of layers, sorted
204
+ # form highest conductivity to lowest. It deletes a layer in the
205
+ # construction if the conductance for the layer is not enough to reach
206
+ # the total conductance for the construction that we are trying to
207
+ # reach. If modifies the thickness or resistance (depending on the
208
+ # layer material type) of a layer if doing so will reach the overall
209
+ # construction conductance target. The total conductance of the
210
+ # construction is rounded because the conductance never seems to be
211
+ # set precisely enough.
243
212
  while total_conductance.round(4) < req_conductance
213
+
244
214
  # There are too indicies that are tracked:
245
215
  # index: The index of the element in the sorted array of layers that we are currently considering
246
216
  # const_index: The index of the layer we are currently considering in the construction
247
- # Note that both the construction array and sorted array contain the same elements. However these elements
248
- # may be in a different order. Thus, the index and const_index may be different. They will both indicate
249
- # the same layer. However, they may differ because the sorted array is sorted by conductivity while the
250
- # construction array is ordered with the first layer outside (a given space) and the final layer inside (a
251
- # given space).
217
+ # Note that both the construction array and sorted array contain
218
+ # the same elements. However these elements may be in a different
219
+ # order. Thus, the index and const_index may be different. They
220
+ # will both indicate the same layer. However, they may differ
221
+ # because the sorted array is sorted by conductivity while the
222
+ # construction array is ordered with the first layer outside (a
223
+ # given space) and the final layer inside (a given space).
252
224
  const_index = sorted_layers[index][:construction_index]
253
- # Check if modifying the resistance of the currently layer will be enough to reach our total construction
254
- # conductance goal. If it will, modify the layer. If it will not, delete the layer.
225
+
226
+ # Check if modifying the resistance of the currently layer will be
227
+ # enough to reach our total construction conductance goal. If it
228
+ # will, modify the layer. If it will not, delete the layer.
255
229
  if sorted_layers[index][:resistance_SI] > ((1.0 / total_conductance) - (1.0 / req_conductance))
256
- # If the current layer is a NoMass or AirGap material its thickness is zero so we set the resistance.
230
+
231
+ # If the current layer is a NoMass or AirGap material its
232
+ # thickness is zero so we set the resistance.
257
233
  if sorted_layers[index][:thickness_m] == 0
234
+
258
235
  # Determine the resistance we want to set the layer to.
259
236
  res_mod = sorted_layers[index][:resistance_SI] - ((1.0 / total_conductance) - (1.0 / req_conductance))
260
- # Find out if the layer is an AirGap or NoMass and set the resistance for the layer with the right
261
- # command systax.
237
+
238
+ # Find out if the layer is an AirGap or NoMass and set the
239
+ # resistance for the layer with the right command systax.
262
240
  mat_type = construction.layers[const_index].iddObjectType.valueName.to_s
263
241
  case mat_type
264
242
  when "OS_Material_NoMass"
@@ -267,45 +245,58 @@ module BTAP
267
245
  construction.layers[const_index].to_AirGap.get.setThermalResistance(res_mod)
268
246
  end
269
247
  else
270
- # The the current layer is a regular opaque material it has a thickness so we set that to reach the
271
- # desired resistance for that layer.
272
- # Determine the thickness we want to set the layer.
248
+
249
+ # The the current layer is a regular opaque material it has a
250
+ # thickness so we set that to reach the desired resistance for
251
+ # that layer. Determine the thickness we want to set the layer.
273
252
  thick_mod = (sorted_layers[index][:resistance_SI] - ((1.0 / total_conductance) - (1.0 / req_conductance))) * (sorted_layers[index][:conductivity_SI])
274
253
  # Set the thickness of the layer.
275
254
  construction.layers[const_index].to_StandardOpaqueMaterial.get.setThickness(thick_mod)
276
255
  end
277
- # Step the index of the sorted array forward by 1. We should be able to leave the loop now because the
278
- # construction should have the conductance we want now. But you never know.
256
+
257
+ # Step the index of the sorted array forward by 1. We should be
258
+ # able to leave the loop now because the construction should have
259
+ # the conductance we want now. But you never know.
279
260
  index += 1
280
261
  else
281
- # There the layer could not be adjusted to reach the desired conductance for the construction so get rid
282
- # of the layer.
283
- # If this is the only layer then we cannot get rid of it so throw an error. This should never happen but
284
- # you never know.
262
+
263
+ # There the layer could not be adjusted to reach the desired
264
+ # conductance for the construction so get rid of the layer. If
265
+ # this is the only layer then we cannot get rid of it so throw an
266
+ # error. This should never happen but you never know.
285
267
  if sorted_layers.size == 1
286
268
  raise ("Could not set conductance of construction #{construction.name.to_s} to #{req_conductance} because existing layers make this impossible. Could not automatically change the constructions. Change the construction to allow for this conductance to be set.")
287
269
  return construction
288
270
  end
271
+
289
272
  # Delete the layer from the construction.
290
273
  construction.eraseLayer(const_index)
291
- # Delete the layer from the sorted set of layers (so that both the construction array and sorted array
292
- # continue to contain the same layers).
274
+
275
+ # Delete the layer from the sorted set of layers (so that both
276
+ # the construction array and sorted array continue to contain the
277
+ # same layers).
293
278
  sorted_layers.delete_at(index)
294
- # Go through the sorted array and change the construction indicies so that they continue to point to the
295
- # correct layers of the construction array. Note that index is not increased. This is because the element
296
- # we were looking at just got removed so its index will be the same as that of what would have been the
297
- # next element.
279
+
280
+ # Go through the sorted array and change the construction indicies
281
+ # so that they continue to point to the correct layers of the
282
+ # construction array. Note that index is not increased. This is
283
+ # because the element we were looking at just got removed so its
284
+ # index will be the same as that of what would have been the next
285
+ # element.
298
286
  sorted_layers.each do |sorted_layer|
299
287
  if sorted_layer[:construction_index] > (const_index - 1)
300
288
  sorted_layer[:construction_index] -= 1
301
289
  end
302
290
  end
303
291
  end
304
- # Get the revised conductance for the construction now that it has been modified (by either removing or
305
- # modifying layers).
292
+
293
+ # Get the revised conductance for the construction now that it has
294
+ # been modified (by either removing or modifying layers).
306
295
  total_conductance = construction.thermalConductance.to_f
307
- # Check if we have anything left to modify. If yes, then keep going. If not, then if we have done enough
308
- # we can stop and return the revised construction, otherwise throw an error.
296
+
297
+ # Check if we have anything left to modify. If yes, then keep going.
298
+ # If not, then if we have done enough we can stop and return the
299
+ # revised construction, otherwise throw an error.
309
300
  if construction.layers.size < index + 1
310
301
  if total_conductance.round(4) >= req_conductance
311
302
  return construction
@@ -315,45 +306,25 @@ module BTAP
315
306
  end
316
307
  end
317
308
  end
309
+
318
310
  # We have achieved our goal, return the revised construction.
319
311
  return construction
320
312
  end
321
313
 
322
- # This checks if the construction layer can be modified to set thermal resistance of the whole construction to
323
- # be less than the required resistance
324
- # @author Chris Kirney <chris.kirney@canada.ca>
325
- # @param mat_resistance <Fixnum>
326
- # @param total_conductance <Fixnum>
327
- # @param req_conductance <Fixnum>
328
- # @return [<Fixnum>] layer resistance needed to meet construction material resistance, -999 if this is not enough
329
- def self.should_modify_layer(mat_resistance:, total_conductance:, req_conductance:)
330
- # Determine if the amount of resistance you can modify in this layer is greater than the amount of resistance
331
- # you have to change.
332
- if mat_resistance > ((1.0 / total_conductance) - (1.0 / req_conductance))
333
- # If yes, determine what the resistance for this layer should be to meet the required resistance of the
334
- # entire assembly. Then return the new resistance value.
335
- target_res = mat_resistance - ((1.0 / total_conductance) - (1.0 / req_conductance))
336
- return target_res
337
- else
338
- # If no, then return an unambiguous no.
339
- return -999
340
- end
341
- end
342
-
343
- #This will create construction model
344
- #@author Phylroy A. Lopez <plopez@nrcan.gc.ca>
345
- #@param model [OpenStudio::Model::Model]
346
- #@param name <String>
347
- #@param materials <Material>
348
- #@param insulationLayer = nil
349
- #@return [String] construction
314
+ # This will create construction model
315
+ # @author Phylroy A. Lopez <plopez@nrcan.gc.ca>
316
+ # @param model [OpenStudio::Model::Model]
317
+ # @param name <String>
318
+ # @param materials <Material>
319
+ # @param insulationLayer = nil
320
+ # @return [String] construction
350
321
  def self.create_construction(model, name, materials, insulationLayer = nil)
351
322
  construction = OpenStudio::Model::Construction.new(model)
352
323
  construction.setName(name)
353
- #check to see if they are all Fenestation or Opaque. Can't mix and match.
354
324
  is_fenestration = false
355
325
  is_opaque = false
356
- #check to see if materials are all the same type.
326
+
327
+ # Check to see if materials are all the same type.
357
328
  materials.each do |material|
358
329
  is_fenestration = true unless material.to_FenestrationMaterial.empty?
359
330
  is_opaque = true unless material.to_OpaqueMaterial.empty?
@@ -364,15 +335,15 @@ module BTAP
364
335
  return construction
365
336
  end
366
337
 
367
- #This will customize fenestration construction
368
- #@author Phylroy A. Lopez <plopez@nrcan.gc.ca>
369
- #@param model [OpenStudio::Model::Model]
370
- #@param construction <String>
371
- #@param conductance <String> = nil
372
- #@param solarTransmittanceatNormalIncidence [Float] = nil
373
- #@param visibleTransmittance [Float] = nil
374
- #@param at_temperature_c [Float] = 0.0
375
- #@return [String] create_construction
338
+ # This will customize fenestration construction
339
+ # @author Phylroy A. Lopez <plopez@nrcan.gc.ca>
340
+ # @param model [OpenStudio::Model::Model]
341
+ # @param construction <String>
342
+ # @param conductance <String> = nil
343
+ # @param solarTransmittanceatNormalIncidence [Float] = nil
344
+ # @param visibleTransmittance [Float] = nil
345
+ # @param at_temperature_c [Float] = 0.0
346
+ # @return [String] create_construction
376
347
  def self.customize_fenestration_construction(
377
348
  model,
378
349
  construction,
@@ -382,8 +353,9 @@ module BTAP
382
353
  at_temperature_c = 0.0)
383
354
  construction = OpenStudio::Model::getConstructionByName(model, construction.name.to_s).get
384
355
  raise ("This is not a fenestration!") unless construction.isFenestration
385
- #get equivilant values for tsol, tvis, and conductances.
386
- #TSol in this case is SHGC
356
+
357
+ # Get equivilant values for tsol, tvis, and conductances.
358
+ # TSol in this case is SHGC.
387
359
  solarTransmittanceatNormalIncidence = OpenstudioStandards::Constructions.construction_get_solar_transmittance(construction) if solarTransmittanceatNormalIncidence.nil?
388
360
  visibleTransmittance = OpenstudioStandards::Constructions.construction_get_visible_transmittance(construction) if visibleTransmittance.nil?
389
361
  conductance = OpenstudioStandards::Constructions.construction_get_conductance(construction) if conductance.nil?
@@ -404,7 +376,8 @@ module BTAP
404
376
  gas_array << material unless material.to_GasLayer.empty?
405
377
  end
406
378
 
407
- #set value of fictious glazing based on the fenestrations front and back if available
379
+ # Set value of fictious glazing based on the fenestrations front and
380
+ # back if available.
408
381
  unless glazing_array.first.to_StandardGlazing.empty?
409
382
  frontSideSolarReflectanceatNormalIncidence = glazing_array.first.to_StandardGlazing.get.frontSideSolarReflectanceatNormalIncidence
410
383
  frontSideVisibleReflectanceatNormalIncidence = glazing_array.first.to_StandardGlazing.get.frontSideVisibleReflectanceatNormalIncidence
@@ -416,10 +389,9 @@ module BTAP
416
389
  backSideVisibleReflectanceatNormalIncidence = glazing_array.last.to_StandardGlazing.get.backSideVisibleReflectanceatNormalIncidence
417
390
  backSideInfraredHemisphericalEmissivity = glazing_array.last.to_StandardGlazing.get.backSideInfraredHemisphericalEmissivity
418
391
  end
419
- #create fictious glazing.
420
- #assume a thickness of 0.10m
392
+
393
+ # Create fictious glazing. Assume a thickness of 0.10m.
421
394
  thickness = 0.10
422
- #calculate conductivity
423
395
  conductivity = conductance * thickness
424
396
  data_name_suffix = "U=#{("%.3f" % conductivity).to_s} SHGC=#{("%.3f" % solarTransmittanceatNormalIncidence).to_s}"
425
397
  base_cons_name = construction.name.to_s
@@ -431,7 +403,7 @@ module BTAP
431
403
  #Search to prevent the massive duplication that may ensue.
432
404
  return model.getConstructionByName(cons_name).get unless model.getConstructionByName(cons_name).empty?
433
405
 
434
- #fix for Simple glazing
406
+ # Fix for SimpleGlazing
435
407
  glazing_name = "SimpleGlazing:" + data_name_suffix
436
408
  glazing = nil
437
409
  if model.getSimpleGlazingByName(glazing_name).empty?
@@ -446,206 +418,102 @@ module BTAP
446
418
  glazing = model.getSimpleGlazingByName(glazing_name).get
447
419
  end
448
420
 
449
- #add the glazing and any shading materials to the array and create construction based on this.
421
+ # Add the glazing and any shading materials to the array and create
422
+ # construction based on this.
450
423
  new_materials_array = Array.new()
451
424
  new_materials_array << glazing
452
425
  new_materials_array.concat(shading_material_array) unless shading_material_array.empty?
453
426
  #puts new_materials_array.size
454
427
  return self.create_construction(construction.model, cons_name, new_materials_array)
455
428
  end
456
- end #module Constructions
429
+ end # module Constructions
457
430
 
458
- #This module contains methods for creating ConstructionSets.
431
+ # This module contains methods for creating ConstructionSets.
459
432
  module ConstructionSets #Resources::Envelope::ConstructionSets
460
433
 
461
- #Test Constructions Module
462
- if __FILE__ == $0
463
- require 'test/unit'
464
- class ConstructionsSetTests < Test::Unit::TestCase
465
-
466
- #This method creates default surface constructions
467
- #@author phylroy.lopez@nrcan.gc.ca
468
- def test_create_default_surface_constructions()
469
- model = OpenStudio::Model::Model.new()
470
- #Create layers from defaults
471
- insulation = OpenStudio::Model::StandardOpaqueMaterial.new(model, 'Smooth', 0.1, 0.001, 0.1, 0.1)
472
- opaque = OpenStudio::Model::StandardOpaqueMaterial.new(model, 'Smooth', 0.1, 0.1, 0.1, 100)
473
- massless = OpenStudio::Model::MasslessOpaqueMaterial.new(model, 'Smooth', 0.1)
474
- construction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [opaque, insulation, massless, opaque], insulation)
475
- walls_cons = floor_cons = roof_cons = construction
476
- construction_set = BTAP::Resources::Envelope::ConstructionSets::create_default_surface_constructions(model, "test construction set", walls_cons, floor_cons, roof_cons)
477
- #Check that the construction was created
478
- assert(!(construction_set.to_DefaultSurfaceConstructions.empty?))
479
- end
480
-
481
- #This method creates default subsurface constructions
482
- #@author phylroy.lopez@nrcan.gc.ca
483
- def test_create_default_subsurface_constructions()
484
- model = OpenStudio::Model::Model.new()
485
- #Create layers from defaults
486
- simple = OpenStudio::Model::SimpleGlazing.new(model, 0.1, 0.1)
487
- simple.setThickness(0.005)
488
- simple.setVisibleTransmittance(0.8)
489
- standard = OpenStudio::Model::StandardGlazing.new(model, 'SpectralAverage', 0.003)
490
- fixedWindowConstruction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [simple, standard])
491
- operableWindowConstruction = setDoorConstruction = setGlassDoorConstruction = overheadDoorConstruction = skylightConstruction = tubularDaylightDomeConstruction = tubularDaylightDiffuserConstruction = fixedWindowConstruction
492
- default_subsurface_constructions = BTAP::Resources::Envelope::ConstructionSets::create_subsurface_construction_set(
493
- model,
494
- fixedWindowConstruction,
495
- operableWindowConstruction,
496
- setDoorConstruction,
497
- setGlassDoorConstruction,
498
- overheadDoorConstruction,
499
- skylightConstruction,
500
- tubularDaylightDomeConstruction,
501
- tubularDaylightDiffuserConstruction)
502
- assert(!(default_subsurface_constructions.to_DefaultSubSurfaceConstructions.empty?))
503
- end
504
-
505
- #This method creates default constructions
506
- #@author phylroy.lopez@nrcan.gc.ca
507
- def test_create_default_construction_set()
508
- model = OpenStudio::Model::Model.new()
509
- #Create layers from defaults
510
- insulation = OpenStudio::Model::StandardOpaqueMaterial.new(model, 'Smooth', 0.1, 0.001, 0.1, 0.1)
511
- opaque = OpenStudio::Model::StandardOpaqueMaterial.new(model, 'Smooth', 0.1, 0.1, 0.1, 100)
512
- massless = OpenStudio::Model::MasslessOpaqueMaterial.new(model, 'Smooth', 0.1)
513
- construction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [opaque, insulation, massless, opaque], insulation)
514
- walls_cons = floor_cons = roof_cons = construction
515
- exterior_construction_set = BTAP::Resources::Envelope::ConstructionSets::create_default_surface_constructions(model, "test construction set", walls_cons, floor_cons, roof_cons)
516
- interior_construction_set = ground_construction_set = exterior_construction_set
517
-
518
- #Create layers from defaults
519
- simple = OpenStudio::Model::SimpleGlazing.new(model, 0.1, 0.1)
520
- simple.setThickness(0.005)
521
- simple.setVisibleTransmittance(0.8)
522
- standard = OpenStudio::Model::StandardGlazing.new(model, 'SpectralAverage', 0.003)
523
- fixedWindowConstruction = BTAP::Resources::Envelope::Constructions::create_construction(model, "test construction", [simple, standard])
524
- operableWindowConstruction = setDoorConstruction = setGlassDoorConstruction = overheadDoorConstruction = skylightConstruction = tubularDaylightDomeConstruction = tubularDaylightDiffuserConstruction = fixedWindowConstruction
525
- ext_subsurface_constructions = BTAP::Resources::Envelope::ConstructionSets::create_subsurface_construction_set(
526
- model,
527
- fixedWindowConstruction,
528
- operableWindowConstruction,
529
- setDoorConstruction,
530
- setGlassDoorConstruction,
531
- overheadDoorConstruction,
532
- skylightConstruction,
533
- tubularDaylightDomeConstruction,
534
- tubularDaylightDiffuserConstruction)
535
-
536
- int_subsurface_constructions = ext_subsurface_constructions
537
-
538
- construction_set = BTAP::Resources::Envelope::ConstructionSets::create_default_construction_set(
539
- model,
540
- "default construction set test",
541
- exterior_construction_set,
542
- interior_construction_set,
543
- ground_construction_set,
544
- ext_subsurface_constructions,
545
- int_subsurface_constructions)
546
-
547
- #Check that the construction was created
548
- assert(!(construction_set.to_DefaultConstructionSet.empty?))
549
- end
550
- end
551
- end
552
-
553
- #This method set the default construction set from an OSM library file and the construction set name.
554
- #params construction_library_file [String] Path to osm file that contains the contruction set to be used.
555
- #params construction_set_name [String] Name of the construction set to be used.
556
- def self.set_construction_set_by_file(model, construction_library_file, construction_set_name, runner = nil)
557
- BTAP::runner_register("Info", "set_construction_set_by_file(#{construction_library_file}, #{construction_set_name})")
558
- #check if file exists
559
- unless File.exist?(construction_library_file) == true
560
- BTAP::runner_register("Error", "Could not find #{construction_library_file}", runner)
561
- return false
562
- end
563
- construction_set = BTAP::Resources::Envelope::ConstructionSets::get_construction_set_from_library(construction_library_file, construction_set_name)
564
- #check if construction set name exists and can apply to the model.
565
- unless model.building.get.setDefaultConstructionSet(construction_set.clone(model).to_DefaultConstructionSet.get)
566
- BTAP::runner_register("Error", "Could not use default construction set #{construction_set_name} from #{construction_library_file} ", runner)
567
- return false
568
- end
569
- #sets all surfaces to use default constructions except adiabatic, where it does a hard assignment of the interior wall construction type.
570
- model.getPlanarSurfaces.sort.each { |item| item.resetConstruction }
571
- #if the default construction set is defined..try to assign the interior wall to the adiabatic surfaces
572
- BTAP::Resources::Envelope::assign_interior_surface_construction_to_adiabatic_surfaces(model, runner)
573
- BTAP::runner_register("Info", "set_construction_set_by_file(#{construction_library_file}, #{construction_set_name}) Completed Sucessfully.")
574
- return true
575
- end
576
-
577
- #This method customizes default surface construction and sets conductance
578
- #@author phylroy.lopez@nrcan.gc.ca
579
- #@param model [OpenStudio::Model::Model]
580
- #@param name [String]
581
- #@param default_surface_construction_set <String>
582
- #@param ext_wall_cond [Float] = nil
583
- #@param ext_floor_cond [Float] = nil
584
- #@param ext_roof_cond [Float] = nil
585
- #@param ground_wall_cond [Float] = nil
586
- #@param ground_floor_cond [Float] = nil
587
- #@param ground_roof_cond [Float] = nil
588
- #@param fixed_window_cond [Float] = nil
589
- #@param fixed_wind_solar_trans [Float] = nil
590
- #@param fixed_wind_vis_trans [Float] = nil
591
- #@param operable_window_cond [Float] = nil
592
- #@param operable_wind_solar_trans [Float] = nil
593
- #@param operable_wind_vis_trans [Float] = nil
594
- #@param door_construction_cond [Float] = nil
595
- #@param glass_door_cond [Float] = nil
596
- #@param glass_door_solar_trans [Float] = nil
597
- #@param glass_door_vis_trans [Float] = nil
598
- #@param overhead_door_cond [Float] = nil
599
- #@param skylight_cond [Float] = nil
600
- #@param skylight_solar_trans [Float] = nil
601
- #@param skylight_vis_trans [Float] = nil,
602
- #@param tubular_daylight_dome_cond [Float] = nil
603
- #@param tubular_daylight_dome_solar_trans [Float] = nil
604
- #@param tubular_daylight_dome_vis_trans [Float] = nil,
605
- #@param tubular_daylight_diffuser_cond [Float] = nil
606
- #@param tubular_daylight_diffuser_solar_trans [Float] = nil
607
- #@param tubular_daylight_diffuser_vis_trans [Float] = nil
608
- def self.customize_default_surface_construction_set!(model:,
609
- name:,
610
- default_surface_construction_set:,
611
- # ext surfaces
612
- ext_wall_cond: nil,
613
- ext_floor_cond: nil,
614
- ext_roof_cond: nil,
615
- # ground surfaces
616
- ground_wall_cond: nil,
617
- ground_floor_cond: nil,
618
- ground_roof_cond: nil,
619
- # fixed Windows
620
- fixed_window_cond: nil,
621
- fixed_wind_solar_trans: nil,
622
- fixed_wind_vis_trans: nil,
623
- # operable windows
624
- operable_wind_solar_trans: nil,
625
- operable_window_cond: nil,
626
- operable_wind_vis_trans: nil,
627
- # glass doors
628
- glass_door_cond: nil,
629
- glass_door_solar_trans: nil,
630
- glass_door_vis_trans: nil,
631
- # opaque doors
632
- door_construction_cond: nil,
633
- overhead_door_cond: nil,
634
- # skylights
635
- skylight_cond: nil,
636
- skylight_solar_trans: nil,
637
- skylight_vis_trans: nil,
638
- # tubular daylight dome
639
- tubular_daylight_dome_cond: nil,
640
- tubular_daylight_dome_solar_trans: nil,
641
- tubular_daylight_dome_vis_trans: nil,
642
- # tubular daylight diffuser
643
- tubular_daylight_diffuser_cond: nil,
644
- tubular_daylight_diffuser_solar_trans: nil,
645
- tubular_daylight_diffuser_vis_trans: nil
434
+ # This method customizes default surface construction and sets
435
+ # conductance.
436
+ # @author phylroy.lopez@nrcan.gc.ca
437
+ # @param model [OpenStudio::Model::Model]
438
+ # @param name [String]
439
+ # @param default_surface_construction_set <String>
440
+ # @param ext_wall_cond [Float] = nil
441
+ # @param ext_floor_cond [Float] = nil
442
+ # @param ext_roof_cond [Float] = nil
443
+ # @param ground_wall_cond [Float] = nil
444
+ # @param ground_floor_cond [Float] = nil
445
+ # @param ground_roof_cond [Float] = nil
446
+ # @param fixed_window_cond [Float] = nil
447
+ # @param fixed_wind_solar_trans [Float] = nil
448
+ # @param fixed_wind_vis_trans [Float] = nil
449
+ # @param operable_window_cond [Float] = nil
450
+ # @param operable_wind_solar_trans [Float] = nil
451
+ # @param operable_wind_vis_trans [Float] = nil
452
+ # @param door_construction_cond [Float] = nil
453
+ # @param glass_door_cond [Float] = nil
454
+ # @param glass_door_solar_trans [Float] = nil
455
+ # @param glass_door_vis_trans [Float] = nil
456
+ # @param overhead_door_cond [Float] = nil
457
+ # @param skylight_cond [Float] = nil
458
+ # @param skylight_solar_trans [Float] = nil
459
+ # @param skylight_vis_trans [Float] = nil,
460
+ # @param tubular_daylight_dome_cond [Float] = nil
461
+ # @param tubular_daylight_dome_solar_trans [Float] = nil
462
+ # @param tubular_daylight_dome_vis_trans [Float] = nil,
463
+ # @param tubular_daylight_diffuser_cond [Float] = nil
464
+ # @param tubular_daylight_diffuser_solar_trans [Float] = nil
465
+ # @param tubular_daylight_diffuser_vis_trans [Float] = nil
466
+ def self.customize_default_surface_construction_set!(
467
+ model:,
468
+ name:,
469
+ default_surface_construction_set:,
470
+
471
+ # Exterior surfaces
472
+ ext_wall_cond: nil,
473
+ ext_floor_cond: nil,
474
+ ext_roof_cond: nil,
475
+
476
+ # Ground surfaces
477
+ ground_wall_cond: nil,
478
+ ground_floor_cond: nil,
479
+ ground_roof_cond: nil,
480
+
481
+ # Fixed windows
482
+ fixed_window_cond: nil,
483
+ fixed_wind_solar_trans: nil,
484
+ fixed_wind_vis_trans: nil,
485
+
486
+ # Operable windows
487
+ operable_wind_solar_trans: nil,
488
+ operable_window_cond: nil,
489
+ operable_wind_vis_trans: nil,
490
+
491
+ # Glass doors
492
+ glass_door_cond: nil,
493
+ glass_door_solar_trans: nil,
494
+ glass_door_vis_trans: nil,
495
+
496
+ # Opaque doors
497
+ door_construction_cond: nil,
498
+ overhead_door_cond: nil,
499
+
500
+ # Skylights
501
+ skylight_cond: nil,
502
+ skylight_solar_trans: nil,
503
+ skylight_vis_trans: nil,
504
+
505
+ # Tubular daylight dome
506
+ tubular_daylight_dome_cond: nil,
507
+ tubular_daylight_dome_solar_trans: nil,
508
+ tubular_daylight_dome_vis_trans: nil,
509
+
510
+ # Tubular daylight diffuser
511
+ tubular_daylight_diffuser_cond: nil,
512
+ tubular_daylight_diffuser_solar_trans: nil,
513
+ tubular_daylight_diffuser_vis_trans: nil
646
514
  )
647
515
 
648
- #Change name if required.
516
+ # Change name if required.
649
517
  default_surface_construction_set.setName(name) unless name.nil?
650
518
  ext_surface_set = default_surface_construction_set.defaultExteriorSurfaceConstructions.get
651
519
  new_ext_surface_set = self.customize_default_surface_constructions_conductance(model, name, ext_surface_set, ext_wall_cond, ext_floor_cond, ext_roof_cond)
@@ -687,102 +555,32 @@ module BTAP
687
555
 
688
556
  end
689
557
 
690
- #This will remove all associated construction costs for each construction
691
- #type associated with the construction set. Unless the value is set to nil, in which case it will do nothing.
692
- #@author phylroy.lopez@nrcan.gc.ca
693
- #@param default_surface_construction_set <String>
694
- #@param ext_wall_cost [Float] = nil
695
- #@param ext_floor_cost [Float] = nil
696
- #@param ext_roof_cost [Float] = nil
697
- #@param ground_wall_cost [Float] = nil
698
- #@param ground_floor_cost [Float] = nil
699
- #@param ground_roof_cost [Float] = nil
700
- #@param fixed_window_cost [Float] = nil
701
- #@param operable_window_cost [Float] = nil
702
- #@param door_construction_cost [Float] = nil
703
- #@param glass_door_cost [Float] = nil
704
- #@param overhead_door_cost [Float] = nil
705
- #@param skylight_cost [Float] = nil
706
- #@param tubular_daylight_dome_cost [Float] = nil
707
- #@param tubular_daylight_diffuser_cost [Float] = nil
708
- #@param total_building_construction_set_cost [Float] = nil
709
- def self.customize_default_surface_construction_set_costs(default_surface_construction_set,
710
- ext_wall_cost = nil,
711
- ext_floor_cost = nil,
712
- ext_roof_cost = nil,
713
- ground_wall_cost = nil,
714
- ground_floor_cost = nil,
715
- ground_roof_cost = nil,
716
- fixed_window_cost = nil,
717
- operable_window_cost = nil,
718
- door_construction_cost = nil,
719
- glass_door_cost = nil,
720
- overhead_door_cost = nil,
721
- skylight_cost = nil,
722
- tubular_daylight_dome_cost = nil,
723
- tubular_daylight_diffuser_cost = nil,
724
- total_building_construction_set_cost = nil
725
- )
726
-
727
- constructions_and_cost = [
728
- ["ext_wall_cost_m3", ext_wall_cost, default_surface_construction_set.defaultExteriorSurfaceConstructions.get.wallConstruction.get],
729
- ["ext_floor_cost_m3", ext_floor_cost, default_surface_construction_set.defaultExteriorSurfaceConstructions.get.floorConstruction.get],
730
- ["ext_roof_cost_m3", ext_roof_cost, default_surface_construction_set.defaultExteriorSurfaceConstructions.get.roofCeilingConstruction.get],
731
- ["ground_wall_cost_m3", ground_wall_cost, default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.wallConstruction.get],
732
- ["ground_floor_cost_m3", ground_floor_cost, default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.floorConstruction.get],
733
- ["ground_roof_cost_m3", ground_roof_cost, default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.roofCeilingConstruction.get],
734
- ["fixed_window_cost_m3", fixed_window_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.fixedWindowConstruction.get],
735
- ["operable_window_cost_m3", operable_window_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.operableWindowConstruction.get],
736
- ["door_construction_cost_m3", door_construction_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.doorConstruction.get],
737
- ["glass_door_cost_m3", glass_door_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.glassDoorConstruction.get],
738
- ["overhead_door_cost_m3", overhead_door_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.overheadDoorConstruction.get],
739
- ["skylight_cost_m3", skylight_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.skylightConstruction.get],
740
- ["tubular_daylight_dome_cost_m3", tubular_daylight_dome_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.tubularDaylightDomeConstruction.get],
741
- ["tubular_daylight_diffuser_cost_m3", tubular_daylight_diffuser_cost, default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.tubularDaylightDiffuserConstruction.get]
742
- ]
743
-
744
- #Assign cost to each construction.
745
- constructions_and_cost.each do |item|
746
- unless item[1].nil?
747
- item[2].removeLifeCycleCosts()
748
- raise("Could not remove LCC info from construction #{item[2]}") unless item[2].lifeCycleCosts.size == 0
749
- construction_cost_object = OpenStudio::Model::LifeCycleCost.new(item[2])
750
- construction_cost_object.setName(item[0])
751
- construction_cost_object.setCost(item[1])
752
- construction_cost_object.setCostUnits("CostPerArea")
753
- end
754
- end
755
- #create building total construction cost if needed.
756
- building = default_surface_construction_set.model.building.get
757
- BTAP::Resources::Economics::object_cost(building, "Builing Contruction Set Whole Building Capital Cost", total_building_construction_set_cost, "CostPerEach")
758
- end
759
-
760
- #This will customize default subsurface construction conductances.
761
- #@author phylroy.lopez@nrcan.gc.ca
762
- #@param model [OpenStudio::Model::Model]
763
- #@param name [String]
764
- #@param subsurface_set [Array]
765
- #@param fixed_window_conductance [Float] = nil
766
- #@param fixed_wind_solar_trans [Float] = nil
767
- #@param fixed_wind_vis_trans [Float] = nil
768
- #@param operable_window_conductance [Float] = nil
769
- #@param operable_wind_solar_trans [Float] = nil
770
- #@param operable_wind_vis_trans [Float] = nil
771
- #@param door_construction_conductance [Float] = nil
772
- #@param glass_door_conductance [Float] = nil
773
- #@param glass_door_solar_trans [Float] = nil
774
- #@param glass_door_vis_trans [Float] = nil
775
- #@param overhead_door_conductance [Float] = nil
776
- #@param skylight_conductance [Float] = nil
777
- #@param skylight_solar_trans [Float] = nil
778
- #@param skylight_vis_trans [Float] = nil
779
- #@param tubular_daylight_dome_conductance [Float] = nil
780
- #@param tubular_daylight_dome_solar_trans [Float] = nil
781
- #@param tubular_daylight_dome_vis_trans [Float] = nil
782
- #@param tubular_daylight_diffuser_conductance [Float] = nil
783
- #@param tubular_daylight_diffuser_solar_trans [Float] = nil
784
- #@param tubular_daylight_diffuser_vis_trans [Float] = nil
785
- #@return [Object] set
558
+ # This will customize default subsurface construction conductances.
559
+ # @author phylroy.lopez@nrcan.gc.ca
560
+ # @param model [OpenStudio::Model::Model]
561
+ # @param name [String]
562
+ # @param subsurface_set [Array]
563
+ # @param fixed_window_conductance [Float] = nil
564
+ # @param fixed_wind_solar_trans [Float] = nil
565
+ # @param fixed_wind_vis_trans [Float] = nil
566
+ # @param operable_window_conductance [Float] = nil
567
+ # @param operable_wind_solar_trans [Float] = nil
568
+ # @param operable_wind_vis_trans [Float] = nil
569
+ # @param door_construction_conductance [Float] = nil
570
+ # @param glass_door_conductance [Float] = nil
571
+ # @param glass_door_solar_trans [Float] = nil
572
+ # @param glass_door_vis_trans [Float] = nil
573
+ # @param overhead_door_conductance [Float] = nil
574
+ # @param skylight_conductance [Float] = nil
575
+ # @param skylight_solar_trans [Float] = nil
576
+ # @param skylight_vis_trans [Float] = nil
577
+ # @param tubular_daylight_dome_conductance [Float] = nil
578
+ # @param tubular_daylight_dome_solar_trans [Float] = nil
579
+ # @param tubular_daylight_dome_vis_trans [Float] = nil
580
+ # @param tubular_daylight_diffuser_conductance [Float] = nil
581
+ # @param tubular_daylight_diffuser_solar_trans [Float] = nil
582
+ # @param tubular_daylight_diffuser_vis_trans [Float] = nil
583
+ # @return [Object] set
786
584
  def self.customize_default_sub_surface_constructions_conductance(
787
585
  model:,
788
586
  name:,
@@ -820,15 +618,15 @@ module BTAP
820
618
  return set
821
619
  end
822
620
 
823
- #This will customize default surface construction conductance.
824
- #@author phylroy.lopez@nrcan.gc.ca
825
- #@param model [OpenStudio::Model::Model]
826
- #@param name [String] = nil
827
- #@param default_surface_constructions [Float] = nil
828
- #@param wall_conductance [Float] = nil
829
- #@param floor_conductance [Float] = nil
830
- #@param roof_conductance [Float] = nil
831
- #@return [Object] set
621
+ # This will customize default surface construction conductance.
622
+ # @author phylroy.lopez@nrcan.gc.ca
623
+ # @param model [OpenStudio::Model::Model]
624
+ # @param name [String] = nil
625
+ # @param default_surface_constructions [Float] = nil
626
+ # @param wall_conductance [Float] = nil
627
+ # @param floor_conductance [Float] = nil
628
+ # @param roof_conductance [Float] = nil
629
+ # @return [Object] set
832
630
  def self.customize_default_surface_constructions_conductance(model, name, default_surface_constructions, wall_conductance = nil, floor_conductance = nil, roof_conductance = nil)
833
631
 
834
632
  set = OpenStudio::Model::DefaultSurfaceConstructions.new(model)
@@ -839,14 +637,15 @@ module BTAP
839
637
  return set
840
638
  end
841
639
 
842
- #This creates a new construction set of wall, floor and roof/ceiling objects.
843
- #@author phylroy.lopez@nrcan.gc.ca
844
- #@param model [OpenStudio::Model::Model]
845
- #@param name [String] = nil
846
- #@param wall [Float] = nil
847
- #@param floor [Float] = nil
848
- #@param roof [Float] = nil
849
- #@return [Object] set
640
+ # This creates a new construction set of wall, floor and roof/ceiling
641
+ # objects.
642
+ # @author phylroy.lopez@nrcan.gc.ca
643
+ # @param model [OpenStudio::Model::Model]
644
+ # @param name [String] = nil
645
+ # @param wall [Float] = nil
646
+ # @param floor [Float] = nil
647
+ # @param roof [Float] = nil
648
+ # @return [Object] set
850
649
  def self.create_default_surface_constructions(model, name, wall, floor, roof)
851
650
  wall = BTAP::Common::validate_array(model, wall, "Construction").first
852
651
  floor = BTAP::Common::validate_array(model, floor, "Construction").first
@@ -859,18 +658,19 @@ module BTAP
859
658
  return set
860
659
  end
861
660
 
862
- #This method creates a subsurface construction set (windows, doors, skylights, etc)
863
- #@author phylroy.lopez@nrcan.gc.ca
864
- #@param model [OpenStudio::Model::Model]
865
- #@param fixedWindowConstruction <String>
866
- #@param operableWindowConstruction <String>
867
- #@param setDoorConstruction <String>
868
- #@param setGlassDoorConstruction <String>
869
- #@param overheadDoorConstruction <String>
870
- #@param skylightConstruction <String>
871
- #@param tubularDaylightDomeConstruction <String>
872
- #@param tubularDaylightDiffuserConstruction <String>
873
- #@return [Object] set
661
+ # This method creates a subsurface construction set (windows, doors,
662
+ # skylights, etc)
663
+ # @author phylroy.lopez@nrcan.gc.ca
664
+ # @param model [OpenStudio::Model::Model]
665
+ # @param fixedWindowConstruction <String>
666
+ # @param operableWindowConstruction <String>
667
+ # @param setDoorConstruction <String>
668
+ # @param setGlassDoorConstruction <String>
669
+ # @param overheadDoorConstruction <String>
670
+ # @param skylightConstruction <String>
671
+ # @param tubularDaylightDomeConstruction <String>
672
+ # @param tubularDaylightDiffuserConstruction <String>
673
+ # @return [Object] set
874
674
  def self.create_subsurface_construction_set(
875
675
  model,
876
676
  fixedWindowConstruction,
@@ -902,40 +702,18 @@ module BTAP
902
702
  return set
903
703
  end
904
704
 
905
- #This method gets construction set object from external library
906
- #@author phylroy.lopez@nrcan.gc.ca
907
- #@param construction_library_file [String]
908
- #@param construction_set_name [String]
909
- #@return [Boolean] optional_construction_set
910
- def self.get_construction_set_from_library(construction_library_file, construction_set_name)
911
- #Load Contruction osm library.
912
- if File.exist?(construction_library_file)
913
- construction_lib = BTAP::FileIO::load_osm(construction_library_file)
914
- #Get construction set..
915
- optional_construction_set = construction_lib.getDefaultConstructionSetByName(construction_set_name)
916
- if optional_construction_set.empty?
917
- raise("#{construction_set_name} does not exist in #{construction_library_file} library ")
918
- else
919
- return optional_construction_set.get
920
- end
921
- else
922
- raise("Error : Construction Lib #{construction_library_file} does not exist!")
923
- end
924
- return false
925
- end
926
-
927
- #This method creates a default construction set. A construction set for
928
- #exterior, interior,ground and subsurface must be created prior to populate
929
- #this object.
930
- #@author phylroy.lopez@nrcan.gc.ca
931
- #@param model [OpenStudio::Model::Model]
932
- #@param name [String]
933
- #@param exterior_construction_set
934
- #@param interior_construction_set
935
- #@param ground_construction_set
936
- #@param subsurface_exterior_construction_set
937
- #@param subsurface_interior_construction_set
938
- #@return [Object] set
705
+ # This method creates a default construction set. A construction set for
706
+ # exterior, interior,ground and subsurface must be created prior to populate
707
+ # this object.
708
+ # @author phylroy.lopez@nrcan.gc.ca
709
+ # @param model [OpenStudio::Model::Model]
710
+ # @param name [String]
711
+ # @param exterior_construction_set
712
+ # @param interior_construction_set
713
+ # @param ground_construction_set
714
+ # @param subsurface_exterior_construction_set
715
+ # @param subsurface_interior_construction_set
716
+ # @return [Object] set
939
717
  def self.create_default_construction_set(
940
718
  model,
941
719
  name,
@@ -960,44 +738,7 @@ module BTAP
960
738
  set.setName(name)
961
739
  return set
962
740
  end
963
-
964
- #This method creates a default construction set. A construction set for
965
- #exterior, interior,ground and subsurface must be created prior to populate
966
- #this object.
967
- #@author phylroy.lopez@nrcan.gc.ca
968
- #@param default_surface_construction_set [Object]
969
- #@return [String] table
970
- def self.get_construction_set_info(default_surface_construction_set)
971
- #######################
972
- constructions_and_cost = [
973
- ["ext_wall", default_surface_construction_set.defaultExteriorSurfaceConstructions.get.wallConstruction.get],
974
- ["ext_floor", default_surface_construction_set.defaultExteriorSurfaceConstructions.get.floorConstruction.get],
975
- ["ext_roof", default_surface_construction_set.defaultExteriorSurfaceConstructions.get.roofCeilingConstruction.get],
976
- ["ground_wall", default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.wallConstruction.get],
977
- ["ground_floor", default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.floorConstruction.get],
978
- ["ground_roof", default_surface_construction_set.defaultGroundContactSurfaceConstructions.get.roofCeilingConstruction.get],
979
- ["fixed_window", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.fixedWindowConstruction.get],
980
- ["operable_window", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.operableWindowConstruction.get],
981
- ["door_construction", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.doorConstruction.get],
982
- ["glass_door", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.glassDoorConstruction.get],
983
- ["overhead_door", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.overheadDoorConstruction.get],
984
- ["skylight", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.skylightConstruction.get],
985
- ["tubular_daylight_dome", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.tubularDaylightDomeConstruction.get],
986
- ["tubular_daylight_diffuser", default_surface_construction_set.defaultExteriorSubSurfaceConstructions.get.tubularDaylightDiffuserConstruction.get]
987
- ]
988
- default_surface_construction_set.name
989
- table = "construction,rsi,cost_m3\n"
990
- constructions_and_cost.each do |item|
991
- cost_item = OpenStudio::Model::getLifeCycleCostByName(default_surface_construction_set.model, "#{item[0]}_cost_m3")
992
- #ensure it exists
993
- cost = "NA"
994
- cost = cost_item.cost unless cost_item.empty?
995
- rsi = 1.0 / OpenstudioStandards::Constructions.construction_get_conductance(item[1])
996
- table << "#{item[0]},#{rsi},#{cost}\n"
997
- end
998
- return table
999
- end
1000
- end #module ConstructionSet
1001
- end #Envelope
1002
- end #module Resources
741
+ end # module ConstructionSets
742
+ end # module Envelope
743
+ end # module Resources
1003
744
  end