openstudio-standards 0.3.0 → 0.3.1.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/geometry/ASHRAELargeOffice.json +4 -4
- data/data/geometry/ASHRAESuperMarket.json +29 -38
- data/data/standards/OpenStudio_Standards-deer-ALL-comstock(space_types).xlsx +0 -0
- data/data/standards/metadata_units_OpenStudio_Standards-deer-ALL-comstockspace_types.csv +172 -0
- data/data/standards/test_performance_expected_dd_results.csv +1890 -2016
- data/lib/openstudio-standards/btap/analysis.rb +389 -389
- data/lib/openstudio-standards/btap/bridging.rb +2099 -0
- data/lib/openstudio-standards/btap/btap.model.rb +717 -717
- data/lib/openstudio-standards/btap/btap.rb +33 -30
- data/lib/openstudio-standards/btap/economics.rb +1163 -1163
- data/lib/openstudio-standards/btap/envelope.rb +4 -4
- data/lib/openstudio-standards/btap/equest.rb +2524 -2524
- data/lib/openstudio-standards/btap/fileio.rb +10 -0
- data/lib/openstudio-standards/btap/measures.rb +1515 -1515
- data/lib/openstudio-standards/btap/mpc.rb +554 -554
- data/lib/openstudio-standards/btap/reporting.rb +287 -287
- data/lib/openstudio-standards/btap/simmanager.rb +759 -759
- data/lib/openstudio-standards/btap/spaceloads.rb +439 -439
- data/lib/openstudio-standards/btap/spacetypes.rb +113 -113
- data/lib/openstudio-standards/btap/utilities.rb +134 -134
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb +8 -83
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb +3 -99
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +81 -75
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +7 -306
- data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +75 -98
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +41 -14
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +40 -14
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Pump.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +7 -5
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +1 -23
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.PumpVariableSpeed.rb +3 -3
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +93 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +17 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +5 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +24 -4
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +41 -25
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +3 -3
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +18 -0
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +13 -10
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +5 -3
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +11 -8
- data/lib/openstudio-standards/standards/Standards.Construction.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.Fan.rb +6 -6
- data/lib/openstudio-standards/standards/Standards.Model.rb +88 -66
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.Pump.rb +21 -19
- data/lib/openstudio-standards/standards/Standards.Space.rb +41 -36
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_cases.json +510 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_compressors.json +18 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_walkins.json +410 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_cases.json +510 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_compressors.json +18 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_walkins.json +410 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_cases.json +510 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_compressors.json +18 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_walkins.json +410 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_cases.json +510 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_compressors.json +18 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_walkins.json +410 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +12 -3
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +5 -3
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ZoneHVACComponent.rb +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +4 -3
- data/lib/openstudio-standards/standards/deer/deer_1985/comstock_deer_1985/data/comstock_deer_1985.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_1996/comstock_deer_1996/data/comstock_deer_1996.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2003/comstock_deer_2003/data/comstock_deer_2003.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2003/deer_2003.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2007/comstock_deer_2007/data/comstock_deer_2007.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2007/deer_2007.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2011/comstock_deer_2011/data/comstock_deer_2011.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2014/comstock_deer_2014/data/comstock_deer_2014.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2015/comstock_deer_2015/data/comstock_deer_2015.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2017/comstock_deer_2017/data/comstock_deer_2017.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2020/comstock_deer_2020/data/comstock_deer_2020.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +8 -0
- data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.ThermalZone.rb +21 -0
- data/lib/openstudio-standards/standards/deer/deer_2025/comstock_deer_2025/data/comstock_deer_2025.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2030/comstock_deer_2030/data/comstock_deer_2030.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2035/comstock_deer_2035/data/comstock_deer_2035.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2040/comstock_deer_2040/data/comstock_deer_2040.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2045/comstock_deer_2045/data/comstock_deer_2045.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2050/comstock_deer_2050/data/comstock_deer_2050.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2055/comstock_deer_2055/data/comstock_deer_2055.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2060/comstock_deer_2060/data/comstock_deer_2060.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2065/comstock_deer_2065/data/comstock_deer_2065.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2070/comstock_deer_2070/data/comstock_deer_2070.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_2075/comstock_deer_2075/data/comstock_deer_2075.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/deer/deer_pre_1975/comstock_deer_pre_1975/data/comstock_deer_pre_1975.spc_typ.json +405 -405
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +1 -1
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +3 -1
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +3 -1
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +2 -2
- data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +233 -0
- data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +180 -0
- data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +6 -1
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +839 -290
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +102 -66
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +85 -8
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartment.osm +2483 -992
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LowriseApartment.osm +4 -336
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/MidriseApartment.osm +228 -231
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +12 -18
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_type_unit_definitions.txt +76 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +6 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +111 -24
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +1 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +3 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +64 -16
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +61 -17
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +128 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +252 -23
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +316 -20
- data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +3 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +38 -0
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +16 -24
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +48 -25
- data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +3 -3
- data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +36 -19
- data/lib/openstudio-standards/standards/necb/NECB2020/data/furnaces.json +19 -4
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps.json +20 -40
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +74 -36
- data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +0 -2
- data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +123 -56
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +124 -2
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +15 -2
- data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
- data/lib/openstudio-standards/utilities/simulation.rb +1 -1
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.stat_file.rb +33 -1
- data/lib/openstudio-standards.rb +1 -0
- metadata +14 -121
- data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
- data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_ON_Kingston.AP.718200_TMYx.2004-2018.stat +0 -700
- data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_ON_Region.of.Waterloo.Intl.AP.713680_TMYx.2004-2018.stat +0 -700
- data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_ON_Sarnia-Hadfield.AP.717040_TMYx.2004-2018.stat +0 -700
- data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.ddy +0 -276
- data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_QC_Gatineau.AP.716279_TMYx.2004-2018.stat +0 -611
- data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.ddy +0 -276
- data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_QC_Granby.710367_TMYx.2004-2018.stat +0 -610
- data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_QC_Sherbrooke.AP.716100_TMYx.2004-2018.stat +0 -700
- data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.ddy +0 -2342
- data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.epw +0 -8768
- data/data/weather/CAN_QC_Trois.Rivieres.717240_TMYx.2004-2018.stat +0 -700
- data/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb +0 -81
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb +0 -69
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +0 -178
- data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb +0 -67
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb +0 -30
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb +0 -68
- data/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb +0 -68
- data/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb +0 -42
- data/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb +0 -58
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +0 -171
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb +0 -56
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb +0 -89
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb +0 -50
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -69
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb +0 -120
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb +0 -56
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb +0 -41
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb +0 -30
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb +0 -30
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +0 -68
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb +0 -61
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -57
- data/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +0 -59
- data/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb +0 -49
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb +0 -90
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +0 -83
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +0 -57
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb +0 -29
- data/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb +0 -29
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +0 -55
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +0 -55
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb +0 -38
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb +0 -42
- data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +0 -59
- data/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb +0 -59
- data/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb +0 -48
- data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +0 -16
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb +0 -88
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb +0 -88
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb +0 -104
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb +0 -27
- data/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb +0 -27
@@ -1,759 +1,759 @@
|
|
1
|
-
# *********************************************************************
|
2
|
-
# * Copyright (c) 2008-2015, Natural Resources Canada
|
3
|
-
# * All rights reserved.
|
4
|
-
# *
|
5
|
-
# * This library is free software; you can redistribute it and/or
|
6
|
-
# * modify it under the terms of the GNU Lesser General Public
|
7
|
-
# * License as published by the Free Software Foundation; either
|
8
|
-
# * version 2.1 of the License, or (at your option) any later version.
|
9
|
-
# *
|
10
|
-
# * This library is distributed in the hope that it will be useful,
|
11
|
-
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# * Lesser General Public License for more details.
|
14
|
-
# *
|
15
|
-
# * You should have received a copy of the GNU Lesser General Public
|
16
|
-
# * License along with this library; if not, write to the Free Software
|
17
|
-
# * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
-
# **********************************************************************/
|
19
|
-
|
20
|
-
#require "SecureRandom"
|
21
|
-
|
22
|
-
module BTAP
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
end
|
1
|
+
# # *********************************************************************
|
2
|
+
# # * Copyright (c) 2008-2015, Natural Resources Canada
|
3
|
+
# # * All rights reserved.
|
4
|
+
# # *
|
5
|
+
# # * This library is free software; you can redistribute it and/or
|
6
|
+
# # * modify it under the terms of the GNU Lesser General Public
|
7
|
+
# # * License as published by the Free Software Foundation; either
|
8
|
+
# # * version 2.1 of the License, or (at your option) any later version.
|
9
|
+
# # *
|
10
|
+
# # * This library is distributed in the hope that it will be useful,
|
11
|
+
# # * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# # * Lesser General Public License for more details.
|
14
|
+
# # *
|
15
|
+
# # * You should have received a copy of the GNU Lesser General Public
|
16
|
+
# # * License along with this library; if not, write to the Free Software
|
17
|
+
# # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
# # **********************************************************************/
|
19
|
+
#
|
20
|
+
# #require "SecureRandom"
|
21
|
+
#
|
22
|
+
# module BTAP
|
23
|
+
#
|
24
|
+
# module SimManager
|
25
|
+
#
|
26
|
+
# #This method will simulate all files in a folder.
|
27
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
28
|
+
# #@param folder [String] folder
|
29
|
+
# def self.simulate_all_files_in_folder(folder)
|
30
|
+
# osm_files = BTAP::FileIO::get_find_files_from_folder_by_extension(folder, ".osm")
|
31
|
+
# self.simulate_files(folder,osm_files)
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# #This method will simulate all files in a array.
|
35
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
36
|
+
# #@param folder Array[String] folder
|
37
|
+
# def self.simulate_files(folder,osm_files)
|
38
|
+
#
|
39
|
+
# co = OpenStudio::Runmanager::ConfigOptions.new()
|
40
|
+
# co.fastFindEnergyPlus()
|
41
|
+
# rm = OpenStudio::Runmanager::RunManager.new("SecureRandom.hex.db", true)
|
42
|
+
# rm.setPaused(false)
|
43
|
+
# counter = 0
|
44
|
+
#
|
45
|
+
# osm_files.each do |model_path|
|
46
|
+
# counter = counter + 1
|
47
|
+
# work_items = OpenStudio::Runmanager::WorkItemVector.new
|
48
|
+
# work_items << OpenStudio::Runmanager::WorkItem.new("ModelToIdf".to_JobType)
|
49
|
+
# work_items << OpenStudio::Runmanager::WorkItem.new("ExpandObjects".to_JobType)
|
50
|
+
# # ruby_job = OpenStudio::Runmanager::RubyJobBuilder.new(cost_injection)
|
51
|
+
# # ruby_job.setIncludeDir(OpenStudio::Path.new("#{$OpenStudio_Dir}"))
|
52
|
+
# # work_items << ruby_job.toWorkItem
|
53
|
+
# work_items << OpenStudio::Runmanager::WorkItem.new("EnergyPlus".to_JobType)
|
54
|
+
# #work_items << OpenStudio::Runmanager::WorkItem.new("ReadVars".to_JobType)
|
55
|
+
# work_items << OpenStudio::Runmanager::WorkItem.new("OpenStudioPostProcess".to_JobType)
|
56
|
+
# workflow = OpenStudio::Runmanager::Workflow.new(work_items)
|
57
|
+
# params = OpenStudio::Runmanager::JobParams.new;
|
58
|
+
# params.append("cleanoutfiles", "standard");
|
59
|
+
# workflow.add(params)
|
60
|
+
# workflow.add(co.getTools())
|
61
|
+
# rm.enqueue( workflow.create( OpenStudio::Path.new("#{folder}/#{File.basename(model_path, ".osm")}"), OpenStudio::Path.new(model_path)),false)
|
62
|
+
# # puts "#{model_path} enqueued. #{counter} of #{osm_files.size}"
|
63
|
+
# end
|
64
|
+
# #rm.showStatusDialog()
|
65
|
+
# rm.waitForFinished()
|
66
|
+
# end
|
67
|
+
#
|
68
|
+
#
|
69
|
+
#
|
70
|
+
# #This method will run the simulation. You must provide a folder where you wish
|
71
|
+
# #to run the simulation, and if not previously defined, the weather file. This will delete and recreate the folder provided to ensure that it is clean.
|
72
|
+
# #@author Phylroy A. Lopez
|
73
|
+
# #@param model [OpenStudio::model::Model] A model object
|
74
|
+
# #@param folder_name [String] a simple string of the simulation folder path, remember to escape the slashes..(i.e. // not / )
|
75
|
+
# #@param epw_path [String] a simple string of the epw file path, remember to escape the slashes..(i.e. // not / )
|
76
|
+
# #@return [OpenStudio::Model::Model] the OpenStudio model object (self reference).
|
77
|
+
# def self.run_simulation( model, folder_name,epw_path = "" )
|
78
|
+
#
|
79
|
+
# if not File.exists?(epw_path) and not File.exists?(model.getWeatherFile.path.get.to_s)
|
80
|
+
# raise ("Error: Weather file not set. Cannot run. Please set weather file using the OpenStudio::Model::WeatherFile::setWeatherFile(model,filepath) command ")
|
81
|
+
# else if epw_path != ""
|
82
|
+
# BTAP::Site::set_weather_file(model,epw_path)
|
83
|
+
# end
|
84
|
+
# #Create RunManager
|
85
|
+
# Dir::mkdir(folder_name) unless File.exists?( folder_name )
|
86
|
+
# process_manager = BTAP::SimManager::ProcessManager.new( folder_name )
|
87
|
+
# process_manager.addModel(model)
|
88
|
+
# process_manager.start_sims
|
89
|
+
# end
|
90
|
+
# return model
|
91
|
+
# end
|
92
|
+
#
|
93
|
+
#
|
94
|
+
#
|
95
|
+
# class ProcessManager
|
96
|
+
#
|
97
|
+
# attr_accessor :run_manager
|
98
|
+
# attr_accessor :workflow
|
99
|
+
# attr_accessor :model_array
|
100
|
+
# attr_accessor :results_folder
|
101
|
+
#
|
102
|
+
#
|
103
|
+
# def getPaths
|
104
|
+
# #set the Energyplus.exe path variable
|
105
|
+
# @ep_path = OpenStudio.getEnergyPlusExecutable
|
106
|
+
# #set the root folder for E+
|
107
|
+
# @ep_parent_path = OpenStudio.getEnergyPlusDirectory
|
108
|
+
#
|
109
|
+
# #find IDD path
|
110
|
+
# idd_path = @ep_parent_path.to_s + "/Energy+.idd"
|
111
|
+
#
|
112
|
+
# if (not File.exists?(idd_path))
|
113
|
+
# raise("Cannot locate the input data dictionary (IDD) in the EnergyPlus directory #{idd_path}. Correct the EXE path and try again.")
|
114
|
+
# return(false)
|
115
|
+
# end
|
116
|
+
#
|
117
|
+
# #Find the expand object exe.
|
118
|
+
# expandobjects_path = ''
|
119
|
+
# expandobjects_path = @ep_parent_path.to_s + '/ExpandObjects.exe'
|
120
|
+
# if (not File.exists?(expandobjects_path))
|
121
|
+
# UI.messagebox("Cannot locate ExpandObjects in the EnergyPlus directory. Correct the EXE path and try again.")
|
122
|
+
# end
|
123
|
+
#
|
124
|
+
# #Find the ReadVarsESO.exe
|
125
|
+
#
|
126
|
+
# @readvars_path = ""
|
127
|
+
# if (/mswin/.match(RUBY_PLATFORM) or /mingw/.match(RUBY_PLATFORM))
|
128
|
+
# @readvars_path = @ep_parent_path.to_s + "/PostProcess/ReadVarsESO.exe"
|
129
|
+
# else
|
130
|
+
# @readvars_path = @ep_parent_path.to_s + '/readvars'
|
131
|
+
# end
|
132
|
+
#
|
133
|
+
#
|
134
|
+
# if (not File.exists?(@readvars_path))
|
135
|
+
# @readvars_path = @ep_parent_path.to_s + '/readvars.exe'
|
136
|
+
# end
|
137
|
+
# if (not File.exists?(@readvars_path))
|
138
|
+
# UI.messagebox("Cannot locate ReadVarsESO in the EnergyPlus directory. Correct the EXE path and try again.")
|
139
|
+
# return(false)
|
140
|
+
# end
|
141
|
+
# end
|
142
|
+
#
|
143
|
+
# #This method finds the energyplus folder and returns the path string.
|
144
|
+
# #@author Phylroy A. Lopez
|
145
|
+
# #@return [String] a simple string of the epw file path, remember to escape the slashes..(i.e. // not / )
|
146
|
+
# def self.find_energyplus_folder()
|
147
|
+
# return OpenStudio.getEnergyPlusDirectory.to_s
|
148
|
+
# end
|
149
|
+
#
|
150
|
+
# #This method finds the eReadVarsESO.exe and returns the path string.
|
151
|
+
# #@author Phylroy A. Lopez
|
152
|
+
# #@return [String] readvars_path a simple string of the eReadVarsESO.exe file path, remember to escape the slashes..(i.e. // not / )
|
153
|
+
# def self.find_read_vars_eso()
|
154
|
+
# #Find the ReadVarsESO.exe
|
155
|
+
# readvars_path = ""
|
156
|
+
# ep_parent_path = self.find_energyplus_folder()
|
157
|
+
# if (/mswin/.match(RUBY_PLATFORM) or /mingw/.match(RUBY_PLATFORM))
|
158
|
+
# readvars_path = ep_parent_path.to_s + "/PostProcess/ReadVarsESO.exe"
|
159
|
+
# else
|
160
|
+
# readvars_path = ep_parent_path.to_s + '/readvars'
|
161
|
+
# end
|
162
|
+
# if (not File.exists?(readvars_path))
|
163
|
+
# readvars_path = ep_parent_path.to_s + '/readvars.exe'
|
164
|
+
# end
|
165
|
+
# if (not File.exists?(readvars_path))
|
166
|
+
# raise("Cannot locate ReadVarsESO in the EnergyPlus directory #{ep_parent_path}. Correct the EXE path and try again.")
|
167
|
+
# end
|
168
|
+
# return readvars_path
|
169
|
+
# end
|
170
|
+
#
|
171
|
+
# #This method initializes the Analysis Folder.
|
172
|
+
# #@author Phylroy A. Lopez
|
173
|
+
# #@param analysisFolder [String] a simple string of the Analysis Folder file path, remember to escape the slashes..(i.e. // not / )
|
174
|
+
# def initialize(analysisFolder)
|
175
|
+
#
|
176
|
+
# @model_array = Array
|
177
|
+
# #set Analysis Folder.
|
178
|
+
# @analysisFolder = analysisFolder
|
179
|
+
# #FileUtils.rm_rf(@analysisFolder)
|
180
|
+
# FileUtils.mkdir_p("#{@analysisFolder}")
|
181
|
+
# FileUtils.mkdir_p("#{@analysisFolder}/simulations") unless File.exists?("#{@analysisFolder}/simulations")
|
182
|
+
# FileUtils.mkdir_p("#{@analysisFolder}/results") unless File.exists?("#{@analysisFolder}/results")
|
183
|
+
# #create Runmanager
|
184
|
+
# runmanager_db_path = OpenStudio::Path.new(@analysisFolder + "\\runmanager.sql")
|
185
|
+
# #FileUtils.rm(runmanager_db_path.to_s) if OpenStudio::exists(runmanager_db_path)
|
186
|
+
# #OpenStudio::Runmanager::ConfigOptions::setMaxLocalJobs(6)
|
187
|
+
# @run_manager = OpenStudio::Runmanager::RunManager.new(runmanager_db_path, true)
|
188
|
+
#
|
189
|
+
#
|
190
|
+
# #create Workflow.
|
191
|
+
# @workflow = OpenStudio::Runmanager::Workflow.new();
|
192
|
+
#
|
193
|
+
# #Set up tools for workflow.
|
194
|
+
# self.getPaths
|
195
|
+
# tools = OpenStudio::Runmanager::Tools.new()
|
196
|
+
# tools.append(OpenStudio::Runmanager::ToolInfo.new("readvars", OpenStudio::Runmanager::ToolVersion.new(), OpenStudio::Path.new(@readvars_path)))
|
197
|
+
# expand = OpenStudio::Runmanager::JobFactory::createExpandObjectsJob(tools, OpenStudio::Runmanager::JobParams.new(), OpenStudio::Runmanager::Files.new())
|
198
|
+
# #readvars = OpenStudio::Runmanager::JobFactory::createReadVarsJob(tools, OpenStudio::Runmanager::JobParams.new(), OpenStudio::Runmanager::Files.new())
|
199
|
+
#
|
200
|
+
# #Create ModeltoIDF->Expand->EnergyPlus->ReadVars workflow.
|
201
|
+
# @workflow.addJob(OpenStudio::Runmanager::JobType.new("ModelToIdf"));
|
202
|
+
# @workflow.addJob( OpenStudio::Runmanager::JobType.new("ExpandObjects") )
|
203
|
+
# @workflow.addJob(OpenStudio::Runmanager::JobType.new("EnergyPlus"));
|
204
|
+
# #@workflow.addJob(OpenStudio::Runmanager::JobType.new("OpenStudioPostProcess"));
|
205
|
+
# #@workflow.addJob(OpenStudio::Runmanager::JobType.new("ReadVars"))
|
206
|
+
# @workflow.add(OpenStudio::Runmanager::ConfigOptions::makeTools(
|
207
|
+
# @ep_parent_path,
|
208
|
+
# OpenStudio::Path.new,
|
209
|
+
# OpenStudio::Path.new,
|
210
|
+
# $OpenStudio_RubyExeDir,
|
211
|
+
# OpenStudio::Path.new))
|
212
|
+
# tools.append(OpenStudio::Runmanager::ToolInfo.new("readvars", OpenStudio::Runmanager::ToolVersion.new(), OpenStudio::Path.new(@readvars_path)))
|
213
|
+
# #create Project Database
|
214
|
+
# #create the project database
|
215
|
+
# @projectPath = OpenStudio::Path.new(@analysisFolder + "\\projectdb.osp")
|
216
|
+
# FileUtils.rm(@projectPath.to_s) if OpenStudio::exists(@projectPath)
|
217
|
+
# database = OpenStudio::Project::ProjectDatabase.new(@projectPath, @run_manager)
|
218
|
+
# end
|
219
|
+
#
|
220
|
+
# #This method adds the model to the folder.
|
221
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
222
|
+
# #@param model [OpenStudio::model::Model] A model object
|
223
|
+
# #@param folder [String]
|
224
|
+
# #@return [String] self
|
225
|
+
# def addModel(model, folder = @analysisFolder )
|
226
|
+
#
|
227
|
+
# run_name = model.building.get.name.get.to_s
|
228
|
+
# working_folder = OpenStudio::Path.new(folder.to_s + "\\simulations\\" + run_name )
|
229
|
+
# osm_save_path = OpenStudio::Path.new(folder.to_s + "\\simulations\\" + run_name + "\\" + run_name + ".osm" )
|
230
|
+
# model.save(OpenStudio::Path.new(osm_save_path), true);
|
231
|
+
# @run_manager.enqueue(@workflow.create(working_folder, osm_save_path, model.getWeatherFile.path.get),true)
|
232
|
+
# return self
|
233
|
+
# end
|
234
|
+
#
|
235
|
+
# #This method simulates all files in a folder.
|
236
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
237
|
+
# #@param folder [String]
|
238
|
+
# def simulate_all_files_in_folder(folder)
|
239
|
+
# co = OpenStudio::Runmanager::ConfigOptions.new()
|
240
|
+
# co.fastFindEnergyPlus()
|
241
|
+
# @run_manager.showStatusDialog()
|
242
|
+
# @workflow = OpenStudio::Runmanager::Workflow.new("ModelToIdf->ExpandObjects->EnergyPlus")
|
243
|
+
#
|
244
|
+
# @workflow.add(co.getTools())
|
245
|
+
#
|
246
|
+
# BTAP::FileIO::get_find_files_from_folder_by_extension(folder, ".osm").each do |model_path|
|
247
|
+
# basename = File.basename(model_path, ".osm")
|
248
|
+
# proc_folder = "#{folder}/#{basename}"
|
249
|
+
# @run_manager.enqueue( @workflow.create( OpenStudio::Path.new(proc_folder), OpenStudio::Path.new(model_path)),true)
|
250
|
+
# @run_manager.setPaused(false)
|
251
|
+
# GC.start()
|
252
|
+
# end
|
253
|
+
# @run_manager.showStatusDialog()
|
254
|
+
# @run_manager.waitForFinished()
|
255
|
+
#
|
256
|
+
# end
|
257
|
+
#
|
258
|
+
#
|
259
|
+
#
|
260
|
+
# def start_sims
|
261
|
+
# unless File.exist?(@analysisFolder)
|
262
|
+
# Dir.mkdir(@analysisFolder)
|
263
|
+
# end
|
264
|
+
# @run_manager.showStatusDialog()
|
265
|
+
# @run_manager.waitForFinished()
|
266
|
+
# end
|
267
|
+
#
|
268
|
+
# class SummaryReport
|
269
|
+
# # End Uses data
|
270
|
+
# End_use_report_name = 'AnnualBuildingUtilityPerformanceSummary'
|
271
|
+
# End_use_reportForString = 'Entire Facility'
|
272
|
+
# End_use_table_name = 'End Uses'
|
273
|
+
# Fuel_types = [
|
274
|
+
# ['Electricity', 'GJ'],
|
275
|
+
# ['Natural Gas', 'GJ'],
|
276
|
+
# ['Other Fuel', 'GJ'],
|
277
|
+
# ['District Cooling', 'GJ'],
|
278
|
+
# ['District Heating', 'GJ'],
|
279
|
+
# ['Water', 'm3']]
|
280
|
+
# End_use_types = [
|
281
|
+
# 'Heating',
|
282
|
+
# 'Cooling',
|
283
|
+
# 'Interior Lighting',
|
284
|
+
# 'Exterior Lighting',
|
285
|
+
# 'Interior Equipment',
|
286
|
+
# 'Exterior Equipment',
|
287
|
+
# 'Fans',
|
288
|
+
# 'Pumps',
|
289
|
+
# 'Heat Rejection',
|
290
|
+
# 'Humidification',
|
291
|
+
# 'Heat Recovery',
|
292
|
+
# 'Water Systems',
|
293
|
+
# 'Refrigeration',
|
294
|
+
# 'Generators'
|
295
|
+
# ]
|
296
|
+
#
|
297
|
+
#
|
298
|
+
# def get_header
|
299
|
+
# end_use_header_array = ""
|
300
|
+
# #Print Header
|
301
|
+
# end_use_header = end_use_header + "OSM File,"
|
302
|
+
# end_use_header = end_use_header + "SQL File,"
|
303
|
+
# end_use_header = end_use_header + "Conditioned Building Area m2,"
|
304
|
+
# end_use_header = end_use_header + "Average Wall Conductance,"
|
305
|
+
# end_use_header = end_use_header + "Average Roof Conductance,"
|
306
|
+
# #End Uses
|
307
|
+
# End_use_types.each do |end_use|
|
308
|
+
# Fuel_types.each do |fuel_type|
|
309
|
+
# end_use_header_array = end_use_header_array + "#{end_use} #{fuel_type[0]} (#{fuel_type[1]}),"
|
310
|
+
# end
|
311
|
+
# end
|
312
|
+
# end
|
313
|
+
#
|
314
|
+
# def initialize()
|
315
|
+
# header = get_header()
|
316
|
+
#
|
317
|
+
# end
|
318
|
+
# end
|
319
|
+
#
|
320
|
+
# #This method will return an array of common annual data results. With header and unit information and returns an annual results string array.
|
321
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
322
|
+
# #@param osm_file [String]
|
323
|
+
# #@param sql_path [String]
|
324
|
+
# #@return [annual_results_array<String>]
|
325
|
+
# def self.old_get_annual_results_model_results(osm_file,sql_path)
|
326
|
+
#
|
327
|
+
# #load Osm file.
|
328
|
+
# model = BTAP::FileIO::load_osm(osm_file)
|
329
|
+
# #construct sql path.
|
330
|
+
# basename = File.basename(osm_file,".osm")
|
331
|
+
# sql_file = OpenStudio::SqlFile.new(OpenStudio::Path.new(sql_path))
|
332
|
+
#
|
333
|
+
# #link sql output
|
334
|
+
# model.setSqlFile(sql_file)
|
335
|
+
#
|
336
|
+
# current_building = model.building.get
|
337
|
+
# current_facility = model.getFacility
|
338
|
+
# weather_object = model.getWeatherFile
|
339
|
+
#
|
340
|
+
# #Create hash of results.
|
341
|
+
# annual_results_array = Array.new()
|
342
|
+
#
|
343
|
+
# if match = current_building.name.get.match(/(^.*)~(.*)~(.*)/)
|
344
|
+
# building_name, vintage_name, ecm_name = match.captures
|
345
|
+
# annual_results_array.push( [ building_name,"building_type",""])
|
346
|
+
# annual_results_array.push( [ vintage_name,"vintage_name",""])
|
347
|
+
# annual_results_array.push( [ ecm_name,"measure_id",""])
|
348
|
+
# else
|
349
|
+
# annual_results_array.push( [ current_building.name,"building_name",""])
|
350
|
+
# end
|
351
|
+
# annual_results_array.push( [ osm_file,"OSM file",""])
|
352
|
+
# annual_results_array.push( [ sql_path,"SQL file",""])
|
353
|
+
# #Weather file
|
354
|
+
# annual_results_array.push( [ weather_object.city, "City","-"])
|
355
|
+
# annual_results_array.push( [ weather_object.stateProvinceRegion, "Province","-"])
|
356
|
+
# annual_results_array.push( [ weather_object.country, "Country","-"])
|
357
|
+
# annual_results_array.push( [ weather_object.dataSource, "Data Source","-"])
|
358
|
+
# annual_results_array.push( [ weather_object.wMONumber, "wMONumber","-"])
|
359
|
+
# annual_results_array.push( [ weather_object.latitude, "Latitude","-"])
|
360
|
+
# annual_results_array.push( [ weather_object.longitude, "Longitude","-"])
|
361
|
+
#
|
362
|
+
# hdd = BTAP::Environment::WeatherFile.new( weather_object.path.get.to_s ).hdd18
|
363
|
+
# cdd = BTAP::Environment::WeatherFile.new( weather_object.path.get.to_s ).cdd18
|
364
|
+
# annual_results_array.push( [ hdd, "Heating Degree Days","deg*Day"])
|
365
|
+
# annual_results_array.push( [ cdd, "Cooling Degree Days","deg*Day"])
|
366
|
+
# annual_results_array.push( [ NECB2011.new().get_climate_zone_name(hdd), "NECB Climate Zone",""])
|
367
|
+
#
|
368
|
+
#
|
369
|
+
# annual_results_array.push( [ current_building.floorArea(),"Total Floor Area", "M2"])
|
370
|
+
# annual_results_array.push( [ current_building.conditionedFloorArea(),"Conditioned Floor Area", "M2"])
|
371
|
+
# annual_results_array.push( [ current_building.exteriorSurfaceArea,"Exterior Surface Area", "M2"])
|
372
|
+
# annual_results_array.push( [ current_building.exteriorWallArea,"Exterior Wall Area", "M2"])
|
373
|
+
# annual_results_array.push( [ current_building.airVolume,"Building Air Volume", "M3"])
|
374
|
+
# annual_results_array.push( [ current_building.numberOfPeople(),"Number of People","Persons"])
|
375
|
+
#
|
376
|
+
# annual_results_array.push( [ current_building.peoplePerFloorArea(),"Number of People per Area","Persons/M2"])
|
377
|
+
# annual_results_array.push( [ current_building.lightingPower ,"Lighting Power","W"])
|
378
|
+
# annual_results_array.push( [ current_building.lightingPowerPerFloorArea(),"Lighting Power Density","W/M2"])
|
379
|
+
# annual_results_array.push( [ current_building.lightingPowerPerPerson() ,"Lighting Power Per Person","W/Person"])
|
380
|
+
# annual_results_array.push( [ current_building.electricEquipmentPower(),"Electric Equipment Power","W"])
|
381
|
+
# annual_results_array.push( [ current_building.electricEquipmentPowerPerFloorArea(),"Electric Equipment Power per Floor Area","W/M2"])
|
382
|
+
# annual_results_array.push( [ current_building.electricEquipmentPowerPerPerson(), "Electric Equipment Power Per Person","W/person"])
|
383
|
+
# annual_results_array.push( [ current_building.gasEquipmentPower(), "Gas Equipment Power","W"])
|
384
|
+
# annual_results_array.push( [ current_building.gasEquipmentPowerPerFloorArea(),"Gas Equipment Power per Floor Area","W/M2"])
|
385
|
+
# annual_results_array.push( [ current_building.gasEquipmentPowerPerPerson(), "Gas Equipment Power Per Person","W/person"] )
|
386
|
+
# annual_results_array.push( [ model.getBuildingStorys.size, "Number of Stories", ""])
|
387
|
+
#
|
388
|
+
# annual_results_array.push( [ current_facility.totalSiteEnergy(), "Total Site Energy", "GJ"])
|
389
|
+
# annual_results_array.push( [ current_facility.netSiteEnergy(), "Net Site Energy", "GJ"])
|
390
|
+
# annual_results_array.push( [ current_facility.totalSourceEnergy(), "Total Source Energy", "GJ"])
|
391
|
+
# annual_results_array.push( [ current_facility.netSourceEnergy(), "Net Source Energy", "GJ"])
|
392
|
+
#
|
393
|
+
# annual_results_array.push( [ current_facility.hoursHeatingSetpointNotMet(),"Hours Heating Setpoint Not Met", "Hours"])
|
394
|
+
# annual_results_array.push( [ current_facility.hoursCoolingSetpointNotMet(),"Hours Cooling Setpoint Not Met", "Hours"])
|
395
|
+
#
|
396
|
+
# #cost information
|
397
|
+
# # annual_results_array.push( [ current_facility.annualTotalCost(OpenStudio::FuelType.new("NaturalGas")), "Annual Natural Gas Total Cost", "$"])
|
398
|
+
# # annual_results_array.push( [ current_facility.annualTotalCostPerBldgArea(OpenStudio::FuelType.new("NaturalGas")),"Annual Natural Gas Total Cost per Bldg Area", "$/M2"])
|
399
|
+
# # annual_results_array.push( [ current_facility.annualTotalCostPerNetConditionedBldgArea(OpenStudio::FuelType.new("NaturalGas")), "Annual Natural Gas Total Cost per Conditioned Bldg Area", "$/M2"])
|
400
|
+
# # annual_results_array.push( [ current_facility.annualTotalUtilityCost(), "Annual Total Utility Cost", "$"])
|
401
|
+
# # annual_results_array.push( [ current_facility.annualElectricTotalCost() , "Annual Total Electric Utility Cost", "$"])
|
402
|
+
# # annual_results_array.push( [ current_facility.annualGasTotalCost(), "Annual Total Gas Utility Cost", "$"])
|
403
|
+
# # annual_results_array.push( [ current_facility.annualDistrictCoolingTotalCost(), "Annual Total District Cooling Utility Cost", "$"])
|
404
|
+
# # annual_results_array.push( [ current_facility.annualDistrictHeatingTotalCost(), "Annual Total District Heating Utility Cost", "$"])
|
405
|
+
# # annual_results_array.push( [ current_facility.annualWaterTotalCost(), "Annual Total Water Cost", "$"])
|
406
|
+
# # annual_results_array.push( [ current_facility.totalEnergyTimeDependentValuation(), "Annual Total Water Cost", "$"])
|
407
|
+
# # annual_results_array.push( [ current_facility.totalCostTimeDependentValuation(), "Annual Total Water Cost", "$"])
|
408
|
+
# # annual_results_array.push( [ current_facility.electricityEnergyTimeDependentValuation(), "electricityEnergyTimeDependentValuation", "J"])
|
409
|
+
# # annual_results_array.push( [ current_facility.electricityCostTimeDependentValuation(), "electricityCostTimeDependentValuation", "$"])
|
410
|
+
# # annual_results_array.push( [ current_facility.fossilFuelEnergyTimeDependentValuation(),"fossilFuelEnergyTimeDependentValuation", "J"])
|
411
|
+
# # annual_results_array.push( [ current_facility.fossilFuelCostTimeDependentValuation(), "fossilFuelCostTimeDependentValuation", "$"])
|
412
|
+
# # annual_results_array.push( [ current_facility.economicsCapitalCost(), "economics Capitol Costs", "$"])
|
413
|
+
# # annual_results_array.push( [ current_facility.economicsEnergyCost(), "economics Energy Costs", "$"])
|
414
|
+
# # annual_results_array.push( [ current_facility.economicsTLCC(), "economics Total Life Cycle Costs", "$"])
|
415
|
+
#
|
416
|
+
#
|
417
|
+
# value = model.sqlFile().get().execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='Life-Cycle Cost Report' AND ReportForString='Entire Facility' AND TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'")
|
418
|
+
#
|
419
|
+
# if value.empty?
|
420
|
+
# value = 0.0
|
421
|
+
# else
|
422
|
+
# value = value.get
|
423
|
+
# end
|
424
|
+
# annual_results_array.push( [ value, "Total Capitol Costs", "$"])
|
425
|
+
#
|
426
|
+
#
|
427
|
+
#
|
428
|
+
#
|
429
|
+
# # annual_results_array.push( [ current_facility.economicsVirtualRateGas(), "economics Virtual Rate Gas", "$/GJ"])
|
430
|
+
# # annual_results_array.push( [ current_facility.economicsVirtualRateElec(), "economics Virtual Rate Electric", "$/GJ"])
|
431
|
+
# # annual_results_array.push( [ current_facility.economicsVirtualRateCombined(), "economics Virtual Rate Combined", "$/GJ"])
|
432
|
+
# # annual_results_array.push( [ current_facility.economicsSPB(), "economics Simple Pay Back", "Years"])
|
433
|
+
# # annual_results_array.push( [ current_facility.economicsDPB(), "economics Discounted Payback", "Years"])
|
434
|
+
# # annual_results_array.push( [ current_facility.economicsNPV(), "economics Net Present Value", "$"])
|
435
|
+
# # annual_results_array.push( [ current_facility.economicsIRR(), "economics Internal Rate of Return", "%"])
|
436
|
+
#
|
437
|
+
# # annual_results_array.each {|result| puts "#{result[0]}, #{result[1]}, #{result[2]}, #{basename}" }
|
438
|
+
# #Determine weighted area average conductances
|
439
|
+
# outdoor_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(model.getSurfaces(), "Outdoors")
|
440
|
+
# outdoor_walls = BTAP::Geometry::Surfaces::filter_by_surface_types(outdoor_surfaces, "Wall")
|
441
|
+
# outdoor_roofs = BTAP::Geometry::Surfaces::filter_by_surface_types(outdoor_surfaces, "RoofCeiling")
|
442
|
+
# outdoor_floors = BTAP::Geometry::Surfaces::filter_by_surface_types(outdoor_surfaces, "Floor")
|
443
|
+
# outdoor_subsurfaces = BTAP::Geometry::Surfaces::get_subsurfaces_from_surfaces(outdoor_surfaces)
|
444
|
+
# windows = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(outdoor_subsurfaces, ["FixedWindow" , "OperableWindow" ])
|
445
|
+
# skylights = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(outdoor_subsurfaces, ["Skylight", "TubularDaylightDiffuser","TubularDaylightDome" ])
|
446
|
+
# doors = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(outdoor_subsurfaces, ["Door" , "GlassDoor" ])
|
447
|
+
# overhead_doors = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(outdoor_subsurfaces, ["OverheadDoor" ])
|
448
|
+
# outdoor_walls_average_conductance = BTAP::Geometry::Surfaces::get_weighted_average_surface_conductance(outdoor_walls)
|
449
|
+
# outdoor_roofs_average_conductance = BTAP::Geometry::Surfaces::get_weighted_average_surface_conductance(outdoor_roofs)
|
450
|
+
# outdoor_floors_average_conductance = BTAP::Geometry::Surfaces::get_weighted_average_surface_conductance(outdoor_floors)
|
451
|
+
# windows_average_conductance = BTAP::Geometry::Surfaces::get_weighted_average_surface_conductance(windows)
|
452
|
+
# skylights_average_conductance = BTAP::Geometry::Surfaces::get_weighted_average_surface_conductance(skylights)
|
453
|
+
# doors_average_conductance = BTAP::Geometry::Surfaces::get_weighted_average_surface_conductance(doors)
|
454
|
+
# overhead_doors_average_conductance = BTAP::Geometry::Surfaces::get_weighted_average_surface_conductance(overhead_doors)
|
455
|
+
# #Store Values
|
456
|
+
# annual_results_array.push( [ outdoor_walls_average_conductance ,"outdoor_walls_average_conductance", "?"])
|
457
|
+
# annual_results_array.push( [ outdoor_roofs_average_conductance ,"outdoor_roofs_average_conductance", "?"])
|
458
|
+
# annual_results_array.push( [ outdoor_floors_average_conductance ,"outdoor_floors_average_conductance", "?"])
|
459
|
+
# annual_results_array.push( [ windows_average_conductance ,"outdoor_windows_average_conductance", "?"])
|
460
|
+
# annual_results_array.push( [ doors_average_conductance ,"outdoor_doors_average_conductance", "?"])
|
461
|
+
# annual_results_array.push( [ overhead_doors_average_conductance ,"outdoor_overhead_doors_average_conductance", "?"])
|
462
|
+
# annual_results_array.push( [ skylights_average_conductance ,"skylights_average_conductance", "?"])
|
463
|
+
# annual_results_array.push( [ BTAP::Geometry::get_fwdr(model), "Fenestration To Wall Ratio", "-"])
|
464
|
+
# annual_results_array.push( [ BTAP::Geometry::get_srr(model), "Skylight to Roof Ratio", "-"])
|
465
|
+
#
|
466
|
+
# #Get peak watts for gas and elec
|
467
|
+
# electric_peak = model.sqlFile().get().execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='EnergyMeters'" +
|
468
|
+
# " AND ReportForString='Entire Facility' AND TableName='Annual and Peak Values - Electricity' AND RowName='Electricity:Facility'" +
|
469
|
+
# " AND ColumnName='Electricity Maximum Value' AND Units='W'")
|
470
|
+
# if electric_peak.empty?
|
471
|
+
# electric_peak = 0.0
|
472
|
+
# end
|
473
|
+
#
|
474
|
+
# natural_gas_peak = model.sqlFile().get().execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='EnergyMeters'" +
|
475
|
+
# " AND ReportForString='Entire Facility' AND TableName='Annual and Peak Values - Natural Gas' AND RowName='NaturalGas:Facility'" +
|
476
|
+
# " AND ColumnName='Natural Gas Maximum Value' AND Units='W'")
|
477
|
+
# if natural_gas_peak.empty?
|
478
|
+
# natural_gas_peak = 0.0
|
479
|
+
# end
|
480
|
+
#
|
481
|
+
# annual_results_array.push( [ electric_peak ,"Peak Electricity", "W"])
|
482
|
+
# annual_results_array.push( [ natural_gas_peak ,"Peak Gas", "W"])
|
483
|
+
#
|
484
|
+
# #Get End Uses by fuel type.
|
485
|
+
# fuel_types = [
|
486
|
+
# ['Electricity', 'GJ'],
|
487
|
+
# ['Natural Gas', 'GJ'],
|
488
|
+
# ['Other Fuel', 'GJ'],
|
489
|
+
# ['District Cooling', 'GJ'],
|
490
|
+
# ['District Heating', 'GJ'],
|
491
|
+
# ['Water', 'm3']]
|
492
|
+
# use_types = [
|
493
|
+
# 'Heating',
|
494
|
+
# 'Cooling',
|
495
|
+
# 'Interior Lighting',
|
496
|
+
# 'Exterior Lighting',
|
497
|
+
# 'Interior Equipment',
|
498
|
+
# 'Exterior Equipment',
|
499
|
+
# 'Fans',
|
500
|
+
# 'Pumps',
|
501
|
+
# 'Heat Rejection',
|
502
|
+
# 'Humidification',
|
503
|
+
# 'Heat Recovery',
|
504
|
+
# 'Water Systems',
|
505
|
+
# 'Refrigeration',
|
506
|
+
# 'Generators'
|
507
|
+
# ]
|
508
|
+
# use_types.each do |use_type|
|
509
|
+
# fuel_types.each do |fuel_type|
|
510
|
+
# fuel_name = fuel_type[0]
|
511
|
+
# fuel_units = fuel_type[1]
|
512
|
+
# value = model.sqlFile().get().execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'")
|
513
|
+
# if value.empty?
|
514
|
+
# value = 0.0
|
515
|
+
# else
|
516
|
+
# value = value.get
|
517
|
+
# end
|
518
|
+
# annual_results_array.push( [ value, "#{fuel_name}-#{use_type}", fuel_units])
|
519
|
+
# annual_results_array.push( [ value / current_building.floorArea() , "#{fuel_name}-#{use_type} Total Floor Area Intensity", "#{fuel_units}/m2"] )
|
520
|
+
# end
|
521
|
+
# end
|
522
|
+
# return annual_results_array
|
523
|
+
# end
|
524
|
+
#
|
525
|
+
# #This method will return an array of common annual data results. With header and unit information and returns an annual results string array.
|
526
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
527
|
+
# #@param osm_file [String]
|
528
|
+
# #@param sql_path [String]
|
529
|
+
# #@return [annual_results_array<String>]
|
530
|
+
# def self.get_annual_results_model_results(osm_file,sql_path)
|
531
|
+
#
|
532
|
+
# #load Osm file.
|
533
|
+
# model = BTAP::FileIO::load_osm(osm_file)
|
534
|
+
# #link sql output
|
535
|
+
# model.setSqlFile(OpenStudio::SqlFile.new(OpenStudio::Path.new(sql_path)))
|
536
|
+
#
|
537
|
+
# #Create hash of results.
|
538
|
+
# annual_results_array = Array.new()
|
539
|
+
# annual_results_array.push( [ osm_file,"osm_file",""])
|
540
|
+
# annual_results_array.push( [ sql_path,"sql_path",""])
|
541
|
+
# if match = model.building.get.name.get.match(/(^.*)~(.*)~(.*)/)
|
542
|
+
# building_name, vintage_name, ecm_name = match.captures
|
543
|
+
# annual_results_array.push( [ building_name,"building_name",""])
|
544
|
+
# annual_results_array.push( [ vintage_name,"vintage_name",""])
|
545
|
+
# annual_results_array.push( [ ecm_name,"measure_id",""])
|
546
|
+
# else
|
547
|
+
# annual_results_array.push( [ model.building.get.name,"building_name",""])
|
548
|
+
# end
|
549
|
+
#
|
550
|
+
# #Capitol Costs
|
551
|
+
# value = model.sqlFile().get().execAndReturnFirstDouble("SELECT Value FROM tabulardatawithstrings WHERE ReportName='Life-Cycle Cost Report' AND ReportForString='Entire Facility' AND TableName='Present Value by Category' AND RowName='Grand Total' AND ColumnName='Present Value'")
|
552
|
+
# if value.empty?
|
553
|
+
# value = 0.0
|
554
|
+
# else
|
555
|
+
# value = value.get
|
556
|
+
# end
|
557
|
+
# annual_results_array.push( [ value, "Simulation Total Capitol Costs", "$"])
|
558
|
+
#
|
559
|
+
#
|
560
|
+
# #Total floor Areas
|
561
|
+
# annual_results_array.push( [ model.building.get.floorArea(),"Total Floor Area", "M2"])
|
562
|
+
# #Conditioned floor area
|
563
|
+
# annual_results_array.push( [ model.building.get.conditionedFloorArea(),"Conditioned Floor Area", "M2"])
|
564
|
+
#
|
565
|
+
#
|
566
|
+
# #District Heating
|
567
|
+
# fuel_name,use_type,fuel_units = "District Heating","Heating", 'GJ'
|
568
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
569
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
570
|
+
#
|
571
|
+
# #District Cooling
|
572
|
+
# fuel_name,use_type,fuel_units = "District Cooling","Cooling", 'GJ'
|
573
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
574
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
575
|
+
#
|
576
|
+
#
|
577
|
+
# #Electrical Heating
|
578
|
+
# fuel_name,use_type,fuel_units = "Electricity","Heating", 'GJ'
|
579
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
580
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
581
|
+
#
|
582
|
+
# #Natural Gas Heating
|
583
|
+
# fuel_name,use_type,fuel_units = "Natural Gas","Heating", 'GJ'
|
584
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
585
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
586
|
+
#
|
587
|
+
# #Electric Cooling
|
588
|
+
# fuel_name,use_type,fuel_units = "Electricity","Cooling", 'GJ'
|
589
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
590
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
591
|
+
#
|
592
|
+
# #Electric Water systems
|
593
|
+
# fuel_name,use_type,fuel_units = "Electricity","Water Systems", 'GJ'
|
594
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
595
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
596
|
+
#
|
597
|
+
# #NG Water systems
|
598
|
+
# fuel_name,use_type,fuel_units = "Natural Gas","Water Systems", 'GJ'
|
599
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
600
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
601
|
+
#
|
602
|
+
# fuel_name,use_type,fuel_units = "Electricity","Interior Lighting", 'GJ'
|
603
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
604
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
605
|
+
#
|
606
|
+
# fuel_name,use_type,fuel_units = "Electricity","Interior Equipment", 'GJ'
|
607
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
608
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
609
|
+
#
|
610
|
+
# fuel_name,use_type,fuel_units = "District Heating","Interior Equipment", 'GJ'
|
611
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
612
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
613
|
+
#
|
614
|
+
#
|
615
|
+
# fuel_name,use_type,fuel_units = "Electricity","Fans", 'GJ'
|
616
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
617
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
618
|
+
#
|
619
|
+
# fuel_name,use_type,fuel_units = "Electricity","Pumps", 'GJ'
|
620
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
621
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
622
|
+
#
|
623
|
+
# fuel_name,use_type,fuel_units = "Electricity","Heat Recovery", 'GJ'
|
624
|
+
# sql_query = "SELECT Value FROM tabulardatawithstrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='End Uses' AND RowName='#{use_type}' AND ColumnName='#{fuel_name}' AND Units='#{fuel_units}'"
|
625
|
+
# annual_results_array.push( [ model.sqlFile().get().execAndReturnFirstDouble(sql_query).get ? model.sqlFile().get().execAndReturnFirstDouble(sql_query).get * 277.778 : 0.0, "#{fuel_name}-#{use_type}", "KWh"])
|
626
|
+
#
|
627
|
+
#
|
628
|
+
# return annual_results_array
|
629
|
+
# end
|
630
|
+
#
|
631
|
+
# #This method will convert eso to cvs.
|
632
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
633
|
+
# #@param eso_file_path [String]
|
634
|
+
# def self.convert_eso_to_csv(eso_file_path)
|
635
|
+
# #Run ESO Vars command must be run in folder.
|
636
|
+
# root_folder = Dir.getwd()
|
637
|
+
# # puts File.dirname(eso_file_path)
|
638
|
+
# Dir.chdir(File.dirname(eso_file_path))
|
639
|
+
# system(self.find_read_vars_eso())
|
640
|
+
# #get name of run from html file. This is faster than loading OSM file.
|
641
|
+
# runname = ""
|
642
|
+
# f = File.open("eplustbl.htm")
|
643
|
+
# f.each_line do |line|
|
644
|
+
# if line =~ /<p>Building: <b>(.*)<\/b><\/p>/
|
645
|
+
# runname = $1
|
646
|
+
# break
|
647
|
+
# end
|
648
|
+
# end
|
649
|
+
# f.close
|
650
|
+
# #copy files over with distinct names
|
651
|
+
# FileUtils.cp("eplusout.csv","#{runname}_eplusout.csv")
|
652
|
+
# FileUtils.cp("eplustbl.htm","#{runname}_eplustbl.htm")
|
653
|
+
# FileUtils.cp("eplusout.sql","#{runname}_eplusout.sql")
|
654
|
+
# Dir.chdir(root_folder)
|
655
|
+
# end
|
656
|
+
#
|
657
|
+
# #This method will copy results to a folder.
|
658
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
659
|
+
# #@param in_folder [String]
|
660
|
+
# #@param out_folder [String]
|
661
|
+
# def copy_results_to_folder(in_folder,out_folder)
|
662
|
+
# #find all csv hourly output
|
663
|
+
# BTAP::FILEIO::get_find_files_from_folder_by_extension(in_folder, "_eplusout.csv").each {|file| FileUtils.cp(file,out_folder)}
|
664
|
+
# BTAP::FILEIO::get_find_files_from_folder_by_extension(in_folder, "_eplustbl.htm").each {|file| FileUtils.cp(file,out_folder)}
|
665
|
+
# BTAP::FILEIO::get_find_files_from_folder_by_extension(in_folder, "_eplusout.sql").each {|file| FileUtils.cp(file,out_folder)}
|
666
|
+
#
|
667
|
+
# end
|
668
|
+
#
|
669
|
+
#
|
670
|
+
# #This method copies report files to a single folder for convenience.
|
671
|
+
# #@author phylroy.lopez@nrcan.gc.ca
|
672
|
+
# #@param run_name [String]
|
673
|
+
# #@return [OpenStudio::model::Model] A model object
|
674
|
+
# def processResults(run_name)
|
675
|
+
# #make sql folder
|
676
|
+
# Dir.mkdir(@outdir.to_s+"\\sqlresults") unless File.exists?(@outdir.to_s+"\\sqlresults")
|
677
|
+
# #make html folder
|
678
|
+
# Dir.mkdir(@outdir.to_s+"\\htmlresults") unless File.exists?(@outdir.to_s+"\\htmlresults")
|
679
|
+
# #puts "processing results for " + run_name
|
680
|
+
#
|
681
|
+
# #load sql file
|
682
|
+
# # see if we can find sql file
|
683
|
+
# sql_path = OpenStudio::Path.new(@outdir.to_s+"\\" + run_name + "_osm\\ModelToIdf\\ExpandObjects-0\\EnergyPlus-0\\eplusout.sql")
|
684
|
+
# html_path = OpenStudio::Path.new(@outdir.to_s+"\\" + run_name + "_osm\\ModelToIdf\\ExpandObjects-0\\EnergyPlus-0\\eplustbl.htm")
|
685
|
+
# FileUtils.cp(sql_path.to_s,@outdir.to_s+"/sqlresults/" + run_name + ".sql")
|
686
|
+
# FileUtils.cp(html_path.to_s,@outdir.to_s+"/htmlresults/" + run_name + ".htm")
|
687
|
+
#
|
688
|
+
# #load osm file to attach sql file
|
689
|
+
# model_path = OpenStudio::Path.new(@outdir.to_s+"\\"+ run_name + ".osm")
|
690
|
+
# if OpenStudio::exists(model_path)
|
691
|
+
# model = BTAP::FileIO::load_osm(model_path)
|
692
|
+
# end
|
693
|
+
#
|
694
|
+
#
|
695
|
+
# #attach sql file
|
696
|
+
# if OpenStudio::exists(sql_path)
|
697
|
+
# # translate the results and load them into the model
|
698
|
+
# sqlFile = OpenStudio::SqlFile.new(sql_path)
|
699
|
+
# model.setSqlFile(sqlFile)
|
700
|
+
# else
|
701
|
+
# #puts "could not load sql file" + sql_path
|
702
|
+
# end
|
703
|
+
#
|
704
|
+
#
|
705
|
+
# #construct path to E+ run.
|
706
|
+
# ep_project_folder = @outdir.to_s+"\\" + run_name + "_osm\\ModelToIdf\\ExpandObjects-0\\EnergyPlus-0\\"
|
707
|
+
# eso_file = ep_project_folder + "\\eplusout.eso"
|
708
|
+
# #create csv folder at top of folder hieracrhy.
|
709
|
+
# cvs_results_folder = @outdir.to_s+"/csvresults/"
|
710
|
+
# Dir.mkdir(cvs_results_folder) unless File.exists?(cvs_results_folder)
|
711
|
+
# #create path to e+ csv file and copy it to folder.
|
712
|
+
#
|
713
|
+
#
|
714
|
+
# #Run ESO Vars command must be run in folder.
|
715
|
+
# root_folder = Dir.getwd()
|
716
|
+
# Dir.chdir(ep_project_folder)
|
717
|
+
# system(@readvars_path)
|
718
|
+
# csv_file = ep_project_folder + "\\eplusout.csv"
|
719
|
+
# FileUtils.cp(csv_file, cvs_results_folder + run_name + ".csv")
|
720
|
+
# Dir.chdir(root_folder)
|
721
|
+
# return model
|
722
|
+
# end
|
723
|
+
#
|
724
|
+
# #This method will fix underheated hours
|
725
|
+
# #@author Phylroy A. Lopez
|
726
|
+
# #@param model [OpenStudio::model::Model] A model object
|
727
|
+
# #@param folder_name [String] a simple string of the simulation folder path, remember to escape the slashes..(i.e. // not / )
|
728
|
+
# #@param epw_path [String] a simple string of the epw file path, remember to escape the slashes..(i.e. // not / )
|
729
|
+
# def fix_underheated_hours(model,epw_path,folder_name = "c:/temp/")
|
730
|
+
#
|
731
|
+
# #Run model.
|
732
|
+
# BTAP::SimManager::run_simulation(model, folder_name, epw_path)
|
733
|
+
#
|
734
|
+
# #Look at hours unmet per zone table in eplusout.htm file
|
735
|
+
# #Make sure that the zone with the problem is not a slave zone on a single-zone VAV system.
|
736
|
+
# #Check your thermostat setpoint schedules for this zone to make sure values are reasonable
|
737
|
+
# #Check that design days are for the same location as the weather file
|
738
|
+
# #Open the .osm in a text editor to look at this.
|
739
|
+
# #Check the tolerance for reporting unmet hours
|
740
|
+
# #Try 2F and re-run. If tolerance is too tight, you can get false alarms.
|
741
|
+
# #Check design/sizing temperature for each plant loop.
|
742
|
+
# #This is found by clicking the dashed line in the center of a plant loop.
|
743
|
+
# #Check the operational temperature in the plant loop's setpoint manager.
|
744
|
+
# #It should match up with the design/sizing temperature for that loop.
|
745
|
+
# #If you size the loop for 180F water but tell it to operate at 150F, the equipment won't be big enough during peak times.
|
746
|
+
# #Check design/sizing heating and cooling supply air temperatures for air loop.
|
747
|
+
# #This is found by clicking the dashed line in the center of the air loop.
|
748
|
+
# #Check the operational temperature in the air loop's setpoint manager.
|
749
|
+
# #It should match up with the design/sizing temperature for that loop.
|
750
|
+
# #If you size the loop for 55F supply air but tell it to operate at 60F, the equipment might not be big enough during peak times.
|
751
|
+
# #Check that sizing design day thermostat is using a constant setpoint schedule with no setback.
|
752
|
+
# #This is a 90.1 requirement. If your design day has a setback, your system will be oversized in an attempt to be able to go from setback to setup in a single timestep.
|
753
|
+
# #Equipment that is significantly oversized might not operate properly at low load conditions.
|
754
|
+
# end
|
755
|
+
#
|
756
|
+
# end
|
757
|
+
#
|
758
|
+
# end
|
759
|
+
# end
|