openstudio-standards 0.8.4 → 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/{costing/common_paths.rb → common_paths.rb} +14 -11
- 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/constructions_glazing.csv +121 -0
- data/lib/openstudio-standards/btap/common_resources/costs.csv +1897 -0
- data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/lighting.csv +59 -59
- data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/materials_hvac.csv +1019 -1032
- data/lib/openstudio-standards/btap/costing/btap_costing.rb +3 -7
- data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +1 -5
- data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +5 -4
- data/lib/openstudio-standards/btap/costing/dcv_costing.rb +1 -1
- data/lib/openstudio-standards/btap/costing/envelope_costing.rb +112 -181
- data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +4 -4
- data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +2 -1
- data/lib/openstudio-standards/btap/costing/lighting_costing.rb +3 -3
- data/lib/openstudio-standards/btap/costing/test_list.txt +15 -17
- data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +10 -9
- data/lib/openstudio-standards/btap/geometry.rb +86 -6
- data/lib/openstudio-standards/btap/structure.rb +657 -0
- 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 +6 -11
- 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.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 +1 -0
- 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 +19 -10
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +12 -11
- 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 +69 -92
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +2 -1
- 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 +32 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +18 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +21 -15
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_namer.rb +5 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +2 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +30 -141
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +233 -112
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +10 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +2 -2
- 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/common/btap_analysis.rb +79 -0
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +16 -4
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +65 -42
- 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/version.rb +1 -1
- data/lib/openstudio-standards/weather/stat_file.rb +2 -2
- data/lib/openstudio-standards.rb +55 -38
- metadata +106 -66
- data/lib/openstudio-standards/btap/costing/common_resources/constructions_glazing.csv +0 -61
- data/lib/openstudio-standards/btap/costing/common_resources/costs.csv +0 -1904
- 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/btap/{costing/common_resources → common_resources}/ConstructionProperties.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/Constructions.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/construction_sets.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/constructions_opaque.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/costs_local_factors.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/hvac_vent_ahu.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/lighting_sets.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/locations.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/materials_glazing.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/materials_lighting.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/materials_opaque.csv +0 -0
- /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
|
@@ -20,6 +20,7 @@ class NECB2020
|
|
|
20
20
|
else
|
|
21
21
|
capacity_w = capacity_w.get
|
|
22
22
|
end
|
|
23
|
+
capacity_kw = capacity_w/1000.0
|
|
23
24
|
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
|
24
25
|
capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
|
|
25
26
|
|
|
@@ -35,6 +36,7 @@ class NECB2020
|
|
|
35
36
|
end
|
|
36
37
|
volume_gal = OpenStudio.convert(volume_m3, 'm^3', 'gal').get
|
|
37
38
|
volume_litre = OpenStudio.convert(volume_m3, 'm^3', 'L').get
|
|
39
|
+
|
|
38
40
|
# Get the heater fuel type
|
|
39
41
|
fuel_type = water_heater_mixed.heaterFuelType
|
|
40
42
|
unless fuel_type == 'NaturalGas' || fuel_type == 'Electricity' || fuel_type == 'FuelOilNo2'
|
|
@@ -47,12 +49,12 @@ class NECB2020
|
|
|
47
49
|
# From PNNL http://www.energycodes.gov/sites/default/files/documents/PrototypeModelEnhancements_2014_0.pdf
|
|
48
50
|
# Appendix A: Service Water Heating
|
|
49
51
|
# and modified by PCF 1630 as noted below.
|
|
50
|
-
|
|
51
52
|
water_heater_eff = nil
|
|
52
53
|
ua_btu_per_hr_per_f = nil
|
|
53
54
|
sl_btu_per_hr = nil
|
|
54
55
|
q_load_btu_per_hr = nil
|
|
55
56
|
uef = nil
|
|
57
|
+
|
|
56
58
|
case fuel_type
|
|
57
59
|
when 'Electricity'
|
|
58
60
|
volume_litre_per_s = volume_m3 * 1000
|
|
@@ -89,55 +91,57 @@ class NECB2020
|
|
|
89
91
|
# AND
|
|
90
92
|
#
|
|
91
93
|
# PNNL http://www.energycodes.gov/sites/default/files/documents/PrototypeModelEnhancements_2014_0.pdf
|
|
94
|
+
#
|
|
95
|
+
# Updated reference links:
|
|
96
|
+
# https://www.pnnl.gov/main/publications/external/technical_reports/PNNL-23269.pdf - Equations may have typos, also for EF which is at diff test T.
|
|
97
|
+
# https://www.nrel.gov/docs/fy21osti/71633.pdf
|
|
98
|
+
# https://ases.org/wp-content/uploads/2021/11/Using-Simple-Algebraic-Models-and-Rating-Test-Data-to-Predict-Water-Heater-Energy-Consumption-Under-Off-Test-Conditions-.pdf
|
|
99
|
+
# https://www.ecfr.gov/current/title-10/chapter-II/subchapter-D/part-430/subpart-B/appendix-Appendix%20E%20to%20Subpart%20B%20of%20Part%20430
|
|
100
|
+
#
|
|
101
|
+
|
|
102
|
+
# Assume first hour rating.
|
|
103
|
+
# Rule of thumb is FHR is 70% tank_volume + ~40 Gal
|
|
104
|
+
# Ref: https://www.waterheaterpros.com/first-hour-rating#:~:text=To%20find%20a%20water%20heater%27s,can%20deliver%20at%20peak%20hours.
|
|
105
|
+
fhr_L_per_hr = 0.7*volume_litre + 151.0
|
|
92
106
|
|
|
93
|
-
# Assume fhr = peak demand flow
|
|
94
|
-
tank_param = auto_size_shw_capacity(model:water_heater_mixed.model, shw_scale: 'NECB_Default')
|
|
95
|
-
fhr_L_per_hr = tank_param['loop_peak_flow_rate_SI']
|
|
96
|
-
fhr_L_per_hr = fhr_L_per_hr * 3600000
|
|
97
107
|
if capacity_w <= 22000 and volume_litre >= 76 and volume_litre < 208
|
|
98
|
-
if fhr_L_per_hr < 68
|
|
108
|
+
if fhr_L_per_hr < 68 # 18 US Gal - UEF draw pattern very small usage
|
|
99
109
|
uef = 0.3456 - 0.00053*volume_litre
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
elsif fhr_L_per_hr >= 68 and fhr_L_per_hr < 193
|
|
110
|
+
volume_drawn_gal = 10 # 37.85L
|
|
111
|
+
elsif fhr_L_per_hr >= 68 and fhr_L_per_hr < 193 # 51 US Gal - UEF draw pattern low usage
|
|
103
112
|
uef = 0.5982 - 0.00050*volume_litre
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
elsif fhr_L_per_hr >= 193 and fhr_L_per_hr < 284
|
|
113
|
+
volume_drawn_gal = 38 # 143.8L
|
|
114
|
+
elsif fhr_L_per_hr >= 193 and fhr_L_per_hr < 284 # 75 US Gal - UEF draw pattern medium usage
|
|
107
115
|
uef = 0.6483 - 0.00045*volume_litre
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
elsif fhr_L_per_hr >= 284
|
|
116
|
+
volume_drawn_gal = 55 # 208.2L
|
|
117
|
+
elsif fhr_L_per_hr >= 284 # 75 US Gal - UEF draw pattern high usage
|
|
111
118
|
uef = 0.6920 - 0.00034*volume_litre
|
|
112
|
-
|
|
113
|
-
volume_drawn_gal = 84
|
|
119
|
+
volume_drawn_gal = 84 # 318.0L
|
|
114
120
|
end
|
|
115
121
|
|
|
116
|
-
# Assume burner efficiency (PNNL)
|
|
122
|
+
# Assume burner efficiency (PNNL-23269)
|
|
117
123
|
water_heater_eff = 0.82
|
|
118
124
|
|
|
119
125
|
# Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020)
|
|
120
|
-
q_load_btu = volume_drawn_gal*8.30074*0.99826*(125-58) #water properties at 91.5F
|
|
126
|
+
q_load_btu = volume_drawn_gal*8.30074*0.99826*(125.0-58.0) # water properties at 91.5F; derived from UEF test.
|
|
121
127
|
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
|
128
|
+
|
|
129
|
+
# From PNNL-23269?
|
|
122
130
|
re = water_heater_eff + q_load_btu*(uef-water_heater_eff)/(24*capacity_btu_per_hr*uef)
|
|
123
131
|
ua_btu_per_hr_per_f = (water_heater_eff-re)*capacity_btu_per_hr/(125-67.5)
|
|
124
132
|
|
|
125
133
|
elsif capacity_w <= 22000 and volume_litre >= 208 and volume_litre < 380
|
|
126
134
|
if fhr_L_per_hr < 68
|
|
127
135
|
uef = 0.6470 - 0.00016*volume_litre
|
|
128
|
-
q_load_btu_per_hr = 5561
|
|
129
136
|
volume_drawn_gal = 10
|
|
130
137
|
elsif fhr_L_per_hr >= 68 and fhr_L_per_hr < 193
|
|
131
138
|
uef = 0.7689 - 0.00013*volume_litre
|
|
132
|
-
q_load_btu_per_hr = 21131
|
|
133
139
|
volume_drawn_gal = 38
|
|
134
140
|
elsif fhr_L_per_hr >= 193 and fhr_L_per_hr < 284
|
|
135
141
|
uef = 0.7897 - 0.00011*volume_litre
|
|
136
|
-
q_load_btu_per_hr = 30584
|
|
137
142
|
volume_drawn_gal = 55
|
|
138
143
|
elsif fhr_L_per_hr >= 284
|
|
139
144
|
uef = 0.8072 - 0.00008*volume_litre
|
|
140
|
-
q_load_btu_per_hr = 46710
|
|
141
145
|
volume_drawn_gal = 84
|
|
142
146
|
end
|
|
143
147
|
|
|
@@ -147,7 +151,8 @@ class NECB2020
|
|
|
147
151
|
# Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020)
|
|
148
152
|
q_load_btu = volume_drawn_gal*8.30074*0.99826*(125-58) #water properties at 91.5F
|
|
149
153
|
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
|
150
|
-
|
|
154
|
+
|
|
155
|
+
# Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020); Note tank at 125F for UEF, previously 135F for EF test
|
|
151
156
|
re = water_heater_eff + q_load_btu*(uef-water_heater_eff)/(24*capacity_btu_per_hr*uef)
|
|
152
157
|
ua_btu_per_hr_per_f = (water_heater_eff-re)*capacity_btu_per_hr/(125-67.5)
|
|
153
158
|
|
|
@@ -163,16 +168,12 @@ class NECB2020
|
|
|
163
168
|
# Estimate recovery efficiency (RE) and UA (Maguire and Robers, 2020)
|
|
164
169
|
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
|
165
170
|
if fhr_L_per_hr < 68
|
|
166
|
-
q_load_btu_per_hr = 5561
|
|
167
171
|
volume_drawn_gal = 10
|
|
168
172
|
elsif fhr_L_per_hr >= 68 and fhr_L_per_hr < 193
|
|
169
|
-
q_load_btu_per_hr = 21131
|
|
170
173
|
volume_drawn_gal = 38
|
|
171
174
|
elsif fhr_L_per_hr >= 193 and fhr_L_per_hr < 284
|
|
172
|
-
q_load_btu_per_hr = 30584
|
|
173
175
|
volume_drawn_gal = 55
|
|
174
|
-
elsif fhr_L_per_hr >= 284
|
|
175
|
-
q_load_btu_per_hr = 46710
|
|
176
|
+
elsif fhr_L_per_hr >= 284
|
|
176
177
|
volume_drawn_gal = 84
|
|
177
178
|
end
|
|
178
179
|
q_load_btu = volume_drawn_gal*8.30074*0.99826*(125-58) #water properties at 91.5F
|
|
@@ -182,7 +183,6 @@ class NECB2020
|
|
|
182
183
|
ua_btu_per_hr_per_f = (water_heater_eff-re)*capacity_btu_per_hr/(125-67.5)
|
|
183
184
|
|
|
184
185
|
else # all other water heaters
|
|
185
|
-
capacity_kw = capacity_w/1000
|
|
186
186
|
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
|
187
187
|
# thermal efficiency (NECB2020)
|
|
188
188
|
et = 0.9
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
require 'openstudio'
|
|
2
|
+
|
|
3
|
+
# BTAP Analysis:
|
|
4
|
+
# Class to instantiate post-analysis mechanisms like costing or carbon
|
|
5
|
+
# calculation.
|
|
6
|
+
# Can be done during a simulation or without one given an OSM file and its SQL
|
|
7
|
+
# file, along with a few other parameters.
|
|
8
|
+
|
|
9
|
+
# Abstract class, only instantiate BTAPNoSimAnalysis or BTAPDatapointAnalysis.
|
|
10
|
+
class BTAPAnalysis
|
|
11
|
+
def initialize(output_folder:, template:)
|
|
12
|
+
@output_folder = output_folder
|
|
13
|
+
@template = template
|
|
14
|
+
@cp = CommonPaths.instance
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def run_costing(costs_csv: @cp.costs_path, factors_csv: @cp.costs_local_factors_path)
|
|
18
|
+
costing = BTAPCosting.new(costs_csv: costs_csv, factors_csv: factors_csv, attributes: @attributes)
|
|
19
|
+
|
|
20
|
+
cost_result, btap_items = costing.cost_audit_all(
|
|
21
|
+
model: @model,
|
|
22
|
+
prototype_creator: @standard,
|
|
23
|
+
template_type: @template)
|
|
24
|
+
|
|
25
|
+
if not @qaqc.nil?
|
|
26
|
+
@qaqc[:costing_information] = cost_result
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# disable openstudio-version; for debugging only
|
|
30
|
+
# cost_result["openstudio-version"] = OpenstudioStandards::VERSION
|
|
31
|
+
File.open(File.join(@output_folder, 'cost_results.json'), 'w') do |f|
|
|
32
|
+
f.write(JSON.pretty_generate(cost_result, allow_nan: true))
|
|
33
|
+
end
|
|
34
|
+
puts "Wrote File cost_results.json in #{@output_folder} "
|
|
35
|
+
|
|
36
|
+
return cost_result
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def run_carbon
|
|
40
|
+
carbon = BTAPCarbon.new(attributes: @attributes, standards_data: @standard.standards_data)
|
|
41
|
+
carbon_result = carbon.audit_embodied_carbon
|
|
42
|
+
|
|
43
|
+
if not @qaqc.nil?
|
|
44
|
+
@qaqc[:carbon_information] = carbon_result
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
File.open(File.join(@output_folder, 'carbon_results.json'), 'w') do |f|
|
|
48
|
+
f.write(JSON.pretty_generate(carbon_result, allow_nan: true))
|
|
49
|
+
end
|
|
50
|
+
puts "Wrote File carbon_results.json in #{@output_folder} "
|
|
51
|
+
|
|
52
|
+
return carbon_result
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# For a no-simulation run, the SQL file, template, and datapoint ID must be provided.
|
|
57
|
+
class BTAPNoSimAnalysis < BTAPAnalysis
|
|
58
|
+
def initialize(model_path:, sql_file_path:, output_folder:, template:, datapoint_id:, analysis_id: SecureRandom.uuid)
|
|
59
|
+
super(output_folder: output_folder, template: template)
|
|
60
|
+
@model = BTAP::FileIO.load_osm(model_path)
|
|
61
|
+
@template = template
|
|
62
|
+
@standard = Standard.build(template)
|
|
63
|
+
@datapoint_id = datapoint_id
|
|
64
|
+
@analysis_id = analysis_id
|
|
65
|
+
@attributes = BTAP::Attributes.new(@model, @standard)
|
|
66
|
+
@model.setSqlFile(OpenStudio::SqlFile.new(sql_file_path))
|
|
67
|
+
@qaqc = BTAPDatapoint.build_qaqc(@model, @standard, @datapoint_id, @analysis_id)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
class BTAPDatapointAnalysis < BTAPAnalysis
|
|
72
|
+
def initialize(model:, output_folder:, template:, standard:, qaqc:)
|
|
73
|
+
super(output_folder: output_folder, template: template)
|
|
74
|
+
@model = model
|
|
75
|
+
@standard = standard
|
|
76
|
+
@qaqc = qaqc
|
|
77
|
+
@attributes = BTAP::Attributes.new(@model, @standard)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -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.
|
|
@@ -207,30 +207,7 @@ class BTAPDatapoint
|
|
|
207
207
|
#Check if sql file was create.. if not we can't get much output.
|
|
208
208
|
raise('no sql file found,simulation probably could not start due to error...see error logs.') if model.sqlFile.empty?
|
|
209
209
|
# Create qaqc file and save it.
|
|
210
|
-
@qaqc =
|
|
211
|
-
command = "SELECT Value
|
|
212
|
-
FROM TabularDataWithStrings
|
|
213
|
-
WHERE ReportName='LEEDsummary'
|
|
214
|
-
AND ReportForString='Entire Facility'
|
|
215
|
-
AND TableName='Sec1.1A-General Information'
|
|
216
|
-
AND RowName = 'Principal Heating Source'
|
|
217
|
-
AND ColumnName='Data'"
|
|
218
|
-
value = model.sqlFile.get.execAndReturnFirstString(command)
|
|
219
|
-
# make sure all the data are available
|
|
220
|
-
@qaqc[:building][:principal_heating_source] = 'unknown'
|
|
221
|
-
unless value.empty?
|
|
222
|
-
@qaqc[:building][:principal_heating_source] = value.get
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
if @qaqc[:building][:principal_heating_source] == 'Additional Fuel'
|
|
226
|
-
model.getPlantLoops.sort.each do |iplantloop|
|
|
227
|
-
boilers = iplantloop.components.select { |icomponent| icomponent.to_BoilerHotWater.is_initialized }
|
|
228
|
-
@qaqc[:building][:principal_heating_source] = 'FuelOilNo2' unless boilers.select { |boiler| boiler.to_BoilerHotWater.get.fuelType.to_s == 'FuelOilNo2' }.empty?
|
|
229
|
-
end
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
@qaqc[:aws_datapoint_id] = @options[:datapoint_id]
|
|
233
|
-
@qaqc[:aws_analysis_id] = @options[:analysis_id]
|
|
210
|
+
@qaqc = BTAPDatapoint.build_qaqc(model, @standard, @options[:datapoint_id], @options[:analysis_id])
|
|
234
211
|
|
|
235
212
|
# Load the sql file into model
|
|
236
213
|
sql_path = OpenStudio::Path.new(File.join(@run_dir, 'run/eplusout.sql'))
|
|
@@ -246,18 +223,26 @@ class BTAPDatapoint
|
|
|
246
223
|
# Attach the sql file from the run to the sizing model
|
|
247
224
|
model.setSqlFile(sql)
|
|
248
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
|
+
|
|
249
236
|
@cost_result = nil
|
|
250
237
|
if @options[:enable_costing]
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
@
|
|
259
|
-
File.open(File.join(@dp_temp_folder, 'cost_results.json'), 'w') { |f| f.write(JSON.pretty_generate(@cost_result, allow_nan: true)) }
|
|
260
|
-
puts "Wrote File cost_results.json in #{Dir.pwd} "
|
|
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
|
|
261
246
|
end
|
|
262
247
|
|
|
263
248
|
@qaqc[:options] = @options # This is options sent on the command line
|
|
@@ -265,6 +250,7 @@ class BTAPDatapoint
|
|
|
265
250
|
@btap_data = BTAPData.new(model: model,
|
|
266
251
|
runner: nil,
|
|
267
252
|
cost_result: @cost_result,
|
|
253
|
+
carbon_result: @carbon_result,
|
|
268
254
|
qaqc: @qaqc,
|
|
269
255
|
npv_start_year: @npv_start_year,
|
|
270
256
|
npv_end_year: @npv_end_year,
|
|
@@ -309,25 +295,62 @@ class BTAPDatapoint
|
|
|
309
295
|
# clean temp/cache folder up.
|
|
310
296
|
FileUtils.rm_rf(input_folder_cache)
|
|
311
297
|
FileUtils.rm_rf(@dp_temp_folder)
|
|
312
|
-
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
|
|
313
301
|
raise(@bang)
|
|
314
302
|
end
|
|
315
303
|
end
|
|
316
304
|
end
|
|
317
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
|
+
|
|
318
341
|
def s3_copy_file_to_s3(bucket_name:, source_file:, target_file:, n: 0)
|
|
319
|
-
#require 'aws-sdk-core'
|
|
320
|
-
#require 'aws-sdk-s3'
|
|
342
|
+
# require 'aws-sdk-core'
|
|
343
|
+
# require 'aws-sdk-s3'
|
|
321
344
|
Aws.use_bundled_cert!
|
|
322
|
-
|
|
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)
|
|
323
348
|
|
|
324
349
|
puts("Copying File to S3. source_file:#{source_file} bucket:#{bucket_name} target_folder:#{target_file}")
|
|
325
350
|
response = nil
|
|
326
351
|
begin
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
# passing the TempFile object's path is massively faster than passing the TempFile object itself
|
|
330
|
-
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)
|
|
331
354
|
|
|
332
355
|
if result == true
|
|
333
356
|
puts "Object '#{source_file}' uploaded to bucket '#{bucket_name}'."
|
|
@@ -75,7 +75,7 @@ module OpenstudioStandards
|
|
|
75
75
|
space.spaceInfiltrationDesignFlowRates.each do |infil|
|
|
76
76
|
if infil.designFlowRate.is_initialized
|
|
77
77
|
is_vest = true
|
|
78
|
-
OpenStudio.logFree(OpenStudio::Info, '
|
|
78
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ThermalZone', "For #{thermal_zone.name}: This zone is considered a vestibule.")
|
|
79
79
|
break
|
|
80
80
|
end
|
|
81
81
|
end
|
|
@@ -175,7 +175,7 @@ module OpenstudioStandards
|
|
|
175
175
|
htd = true
|
|
176
176
|
end
|
|
177
177
|
else
|
|
178
|
-
OpenStudio.logFree(OpenStudio::Debug, '
|
|
178
|
+
OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.ThermalZone', "Zone #{thermal_zone.name} used an unknown schedule type for the heating setpoint; assuming heated.")
|
|
179
179
|
htd = true
|
|
180
180
|
end
|
|
181
181
|
end
|
|
@@ -211,7 +211,7 @@ module OpenstudioStandards
|
|
|
211
211
|
htd = true
|
|
212
212
|
end
|
|
213
213
|
else
|
|
214
|
-
OpenStudio.logFree(OpenStudio::Debug, '
|
|
214
|
+
OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.ThermalZone', "Zone #{thermal_zone.name} used an unknown schedule type for the heating setpoint; assuming heated.")
|
|
215
215
|
htd = true
|
|
216
216
|
end
|
|
217
217
|
end
|
|
@@ -316,7 +316,7 @@ module OpenstudioStandards
|
|
|
316
316
|
cld = true
|
|
317
317
|
end
|
|
318
318
|
else
|
|
319
|
-
OpenStudio.logFree(OpenStudio::Debug, '
|
|
319
|
+
OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.ThermalZone', "Zone #{thermal_zone.name} used an unknown schedule type for the cooling setpoint; assuming cooled.")
|
|
320
320
|
cld = true
|
|
321
321
|
end
|
|
322
322
|
end
|
|
@@ -352,7 +352,7 @@ module OpenstudioStandards
|
|
|
352
352
|
cld = true
|
|
353
353
|
end
|
|
354
354
|
else
|
|
355
|
-
OpenStudio.logFree(OpenStudio::Debug, '
|
|
355
|
+
OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.ThermalZone', "Zone #{thermal_zone.name} used an unknown schedule type for the cooling setpoint; assuming cooled.")
|
|
356
356
|
cld = true
|
|
357
357
|
end
|
|
358
358
|
end
|
|
@@ -384,7 +384,7 @@ module OpenstudioStandards
|
|
|
384
384
|
def self.thermal_zone_electric_heat?(thermal_zone)
|
|
385
385
|
# error if HVACComponent heating fuels method is not available
|
|
386
386
|
if thermal_zone.model.version < OpenStudio::VersionString.new('3.6.0')
|
|
387
|
-
OpenStudio.logFree(OpenStudio::Error, '
|
|
387
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.ThermalZone', 'Required HVACComponent method .heatingFuelTypes is not available in pre-OpenStudio 3.6.0 versions. Use a more recent version of OpenStudio.')
|
|
388
388
|
end
|
|
389
389
|
|
|
390
390
|
# Get an array of the heating fuels used by the zone
|
|
@@ -404,7 +404,7 @@ module OpenstudioStandards
|
|
|
404
404
|
def self.thermal_zone_fossil_heat?(thermal_zone)
|
|
405
405
|
# error if HVACComponent heating fuels method is not available
|
|
406
406
|
if thermal_zone.model.version < OpenStudio::VersionString.new('3.6.0')
|
|
407
|
-
OpenStudio.logFree(OpenStudio::Error, '
|
|
407
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.ThermalZone', 'Required HVACComponent method .heatingFuelTypes is not available in pre-OpenStudio 3.6.0 versions. Use a more recent version of OpenStudio.')
|
|
408
408
|
end
|
|
409
409
|
|
|
410
410
|
is_fossil = false
|
|
@@ -438,7 +438,7 @@ module OpenstudioStandards
|
|
|
438
438
|
def self.thermal_zone_district_heat?(thermal_zone)
|
|
439
439
|
# error if HVACComponent heating fuels method is not available
|
|
440
440
|
if thermal_zone.model.version < OpenStudio::VersionString.new('3.6.0')
|
|
441
|
-
OpenStudio.logFree(OpenStudio::Error, '
|
|
441
|
+
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.ThermalZone', 'Required HVACComponent method .heatingFuelTypes is not available in pre-OpenStudio 3.6.0 versions. Use a more recent version of OpenStudio.')
|
|
442
442
|
end
|
|
443
443
|
|
|
444
444
|
is_district = false
|
|
@@ -467,39 +467,6 @@ module OpenstudioStandards
|
|
|
467
467
|
return is_mixed
|
|
468
468
|
end
|
|
469
469
|
|
|
470
|
-
# Adds a thermostat that heats the space to 0 F and cools to 120 F.
|
|
471
|
-
# These numbers are outside of the threshold that is considered heated
|
|
472
|
-
# or cooled by thermal_zone_cooled?() and thermal_zone_heated?()
|
|
473
|
-
#
|
|
474
|
-
# @param thermal_zone [OpenStudio::Model::ThermalZone] OpenStudio ThermalZone object
|
|
475
|
-
# @return [Boolean] returns true if successful, false if not
|
|
476
|
-
def self.thermal_zone_add_unconditioned_thermostat(thermal_zone)
|
|
477
|
-
# Heated to 0F (below thermal_zone_heated?(thermal_zone) threshold)
|
|
478
|
-
htg_t_f = 0
|
|
479
|
-
htg_t_c = OpenStudio.convert(htg_t_f, 'F', 'C').get
|
|
480
|
-
htg_stpt_sch = OpenStudio::Model::ScheduleRuleset.new(thermal_zone.model)
|
|
481
|
-
htg_stpt_sch.setName('Unconditioned Minimal Heating')
|
|
482
|
-
htg_stpt_sch.defaultDaySchedule.setName('Unconditioned Minimal Heating Default')
|
|
483
|
-
htg_stpt_sch.defaultDaySchedule.addValue(OpenStudio::Time.new(0, 24, 0, 0), htg_t_c)
|
|
484
|
-
|
|
485
|
-
# Cooled to 120F (above thermal_zone_cooled?(thermal_zone) threshold)
|
|
486
|
-
clg_t_f = 120
|
|
487
|
-
clg_t_c = OpenStudio.convert(clg_t_f, 'F', 'C').get
|
|
488
|
-
clg_stpt_sch = OpenStudio::Model::ScheduleRuleset.new(thermal_zone.model)
|
|
489
|
-
clg_stpt_sch.setName('Unconditioned Minimal Heating')
|
|
490
|
-
clg_stpt_sch.defaultDaySchedule.setName('Unconditioned Minimal Heating Default')
|
|
491
|
-
clg_stpt_sch.defaultDaySchedule.addValue(OpenStudio::Time.new(0, 24, 0, 0), clg_t_c)
|
|
492
|
-
|
|
493
|
-
# Thermostat
|
|
494
|
-
thermostat = OpenStudio::Model::ThermostatSetpointDualSetpoint.new(thermal_zone.model)
|
|
495
|
-
thermostat.setName("#{thermal_zone.name} Unconditioned Thermostat")
|
|
496
|
-
thermostat.setHeatingSetpointTemperatureSchedule(htg_stpt_sch)
|
|
497
|
-
thermostat.setCoolingSetpointTemperatureSchedule(clg_stpt_sch)
|
|
498
|
-
thermal_zone.setThermostatSetpointDualSetpoint(thermostat)
|
|
499
|
-
|
|
500
|
-
return true
|
|
501
|
-
end
|
|
502
|
-
|
|
503
470
|
# Determine the design internal load (W) for this zone without space multipliers.
|
|
504
471
|
# This include People, Lights, Electric Equipment, and Gas Equipment in all spaces in this zone.
|
|
505
472
|
# It assumes 100% of the wattage is converted to heat, and that the design peak schedule value is 1 (100%).
|
|
@@ -569,7 +536,7 @@ module OpenstudioStandards
|
|
|
569
536
|
building_type = building_type_areas.key(building_type_areas.values.max)
|
|
570
537
|
|
|
571
538
|
if building_type.nil?
|
|
572
|
-
OpenStudio.logFree(OpenStudio::Info, '
|
|
539
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ThermalZone', "Thermal zone #{thermal_zone.name} does not have standards building type.")
|
|
573
540
|
end
|
|
574
541
|
|
|
575
542
|
return building_type
|
|
@@ -687,7 +654,7 @@ module OpenstudioStandards
|
|
|
687
654
|
# Convert to cfm
|
|
688
655
|
tot_oa_flow_rate_cfm = OpenStudio.convert(tot_oa_flow_rate, 'm^3/s', 'cfm').get
|
|
689
656
|
|
|
690
|
-
OpenStudio.logFree(OpenStudio::Debug, 'openstudio.
|
|
657
|
+
OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.ThermalZone', "For #{thermal_zone.name}, design min OA = #{tot_oa_flow_rate_cfm.round} cfm.")
|
|
691
658
|
|
|
692
659
|
return tot_oa_flow_rate
|
|
693
660
|
end
|
|
@@ -711,7 +678,7 @@ module OpenstudioStandards
|
|
|
711
678
|
# Calculate the per-area value
|
|
712
679
|
tot_oa_flow_rate_per_area = tot_oa_flow_rate / sum_floor_area
|
|
713
680
|
|
|
714
|
-
# OpenStudio::logFree(OpenStudio::Debug, "openstudio.
|
|
681
|
+
# OpenStudio::logFree(OpenStudio::Debug, "openstudio.standards.ThermalZone", "For #{self.name}, OA per area = #{tot_oa_flow_rate_per_area.round(8)} m^3/s*m^2.")
|
|
715
682
|
|
|
716
683
|
return tot_oa_flow_rate_per_area
|
|
717
684
|
end
|
|
@@ -776,7 +743,7 @@ module OpenstudioStandards
|
|
|
776
743
|
new_dsn_oa.setOutdoorAirFlowRateFractionSchedule(oa_sch)
|
|
777
744
|
end
|
|
778
745
|
|
|
779
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.
|
|
746
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ThermalZone', "For #{thermal_zone.name}: Converted total ventilation requirements to per-area value.")
|
|
780
747
|
end
|
|
781
748
|
|
|
782
749
|
return true
|