openstudio-standards 0.8.3 → 0.8.5.rc1
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/geometry/ASHRAECollege.osm +30 -30
- data/data/geometry/ASHRAECourthouse.osm +22 -22
- data/data/geometry/ASHRAESmallOfficeDetailed.osm +2 -2
- data/data/geometry/DEER_Asm.osm +1 -1
- data/data/geometry/DEER_ECC.osm +1 -1
- data/data/geometry/DEER_EPr.osm +1 -1
- data/data/geometry/DEER_ERC.osm +1 -1
- data/data/geometry/DEER_ESe.osm +1 -1
- data/data/geometry/DEER_EUn.osm +1 -1
- data/data/geometry/DEER_Hsp.osm +1 -1
- data/data/geometry/DEER_Htl.osm +1 -1
- data/data/geometry/DEER_MBT.osm +1 -1
- data/data/geometry/DEER_MFm.osm +1 -1
- data/data/geometry/DEER_Nrs.osm +1 -1
- data/data/geometry/DEER_OfL.osm +1 -1
- data/data/geometry/DEER_OfS.osm +1 -1
- data/data/geometry/DEER_RFF.osm +1 -1
- data/data/geometry/DEER_RSD.osm +1 -1
- data/data/geometry/DEER_Rt3.osm +1 -1
- data/data/geometry/DEER_RtS.osm +1 -1
- data/data/standards/export_OpenStudio_libraries.rb +2 -3
- data/data/standards/test_performance_expected_dd_results.csv +42 -42
- data/lib/openstudio-standards/btap/NECB_building_types.csv +35 -0
- data/lib/openstudio-standards/btap/NECB_space_types.csv +109 -0
- data/lib/openstudio-standards/btap/activity.rb +480 -0
- data/lib/openstudio-standards/btap/attributes.rb +166 -0
- data/lib/openstudio-standards/btap/bridging.rb +561 -1402
- data/lib/openstudio-standards/btap/btap.rb +4 -2
- data/lib/openstudio-standards/btap/btap_test_helper.rb +86 -0
- data/lib/openstudio-standards/btap/carbon/btap_carbon.rb +177 -0
- data/lib/openstudio-standards/btap/common_paths.rb +81 -0
- data/lib/openstudio-standards/btap/common_resources/ConstructionProperties.csv +52 -0
- data/lib/openstudio-standards/btap/common_resources/Constructions.csv +37 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_frame.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_glazing.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_opaque.csv +164 -0
- data/lib/openstudio-standards/btap/common_resources/construction_sets.csv +1270 -0
- data/lib/openstudio-standards/btap/common_resources/constructions_glazing.csv +121 -0
- data/lib/openstudio-standards/btap/common_resources/constructions_opaque.csv +2256 -0
- data/lib/openstudio-standards/btap/common_resources/costs.csv +1897 -0
- data/lib/openstudio-standards/btap/common_resources/costs_local_factors.csv +2315 -0
- data/lib/openstudio-standards/btap/common_resources/hvac_vent_ahu.csv +925 -0
- data/lib/openstudio-standards/btap/common_resources/lighting.csv +364 -0
- data/lib/openstudio-standards/btap/common_resources/lighting_sets.csv +2667 -0
- data/lib/openstudio-standards/btap/common_resources/locations.csv +75 -0
- data/lib/openstudio-standards/btap/common_resources/materials_glazing.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/materials_hvac.csv +1686 -0
- data/lib/openstudio-standards/btap/common_resources/materials_lighting.csv +267 -0
- data/lib/openstudio-standards/btap/common_resources/materials_opaque.csv +164 -0
- data/lib/openstudio-standards/btap/costing/README.md +502 -0
- data/lib/openstudio-standards/btap/costing/btap_costing.rb +469 -0
- data/lib/openstudio-standards/btap/costing/btap_measure_helper.rb +359 -0
- data/lib/openstudio-standards/btap/costing/btap_workflow.rb +117 -0
- data/lib/openstudio-standards/btap/costing/copy_test_results_files_to_expected_results.rb +11 -0
- data/lib/openstudio-standards/btap/costing/cost_building_from_file.rb +136 -0
- data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +173 -0
- data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +354 -0
- data/lib/openstudio-standards/btap/costing/dcv_costing.rb +314 -0
- data/lib/openstudio-standards/btap/costing/dummy.epw +8768 -0
- data/lib/openstudio-standards/btap/costing/dummy.osm +5320 -0
- data/lib/openstudio-standards/btap/costing/envelope_costing.rb +215 -0
- data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +2584 -0
- data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +156 -0
- data/lib/openstudio-standards/btap/costing/lighting_costing.rb +209 -0
- data/lib/openstudio-standards/btap/costing/mech_sizing.json +502 -0
- data/lib/openstudio-standards/btap/costing/neb_end_use_prices.csv +42 -0
- data/lib/openstudio-standards/btap/costing/necb_2011_spacetype_info.csv +225 -0
- data/lib/openstudio-standards/btap/costing/necb_reference_runs.csv +28705 -0
- data/lib/openstudio-standards/btap/costing/nv_costing.rb +547 -0
- data/lib/openstudio-standards/btap/costing/parallel_tests.rb +92 -0
- data/lib/openstudio-standards/btap/costing/pv_ground_costing.rb +687 -0
- data/lib/openstudio-standards/btap/costing/shw_costing.rb +705 -0
- data/lib/openstudio-standards/btap/costing/test_list.txt +15 -0
- data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +27 -0
- data/lib/openstudio-standards/btap/costing/test_run_costing_tests.rb +80 -0
- data/lib/openstudio-standards/btap/costing/ventilation_costing.rb +2616 -0
- data/lib/openstudio-standards/btap/geometry.rb +86 -6
- data/lib/openstudio-standards/btap/structure.rb +657 -0
- data/lib/openstudio-standards/constructions/modify.rb +2 -1
- data/lib/openstudio-standards/create_typical/create_typical.rb +17 -33
- data/lib/openstudio-standards/create_typical/space_type_ratios.rb +36 -36
- data/lib/openstudio-standards/equipment/create_transformer.rb +104 -0
- data/lib/openstudio-standards/equipment/create_typical_equipment.rb +117 -0
- data/lib/openstudio-standards/equipment/data/electric_equipment_space_types.json +1514 -0
- data/lib/openstudio-standards/equipment/data/gas_equipment_space_types.json +227 -0
- data/lib/openstudio-standards/exterior_lighting/create.rb +22 -22
- data/lib/openstudio-standards/exterior_lighting/information.rb +3 -2
- data/lib/openstudio-standards/hvac/components/air_conditioner_vrf.rb +482 -0
- data/lib/openstudio-standards/hvac/components/air_terminal.rb +31 -0
- data/lib/openstudio-standards/hvac/components/boiler_hot_water.rb +163 -0
- data/lib/openstudio-standards/hvac/components/central_air_source_heat_pump.rb +220 -0
- data/lib/openstudio-standards/hvac/components/chiller.rb +25 -0
- data/lib/openstudio-standards/hvac/components/coil.rb +276 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_multi_speed.rb +40 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_single_speed.rb +300 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_two_speed.rb +187 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_water.rb +80 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_water_to_air_heat_pump_equation_fit.rb +182 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_dx_single_speed.rb +220 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_electric.rb +56 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_gas.rb +90 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_gas_multi_stage.rb +33 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_water.rb +98 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_water_to_air_heat_pump_equation_fit.rb +147 -0
- data/lib/openstudio-standards/hvac/components/component.rb +39 -0
- data/lib/openstudio-standards/{standards/ashrae_90_1/data/ashrae_90_1.fans.json → hvac/components/data/fans.json} +6 -6
- data/lib/openstudio-standards/hvac/components/fan.rb +363 -0
- data/lib/openstudio-standards/hvac/components/heat_exchanger_air_to_air.rb +203 -0
- data/lib/openstudio-standards/hvac/components/pump.rb +181 -0
- data/lib/openstudio-standards/hvac/controls/radiant_system_controls.rb +594 -0
- data/lib/openstudio-standards/hvac/conversions.rb +222 -0
- data/lib/openstudio-standards/hvac/curves.rb +192 -0
- data/lib/openstudio-standards/hvac/helpers.rb +357 -0
- data/lib/openstudio-standards/hvac/setpoint_managers/information.rb +4 -4
- data/lib/openstudio-standards/interior_lighting/create_lights.rb +52 -0
- data/lib/openstudio-standards/interior_lighting/create_typical_interior_lighting.rb +254 -0
- data/lib/openstudio-standards/interior_lighting/data/convert_lighting_data.rb +249 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.csv +96 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.json +1429 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_technology.csv +46 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_technology.json +859 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +4 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +4 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +6 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +15 -15
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +5 -5
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +7 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +5 -1
- data/lib/openstudio-standards/prototypes/common/data/prototype_space_type_map.json +2594 -0
- data/lib/openstudio-standards/prototypes/common/data/thermostat_schedule_lookup.json +2108 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirTerminalSingleDuctVAVReheat.rb +33 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +0 -140
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +1 -73
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +1 -69
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +0 -116
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +0 -61
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +2 -2
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +128 -13
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +606 -607
- data/lib/openstudio-standards/prototypes/common/prototype_space_type_map.rb +41 -0
- data/lib/openstudio-standards/prototypes/common/space_type_equipment_map.rb +184 -0
- data/lib/openstudio-standards/prototypes/common/space_type_thermostat_schedule_map.rb +116 -0
- data/lib/openstudio-standards/qaqc/hvac.rb +12 -12
- data/lib/openstudio-standards/refrigeration/create_compressor.rb +2 -5
- data/lib/openstudio-standards/refrigeration/data/refrigeration_compressors.csv +4 -4
- data/lib/openstudio-standards/service_water_heating/create_water_heater.rb +1 -2
- data/lib/openstudio-standards/service_water_heating/create_water_use.rb +5 -5
- data/lib/openstudio-standards/space_type/data/level_1_space_types.json +612 -0
- data/lib/openstudio-standards/space_type/standards_space_type.rb +53 -0
- data/lib/openstudio-standards/standards/Standards.AirConditionerVariableRefrigerantFlow.rb +8 -26
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +13 -13
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +0 -24
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +6 -43
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +7 -24
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +19 -44
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +25 -50
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +25 -33
- data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +9 -22
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +15 -157
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +18 -105
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +3 -23
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +0 -24
- data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +2 -86
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +0 -107
- data/lib/openstudio-standards/standards/Standards.Model.rb +45 -20
- data/lib/openstudio-standards/standards/Standards.People.rb +113 -0
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +11 -11
- data/lib/openstudio-standards/standards/Standards.Pump.rb +2 -147
- data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +57 -41
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +30 -153
- data/lib/openstudio-standards/standards/Standards.Ventilation.rb +74 -0
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PlantLoop.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps_heating.json +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +37 -112
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/comstock_ashrae_90_1_2007.spc_typ.json +37 -102
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps_heating.json +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +37 -112
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/comstock_ashrae_90_1_2010.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/comstock_ashrae_90_1_2013.spc_typ.json +37 -102
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/comstock_ashrae_90_1_2016.spc_typ.json +45 -109
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoilHeatingGas.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/comstock_ashrae_90_1_2019.spc_typ.json +45 -109
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.curves.json +0 -200
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/comstock_doe_ref_1980_2004.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/comstock_doe_ref_pre_1980.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +2 -68
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +2 -35
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +42 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +5 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +1 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019_WaterHeaterMixed.rb +2 -4
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.curves.json +0 -200
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.fans.json +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/ashrae_90_1_prm.UserData.rb +7 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_enums.rb +0 -1
- data/lib/openstudio-standards/standards/cbes/data/cbes.curves.json +0 -200
- data/lib/openstudio-standards/standards/deer/data/deer.curves.json +0 -200
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +21 -37
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +12 -11
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +68 -27
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +64 -25
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +9 -14
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +4 -4
- data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +1 -1
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +115 -112
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +637 -249
- data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +16 -12
- data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +799 -46
- data/lib/openstudio-standards/standards/necb/NECB2011/data/chillers.json +33 -51
- data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +75 -7
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +25 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartmentMult.osm +14272 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +21 -15
- data/lib/openstudio-standards/standards/necb/NECB2011/data/necb_2015_table_c1.json +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +437 -437
- data/lib/openstudio-standards/standards/necb/NECB2011/data/systems.json +516 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/systems_including_sys5.json +588 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_namer.rb +489 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +18 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +48 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +2 -2
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +35 -27
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +34 -23
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +8 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +68 -150
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +444 -134
- data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +61 -1
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +10 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +636 -636
- data/lib/openstudio-standards/standards/necb/NECB2015/data/unitary_acs.json +38 -38
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +17 -8
- data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +636 -636
- data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +71 -71
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +16 -6
- data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +60 -61
- data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +30 -30
- data/lib/openstudio-standards/standards/necb/README.md +343 -0
- data/lib/openstudio-standards/standards/necb/common/btap_analysis.rb +79 -0
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +206 -32
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +75 -43
- data/lib/openstudio-standards/standards/necb/common/eccc_electric_grid_intensity_20250311.csv +14 -0
- data/lib/openstudio-standards/standards/necb/common/nir_gas_grid_intensity_20250311.csv +14 -0
- data/lib/openstudio-standards/standards/necb/common/system_types.yaml +0 -0
- data/lib/openstudio-standards/thermal_zone/{thermal_zone.rb → information.rb} +12 -45
- data/lib/openstudio-standards/thermal_zone/thermostat_schedules.rb +152 -0
- data/lib/openstudio-standards/utilities/logging.rb +18 -14
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/modify.rb +2 -2
- data/lib/openstudio-standards/weather/stat_file.rb +2 -2
- data/lib/openstudio-standards.rb +67 -38
- metadata +141 -50
- data/lib/openstudio-standards/hvac/components/create.rb +0 -169
- data/lib/openstudio-standards/hvac/components/modify.rb +0 -42
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +0 -438
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.BoilerHotWater.rb +0 -123
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CentralAirSourceHeatPump.rb +0 -216
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXSingleSpeed.rb +0 -273
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXTwoSpeed.rb +0 -159
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWater.rb +0 -77
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -154
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +0 -214
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingElectric.rb +0 -53
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingGas.rb +0 -72
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWater.rb +0 -95
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -125
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ControllerWaterCoil.rb +0 -17
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.transformers.rb +0 -90
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Pump.rb +0 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.PumpVariableSpeed.rb +0 -70
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +0 -590
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +0 -901
- data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +0 -55
- data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanZoneExhaust.rb +0 -5
- data/lib/openstudio-standards/standards/cbes/data/cbes.fans.json +0 -328
- data/lib/openstudio-standards/standards/deer/data/deer.fans.json +0 -328
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Pump.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +0 -0
|
@@ -5,10 +5,22 @@ class BTAPData
|
|
|
5
5
|
attr_accessor :sqlite_file
|
|
6
6
|
attr_accessor :btap_data
|
|
7
7
|
|
|
8
|
-
def initialize(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
def initialize(
|
|
9
|
+
model:,
|
|
10
|
+
runner: nil,
|
|
11
|
+
cost_result:,
|
|
12
|
+
carbon_result:,
|
|
13
|
+
baseline_cost_equipment_total_cost_per_m_sq: -1.0,
|
|
14
|
+
baseline_cost_utility_neb_total_cost_per_m_sq: -1.0,
|
|
15
|
+
baseline_energy_eui_total_gj_per_m_sq: -1.0,
|
|
16
|
+
qaqc:,
|
|
17
|
+
npv_start_year: 2022,
|
|
18
|
+
npv_end_year: 2041,
|
|
19
|
+
npv_discount_rate: 0.03,
|
|
20
|
+
npv_discount_rate_carbon: 0.03,
|
|
21
|
+
oerd_utility_pricing: nil,
|
|
22
|
+
utility_pricing_year: 2020)
|
|
23
|
+
|
|
12
24
|
@model = model
|
|
13
25
|
@error_warning = []
|
|
14
26
|
# sets sql file.
|
|
@@ -20,6 +32,8 @@ class BTAPData
|
|
|
20
32
|
@neb_prices_csv_file_name = File.join(__dir__, 'neb_end_use_prices.csv')
|
|
21
33
|
@neb_prices_csv_file_name = File.join(__dir__, 'utility_pricing_2025-02-20.csv') if oerd_utility_pricing.to_bool
|
|
22
34
|
@necb_reference_runs_csv_file_name = File.join(__dir__, 'necb_reference_runs.csv')
|
|
35
|
+
@eccc_ghg_electricity = File.join(__dir__, 'eccc_electric_grid_intensity_20250311.csv') #REF (Retrieved March 11, 2025) for ECCC's emissions factors for the current and future years for GHG "without Biomass and RNG CO2 emissions": https://data-donnees.az.ec.gc.ca/data/substances/monitor/canada-s-greenhouse-gas-emissions-projections/Current-Projections-Actuelles/Energy-Energie/AM%20Scenario%20AMS/Grid-O%26G-Intensities-Intensites-Reseau-Delectricite-P%26G?lang=en
|
|
36
|
+
@nir_ghg_gas = File.join(__dir__, 'nir_gas_grid_intensity_20250311.csv') #REF (Retrieved March 11, 2025) for Year 2022 of "Table A6.1–1 CO2 Emission Factors for Marketable Natural Gas" of National Inventory Report: https://data-donnees.az.ec.gc.ca/api/file?path=%2Fsubstances%2Fmonitor%2Fcanada-s-official-greenhouse-gas-inventory%2FD-Emission-Factors%2FEN_Annex6_Emission_Factors.pdf
|
|
23
37
|
|
|
24
38
|
# Conditioned floor area is used so much. May as well make it a object variable.
|
|
25
39
|
# setup the queries
|
|
@@ -159,8 +173,8 @@ class BTAPData
|
|
|
159
173
|
|
|
160
174
|
def building_costing_data(cost_result)
|
|
161
175
|
building_data = {}
|
|
162
|
-
building_data['
|
|
163
|
-
building_data['
|
|
176
|
+
building_data['cost_province_state'] = cost_result['province_state']
|
|
177
|
+
building_data['cost_city'] = cost_result['city']
|
|
164
178
|
building_data['cost_equipment_envelope_total_cost_per_m_sq'] = (cost_result['totals']['envelope']) / @conditioned_floor_area_m_sq
|
|
165
179
|
building_data['cost_equipment_thermal_bridging_total_cost_per_m_sq'] = (cost_result['totals']['thermal_bridging']) / @conditioned_floor_area_m_sq
|
|
166
180
|
building_data['cost_equipment_lighting_total_cost_per_m_sq'] = (cost_result['totals']['lighting']) / @conditioned_floor_area_m_sq
|
|
@@ -228,6 +242,9 @@ class BTAPData
|
|
|
228
242
|
# Create a hash of the neb data.
|
|
229
243
|
neb_data = CSV.parse(File.read(@neb_prices_csv_file_name), headers: true, converters: :numeric).map(&:to_h)
|
|
230
244
|
|
|
245
|
+
# Create a hash of the ECCC's electricity emissions factors for the current and future years for GHG "without Biomass and RNG CO2 emissions".
|
|
246
|
+
eccc_ghg_elec_emission_factors = CSV.parse(File.read(@eccc_ghg_electricity), headers: true, converters: :numeric).map(&:to_h)
|
|
247
|
+
|
|
231
248
|
# Find which province the proposed building is located in
|
|
232
249
|
building_type = 'Commercial'
|
|
233
250
|
geography_data = climate_data
|
|
@@ -245,17 +262,14 @@ class BTAPData
|
|
|
245
262
|
onsite_elec_generation = @btap_data['total_site_eui_gj_per_m_sq'] - @btap_data['net_site_eui_gj_per_m_sq']
|
|
246
263
|
if onsite_elec_generation > 0.0
|
|
247
264
|
eui_elec = @btap_data['energy_eui_electricity_gj_per_m_sq'] - onsite_elec_generation
|
|
248
|
-
# Calculate the saved GHG emissions from onsite electricity generatation (assume it does not emmit GHGs)
|
|
249
|
-
ghg_saved = get_utility_ghg_kg_per_gj(province: province_abbreviation, fuel_type: "Electricity") * onsite_elec_generation
|
|
250
|
-
# Convert to tonnes of ghg/m^2
|
|
251
|
-
ghg_elec = (@btap_data['cost_utility_ghg_electricity_kg_per_m_sq'].to_f - ghg_saved.to_f)/1000.0
|
|
252
265
|
else
|
|
253
266
|
eui_elec = @btap_data['energy_eui_electricity_gj_per_m_sq']
|
|
254
|
-
# Convert to tonnes of ghg/m^2
|
|
255
|
-
ghg_elec = @btap_data['cost_utility_ghg_electricity_kg_per_m_sq'].to_f/1000.0
|
|
256
267
|
end
|
|
257
|
-
#
|
|
258
|
-
|
|
268
|
+
# Find the appropriate row for electricity GHG emmission factors
|
|
269
|
+
row_emm_factor = eccc_ghg_elec_emission_factors.detect do |data|
|
|
270
|
+
(data['province'] == province)
|
|
271
|
+
end
|
|
272
|
+
# Find the appropriate row for electricity pricing
|
|
259
273
|
row = neb_data.detect do |data|
|
|
260
274
|
(data['building_type'] == building_type) && (data['province'] == province) && (data['fuel_type'] == 'Electricity')
|
|
261
275
|
end
|
|
@@ -269,16 +283,15 @@ class BTAPData
|
|
|
269
283
|
year_index = 1.0
|
|
270
284
|
npv_elec_ghg = 0.0
|
|
271
285
|
npv_elec_peak = 0.0
|
|
286
|
+
emm_factor_conv = 3600.0 #GWH to GJ
|
|
272
287
|
if eui_elec > 0.0
|
|
273
288
|
for year in npv_start_year.to_int..npv_end_year.to_int
|
|
274
|
-
# puts "year, #{year}, #{row[year.to_s]}, year_index, #{year_index}"
|
|
275
289
|
npv_elec += (eui_elec * row[year.to_s]) / (1+npv_discount_rate)**year_index
|
|
276
|
-
npv_elec_ghg += (
|
|
277
|
-
npv_elec_peak += (annual_peak_kW_per_m_sq * row_peak[year.to_s]) / (1+npv_discount_rate)**year_index unless row_peak.nil? || annual_peak_kW_per_m_sq.nil?
|
|
290
|
+
npv_elec_ghg += (((eui_elec * row_emm_factor[year.to_i.to_s].to_f) / emm_factor_conv) * get_national_ghg_cost(year: year.to_i)) / (1+npv_discount_rate_carbon)**year_index
|
|
291
|
+
npv_elec_peak += (annual_peak_kW_per_m_sq * row_peak[year.to_i.to_s]).to_f / (1+npv_discount_rate)**year_index unless row_peak.nil? || annual_peak_kW_per_m_sq.nil?
|
|
278
292
|
year_index += 1.0
|
|
279
293
|
end
|
|
280
294
|
end
|
|
281
|
-
# puts "npv_elec is #{npv_elec}"
|
|
282
295
|
|
|
283
296
|
# Calculate npv of natural gas
|
|
284
297
|
eui_ngas= @btap_data['energy_eui_natural_gas_gj_per_m_sq']
|
|
@@ -740,7 +753,16 @@ class BTAPData
|
|
|
740
753
|
economics_data["cost_utility_neb_#{neb_fuel.downcase}_cost_per_m_sq"] = fuel_consumption_gj * neb_fuel_cost.to_f / @conditioned_floor_area_m_sq
|
|
741
754
|
economics_data['cost_utility_neb_total_cost_per_m_sq'] += economics_data["cost_utility_neb_#{neb_fuel.downcase}_cost_per_m_sq"]
|
|
742
755
|
# Determine cost in GHG kg of CO2
|
|
743
|
-
|
|
756
|
+
if neb_fuel.downcase == 'electricity' # Use ECCC data for utility emission factors rather than NEB data.
|
|
757
|
+
# Create a hash of the ECCC's electricity emissions factors for the current and future years for GHG "without Biomass and RNG CO2 emissions".
|
|
758
|
+
eccc_ghg_elec_emission_factors = CSV.parse(File.read(@eccc_ghg_electricity), headers: true, converters: :numeric).map(&:to_h)
|
|
759
|
+
# Find the appropriate row for electricity GHG emmission factors
|
|
760
|
+
row_emm_factor = eccc_ghg_elec_emission_factors.detect { |data| (data['province'] == province) }
|
|
761
|
+
emm_factor_conv = 3600.0
|
|
762
|
+
economics_data["cost_utility_ghg_#{neb_fuel.downcase}_kg_per_m_sq"] = ((fuel_consumption_gj * row_emm_factor[utility_pricing_year.to_i.to_s].to_f) / emm_factor_conv) * 1000 / @conditioned_floor_area_m_sq
|
|
763
|
+
else
|
|
764
|
+
economics_data["cost_utility_ghg_#{neb_fuel.downcase}_kg_per_m_sq"] = fuel_consumption_gj * get_utility_ghg_kg_per_gj(province: model.getWeatherFile.stateProvinceRegion, fuel_type: ep_fuel[:eplus_fuel_name]) / @conditioned_floor_area_m_sq
|
|
765
|
+
end
|
|
744
766
|
economics_data['cost_utility_ghg_total_kg_per_m_sq'] += economics_data["cost_utility_ghg_#{neb_fuel.downcase}_kg_per_m_sq"]
|
|
745
767
|
end
|
|
746
768
|
# Commenting out block charge rates for now....
|
|
@@ -1582,6 +1604,142 @@ class BTAPData
|
|
|
1582
1604
|
cooling_peak_w = [cooling_peak_w_electricity.to_f, cooling_peak_w_gas.to_f].max
|
|
1583
1605
|
data['cooling_peak_w_per_m_sq'] = cooling_peak_w / @conditioned_floor_area_m_sq
|
|
1584
1606
|
|
|
1607
|
+
# Peak water system load # @todo IMPORTANT NOTE: Peak water system load must be updated if a combination of fuel types is used in a building model.
|
|
1608
|
+
command = "SELECT Value
|
|
1609
|
+
FROM TabularDataWithStrings
|
|
1610
|
+
WHERE ReportName='EnergyMeters'
|
|
1611
|
+
AND ReportForString='Entire Facility'
|
|
1612
|
+
AND TableName='Annual and Peak Values - Electricity'
|
|
1613
|
+
AND RowName='WaterSystems:Electricity'
|
|
1614
|
+
AND ColumnName='Electricity Maximum Value'
|
|
1615
|
+
AND Units='W'"
|
|
1616
|
+
water_heating_peak_w_electricity = @sqlite_file.get.execAndReturnFirstDouble(command)
|
|
1617
|
+
command = "SELECT Value
|
|
1618
|
+
FROM TabularDataWithStrings
|
|
1619
|
+
WHERE ReportName='EnergyMeters'
|
|
1620
|
+
AND ReportForString='Entire Facility'
|
|
1621
|
+
AND TableName='Annual and Peak Values - Natural Gas'
|
|
1622
|
+
AND RowName='WaterSystems:NaturalGas'
|
|
1623
|
+
AND ColumnName='Natural Gas Maximum Value'
|
|
1624
|
+
AND Units='W'"
|
|
1625
|
+
water_heating_peak_w_gas = @sqlite_file.get.execAndReturnFirstDouble(command)
|
|
1626
|
+
water_heating_peak_w = [water_heating_peak_w_electricity.to_f, water_heating_peak_w_gas.to_f].max
|
|
1627
|
+
data['energy_peak_water_systems_w_per_m_sq'] = water_heating_peak_w / @conditioned_floor_area_m_sq
|
|
1628
|
+
|
|
1629
|
+
#===================================================================================================================
|
|
1630
|
+
# Winter peak values
|
|
1631
|
+
### Get number of timesteps from the model
|
|
1632
|
+
number_of_timesteps_per_hour = 1
|
|
1633
|
+
timestep_second = 3600 / number_of_timesteps_per_hour
|
|
1634
|
+
#===================================================================================================================
|
|
1635
|
+
### Calculate number of timesteps of the whole year, and create dates/times for the whole year
|
|
1636
|
+
number_of_timesteps_of_year = 365 * 24 * number_of_timesteps_per_hour
|
|
1637
|
+
timesteps_of_year = []
|
|
1638
|
+
d = Time.new(2006, 1, 1, 0)
|
|
1639
|
+
(0...number_of_timesteps_of_year).each do |increment|
|
|
1640
|
+
timesteps_of_year << (d + (60 * 60 / number_of_timesteps_per_hour) * increment).strftime('%Y-%m-%d %H:%M')
|
|
1641
|
+
end
|
|
1642
|
+
# Find month of each timestep
|
|
1643
|
+
keys_month = timesteps_of_year.map{ |timestep| DateTime.parse(timestep).to_date.month }
|
|
1644
|
+
# Peak electricity in winter
|
|
1645
|
+
query = "
|
|
1646
|
+
SELECT ReportDataDictionaryIndex
|
|
1647
|
+
FROM ReportDataDictionary
|
|
1648
|
+
WHERE Name=='Electricity:Facility' AND ReportingFrequency == 'Hourly' AND Units == 'J'
|
|
1649
|
+
"
|
|
1650
|
+
index_timestep_electricity = @model.sqlFile.get.execAndReturnVectorOfInt(query).get[0]
|
|
1651
|
+
number_of_timesteps_per_hour = 1
|
|
1652
|
+
if index_timestep_electricity.nil?
|
|
1653
|
+
puts "No hourly or timestep data available. Peak data not available"
|
|
1654
|
+
data['energy_peak_electric_w_per_m_sq_winter'] = 0
|
|
1655
|
+
else
|
|
1656
|
+
### Get timestep output for Electricity:Facility output.
|
|
1657
|
+
query = "
|
|
1658
|
+
Select VariableValue
|
|
1659
|
+
FROM ReportVariableData
|
|
1660
|
+
WHERE
|
|
1661
|
+
ReportVariableDataDictionaryIndex = #{index_timestep_electricity}
|
|
1662
|
+
"
|
|
1663
|
+
timestep_values = @model.sqlFile.get.execAndReturnVectorOfDouble(query).get
|
|
1664
|
+
# Create a hash where its keys are months and values for eahc month are electricity energy use (J) of all timesteps for that month
|
|
1665
|
+
hash_months_electricity = keys_month.zip(timestep_values).group_by(&:first).map{|key, value| [key, value.map(&:last)]}.to_h
|
|
1666
|
+
# Find maximum of electricity energy use (J) among all timesteps for each month of the year
|
|
1667
|
+
monthly_peak_J = hash_months_electricity.map { |key, value| [key, value.max()] }.to_h
|
|
1668
|
+
### Convert J to W of maximum electricity energy use (J)
|
|
1669
|
+
monthly_peak_W = monthly_peak_J.map { |key, value| [key, value / timestep_second] }.to_h
|
|
1670
|
+
# Get winter peak
|
|
1671
|
+
winter_peak_W = [monthly_peak_W[12].to_f, monthly_peak_W[1].to_f, monthly_peak_W[2].to_f].max
|
|
1672
|
+
### Normalize by building floor area
|
|
1673
|
+
annual_peak_W_per_m_sq = winter_peak_W / @btap_data['bldg_conditioned_floor_area_m_sq'].to_f
|
|
1674
|
+
data['energy_peak_electric_w_per_m_sq_winter'] = annual_peak_W_per_m_sq
|
|
1675
|
+
end
|
|
1676
|
+
|
|
1677
|
+
# Peak electricity heating in winter
|
|
1678
|
+
query = "
|
|
1679
|
+
SELECT ReportDataDictionaryIndex
|
|
1680
|
+
FROM ReportDataDictionary
|
|
1681
|
+
WHERE Name=='Heating:Electricity' AND ReportingFrequency == 'Hourly' AND Units == 'J'
|
|
1682
|
+
"
|
|
1683
|
+
index_timestep_electricity = @model.sqlFile.get.execAndReturnVectorOfInt(query).get[0]
|
|
1684
|
+
number_of_timesteps_per_hour = 1
|
|
1685
|
+
if index_timestep_electricity.nil?
|
|
1686
|
+
puts "No hourly or timestep data available. Peak data not available"
|
|
1687
|
+
data['energy_peak_electric_heating_w_per_m_sq_winter'] = 0
|
|
1688
|
+
else
|
|
1689
|
+
### Get timestep output for Electricity:Facility output.
|
|
1690
|
+
query = "
|
|
1691
|
+
Select VariableValue
|
|
1692
|
+
FROM ReportVariableData
|
|
1693
|
+
WHERE
|
|
1694
|
+
ReportVariableDataDictionaryIndex = #{index_timestep_electricity}
|
|
1695
|
+
"
|
|
1696
|
+
timestep_values = @model.sqlFile.get.execAndReturnVectorOfDouble(query).get
|
|
1697
|
+
# Create a hash where its keys are months and values for eahc month are electricity energy use (J) of all timesteps for that month
|
|
1698
|
+
hash_months_electricity = keys_month.zip(timestep_values).group_by(&:first).map{|key, value| [key, value.map(&:last)]}.to_h
|
|
1699
|
+
# Find maximum of electricity energy use (J) among all timesteps for each month of the year
|
|
1700
|
+
monthly_peak_J = hash_months_electricity.map { |key, value| [key, value.max()] }.to_h
|
|
1701
|
+
### Convert J to W of maximum electricity energy use (J)
|
|
1702
|
+
monthly_peak_W = monthly_peak_J.map { |key, value| [key, value / timestep_second] }.to_h
|
|
1703
|
+
# Get winter peak
|
|
1704
|
+
winter_peak_W = [monthly_peak_W[12].to_f, monthly_peak_W[1].to_f, monthly_peak_W[2].to_f].max
|
|
1705
|
+
### Normalize by building floor area
|
|
1706
|
+
annual_peak_W_per_m_sq = winter_peak_W / @btap_data['bldg_conditioned_floor_area_m_sq'].to_f
|
|
1707
|
+
data['energy_peak_electric_heating_w_per_m_sq_winter'] = annual_peak_W_per_m_sq
|
|
1708
|
+
end
|
|
1709
|
+
|
|
1710
|
+
# Peak water system electricity heating in winter
|
|
1711
|
+
query = "
|
|
1712
|
+
SELECT ReportDataDictionaryIndex
|
|
1713
|
+
FROM ReportDataDictionary
|
|
1714
|
+
WHERE Name=='WaterSystems:Electricity' AND ReportingFrequency == 'Hourly' AND Units == 'J'
|
|
1715
|
+
"
|
|
1716
|
+
index_timestep_electricity = @model.sqlFile.get.execAndReturnVectorOfInt(query).get[0]
|
|
1717
|
+
number_of_timesteps_per_hour = 1
|
|
1718
|
+
if index_timestep_electricity.nil?
|
|
1719
|
+
puts "No hourly or timestep data available. Peak data not available"
|
|
1720
|
+
data['energy_peak_electric_water_systems_w_per_m_sq_winter'] = 0
|
|
1721
|
+
else
|
|
1722
|
+
### Get timestep output for Electricity:Facility output.
|
|
1723
|
+
query = "
|
|
1724
|
+
Select VariableValue
|
|
1725
|
+
FROM ReportVariableData
|
|
1726
|
+
WHERE
|
|
1727
|
+
ReportVariableDataDictionaryIndex = #{index_timestep_electricity}
|
|
1728
|
+
"
|
|
1729
|
+
timestep_values = @model.sqlFile.get.execAndReturnVectorOfDouble(query).get
|
|
1730
|
+
# Create a hash where its keys are months and values for eahc month are electricity energy use (J) of all timesteps for that month
|
|
1731
|
+
hash_months_electricity = keys_month.zip(timestep_values).group_by(&:first).map{|key, value| [key, value.map(&:last)]}.to_h
|
|
1732
|
+
# Find maximum of electricity energy use (J) among all timesteps for each month of the year
|
|
1733
|
+
monthly_peak_J = hash_months_electricity.map { |key, value| [key, value.max()] }.to_h
|
|
1734
|
+
### Convert J to W of maximum electricity energy use (J)
|
|
1735
|
+
monthly_peak_W = monthly_peak_J.map { |key, value| [key, value / timestep_second] }.to_h
|
|
1736
|
+
# Get winter peak
|
|
1737
|
+
winter_peak_W = [monthly_peak_W[12].to_f, monthly_peak_W[1].to_f, monthly_peak_W[2].to_f].max
|
|
1738
|
+
### Normalize by building floor area
|
|
1739
|
+
annual_peak_W_per_m_sq = winter_peak_W / @btap_data['bldg_conditioned_floor_area_m_sq'].to_f
|
|
1740
|
+
data['energy_peak_electric_water_systems_w_per_m_sq_winter'] = annual_peak_W_per_m_sq
|
|
1741
|
+
end
|
|
1742
|
+
|
|
1585
1743
|
return data
|
|
1586
1744
|
end
|
|
1587
1745
|
|
|
@@ -2081,20 +2239,36 @@ class BTAPData
|
|
|
2081
2239
|
def get_utility_ghg_kg_per_gj(province:, fuel_type:)
|
|
2082
2240
|
ghg_data = [
|
|
2083
2241
|
# Obtained from Portfolio Manager https://portfoliomanager.energystar.gov/pdf/reference/Emissions.pdf 10/10/2020
|
|
2084
|
-
{ "province": 'AB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 53.24, "CO2eq Emissions (g/m3)": 1939.0 },
|
|
2085
|
-
{ "province": 'BC', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 53.19, "CO2eq Emissions (g/m3)": 1937.0 },
|
|
2086
|
-
{ "province": 'MB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.09, "CO2eq Emissions (g/m3)": 1897.0 },
|
|
2087
|
-
{ "province": 'NB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2088
|
-
{ "province": 'NL', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2089
|
-
{ "province": 'NT', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2090
|
-
{ "province": 'NS', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2091
|
-
{ "province": 'NU', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2092
|
-
{ "province": 'ON', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.14, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2093
|
-
{ "province": 'PE', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2094
|
-
{ "province": 'QC', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.12, "CO2eq Emissions (g/m3)": 1898.0 },
|
|
2095
|
-
{ "province": 'SK', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 50.53, "CO2eq Emissions (g/m3)": 1840.0 },
|
|
2096
|
-
{ "province": 'YT', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2242
|
+
#{ "province": 'AB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 53.24, "CO2eq Emissions (g/m3)": 1939.0 },
|
|
2243
|
+
#{ "province": 'BC', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 53.19, "CO2eq Emissions (g/m3)": 1937.0 },
|
|
2244
|
+
#{ "province": 'MB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.09, "CO2eq Emissions (g/m3)": 1897.0 },
|
|
2245
|
+
#{ "province": 'NB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2246
|
+
#{ "province": 'NL', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2247
|
+
#{ "province": 'NT', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2248
|
+
#{ "province": 'NS', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2249
|
+
#{ "province": 'NU', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2250
|
+
#{ "province": 'ON', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.14, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2251
|
+
#{ "province": 'PE', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2252
|
+
#{ "province": 'QC', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.12, "CO2eq Emissions (g/m3)": 1898.0 },
|
|
2253
|
+
#{ "province": 'SK', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 50.53, "CO2eq Emissions (g/m3)": 1840.0 },
|
|
2254
|
+
#{ "province": 'YT', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.50, "CO2eq Emissions (g/m3)": 1912.0 },
|
|
2255
|
+
|
|
2256
|
+
#REF (Retrieved March 11, 2025) for Year 2022 of "Table A6.1–1 CO2 Emission Factors for Marketable Natural Gas" of National Inventory Report: https://data-donnees.az.ec.gc.ca/api/file?path=%2Fsubstances%2Fmonitor%2Fcanada-s-official-greenhouse-gas-inventory%2FD-Emission-Factors%2FEN_Annex6_Emission_Factors.pdf
|
|
2257
|
+
{ "province": 'AB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 53.87, "CO2eq Emissions (g/m3)": 1962.0 },
|
|
2258
|
+
{ "province": 'BC', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 53.98, "CO2eq Emissions (g/m3)": 1966.0 },
|
|
2259
|
+
{ "province": 'MB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.58, "CO2eq Emissions (g/m3)": 1915.0 },
|
|
2260
|
+
{ "province": 'NB', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.69, "CO2eq Emissions (g/m3)": 1919.0 },
|
|
2261
|
+
{ "province": 'NL', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.69, "CO2eq Emissions (g/m3)": 1919.0 },
|
|
2262
|
+
{ "province": 'NT', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 53.98, "CO2eq Emissions (g/m3)": 1966.0 },
|
|
2263
|
+
{ "province": 'NS', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.69, "CO2eq Emissions (g/m3)": 1919.0 },
|
|
2264
|
+
{ "province": 'NU', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 53.98, "CO2eq Emissions (g/m3)": 1966.0 },
|
|
2265
|
+
{ "province": 'ON', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.75, "CO2eq Emissions (g/m3)": 1921.0 },
|
|
2266
|
+
{ "province": 'PE', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.69, "CO2eq Emissions (g/m3)": 1919.0 },
|
|
2267
|
+
{ "province": 'QC', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.88, "CO2eq Emissions (g/m3)": 1926.0 },
|
|
2268
|
+
{ "province": 'SK', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 52.72, "CO2eq Emissions (g/m3)": 1920.0 },
|
|
2269
|
+
{ "province": 'YT', "fuel_type": 'NaturalGas', "CO2eq Emissions (kg/MBtu)": 56.98, "CO2eq Emissions (g/m3)": 1966.0 },
|
|
2097
2270
|
|
|
2271
|
+
# Obtained from Portfolio Manager https://portfoliomanager.energystar.gov/pdf/reference/Emissions.pdf 10/10/2020
|
|
2098
2272
|
{ "province": 'AB', "fuel_type": 'FuelOilNo2', "CO2eq Emissions (kg/MBtu)": 75.13, "CO2eq Emissions (g/m3)": 2763.0 },
|
|
2099
2273
|
{ "province": 'BC', "fuel_type": 'FuelOilNo2', "CO2eq Emissions (kg/MBtu)": 75.13, "CO2eq Emissions (g/m3)": 2763.0 },
|
|
2100
2274
|
{ "province": 'MB', "fuel_type": 'FuelOilNo2', "CO2eq Emissions (kg/MBtu)": 75.13, "CO2eq Emissions (g/m3)": 2763.0 },
|
|
@@ -2,7 +2,7 @@ require 'openstudio'
|
|
|
2
2
|
require 'securerandom'
|
|
3
3
|
require 'optparse'
|
|
4
4
|
require 'yaml'
|
|
5
|
-
#require 'git-revision'
|
|
5
|
+
# require 'git-revision'
|
|
6
6
|
# resource_folder = File.join(__dir__, '..', '..', 'measures/btap_results/resources')
|
|
7
7
|
# OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
|
|
8
8
|
|
|
@@ -77,7 +77,6 @@ class BTAPDatapoint
|
|
|
77
77
|
@dp_output_folder = File.join(output_folder, @options[:datapoint_id])
|
|
78
78
|
|
|
79
79
|
# Show versions in yml file.
|
|
80
|
-
@options[:btap_costing_git_revision] = Git::Revision.commit_short
|
|
81
80
|
@options[:os_git_revision] = OpenstudioStandards.git_revision
|
|
82
81
|
|
|
83
82
|
# Get users' inputs for the parameters needed for the calculation af net present value
|
|
@@ -125,7 +124,13 @@ class BTAPDatapoint
|
|
|
125
124
|
@standard.model_apply_standard(model: model,
|
|
126
125
|
epw_file: @options[:epw_file],
|
|
127
126
|
custom_weather_folder: weather_folder,
|
|
127
|
+
btap_weather: @options[:btap_weather],
|
|
128
128
|
sizing_run_dir: File.join(@dp_temp_folder, 'sizing_folder'),
|
|
129
|
+
hvac_system_primary: @options[:hvac_system_primary],
|
|
130
|
+
hvac_system_dwelling_units: @options[:hvac_system_dwelling_units],
|
|
131
|
+
hvac_system_washrooms: @options[:hvac_system_washrooms],
|
|
132
|
+
hvac_system_corridor: @options[:hvac_system_corridor],
|
|
133
|
+
hvac_system_storage: @options[:hvac_system_storage],
|
|
129
134
|
primary_heating_fuel: @options[:primary_heating_fuel],
|
|
130
135
|
necb_reference_hp: @options[:necb_reference_hp],
|
|
131
136
|
necb_reference_hp_supp_fuel: @options[:necb_reference_hp_supp_fuel],
|
|
@@ -185,6 +190,7 @@ class BTAPDatapoint
|
|
|
185
190
|
boiler_fuel: @options[:boiler_fuel],
|
|
186
191
|
boiler_cap_ratio: @options[:boiler_cap_ratio],
|
|
187
192
|
swh_fuel: @options[:swh_fuel],
|
|
193
|
+
airloop_fancoils_heating: @options[:airloop_fancoils_heating],
|
|
188
194
|
oerd_utility_pricing: @oerd_utility_pricing
|
|
189
195
|
)
|
|
190
196
|
end
|
|
@@ -201,30 +207,7 @@ class BTAPDatapoint
|
|
|
201
207
|
#Check if sql file was create.. if not we can't get much output.
|
|
202
208
|
raise('no sql file found,simulation probably could not start due to error...see error logs.') if model.sqlFile.empty?
|
|
203
209
|
# Create qaqc file and save it.
|
|
204
|
-
@qaqc =
|
|
205
|
-
command = "SELECT Value
|
|
206
|
-
FROM TabularDataWithStrings
|
|
207
|
-
WHERE ReportName='LEEDsummary'
|
|
208
|
-
AND ReportForString='Entire Facility'
|
|
209
|
-
AND TableName='Sec1.1A-General Information'
|
|
210
|
-
AND RowName = 'Principal Heating Source'
|
|
211
|
-
AND ColumnName='Data'"
|
|
212
|
-
value = model.sqlFile.get.execAndReturnFirstString(command)
|
|
213
|
-
# make sure all the data are available
|
|
214
|
-
@qaqc[:building][:principal_heating_source] = 'unknown'
|
|
215
|
-
unless value.empty?
|
|
216
|
-
@qaqc[:building][:principal_heating_source] = value.get
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
if @qaqc[:building][:principal_heating_source] == 'Additional Fuel'
|
|
220
|
-
model.getPlantLoops.sort.each do |iplantloop|
|
|
221
|
-
boilers = iplantloop.components.select { |icomponent| icomponent.to_BoilerHotWater.is_initialized }
|
|
222
|
-
@qaqc[:building][:principal_heating_source] = 'FuelOilNo2' unless boilers.select { |boiler| boiler.to_BoilerHotWater.get.fuelType.to_s == 'FuelOilNo2' }.empty?
|
|
223
|
-
end
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
@qaqc[:aws_datapoint_id] = @options[:datapoint_id]
|
|
227
|
-
@qaqc[:aws_analysis_id] = @options[:analysis_id]
|
|
210
|
+
@qaqc = BTAPDatapoint.build_qaqc(model, @standard, @options[:datapoint_id], @options[:analysis_id])
|
|
228
211
|
|
|
229
212
|
# Load the sql file into model
|
|
230
213
|
sql_path = OpenStudio::Path.new(File.join(@run_dir, 'run/eplusout.sql'))
|
|
@@ -240,15 +223,26 @@ class BTAPDatapoint
|
|
|
240
223
|
# Attach the sql file from the run to the sizing model
|
|
241
224
|
model.setSqlFile(sql)
|
|
242
225
|
|
|
226
|
+
if @options[:enable_costing] or @options[:enable_carbon]
|
|
227
|
+
@cp = CommonPaths.instance
|
|
228
|
+
post_analysis = BTAPDatapointAnalysis.new(
|
|
229
|
+
model: model,
|
|
230
|
+
output_folder: @dp_temp_folder,
|
|
231
|
+
template: @options[:template],
|
|
232
|
+
standard: @standard,
|
|
233
|
+
qaqc: @qaqc)
|
|
234
|
+
end
|
|
235
|
+
|
|
243
236
|
@cost_result = nil
|
|
244
|
-
if
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
237
|
+
if @options[:enable_costing]
|
|
238
|
+
@cost_result = post_analysis.run_costing(
|
|
239
|
+
costs_csv: @cp.costs_path,
|
|
240
|
+
factors_csv: @cp.costs_local_factors_path)
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
@carbon_result = nil
|
|
244
|
+
if @options[:enable_carbon]
|
|
245
|
+
@carbon_result = post_analysis.run_carbon
|
|
252
246
|
end
|
|
253
247
|
|
|
254
248
|
@qaqc[:options] = @options # This is options sent on the command line
|
|
@@ -256,6 +250,7 @@ class BTAPDatapoint
|
|
|
256
250
|
@btap_data = BTAPData.new(model: model,
|
|
257
251
|
runner: nil,
|
|
258
252
|
cost_result: @cost_result,
|
|
253
|
+
carbon_result: @carbon_result,
|
|
259
254
|
qaqc: @qaqc,
|
|
260
255
|
npv_start_year: @npv_start_year,
|
|
261
256
|
npv_end_year: @npv_end_year,
|
|
@@ -300,25 +295,62 @@ class BTAPDatapoint
|
|
|
300
295
|
# clean temp/cache folder up.
|
|
301
296
|
FileUtils.rm_rf(input_folder_cache)
|
|
302
297
|
FileUtils.rm_rf(@dp_temp_folder)
|
|
303
|
-
if
|
|
298
|
+
# Do not fail container if running on AWS, handle error on AWS instead to avoid isuses with large analyses.
|
|
299
|
+
unless @failed == false || (@dp_output_folder.start_with?('s3://'))
|
|
300
|
+
#if @failed == true
|
|
304
301
|
raise(@bang)
|
|
305
302
|
end
|
|
306
303
|
end
|
|
307
304
|
end
|
|
308
305
|
|
|
306
|
+
class << self
|
|
307
|
+
|
|
308
|
+
# Initializes the qaqc data structure.
|
|
309
|
+
# Scoped inside of the class so that it can be used in the intialization of
|
|
310
|
+
# this class as well as in BTAPAnalysis.
|
|
311
|
+
def build_qaqc(model, standard, datapoint_id, analysis_id)
|
|
312
|
+
qaqc = standard.init_qaqc(model)
|
|
313
|
+
command = "SELECT Value
|
|
314
|
+
FROM TabularDataWithStrings
|
|
315
|
+
WHERE ReportName='LEEDsummary'
|
|
316
|
+
AND ReportForString='Entire Facility'
|
|
317
|
+
AND TableName='Sec1.1A-General Information'
|
|
318
|
+
AND RowName = 'Principal Heating Source'
|
|
319
|
+
AND ColumnName='Data'"
|
|
320
|
+
value = model.sqlFile.get.execAndReturnFirstString(command)
|
|
321
|
+
# make sure all the data are available
|
|
322
|
+
qaqc[:building][:principal_heating_source] = 'unknown'
|
|
323
|
+
unless value.empty?
|
|
324
|
+
qaqc[:building][:principal_heating_source] = value.get
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
if qaqc[:building][:principal_heating_source] == 'Additional Fuel'
|
|
328
|
+
model.getPlantLoops.sort.each do |iplantloop|
|
|
329
|
+
boilers = iplantloop.components.select { |icomponent| icomponent.to_BoilerHotWater.is_initialized }
|
|
330
|
+
qaqc[:building][:principal_heating_source] = 'FuelOilNo2' unless boilers.select { |boiler| boiler.to_BoilerHotWater.get.fuelType.to_s == 'FuelOilNo2' }.empty?
|
|
331
|
+
end
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
qaqc[:aws_datapoint_id] = datapoint_id
|
|
335
|
+
qaqc[:aws_analysis_id] = analysis_id
|
|
336
|
+
|
|
337
|
+
return qaqc
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
|
|
309
341
|
def s3_copy_file_to_s3(bucket_name:, source_file:, target_file:, n: 0)
|
|
310
|
-
#require 'aws-sdk-core'
|
|
311
|
-
#require 'aws-sdk-s3'
|
|
342
|
+
# require 'aws-sdk-core'
|
|
343
|
+
# require 'aws-sdk-s3'
|
|
312
344
|
Aws.use_bundled_cert!
|
|
313
|
-
|
|
345
|
+
s3_client = Aws::S3::Client.new(region: 'ca-central-1')
|
|
346
|
+
# Using transfer manager class instead of depricated method
|
|
347
|
+
transfer_manager = Aws::S3::TransferManager.new(client: s3_client)
|
|
314
348
|
|
|
315
349
|
puts("Copying File to S3. source_file:#{source_file} bucket:#{bucket_name} target_folder:#{target_file}")
|
|
316
350
|
response = nil
|
|
317
351
|
begin
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
# passing the TempFile object's path is massively faster than passing the TempFile object itself
|
|
321
|
-
result = obj.upload_file(source_file)
|
|
352
|
+
# Using upload_file from transfer manager class instead of depricated method from older class structure
|
|
353
|
+
result = transfer_manager.upload_file(source_file, bucket: bucket_name, key: target_file)
|
|
322
354
|
|
|
323
355
|
if result == true
|
|
324
356
|
puts "Object '#{source_file}' uploaded to bucket '#{bucket_name}'."
|
|
@@ -618,4 +650,4 @@ class BTAPDatapoint
|
|
|
618
650
|
#===================================================================================================================
|
|
619
651
|
end #output_timestep_data
|
|
620
652
|
#=====================================================================================================================
|
|
621
|
-
end
|
|
653
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
province,units,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050
|
|
2
|
+
Alberta,tCO2e/GWh,958.7,991.3,925.2,916.8,822.5,843.4,794.1,754.5,785.7,789.4,744.9,768.4,765.3,604.3,568.6,530.2,458.3,382.1,304.5,301.4,265.2,226.8,210.2,172.1,165,170.9,166.2,153.9,145,138.4,118.8,106.5,100.3,82.3,77.2,71.4,69.9,70.3,70.9,71.5,71.6,70.6,70.3,68.6,43.9,19.2
|
|
3
|
+
British Columbia,tCO2e/GWh,20.7,20,17,25.3,20.9,21.6,9.4,10.1,10.6,6.9,4.6,2.9,2,5.4,11.6,5.3,8.2,5.7,5.1,5.4,5.3,4.2,3.9,3.7,1.5,1.4,1.4,1.3,1.2,1.1,1,0.6,0.6,0.5,0.5,0.5,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1
|
|
4
|
+
Manitoba,tCO2e/GWh,19.4,24,26.7,21,9.6,4.5,5.8,5.4,5.4,5.6,5.6,3.2,3.1,1.8,1.8,1.9,2.6,2.1,1.8,1.1,0.5,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6
|
|
5
|
+
New Brunswick,tCO2e/GWh,613,595.4,539,546.9,549.6,379.4,333.2,281.4,236.6,264.7,259.4,333.3,261.1,281.6,263,182.5,264.5,291.2,298.4,295.7,319.1,306,278.1,266.1,252,37,31.8,24.8,29.1,29,46.9,52.2,65,64.4,27.8,27.7,2.9,2.5,2.5,2.4,1.9,14.3,12.5,10.6,1.2,0.9
|
|
6
|
+
Newfoundland and Labrador,tCO2e/GWh,85.8,64.8,106.4,90.3,89.7,76.6,81.7,79.3,86,119.8,148.3,151.8,145.1,105.9,104.7,90.3,74.2,81.4,7.6,6.3,6.3,6.2,6,5.8,6.4,5.6,5.5,5.3,5.2,5.1,5,4.8,5,5.3,5.3,5.2,5.1,4.9,4.5,4.2,4.2,4.1,4.1,4,4,3.9
|
|
7
|
+
Northwest Territories,tCO2e/GWh,303.6,275.4,304.7,263.2,205.1,236.3,226.1,115.4,190.2,241.7,352.2,196.2,189.8,202.7,186.1,191.8,192.6,215.5,234.9,175,1,0,0,5.2,4.6,4.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
8
|
+
Nova Scotia,tCO2e/GWh,927.2,974.9,979,803.5,817.8,741.4,743,726.4,713.3,689.9,643.5,656.2,651.2,684.4,645.1,619.3,582.9,542.4,658.1,605.3,529.8,477.9,461.9,448.1,303.9,88.2,89.7,112,105,98.4,70.6,66.7,63.2,60.5,59,57.2,55.4,46.7,45.9,63.3,60.2,57.1,53.7,50.3,47.1,38.6
|
|
9
|
+
Nunavut,tCO2e/GWh,606,507.6,510.1,539,566.8,566.8,482.4,484.2,453.9,567.5,481.8,607.5,574.8,675.3,673.3,616.2,639.8,628.2,788.4,724.3,494.4,456.6,442.9,444.2,456.9,454.3,466.7,410.7,425,449,401,411.4,423.9,378.1,389.3,403.4,361.2,373.9,339.2,304.3,318.7,288.9,257.7,267.9,237.4,208.7
|
|
10
|
+
Ontario,tCO2e/GWh,224.3,206,228.7,189,112.2,143.4,91.2,90.9,67.3,40,42.1,36,16.4,25.5,24.8,24.2,26.3,30.2,23.9,55.5,65.3,76.1,56.9,50.4,50,65,55.9,65.8,68.4,76.1,30.5,23.3,19.1,13.6,10.7,13.1,12.9,11.9,11.7,11.5,14,13.8,13.6,13.4,12.5,3.4
|
|
11
|
+
Prince Edward Island,tCO2e/GWh,5,8.4,4.8,4,5.3,1.6,1.1,9,3.2,3.4,11.3,3.5,6.5,2.1,0.8,0.2,1.4,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.7,0.7,0.7,0.7,0.7,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.5,0.5,0.5,0.5,0.5
|
|
12
|
+
Quebec,tCO2e/GWh,3.2,5.1,8.7,2.5,3.5,2.4,2.7,2.5,1.4,1.5,1.3,1.5,1.4,1.4,1.5,1.8,1.5,1.3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
|
13
|
+
Saskatchewan,tCO2e/GWh,860.6,813.3,803.3,769.7,872,846.4,797.5,807.8,685.2,700.2,736.8,721.4,703.2,720.6,698.5,615.7,692.9,648.2,542.8,560.6,522.9,515.3,499.4,341.2,330.8,115.3,117.1,108.6,104.3,100.3,48.7,40.4,37,34.9,52.4,58.6,62.6,57.6,53.2,40.8,23.8,23.2,22.9,22.3,21.8,12.6
|
|
14
|
+
Yukon,tCO2e/GWh,70,53.4,53.2,51.2,44.6,48.6,68.7,42.8,41.4,41.4,44.6,47.1,53.5,76.2,113.1,111.3,79.3,73.3,120,107.6,7,6.9,6.8,7,8.3,10.2,41.9,48,52.1,52.3,58.9,57.4,55.2,53.2,52.3,46.3,29.8,28.7,27.3,25.2,24.5,24.6,28.5,27.2,27.3,27.6
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
province,units,2022
|
|
2
|
+
Alberta,g/m3,1962
|
|
3
|
+
British Columbia,g/m3,1966
|
|
4
|
+
Manitoba,g/m3,1915
|
|
5
|
+
New Brunswick,g/m3,1919
|
|
6
|
+
Newfoundland and Labrador,g/m3,1919
|
|
7
|
+
Northwest Territories,g/m3,1966
|
|
8
|
+
Nova Scotia,g/m3,1919
|
|
9
|
+
Nunavut,g/m3,1966
|
|
10
|
+
Ontario,g/m3,1921
|
|
11
|
+
Prince Edward Island,g/m3,1919
|
|
12
|
+
Quebec,g/m3,1926
|
|
13
|
+
Saskatchewan,g/m3,1920
|
|
14
|
+
Yukon,g/m3,1966
|
|
File without changes
|