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.
- checksums.yaml +4 -4
- data/data/standards/test_performance_expected_dd_results.csv +90 -90
- data/lib/openstudio-standards/btap/activity.rb +858 -61
- data/lib/openstudio-standards/btap/attributes.rb +297 -103
- data/lib/openstudio-standards/btap/bridging.rb +1335 -593
- data/lib/openstudio-standards/btap/btap.rb +60 -181
- data/lib/openstudio-standards/btap/carbon/btap_carbon.rb +199 -142
- data/lib/openstudio-standards/btap/common/constructions.json +1275 -0
- data/lib/openstudio-standards/btap/common/costs.csv +1969 -0
- data/lib/openstudio-standards/btap/common/costs_local_factors.csv +2315 -0
- data/lib/openstudio-standards/btap/common/materials_glazing.csv +61 -0
- data/lib/openstudio-standards/btap/{common_resources → common}/materials_hvac.csv +1685 -1685
- data/lib/openstudio-standards/btap/{common_resources → common}/materials_lighting.csv +266 -266
- data/lib/openstudio-standards/btap/common/materials_opaque.csv +214 -0
- data/lib/openstudio-standards/btap/common/necb_building_types.csv +35 -0
- data/lib/openstudio-standards/btap/common/necb_space_types.csv +110 -0
- data/lib/openstudio-standards/btap/common/thermal_bridging.csv +73 -0
- data/lib/openstudio-standards/btap/costing/btap_costing.rb +346 -429
- data/lib/openstudio-standards/btap/costing/database.rb +104 -0
- data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +356 -344
- data/lib/openstudio-standards/btap/costing/dcv_costing.rb +282 -296
- data/lib/openstudio-standards/btap/costing/envelope_costing.rb +179 -192
- data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +2477 -2316
- data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +127 -142
- data/lib/openstudio-standards/btap/costing/lighting_costing.rb +216 -198
- data/lib/openstudio-standards/btap/costing/nv_costing.rb +522 -523
- data/lib/openstudio-standards/btap/costing/pv_ground_costing.rb +649 -649
- data/lib/openstudio-standards/btap/costing/shw_costing.rb +626 -625
- data/lib/openstudio-standards/btap/costing/thermal_bridging_costing.rb +72 -0
- data/lib/openstudio-standards/btap/costing/ventilation_costing.rb +2363 -2361
- data/lib/openstudio-standards/btap/deprecated.rb +1033 -0
- data/lib/openstudio-standards/btap/envelope.rb +313 -572
- data/lib/openstudio-standards/btap/fileio.rb +152 -1070
- data/lib/openstudio-standards/btap/geometry.rb +486 -766
- data/lib/openstudio-standards/btap/linear_regression.rb +130 -0
- data/lib/openstudio-standards/btap/paths.rb +46 -0
- data/lib/openstudio-standards/btap/qaqc/analysis.rb +163 -0
- data/lib/openstudio-standards/btap/qaqc/data.rb +2293 -0
- data/lib/openstudio-standards/btap/qaqc/datapoint.rb +641 -0
- data/lib/openstudio-standards/btap/schedules.rb +11 -611
- data/lib/openstudio-standards/btap/structure.rb +574 -189
- data/lib/openstudio-standards/constructions/materials/information.rb +1 -1
- data/lib/openstudio-standards/create_typical/create_typical.rb +1 -1
- data/lib/openstudio-standards/exterior_lighting/create.rb +135 -85
- data/lib/openstudio-standards/exterior_lighting/data/typical_exterior_lighting.json +20 -0
- data/lib/openstudio-standards/exterior_lighting/information.rb +23 -2
- data/lib/openstudio-standards/geometry/create.rb +7 -3
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +3 -2
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +3 -2
- data/lib/openstudio-standards/prototypes/common/data/thermostat_schedule_lookup.json +84 -84
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +4 -4
- data/lib/openstudio-standards/refrigeration/create_walkin.rb +45 -5
- data/lib/openstudio-standards/refrigeration/data/refrigerated_walkins.csv +75 -75
- data/lib/openstudio-standards/schedules/parametric.rb +6 -0
- data/lib/openstudio-standards/service_water_heating/create_typical.rb +10 -3
- data/lib/openstudio-standards/service_water_heating/create_water_heating_loop.rb +30 -14
- data/lib/openstudio-standards/service_water_heating/information.rb +4 -1
- data/lib/openstudio-standards/sql_file/unmet_hours.rb +2 -1
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +3 -1
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +3 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.boilers.json +12 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_properties.json +18432 -3072
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.boilers.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_properties.json +8532 -1422
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.boilers.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_properties.json +8532 -1422
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.boilers.json +16 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.computer_room_acs.json +30 -30
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_properties.json +7560 -1260
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +1 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.boilers.json +16 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.construction_properties.json +7560 -1260
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +1 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.boilers.json +22 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.construction_properties.json +7236 -1206
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.furnaces.json +223 -19
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.schedules.json +37 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.boilers.json +3 -0
- 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
- data/lib/openstudio-standards/standards/cbes/data/cbes.schedules.json +1 -1
- data/lib/openstudio-standards/standards/deer/data/deer.schedules.json +1 -1
- data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/data/surface_thermal_transmittance.json +76 -40
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/surface_thermal_transmittance.json +76 -40
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +6 -4
- data/lib/openstudio-standards/standards/necb/NECB2011/NECB2011_QAQC.json +2988 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +25 -3
- data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +672 -534
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Hospital.osm +1791 -1792
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPMultiTower.osm +7 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPTownHouse.osm +7 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LargeHotel.osm +5 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LargeOffice.osm +8 -9
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernEducation.osm +10 -4
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernHealthCare.osm +14 -15
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Outpatient.osm +7 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/surface_thermal_transmittance.json +76 -40
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +14 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +542 -130
- data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +30 -63
- data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +7 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/data/surface_thermal_transmittance.json +90 -0
- data/lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb +8 -6
- data/lib/openstudio-standards/standards/necb/NECB2017/data/surface_thermal_transmittance.json +76 -40
- data/lib/openstudio-standards/standards/necb/NECB2017/necb_2017.rb +2 -1
- data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +0 -117
- data/lib/openstudio-standards/standards/necb/NECB2020/data/surface_thermal_transmittance.json +76 -45
- data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +218 -0
- data/lib/openstudio-standards/standards/necb/common/construction_defaults.osm +12 -7
- data/lib/openstudio-standards/standards/standard.rb +1 -1
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards.rb +9 -4
- metadata +59 -66
- data/data/inventory/thermal_bridging.csv +0 -90
- data/data/standards/OpenStudio_Standards-ashrae_90_1-ALL-comstock(space_types).xlsx +0 -0
- data/data/standards/openstudio_standards_duplicates_log.csv +0 -7962
- data/lib/openstudio-standards/btap/NECB_building_types.csv +0 -35
- data/lib/openstudio-standards/btap/NECB_space_types.csv +0 -109
- data/lib/openstudio-standards/btap/WeatherData1.json +0 -2110
- data/lib/openstudio-standards/btap/WeatherData1.xlsx +0 -0
- data/lib/openstudio-standards/btap/btap_result.rb +0 -1144
- data/lib/openstudio-standards/btap/btap_test_helper.rb +0 -86
- data/lib/openstudio-standards/btap/common_paths.rb +0 -81
- data/lib/openstudio-standards/btap/common_resources/ConstructionProperties.csv +0 -52
- data/lib/openstudio-standards/btap/common_resources/Constructions.csv +0 -37
- data/lib/openstudio-standards/btap/common_resources/construction_sets.csv +0 -1270
- data/lib/openstudio-standards/btap/common_resources/constructions_glazing.csv +0 -121
- data/lib/openstudio-standards/btap/common_resources/constructions_opaque.csv +0 -2256
- data/lib/openstudio-standards/btap/common_resources/costs.csv +0 -1897
- data/lib/openstudio-standards/btap/common_resources/costs_local_factors.csv +0 -2315
- data/lib/openstudio-standards/btap/common_resources/materials_glazing.csv +0 -35
- data/lib/openstudio-standards/btap/common_resources/materials_opaque.csv +0 -164
- data/lib/openstudio-standards/btap/costing/btap_measure_helper.rb +0 -359
- data/lib/openstudio-standards/btap/costing/btap_workflow.rb +0 -117
- data/lib/openstudio-standards/btap/costing/copy_test_results_files_to_expected_results.rb +0 -11
- data/lib/openstudio-standards/btap/costing/cost_building_from_file.rb +0 -136
- data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +0 -173
- data/lib/openstudio-standards/btap/costing/dummy.epw +0 -8768
- data/lib/openstudio-standards/btap/costing/dummy.osm +0 -5320
- data/lib/openstudio-standards/btap/costing/neb_end_use_prices.csv +0 -42
- data/lib/openstudio-standards/btap/costing/necb_2011_spacetype_info.csv +0 -225
- data/lib/openstudio-standards/btap/costing/necb_reference_runs.csv +0 -28705
- data/lib/openstudio-standards/btap/costing/parallel_tests.rb +0 -92
- data/lib/openstudio-standards/btap/costing/test_list.txt +0 -15
- data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +0 -27
- data/lib/openstudio-standards/btap/costing/test_run_costing_tests.rb +0 -80
- data/lib/openstudio-standards/btap/necb_2011_spacetype_info.csv +0 -225
- data/lib/openstudio-standards/btap/utilities/Add_template_field_to_json.rb +0 -22
- data/lib/openstudio-standards/btap/utilities/convert_surfaces_to_adiabatic_necb_8426.rb +0 -204
- data/lib/openstudio-standards/btap/utilities/generate_space_types.rb +0 -8
- data/lib/openstudio-standards/btap/utilities/necb_to_epw_map.rb +0 -50
- data/lib/openstudio-standards/btap/utilities/os_sim_extract.rb +0 -48
- data/lib/openstudio-standards/btap/utilities/rename_surfaces.rb +0 -24
- data/lib/openstudio-standards/btap/utilities/round_surf_coords.rb +0 -32
- data/lib/openstudio-standards/btap/utilities/sched_create.rb +0 -145
- data/lib/openstudio-standards/btap/utilities/set_mult_to_adiabatic.rb +0 -53
- data/lib/openstudio-standards/btap/utilities/space_type.rb +0 -78
- data/lib/openstudio-standards/btap/utilities/weatherData1_xlsx_to_json.rb +0 -56
- data/lib/openstudio-standards/btap/vintagizer.rb +0 -161
- data/lib/openstudio-standards/btap/visualization.rb +0 -72
- data/lib/openstudio-standards/standards/necb/NECB2011/data/necb_2011_spacetype_info.csv +0 -225
- data/lib/openstudio-standards/standards/necb/common/btap_analysis.rb +0 -79
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +0 -2656
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +0 -653
- data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +0 -28705
- data/lib/openstudio-standards/standards/necb/common/utility_pricing_2025-02-20.csv +0 -92
- /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_frame.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_glazing.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_opaque.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/hvac_vent_ahu.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/lighting.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/lighting_sets.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/locations.csv +0 -0
- /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
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
#This method assignes interior surface construction to adiabatic surfaces
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
-
|
|
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
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
|
164
|
-
#Values from the total resistance to see how low we
|
|
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
|
-
|
|
171
|
-
#
|
|
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
|
|
183
|
-
#
|
|
184
|
-
#
|
|
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
|
-
|
|
192
|
-
#
|
|
193
|
-
# the material
|
|
194
|
-
#
|
|
195
|
-
#
|
|
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
|
-
|
|
232
|
-
# layers
|
|
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
|
|
248
|
-
#
|
|
249
|
-
#
|
|
250
|
-
#
|
|
251
|
-
#
|
|
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
|
-
|
|
254
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
261
|
-
#
|
|
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
|
-
|
|
271
|
-
#
|
|
272
|
-
#
|
|
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
|
-
|
|
278
|
-
#
|
|
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
|
-
|
|
282
|
-
#
|
|
283
|
-
#
|
|
284
|
-
#
|
|
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
|
-
|
|
292
|
-
#
|
|
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
|
-
|
|
295
|
-
#
|
|
296
|
-
#
|
|
297
|
-
#
|
|
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
|
-
|
|
305
|
-
#
|
|
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
|
-
|
|
308
|
-
# we
|
|
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
|
|
323
|
-
#
|
|
324
|
-
# @
|
|
325
|
-
# @param
|
|
326
|
-
# @param
|
|
327
|
-
# @param
|
|
328
|
-
# @return [
|
|
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
|
-
|
|
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
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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
|
-
|
|
386
|
-
#
|
|
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
|
-
#
|
|
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
|
-
|
|
420
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
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
|
|
691
|
-
#
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
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
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
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
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
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,
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
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
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
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
|
-
|
|
965
|
-
|
|
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
|