diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/.modelkit-config b/residential measures/SWHC049-08 SEER Rated AC HP/.modelkit-config new file mode 100644 index 000000000..4cc1e8867 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/.modelkit-config @@ -0,0 +1,24 @@ + +# Paths are expanded relative to this modelkit-config file. + +prototypes-dir = '../../prototypes/residential' +templates-dir = '../../templates/energyplus/templates' +weather-dir = '../../weather' +codes-dir = '../../codes' + +max-workers = 12 # Maximum number of simulations to run in parallel + + +[template-compose] +annotate = true +indent = " " +esc-line = "! " +dirs = '~\Documents\Modelkit Caboodle\templates\energyplus\templates' # Must be an absolute path + +[energyplus-run] +engine = 'C:\EnergyPlusV9-5-0' # Must be an absolute path +#engine = '/Applications/EnergyPlus-22-2-0' # Must be an absolute path +#engine = '/Applications/EnergyPlus-9-2-0' # Must be an absolute path +readvars = true +keep = false +output-files = "eplusout.err; eplusout.sql; eplustbl.htm; eplusvar.csv" diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/DEER_EnergyPlus_Modelkit_Measure_list_working_SWHC049-08.xlsx b/residential measures/SWHC049-08 SEER Rated AC HP/DEER_EnergyPlus_Modelkit_Measure_list_working_SWHC049-08.xlsx new file mode 100644 index 000000000..eef5be61d Binary files /dev/null and b/residential measures/SWHC049-08 SEER Rated AC HP/DEER_EnergyPlus_Modelkit_Measure_list_working_SWHC049-08.xlsx differ diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/README.md b/residential measures/SWHC049-08 SEER Rated AC HP/README.md new file mode 100644 index 000000000..375e9aca4 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/README.md @@ -0,0 +1,63 @@ +# SWHC049 Ducted AC and HP HVAC Equipment, Residential + +## Cohorts and case names + +SWHC045 shares some measure case models with SWHC049 but does not have its own subfolder. +Tables below show the origin of TechIDs present in this folder. + +BldgType-BldgVint | Cohort | Prototype root | Introduced +--- | --- | --- | --- +DMo | DMo&0&rDXGF&Ex&dxAC_equip | DMo/templates/root.pxt | By DNV for SWHC049 (Dv24) +DMo | DMo&0&rDXHP&Ex&dxHP_equip | DMo-HP/templates/root.pxt | By DNV for SWHC049 (Dv24) +DMo | DMo&0&rDXGF&New&dxAC_equip | DMo-DXGF-New/templates/root.pxt | By DNV for SWHC049 (Dv24) +DMo | DMo&0&rDXHP&New&dxHP_equip | DMo-HP-New/templates/root.pxt | By DNV for SWHC049 (Dv24) +MFm_Ex | MFm&0&rDXGF&Ex&dxAC_equip | MFm-1985/templates/root_highSEER.pxt | By DNV for SWHC049 (Dv24) +MFm_Ex | MFm&0&rDXHP&Ex&dxHP_equip | MFm-1985-HP/templates/root.pxt | By DNV for SWHC049 (Dv24) +MFm_New | MFm&0&rDXGF&New&dxAC_equip | MFm-New/templates/root_highSEER.pxt | By DNV for SWHC049 (Dv24) +MFm_New | MFm&0&rDXHP&New&dxHP_equip | MFm-New-HP/templates/root_highSEER.pxt | By DNV for SWHC049 (Dv24) +SFm 1975 | SFm&1&rDXHP&Ex&dxHP_equip | SFm-1 Story-1975-HP/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm 1975 | SFm&2&rDXHP&Ex&dxHP_equip | SFm-2 Story-1975-HP/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm 1975 | SFm&1&rDXGF&Ex&dxAC_equip | SFm-1 Story-1975/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm 1975 | SFm&2&rDXGF&Ex&dxAC_equip | SFm-2 Story-1975/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm 1985 | SFm&1&rDXHP&Ex&dxHP_equip | SFm-1 Story-1985-HP/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm 1985 | SFm&2&rDXHP&Ex&dxHP_equip | SFm-2 Story-1985-HP/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm 1985 | SFm&1&rDXGF&Ex&dxAC_equip | SFm-1 Story-1985/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm 1985 | SFm&2&rDXGF&Ex&dxAC_equip | SFm-2 Story-1985/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm New | SFm&1&rDXGF&New&dxAC_equip | SFm-1 Story-New/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm New | SFm&2&rDXGF&New&dxAC_equip | SFm-2 Story-New/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm New | SFm&1&rDXHP&New&dxHP_equip | SFm-1 Story-New-HP/templates/root.pxt | By DNV for SWHC049 (Dv24) +SFm New | SFm&2&rDXHP&New&dxHP_equip | SFm-2 Story-New-HP/templates/root.pxt | By DNV for SWHC049 (Dv24) + +Representative Cohort | Case | Applicable building types | Applicable vintages | Used in measure | Comments +--- | --- | --- | --- | --- | --- +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-13.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-14.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-14.5 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-15.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-16.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-17.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-18.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-19.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-20.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | dxAC-Res-SEER-21.0 | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXGF&Ex&dxAC_equip | Res-GasFurnace-AFUE80-ECM | DMo, SFm, MFm | Ex | SWHC045 | Added by Solaris Technical for SWHC045 +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_7p0_SEER_13_Pre | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_8p0_SEER_14_Std | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_8p2_SEER_14.5_Std | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_8p8_SEER_15_Std | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_9p0_SEER_16_Msr | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_9p4_SEER_17_Msr | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_9p5_SEER_18_Msr | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_9p5_SEER_19_Msr | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_10p0_SEER_20_Msr | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | HSPF_10p5_SEER_21_Msr | DMo, SFm, MFm | Ex, New | SWHC049 | Base case for SWHC049. Added by DNV. +DMo&0&rDXHP&Ex&dxHP_equip | Res-GasFurnace-AFUE80-ECM | DMo, SFm, MFm | Ex | SWHC045 | Added by Solaris Technical for SWHC045 + +## Query file for normalizing units + +The file `query_swhc049.txt` includes queries for cooling and heating capacity for the models generated in this folder. After running simulations, the user may gather outputs using the following command: + +``` +cd "residential measures/SWHC049-08 SEER Rated AC HP" +python result2.py -q query_swhc049.txt +``` diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXGF&Ex&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXGF&Ex&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXGF&Ex&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXGF&New&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXGF&New&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXGF&New&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXHP&Ex&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXHP&Ex&dxHP_equip.csv new file mode 100644 index 000000000..2e046a4d1 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXHP&Ex&dxHP_equip.csv @@ -0,0 +1,11 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_7p0_SEER_13_Pre,,0.12,0.24,3.23,,,unitary_system,2.05 +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXHP&New&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXHP&New&dxHP_equip.csv new file mode 100644 index 000000000..fe7340439 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cases/DMo&0&rDXHP&New&dxHP_equip.csv @@ -0,0 +1,10 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/climates.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/climates.csv new file mode 100644 index 000000000..3ed717387 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/climates.csv @@ -0,0 +1,17 @@ +skip,climate,hz_cz,weather_file,climate_zone,codes_file +,CZ01,,CA_EUREKA_725940S_CZ2022.epw,1,deer-dmo-1972-1985.csv +,CZ02,,CA_NAPA-CO_724955S_CZ2022.epw,2,deer-dmo-1972-1985.csv +,CZ03,,CA_OAKLAND-METRO-AP_724930S_CZ2022.epw,3,deer-dmo-1972-1985.csv +,CZ04,,CA_SAN-JOSE-IAP_724945S_CZ2022.epw,4,deer-dmo-1972-1985.csv +,CZ05,,CA_SANTA-MARIA-PUBLIC-AP_723940S_CZ2022.epw,5,deer-dmo-1972-1985.csv +,CZ06,,CA_LOS-ANGELES-IAP_722950S_CZ2022.epw,6,deer-dmo-1972-1985.csv +,CZ07,,CA_SAN-DIEGO-LINDBERGH-FLD_722900S_CZ2022.epw,7,deer-dmo-1972-1985.csv +,CZ08,,CA_LONG-BEACH-DAUGHERTY-FLD_722970S_CZ2022.epw,8,deer-dmo-1972-1985.csv +,CZ09,,CA_LOS-ANGELES-DOWNTOWN-USC_722874S_CZ2022.epw,9,deer-dmo-1972-1985.csv +,CZ10,,CA_RIVERSIDE-MUNI_722869S_CZ2022.epw,10,deer-dmo-1972-1985.csv +,CZ11,,CA_RED-BLUFF-MUNI-AP_725910S_CZ2022.epw,11,deer-dmo-1972-1985.csv +,CZ12,,CA_STOCKTON-METRO-AP_724920S_CZ2022.epw,12,deer-dmo-1972-1985.csv +,CZ13,,CA_FRESNO-YOSEMITE-IAP_723890S_CZ2022.epw,13,deer-dmo-1972-1985.csv +,CZ14,,CA_DAGGETT-BARSTOW-AP_723815S_CZ2022.epw,14,deer-dmo-1972-1985.csv +,CZ15,,CA_EL-CENTRO-NAF_722810S_CZ2022.epw,15,deer-dmo-1972-1985.csv +,CZ16,,CA_BISHOP-AP_724800S_CZ2022.epw,16,deer-dmo-1972-1985.csv diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cohorts.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cohorts.csv new file mode 100644 index 000000000..4483d33e1 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/cohorts.csv @@ -0,0 +1,5 @@ +skip,cohort,root,:wall_consol_layer_thickness,:wall_consol_layer_conductivity,:floor_consol_layer_thickness,:floor_consol_layer_conductivity,:ceil_consol_layer_thickness,:ceil_consol_layer_conductivity,:door_thermal_resistance,:climate_zone,:infiltration_ACH,:shading_control,:cool_coil_capacity,:heating_coil_capacity +,DMo&0&rDXGF&Ex&dxAC_equip,DMo/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""floor_consol_layer_thickness"", ""Value"")['m']",,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""door_thermal_resistance"", ""R-Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")",, +,DMo&0&rDXHP&Ex&dxHP_equip,Dmo-HP/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""floor_consol_layer_thickness"", ""Value"")['m']",,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""door_thermal_resistance"", ""R-Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")",, +,DMo&0&rDXGF&New&dxAC_equip,Dmo-DXGF-New/templates/root.pxt,,,,,,,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")",,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")",, +,DMo&0&rDXHP&New&dxHP_equip,Dmo-HP-New/templates/root.pxt,,,,,,,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")",,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")",, diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/query.txt b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/query.txt new file mode 100644 index 000000000..b7a670dfb --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo/query.txt @@ -0,0 +1,29 @@ +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Site Energy, Net Site EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Source Energy, Net Source EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Site Energy +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Source Energy + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Total End Uses, Total +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heating, Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Cooling, Cooling +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Lighting, Interior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Lighting, Exterior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Equipment, Interior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Equipment, Exterior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Fans, Fans +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Pumps, Pumps +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Rejection, Heat Rejection +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Humidification, Humidification +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Recovery, Heat Recovery +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Water Systems, Water Systems +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Refrigeration, Refrigeration +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Generators, Generators +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heating, Heating Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Cooling, Cooling Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heating, Heating NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Cooling, Cooling NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Interior Equipment, Interior Equipment Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Interior Equipment, Interior Equipment NG + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Heating, Unmet Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Cooling, Unmet Cooling diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cases/MFm&0&rDXGF&Ex&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cases/MFm&0&rDXGF&Ex&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cases/MFm&0&rDXGF&Ex&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cases/MFm&0&rDXHP&Ex&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cases/MFm&0&rDXHP&Ex&dxHP_equip.csv new file mode 100644 index 000000000..2e046a4d1 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cases/MFm&0&rDXHP&Ex&dxHP_equip.csv @@ -0,0 +1,11 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_7p0_SEER_13_Pre,,0.12,0.24,3.23,,,unitary_system,2.05 +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/climates.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/climates.csv new file mode 100644 index 000000000..d7a1be524 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/climates.csv @@ -0,0 +1,17 @@ +skip,climate,hz_cz,weather_file,climate_zone,codes_file +,CZ01,,CA_EUREKA_725940S_CZ2022.epw,1,deer-mfm-1985.csv +,CZ02,,CA_NAPA-CO_724955S_CZ2022.epw,2,deer-mfm-1985.csv +,CZ03,,CA_OAKLAND-METRO-AP_724930S_CZ2022.epw,3,deer-mfm-1985.csv +,CZ04,,CA_SAN-JOSE-IAP_724945S_CZ2022.epw,4,deer-mfm-1985.csv +,CZ05,,CA_SANTA-MARIA-PUBLIC-AP_723940S_CZ2022.epw,5,deer-mfm-1985.csv +,CZ06,,CA_LOS-ANGELES-IAP_722950S_CZ2022.epw,6,deer-mfm-1985.csv +,CZ07,,CA_SAN-DIEGO-LINDBERGH-FLD_722900S_CZ2022.epw,7,deer-mfm-1985.csv +,CZ08,,CA_LONG-BEACH-DAUGHERTY-FLD_722970S_CZ2022.epw,8,deer-mfm-1985.csv +,CZ09,,CA_LOS-ANGELES-DOWNTOWN-USC_722874S_CZ2022.epw,9,deer-mfm-1985.csv +,CZ10,,CA_RIVERSIDE-MUNI_722869S_CZ2022.epw,10,deer-mfm-1985.csv +,CZ11,,CA_RED-BLUFF-MUNI-AP_725910S_CZ2022.epw,11,deer-mfm-1985.csv +,CZ12,,CA_STOCKTON-METRO-AP_724920S_CZ2022.epw,12,deer-mfm-1985.csv +,CZ13,,CA_FRESNO-YOSEMITE-IAP_723890S_CZ2022.epw,13,deer-mfm-1985.csv +,CZ14,,CA_DAGGETT-BARSTOW-AP_723815S_CZ2022.epw,14,deer-mfm-1985.csv +,CZ15,,CA_EL-CENTRO-NAF_722810S_CZ2022.epw,15,deer-mfm-1985.csv +,CZ16,,CA_BISHOP-AP_724800S_CZ2022.epw,16,deer-mfm-1985.csv diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cohorts.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cohorts.csv new file mode 100644 index 000000000..301b00b02 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/cohorts.csv @@ -0,0 +1,3 @@ +skip,cohort,root,:glass_u,:glass_shgc,:wall_consol_layer_thickness,:wall_consol_layer_conductivity,:ceil_consol_layer_thickness,:ceil_consol_layer_conductivity,:heating_sch_DEER_mrn,:heating_sch_DEER_day,:heating_sch_DEER_eve,:heating_sch_DEER_nit,:cooling_sch_DEER_mrn,:cooling_sch_DEER_day,:cooling_sch_DEER_eve,:cooling_sch_DEER_nit,:climate_zone,:infiltration_ACH,:total_leakage_ratio,:shading_control +,MFm&0&rDXGF&Ex&dxAC_equip,MFm-1985/templates/root_highSEER.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")" +,MFm&0&rDXHP&Ex&dxHP_equip,MFm-1985-HP/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")" diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/query.txt b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/query.txt new file mode 100644 index 000000000..b7a670dfb --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_Ex/query.txt @@ -0,0 +1,29 @@ +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Site Energy, Net Site EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Source Energy, Net Source EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Site Energy +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Source Energy + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Total End Uses, Total +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heating, Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Cooling, Cooling +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Lighting, Interior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Lighting, Exterior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Equipment, Interior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Equipment, Exterior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Fans, Fans +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Pumps, Pumps +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Rejection, Heat Rejection +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Humidification, Humidification +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Recovery, Heat Recovery +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Water Systems, Water Systems +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Refrigeration, Refrigeration +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Generators, Generators +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heating, Heating Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Cooling, Cooling Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heating, Heating NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Cooling, Cooling NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Interior Equipment, Interior Equipment Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Interior Equipment, Interior Equipment NG + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Heating, Unmet Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Cooling, Unmet Cooling diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cases/MFm&0&rDXGF&New&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cases/MFm&0&rDXGF&New&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cases/MFm&0&rDXGF&New&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cases/MFm&0&rDXHP&New&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cases/MFm&0&rDXHP&New&dxHP_equip.csv new file mode 100644 index 000000000..fe7340439 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cases/MFm&0&rDXHP&New&dxHP_equip.csv @@ -0,0 +1,10 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/climates.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/climates.csv new file mode 100644 index 000000000..92c625f0e --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/climates.csv @@ -0,0 +1,17 @@ +skip,climate,hz_cz,weather_file,climate_zone,codes_file +,CZ01,,CA_EUREKA_725940S_CZ2022.epw,1,T24_2025_MFm.csv +,CZ02,,CA_NAPA-CO_724955S_CZ2022.epw,2,T24_2025_MFm.csv +,CZ03,,CA_OAKLAND-METRO-AP_724930S_CZ2022.epw,3,T24_2025_MFm.csv +,CZ04,,CA_SAN-JOSE-IAP_724945S_CZ2022.epw,4,T24_2025_MFm.csv +,CZ05,,CA_SANTA-MARIA-PUBLIC-AP_723940S_CZ2022.epw,5,T24_2025_MFm.csv +,CZ06,,CA_LOS-ANGELES-IAP_722950S_CZ2022.epw,6,T24_2025_MFm.csv +,CZ07,,CA_SAN-DIEGO-LINDBERGH-FLD_722900S_CZ2022.epw,7,T24_2025_MFm.csv +,CZ08,,CA_LONG-BEACH-DAUGHERTY-FLD_722970S_CZ2022.epw,8,T24_2025_MFm.csv +,CZ09,,CA_LOS-ANGELES-DOWNTOWN-USC_722874S_CZ2022.epw,9,T24_2025_MFm.csv +,CZ10,,CA_RIVERSIDE-MUNI_722869S_CZ2022.epw,10,T24_2025_MFm.csv +,CZ11,,CA_RED-BLUFF-MUNI-AP_725910S_CZ2022.epw,11,T24_2025_MFm.csv +,CZ12,,CA_STOCKTON-METRO-AP_724920S_CZ2022.epw,12,T24_2025_MFm.csv +,CZ13,,CA_FRESNO-YOSEMITE-IAP_723890S_CZ2022.epw,13,T24_2025_MFm.csv +,CZ14,,CA_DAGGETT-BARSTOW-AP_723815S_CZ2022.epw,14,T24_2025_MFm.csv +,CZ15,,CA_EL-CENTRO-NAF_722810S_CZ2022.epw,15,T24_2025_MFm.csv +,CZ16,,CA_BISHOP-AP_724800S_CZ2022.epw,16,T24_2025_MFm.csv diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cohorts.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cohorts.csv new file mode 100644 index 000000000..d8ad4c28f --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/cohorts.csv @@ -0,0 +1,3 @@ +skip,cohort,root,:glass_u,:glass_shgc,:wall_consol_layer_thickness,:wall_consol_layer_conductivity,:wall_insulation_layer_thickness,:wall_insulation_layer_conductivity,:ceil_consol_layer_thickness,:ceil_consol_layer_conductivity,:climate_zone,:slab_perimeter_insulation,:roofing,:below_roof_deck_insulation,:radiant_barrier,:duct_r_value +,MFm&0&rDXGF&New&dxAC_equip,MFm-New/templates/root_highSEER.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_thickness"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Slab Floor"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Roofing"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Below Roof Deck Insulation"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Radiant Barrier"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Duct Insulation"", ""Value"")['R-IP']" +,MFm&0&rDXHP&New&dxHP_equip,MFm-New-HP/templates/root_highSEER.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_thickness"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Slab Floor"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Roofing"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Below Roof Deck Insulation"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Radiant Barrier"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Duct Insulation"", ""Value"")['R-IP']" diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/query.txt b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/query.txt new file mode 100644 index 000000000..b7a670dfb --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New/query.txt @@ -0,0 +1,29 @@ +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Site Energy, Net Site EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Source Energy, Net Source EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Site Energy +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Source Energy + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Total End Uses, Total +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heating, Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Cooling, Cooling +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Lighting, Interior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Lighting, Exterior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Equipment, Interior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Equipment, Exterior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Fans, Fans +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Pumps, Pumps +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Rejection, Heat Rejection +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Humidification, Humidification +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Recovery, Heat Recovery +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Water Systems, Water Systems +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Refrigeration, Refrigeration +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Generators, Generators +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heating, Heating Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Cooling, Cooling Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heating, Heating NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Cooling, Cooling NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Interior Equipment, Interior Equipment Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Interior Equipment, Interior Equipment NG + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Heating, Unmet Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Cooling, Unmet Cooling diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&1&rDXGF&Ex&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&1&rDXGF&Ex&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&1&rDXGF&Ex&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&1&rDXHP&Ex&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&1&rDXHP&Ex&dxHP_equip.csv new file mode 100644 index 000000000..2e046a4d1 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&1&rDXHP&Ex&dxHP_equip.csv @@ -0,0 +1,11 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_7p0_SEER_13_Pre,,0.12,0.24,3.23,,,unitary_system,2.05 +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&2&rDXGF&Ex&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&2&rDXGF&Ex&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&2&rDXGF&Ex&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&2&rDXHP&Ex&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&2&rDXHP&Ex&dxHP_equip.csv new file mode 100644 index 000000000..2e046a4d1 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cases/SFm&2&rDXHP&Ex&dxHP_equip.csv @@ -0,0 +1,11 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_7p0_SEER_13_Pre,,0.12,0.24,3.23,,,unitary_system,2.05 +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/climates.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/climates.csv new file mode 100644 index 000000000..9b41ce076 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/climates.csv @@ -0,0 +1,10 @@ +skip,climate,hz_cz,weather_file,climate_zone,codes_file +,CZ01,,CA_EUREKA_725940S_CZ2022.epw,1,deer-sfm-1975-1985.csv +,CZ02,,CA_NAPA-CO_724955S_CZ2022.epw,2,deer-sfm-1975-1985.csv +,CZ03,,CA_OAKLAND-METRO-AP_724930S_CZ2022.epw,3,deer-sfm-1975-1985.csv +,CZ04,,CA_SAN-JOSE-IAP_724945S_CZ2022.epw,4,deer-sfm-1975-1985.csv +,CZ05,,CA_SANTA-MARIA-PUBLIC-AP_723940S_CZ2022.epw,5,deer-sfm-1975-1985.csv +,CZ06,,CA_LOS-ANGELES-IAP_722950S_CZ2022.epw,6,deer-sfm-1975-1985.csv +,CZ07,,CA_SAN-DIEGO-LINDBERGH-FLD_722900S_CZ2022.epw,7,deer-sfm-1975-1985.csv +,CZ08,,CA_LONG-BEACH-DAUGHERTY-FLD_722970S_CZ2022.epw,8,deer-sfm-1975-1985.csv +,CZ09,,CA_LOS-ANGELES-DOWNTOWN-USC_722874S_CZ2022.epw,9,deer-sfm-1975-1985.csv diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cohorts.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cohorts.csv new file mode 100644 index 000000000..339adc8f3 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/cohorts.csv @@ -0,0 +1,5 @@ +skip,cohort,root,:glass_u,:glass_shgc,:sheathing_consol_layer_thickness,:sheathing_consol_layer_conductivity,:wall_consol_layer_thickness,:wall_consol_layer_conductivity,:floor_consol_layer_thickness,:floor_consol_layer_conductivity,:ceil_consol_layer_thickness,:ceil_consol_layer_conductivity,:heating_sch_DEER_mrn,:heating_sch_DEER_day,:heating_sch_DEER_eve,:heating_sch_DEER_nit,:cooling_sch_DEER_mrn,:cooling_sch_DEER_day,:cooling_sch_DEER_eve,:cooling_sch_DEER_nit,:climate_zone,:infiltration_ACH,:total_leakage_ratio,:shading_control,:floor_abv_crawl_insulation +,SFm&1&rDXHP&Ex&dxHP_equip,SFm-1 Story-1975-HP/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""floor_abv_crawl_insulation"", ""Value"")" +,SFm&2&rDXHP&Ex&dxHP_equip,SFm-2 Story-1975-HP/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""floor_abv_crawl_insulation"", ""Value"")" +,SFm&1&rDXGF&Ex&dxAC_equip,SFm-1 Story-1975/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""floor_abv_crawl_insulation"", ""Value"")" +,SFm&2&rDXGF&Ex&dxAC_equip,SFm-2 Story-1975/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""floor_abv_crawl_insulation"", ""Value"")" diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/query.txt b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/query.txt new file mode 100644 index 000000000..b7a670dfb --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975/query.txt @@ -0,0 +1,29 @@ +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Site Energy, Net Site EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Source Energy, Net Source EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Site Energy +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Source Energy + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Total End Uses, Total +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heating, Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Cooling, Cooling +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Lighting, Interior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Lighting, Exterior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Equipment, Interior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Equipment, Exterior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Fans, Fans +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Pumps, Pumps +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Rejection, Heat Rejection +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Humidification, Humidification +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Recovery, Heat Recovery +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Water Systems, Water Systems +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Refrigeration, Refrigeration +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Generators, Generators +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heating, Heating Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Cooling, Cooling Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heating, Heating NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Cooling, Cooling NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Interior Equipment, Interior Equipment Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Interior Equipment, Interior Equipment NG + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Heating, Unmet Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Cooling, Unmet Cooling diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&1&rDXGF&Ex&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&1&rDXGF&Ex&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&1&rDXGF&Ex&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&1&rDXHP&Ex&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&1&rDXHP&Ex&dxHP_equip.csv new file mode 100644 index 000000000..2e046a4d1 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&1&rDXHP&Ex&dxHP_equip.csv @@ -0,0 +1,11 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_7p0_SEER_13_Pre,,0.12,0.24,3.23,,,unitary_system,2.05 +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&2&rDXGF&Ex&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&2&rDXGF&Ex&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&2&rDXGF&Ex&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&2&rDXHP&Ex&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&2&rDXHP&Ex&dxHP_equip.csv new file mode 100644 index 000000000..2e046a4d1 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cases/SFm&2&rDXHP&Ex&dxHP_equip.csv @@ -0,0 +1,11 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_7p0_SEER_13_Pre,,0.12,0.24,3.23,,,unitary_system,2.05 +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/climates.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/climates.csv new file mode 100644 index 000000000..3878aebed --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/climates.csv @@ -0,0 +1,8 @@ +skip,climate,hz_cz,weather_file,climate_zone,codes_file +,CZ10,,CA_RIVERSIDE-MUNI_722869S_CZ2022.epw,10,deer-sfm-1975-1985.csv +,CZ11,,CA_RED-BLUFF-MUNI-AP_725910S_CZ2022.epw,11,deer-sfm-1975-1985.csv +,CZ12,,CA_STOCKTON-METRO-AP_724920S_CZ2022.epw,12,deer-sfm-1975-1985.csv +,CZ13,,CA_FRESNO-YOSEMITE-IAP_723890S_CZ2022.epw,13,deer-sfm-1975-1985.csv +,CZ14,,CA_DAGGETT-BARSTOW-AP_723815S_CZ2022.epw,14,deer-sfm-1975-1985.csv +,CZ15,,CA_EL-CENTRO-NAF_722810S_CZ2022.epw,15,deer-sfm-1975-1985.csv +,CZ16,,CA_BISHOP-AP_724800S_CZ2022.epw,16,deer-sfm-1975-1985.csv diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cohorts.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cohorts.csv new file mode 100644 index 000000000..868116792 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/cohorts.csv @@ -0,0 +1,5 @@ +skip,cohort,root,:roof_base_cavity_insul,:wall_base_type,:wall_base_cavity_insul,:wall_base_cont_insul,:glass_u,:glass_shgc,:sheathing_consol_layer_thickness,:sheathing_consol_layer_conductivity,:wall_consol_layer_thickness,:wall_consol_layer_conductivity,:floor_consol_layer_thickness,:floor_consol_layer_conductivity,:ceil_consol_layer_thickness,:ceil_consol_layer_conductivity,:heating_sch_DEER_mrn,:heating_sch_DEER_day,:heating_sch_DEER_eve,:heating_sch_DEER_nit,:cooling_sch_DEER_mrn,:cooling_sch_DEER_day,:cooling_sch_DEER_eve,:cooling_sch_DEER_nit,:climate_zone,:infiltration_ACH,:total_leakage_ratio,:shading_control,:floor_abv_crawl_insulation +,SFm&1&rDXHP&Ex&dxHP_equip,SFm-1 Story-1985-HP/templates/root.pxt,,,,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")", +,SFm&2&rDXHP&Ex&dxHP_equip,SFm-2 Story-1985-HP/templates/root.pxt,,,,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")", +,SFm&1&rDXGF&Ex&dxAC_equip,SFm-1 Story-1985/templates/root.pxt,,,,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")", +,SFm&2&rDXGF&Ex&dxAC_equip,SFm-2 Story-1985/templates/root.pxt,,,,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")",,,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""heating_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_mrn"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_day"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_eve"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""cooling_sch_DEER_nit"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Infiltration"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""total_leakage_ratio"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""shading_control"", ""Value"")", diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/query.txt b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/query.txt new file mode 100644 index 000000000..b7a670dfb --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985/query.txt @@ -0,0 +1,29 @@ +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Site Energy, Net Site EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Source Energy, Net Source EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Site Energy +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Source Energy + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Total End Uses, Total +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heating, Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Cooling, Cooling +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Lighting, Interior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Lighting, Exterior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Equipment, Interior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Equipment, Exterior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Fans, Fans +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Pumps, Pumps +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Rejection, Heat Rejection +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Humidification, Humidification +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Recovery, Heat Recovery +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Water Systems, Water Systems +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Refrigeration, Refrigeration +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Generators, Generators +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heating, Heating Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Cooling, Cooling Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heating, Heating NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Cooling, Cooling NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Interior Equipment, Interior Equipment Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Interior Equipment, Interior Equipment NG + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Heating, Unmet Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Cooling, Unmet Cooling diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&1&rDXGF&New&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&1&rDXGF&New&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&1&rDXGF&New&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&1&rDXHP&New&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&1&rDXHP&New&dxHP_equip.csv new file mode 100644 index 000000000..fe7340439 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&1&rDXHP&New&dxHP_equip.csv @@ -0,0 +1,10 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&2&rDXGF&New&dxAC_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&2&rDXGF&New&dxAC_equip.csv new file mode 100644 index 000000000..8c7c2befd --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&2&rDXGF&New&dxAC_equip.csv @@ -0,0 +1,12 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:burner_eff +,dxAC-Res-SEER-13.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.0,,0.12,0.24,3.23,,,unitary_system +,dxAC-Res-SEER-14.5,,0.12,0.24,3.43,,,unitary_system +,dxAC-Res-SEER-15.0,,0.12,0.24,3.58,,,unitary_system +,dxAC-Res-SEER-16.0,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system +,dxAC-Res-SEER-17.0,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system +,dxAC-Res-SEER-18.0,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system +,dxAC-Res-SEER-19.0,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system +,dxAC-Res-SEER-20.0,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system +,dxAC-Res-SEER-21.0,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system +,Res-GasFurnace-AFUE80-ECM,,0.12,0.24,,,,,0.8 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&2&rDXHP&New&dxHP_equip.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&2&rDXHP&New&dxHP_equip.csv new file mode 100644 index 000000000..fe7340439 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cases/SFm&2&rDXHP&New&dxHP_equip.csv @@ -0,0 +1,10 @@ +skip,case_name,:vfd_curve_name,:supplyfan_total_eff,:motor_eff,:cooling_coil_cop,:cooling_coil_cop2,:coil_type,:hvac_type,:heating_coil_cop,:burner_eff +,HSPF_8p0_SEER_14_Std,,0.12,0.24,3.23,,,unitary_system,2.34 +,HSPF_8p2_SEER_14.5_Std,,0.12,0.24,3.43,,,unitary_system,2.4 +,HSPF_8p8_SEER_15_Std,,0.12,0.24,3.58,,,unitary_system,2.58 +,HSPF_9p0_SEER_16_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.75,multispeed,unitary_system,2.64 +,HSPF_9p4_SEER_17_Msr,VFD_Fan_Curve,0.25,0.5,3.58,3.89,multispeed,unitary_system,2.75 +,HSPF_9p5_SEER_18_Msr,VFD_Fan_Curve,0.25,0.5,3.58,4.01,multispeed,unitary_system,2.79 +,HSPF_9p5_SEER_19_Msr,VFD_Fan_Curve,0.25,0.5,3.72,4.12,multispeed,unitary_system,2.79 +,HSPF_10p0_SEER_20_Msr,VFD_Fan_Curve,0.25,0.5,3.82,4.22,multispeed,unitary_system,2.92 +,HSPF_10p5_SEER_21_Msr,VFD_Fan_Curve,0.25,0.5,3.94,4.31,multispeed,unitary_system,3.09 diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/climates.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/climates.csv new file mode 100644 index 000000000..71328a5b9 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/climates.csv @@ -0,0 +1,17 @@ +skip,climate,hz_cz,weather_file,climate_zone,codes_file +,CZ01,,CA_EUREKA_725940S_CZ2022.epw,1,T24_2025_SFm.csv +,CZ02,,CA_NAPA-CO_724955S_CZ2022.epw,2,T24_2025_SFm.csv +,CZ03,,CA_OAKLAND-METRO-AP_724930S_CZ2022.epw,3,T24_2025_SFm.csv +,CZ04,,CA_SAN-JOSE-IAP_724945S_CZ2022.epw,4,T24_2025_SFm.csv +,CZ05,,CA_SANTA-MARIA-PUBLIC-AP_723940S_CZ2022.epw,5,T24_2025_SFm.csv +,CZ06,,CA_LOS-ANGELES-IAP_722950S_CZ2022.epw,6,T24_2025_SFm.csv +,CZ07,,CA_SAN-DIEGO-LINDBERGH-FLD_722900S_CZ2022.epw,7,T24_2025_SFm.csv +,CZ08,,CA_LONG-BEACH-DAUGHERTY-FLD_722970S_CZ2022.epw,8,T24_2025_SFm.csv +,CZ09,,CA_LOS-ANGELES-DOWNTOWN-USC_722874S_CZ2022.epw,9,T24_2025_SFm.csv +,CZ10,,CA_RIVERSIDE-MUNI_722869S_CZ2022.epw,10,T24_2025_SFm.csv +,CZ11,,CA_RED-BLUFF-MUNI-AP_725910S_CZ2022.epw,11,T24_2025_SFm.csv +,CZ12,,CA_STOCKTON-METRO-AP_724920S_CZ2022.epw,12,T24_2025_SFm.csv +,CZ13,,CA_FRESNO-YOSEMITE-IAP_723890S_CZ2022.epw,13,T24_2025_SFm.csv +,CZ14,,CA_DAGGETT-BARSTOW-AP_723815S_CZ2022.epw,14,T24_2025_SFm.csv +,CZ15,,CA_EL-CENTRO-NAF_722810S_CZ2022.epw,15,T24_2025_SFm.csv +,CZ16,,CA_BISHOP-AP_724800S_CZ2022.epw,16,T24_2025_SFm.csv diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cohorts.csv b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cohorts.csv new file mode 100644 index 000000000..43cb536b5 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/cohorts.csv @@ -0,0 +1,5 @@ +skip,cohort,root,:glass_u,:glass_shgc,:wall_consol_layer_thickness,:wall_consol_layer_conductivity,:wall_insulation_layer_thickness,:wall_insulation_layer_conductivity,:ceil_consol_layer_thickness,:ceil_consol_layer_conductivity,:climate_zone,:slab_perimeter_insulation,:roofing,:below_roof_deck_insulation,:radiant_barrier,:whole_house_fan,:duct_r_value +,SFm&1&rDXGF&New&dxAC_equip,SFm-1 Story-New/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_thickness"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Slab Floor"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Roofing"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Below Roof Deck Insulation"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Radiant Barrier"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""whole house fan"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Duct Insulation"", ""Value"")['R-IP']" +,SFm&2&rDXGF&New&dxAC_equip,SFm-2 Story-New/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_thickness"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Slab Floor"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Roofing"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Below Roof Deck Insulation"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Radiant Barrier"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""whole house fan"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Duct Insulation"", ""Value"")['R-IP']" +,SFm&1&rDXHP&New&dxHP_equip,SFm-1 Story-New-HP/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_thickness"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Slab Floor"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Roofing"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Below Roof Deck Insulation"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Radiant Barrier"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""whole house fan"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Duct Insulation"", ""Value"")['R-IP']" +,SFm&2&rDXHP&New&dxHP_equip,SFm-2 Story-New-HP/templates/root.pxt,"%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration U-Factor"", ""Value"")['U-IP']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Vertical Fenestration SHGC"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_thickness"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""wall_insulation_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_thickness"", ""Value"")['m']","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""ceil_consol_layer_conductivity"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""climate_zone"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Slab Floor"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Roofing"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Below Roof Deck Insulation"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Radiant Barrier"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""whole house fan"", ""Value"")","%= codes.lookup(""Res Key Prototype Values | Climate Zone #{climate_zone}"", ""Duct Insulation"", ""Value"")['R-IP']" diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/query.txt b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/query.txt new file mode 100644 index 000000000..b7a670dfb --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New/query.txt @@ -0,0 +1,29 @@ +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Site Energy, Net Site EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Source Energy, Net Source EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Site Energy +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Source Energy + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Total End Uses, Total +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heating, Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Cooling, Cooling +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Lighting, Interior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Lighting, Exterior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Interior Equipment, Interior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Exterior Equipment, Exterior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Fans, Fans +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Pumps, Pumps +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Rejection, Heat Rejection +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Humidification, Humidification +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Heat Recovery, Heat Recovery +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Water Systems, Water Systems +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Refrigeration, Refrigeration +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Total Energy/Generators, Generators +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heating, Heating Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Cooling, Cooling Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heating, Heating NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Cooling, Cooling NG +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Interior Equipment, Interior Equipment Elec +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Interior Equipment, Interior Equipment NG + +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Heating, Unmet Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Comfort and Setpoint Not Met Summary/Facility/Time Setpoint Not Met During Occupied Cooling, Unmet Cooling diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/global.pxv b/residential measures/SWHC049-08 SEER Rated AC HP/global.pxv new file mode 100644 index 000000000..c707bb604 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/global.pxv @@ -0,0 +1,2 @@ +:timestep => 6, +:run_control => "ANNUAL" # ANNUAL | SIZING diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/post-process/DMo.py b/residential measures/SWHC049-08 SEER Rated AC HP/post-process/DMo.py new file mode 100644 index 000000000..3223441f3 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/post-process/DMo.py @@ -0,0 +1,647 @@ +#%% +##STEP 0: Setup (import all necessary libraries) +import pandas as pd +import numpy as np +import os +import sys +import datetime as dt +os.chdir(os.path.dirname(__file__)) #resets to current script directory +# %% +#Read master workbook for measure / tech list +df_master = pd.read_excel('DEER_EnergyPlus_Modelkit_Measure_list_working.xlsx', sheet_name='Measure_list', skiprows=4) + +measure_group_names = list(df_master['Measure Group Name'].unique()) + +# %% +#generate unique list of measure names +measures = list(df_master['Measure (general name)'].unique()) +# %% +#Shows list of measure names +print(measures) +#%% +#Define measure name here +measure_name = 'SEER Rated AC HP' + +# %% +#DMo only script +####Define path +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +os.chdir("../..") #go up two directory +print(os.path.abspath(os.curdir)) + +#12/20/2023 After finishing Com, try to condense Res script so one script takes care of one measure folder? +#to do: use for loop to loop over each folder, using if-else to process different building types for Res +path = 'residential measures/SWHC049-06 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_DMo' + +# %% +#extract only the 5th portion of the measure group name for expected_att +#split argument 4 means only split 4 times maximum +techgroup_techtypes = [i.split('&', 4)[-1] for i in measure_group_names] +tech_uniques = list(np.unique((np.array(techgroup_techtypes)))) +# Name parsing function per Amine +# This dictionary of attributes should be updated +expected_att = { + 'BldgType': ['MFm','SFm', 'DMo'], + 'Story': ['0','1','2'], # NA for Not Applicable + 'BldgHVAC': ['rDXGF','rDXHP','rNCEH','rNCGF'], + 'BldgVint': ['Ex','New'], + 'Measure': tech_uniques +} +# function to parse meta data from & delimited case file names (Measure Group Name from master spreadsheet) +def parse_measure_name(measure_name): + #split at most 4 times for 5 descriptor fields + measure_name_split = measure_name.split('&', 4) + # Check here if the presented name has 5 attributes as expected: + if not len(measure_name_split) == 5: + sys.exit('The case name must have at least 5 attributes similar to < BldgType&Story&BldgHVAC&BldgVint&TechGroup__TechType >') + + attributes = list(expected_att.keys()) + measure_name_dict = {attributes[i]: measure_name_split[i] for i in range(0,5)} + + # Check here if the presented attributes are as expected: + for att in attributes: + if measure_name_dict[att] not in expected_att[att]: + sys.exit(f'Attribute <{measure_name_dict[att]}> was not expected') + + + return measure_name_dict # returns a dictionary + +def parse_measure_name2(cohort_names: pd.Series, verify: bool = False) -> pd.DataFrame: + '''Returns a DataFrame with five columns (all type string): + ["BldgType","Story","BldgHVAC","BldgVint","TechGroup__TechType"] + Each cohort name must match the pattern: + "BldgType&Story&BldgHVAC&BldgVint&TechGroup__TechType" + Only alphanumeric characters are allowed [a-zA-Z0-9_], except TechGroup__TechType may contain ampersand (&). + + Parameters + ---------- + cohort_names : pandas.Series + The cohort names as from cohorts.csv. + verify : bool, default=False + If true and name parts do not match `expected_att`, raise an exception. + + Returns + ------- + pandas.DataFrame + Structure containing the parts of cohort name. + ''' + result = cohort_names.str.extract( + r'(?P\w+)&(?P\w+)&(?P\w+)&(?P\w+)&(?P[^/]+)' + ) + if verify: + # Check for missing descriptor fields + missing = result.isna() + if missing.any().any(): + example = cohort_names[missing.any(axis=1)].iloc[0] + raise ValueError(f'Missing descriptor field, e.g. cohort = "{example}"') + # Check for unrecognized fields + for attr_name,attr_val in expected_att.items(): + unrecognized = ~result[attr_name].isin(attr_val) + if unrecognized.any(): + example = result[attr_name][unrecognized].iloc[0] + raise ValueError(f'Unrecognized descriptor field, e.g. {attr_name} = "{example}"') + result.rename({'Measure':'TechGroup__TechType'},axis=1,inplace=True) + return result + +#function to melt long 8760 col into 24col x365row format +def long2wide_pivot(df, name): + ''' + customized function. + input df is long 8760, 1 column format, with the daynum(of365) and hour of day(of24) mapped. + id is the unique identifier. + + output df is the 24col x 365row format of the 8760, with the corresponding id. + ''' + df_wide = df.pivot(index='daynum',columns='Hour', values=df.columns[0]).reset_index().rename_axis('', axis=1) + df_wide['ID']=name + #df_wide = pd.merge(df_wide, df_ag_key, on='ID') + + return df_wide + +#function to uses the “File Name” column from the results-summary csv to identify directory structure (an organized table) of a batch run +# and uses the structure to construct a semi-organized annual outputs table. +def annual_raw_parsing(df, cohort_dict): + #create separated meta data cols + df['BldgLoc'] = split_meta_cols_eu[0] + + df['BldgType'] = cohort_dict['BldgType'] + df['BldgHVAC'] = cohort_dict['BldgHVAC'] + df['BldgVint'] = cohort_dict['BldgVint'] + + df['Story'] = cohort_dict['Story'] + + df['TechGroup_TechType'] = cohort_dict['Measure'] + + df['TechID'] = split_meta_cols_eu[2] + df['file'] = split_meta_cols_eu[3] + + annual_df_v1 = df[['TechID', 'file', 'BldgLoc', 'BldgType','BldgHVAC','BldgVint','Story', 'TechGroup_TechType','Total (kWh)', 'Heating (kWh)', 'Cooling (kWh)', + 'Interior Lighting (kWh)', 'Exterior Lighting (kWh)', + 'Interior Equipment (kWh)', 'Exterior Equipment (kWh)', 'Fans (kWh)', + 'Pumps (kWh)', 'Heat Rejection (kWh)', 'Humidification (kWh)', + 'Heat Recovery (kWh)', 'Water Systems (kWh)', 'Refrigeration (kWh)', + 'Generators (kWh)', 'Heating Elec (kWh)', 'Cooling Elec (kWh)', + 'Heating NG (kWh)', 'Cooling NG (kWh)', 'Interior Equipment Elec (kWh)', + 'Interior Equipment NG (kWh)']] + + return annual_df_v1 + +#function to merge and rearrange specific annual consumption end-use fields into the format required +def end_use_rearrange(df_in): + df_in['kwh_tot'] = (df_in['Heating Elec (kWh)'] + \ + df_in['Cooling Elec (kWh)'] +\ + df_in['Interior Equipment Elec (kWh)'] +\ + df_in['Interior Lighting (kWh)'] +\ + df_in['Exterior Lighting (kWh)'] +\ + df_in['Fans (kWh)']+\ + df_in['Pumps (kWh)']) + + df_in['kwh_ltg'] = (df_in['Interior Lighting (kWh)'] +\ + df_in['Exterior Lighting (kWh)']) + + df_in['kwh_task'] = 0 # placeholder (task lighting load?) + + df_in['kwh_equip'] = df_in['Interior Equipment Elec (kWh)'] +\ + df_in['Exterior Equipment (kWh)'] + + df_in['kwh_htg'] = df_in['Heating Elec (kWh)'] + df_in['kwh_clg'] = df_in['Cooling Elec (kWh)'] + df_in['kwh_twr'] = 0 #place holder (tower kwh load?) + df_in['kwh_aux'] = 0 #place holder (aux equipment kwh load?) + + df_in['kwh_vent'] = df_in['Fans (kWh)'] #use fan kWh as vent load for now + + df_in['kwh_venthtg'] =0 #placeholders fields for now + df_in['kwh_ventclg'] =0 + df_in['kwh_refg'] = 0 + df_in['kwh_hpsup'] = 0 + df_in['kwh_shw'] = 0 + df_in['kwh_ext'] = 0 + + df_in['thm_tot'] = (df_in['Heating NG (kWh)'] +\ + df_in['Cooling NG (kWh)'] +\ + df_in['Interior Equipment NG (kWh)'] +\ + df_in['Water Systems (kWh)'])/29.3 + + df_in['thm_equip'] = df_in['Interior Equipment NG (kWh)']/29.3 + + df_in['thm_htg'] = df_in['Heating NG (kWh)']/29.3 + + df_in['thm_shw'] = df_in['Water Systems (kWh)']/29.3 + + df_in['deskw_ltg'] = 1 #placeholders fields for now + df_in['deskw_equ'] = 1 + + return df_in + + +# %% +#create measure specific Master table based on Measure selected +df_measure = df_master[df_master['Measure (general name)'] == measure_name] +case_cohort_list = df_measure['Measure Group Name'].unique() + +# %% +##STEP 1: Annual data extraction / transformation + +df_raw = pd.read_csv(path+'/results-summary.csv', usecols=['File Name']) +num_runs = len(df_raw['File Name'].dropna().unique()) - 1 +#Read annual data +annual_df = pd.read_csv(path+'/results-summary.csv', nrows=num_runs, skiprows=num_runs+2) +split_meta_cols_eu = annual_df['File Name'].str.split('/', expand=True) + +#if looping over multiple folders/cohort cases, use a list +cohort_cases = list(split_meta_cols_eu[1].unique()) + +sim_annual_proto = pd.DataFrame() +for case in cohort_cases: + print(f'processing all annual data that are grouped in {case}') + cohort_dict = parse_measure_name(case) + sim_annual_i = annual_raw_parsing(annual_df[annual_df['File Name'].str.contains(case)].copy(), cohort_dict) + sim_annual_proto = pd.concat([sim_annual_proto, sim_annual_i]) + print('ok.') +sim_annual_proto = end_use_rearrange(sim_annual_proto) +sim_annual_v1 = sim_annual_proto[['TechID', 'BldgLoc', 'BldgType', 'BldgHVAC', 'BldgVint', 'kwh_tot', 'kwh_ltg', 'kwh_task', + 'kwh_equip', 'kwh_htg', 'kwh_clg', 'kwh_twr', 'kwh_aux', 'kwh_vent', + 'kwh_venthtg', 'kwh_ventclg', + 'kwh_refg', 'kwh_hpsup', 'kwh_shw', 'kwh_ext', 'thm_tot', 'thm_equip', + 'thm_htg', 'thm_shw', 'deskw_ltg', 'deskw_equ']].drop_duplicates().copy() + +# %% +##STEP 2: Hourly data extraction / transformation +#Read 8760 map +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +annual_map = pd.read_excel('annual8760map.xlsx') + +# %% +os.chdir("../..") #go up two directory +print(os.path.abspath(os.curdir)) +hrly_path = path + '/runs' + +#extract data per bldgtype-bldghvac-bldgvint group +hourly_df = pd.DataFrame(index=range(0,8760)) +#extract num_runs / split_meta_cols_eu +df_raw = pd.read_csv(path+'/'+'/results-summary.csv', usecols=['File Name']) +num_runs = len(df_raw['File Name'].dropna().unique()) - 1 +annual_df = pd.read_csv(path+'/'+'/results-summary.csv', nrows=num_runs, skiprows=num_runs+2) +split_meta_cols_eu = annual_df['File Name'].str.split('/', expand=True) +for i in range(0,num_runs): + print(f"merging record {i}") + + #loop path of each file, read corresponding file + full_path = hrly_path + "/" + split_meta_cols_eu.iloc[i][0] + "/" + split_meta_cols_eu.iloc[i][1] + "/" + split_meta_cols_eu.iloc[i][2] + "/instance-var.csv" + df = pd.read_csv(full_path, low_memory=False) + + #remove traling spaces on col headers + df.columns = df.columns.str.rstrip() + + #extract the last column (the total elec hrly profile) + #if for enduse hourly, then extract the relevant end use column + extracted_df = pd.DataFrame(df['Electricity:Facility [J](Hourly)']) + + #create the column name based on the permutations + col_name = split_meta_cols_eu.iloc[i][0] + "/" + split_meta_cols_eu.iloc[i][1] + "/" + split_meta_cols_eu.iloc[i][2] + "/instance-var.csv" + + #change column name + extracted_df = extracted_df.set_axis([col_name],axis=1) + if len(extracted_df)!=8760: + #8/31/2022 update, need to make the final length 8808. Snip data based on difference to 8760 + record_count_diff = len(extracted_df) - 8760 + print(f'extra records: {str(len(extracted_df))}, snipping away {record_count_diff} records and changing to 8760') + extracted_df = extracted_df.iloc[record_count_diff:].reset_index(drop=True) + + #left-merge onto big df + hourly_df = hourly_df.merge(extracted_df, left_index=True, right_index=True) +# %% +fyr_hrly = hourly_df +#rearrange 1-column 8760 format to 365x24 wide format for all runs in hourly_df +converted_df = pd.DataFrame() + +for i in range(0,len(fyr_hrly.columns)): + + #isolate single column + hrly_df = pd.DataFrame(fyr_hrly.iloc[:,i]) + + #create separate metadata columns + col_names = hrly_df.columns[0].split('/') + + #create new key column for merge + hrly_df['hr in 8760'] = (hrly_df.index) + 1 + + #merge based on "hr in 8760" column, the 8760 map + hrly_mapped = pd.merge(hrly_df, annual_map, on='hr in 8760') + + #transform data format + hrly_wide = long2wide_pivot(hrly_mapped, hrly_mapped.columns[0]) + + #add meta data col + hrly_wide['BldgLoc'] = col_names[0] + hrly_wide['BldgType'] = col_names[1] + hrly_wide['TechID'] = col_names[2] + hrly_wide['file'] = col_names[3] + + #append to master df + #converted_df = converted_df.append(hrly_wide) #deprecated method + converted_df = pd.concat([converted_df, hrly_wide]) + print(f"col {i} transformed.") +#%% +#rearrange columns +sim_hourly_wb_proto = converted_df[['TechID','file','BldgLoc','BldgType','ID','daynum',1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, + 24]].copy() +#hourly data conversion +#convert unit (J) to (kWh) for hourly + +sim_hourly_wb_proto['hr01'] = sim_hourly_wb_proto[1]/3600000 +sim_hourly_wb_proto['hr02'] = sim_hourly_wb_proto[2]/3600000 +sim_hourly_wb_proto['hr03'] = sim_hourly_wb_proto[3]/3600000 +sim_hourly_wb_proto['hr04'] = sim_hourly_wb_proto[4]/3600000 +sim_hourly_wb_proto['hr05'] = sim_hourly_wb_proto[5]/3600000 +sim_hourly_wb_proto['hr06'] = sim_hourly_wb_proto[6]/3600000 +sim_hourly_wb_proto['hr07'] = sim_hourly_wb_proto[7]/3600000 +sim_hourly_wb_proto['hr08'] = sim_hourly_wb_proto[8]/3600000 +sim_hourly_wb_proto['hr09'] = sim_hourly_wb_proto[9]/3600000 +sim_hourly_wb_proto['hr10'] = sim_hourly_wb_proto[10]/3600000 +sim_hourly_wb_proto['hr11'] = sim_hourly_wb_proto[11]/3600000 +sim_hourly_wb_proto['hr12'] = sim_hourly_wb_proto[12]/3600000 +sim_hourly_wb_proto['hr13'] = sim_hourly_wb_proto[13]/3600000 +sim_hourly_wb_proto['hr14'] = sim_hourly_wb_proto[14]/3600000 +sim_hourly_wb_proto['hr15'] = sim_hourly_wb_proto[15]/3600000 +sim_hourly_wb_proto['hr16'] = sim_hourly_wb_proto[16]/3600000 +sim_hourly_wb_proto['hr17'] = sim_hourly_wb_proto[17]/3600000 +sim_hourly_wb_proto['hr18'] = sim_hourly_wb_proto[18]/3600000 +sim_hourly_wb_proto['hr19'] = sim_hourly_wb_proto[19]/3600000 +sim_hourly_wb_proto['hr20'] = sim_hourly_wb_proto[20]/3600000 +sim_hourly_wb_proto['hr21'] = sim_hourly_wb_proto[21]/3600000 +sim_hourly_wb_proto['hr22'] = sim_hourly_wb_proto[22]/3600000 +sim_hourly_wb_proto['hr23'] = sim_hourly_wb_proto[23]/3600000 +sim_hourly_wb_proto['hr24'] = sim_hourly_wb_proto[24]/3600000 + +#rearrange columns +sim_hourly_wb_v1 = sim_hourly_wb_proto[['TechID','file','BldgLoc','BldgType','ID','daynum','hr01','hr02','hr03','hr04','hr05','hr06', + 'hr07', 'hr08', 'hr09', 'hr10', 'hr11', 'hr12', + 'hr13', 'hr14', 'hr15', 'hr16', 'hr17', 'hr18', + 'hr19', 'hr20', 'hr21', 'hr22', 'hr23', 'hr24']].copy() +# %% +##STEP 3: Normalizing Units +bldgtype = 'DMo' +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +df_normunits = pd.read_excel('Normunits.xlsx', sheet_name=bldgtype) +numunits_vals = df_normunits[df_normunits['Normunit'] == df_measure['Normunit'].unique()[0]][['Value', 'Msr']] + +if len(numunits_vals) == 1: + numunits = list(numunits_vals['Value'])[0] +elif (measure_name == 'Wall Insulation') or (measure_name == 'Ceiling Insulation'): + numunits = list(numunits_vals[numunits_vals['Msr'] == measure_name]['Value'])[0] +else: + pass +# %% +##Annual Data final field fixes +#note normunit = building area (conditioned) +sim_annual_v1['SizingID'] = 'None' +sim_annual_v1['tstat'] = 0 +#now Norm unit is read from measure master table +sim_annual_v1['normunit'] = df_measure['Normunit'].unique()[0] +#make this automatic as well +sim_annual_v1['measarea'] = 2484 #from DMo model outputs htmls + +#apply normunits where appropriate +#num unit will be per dwelling, so use roof area / num of dwellings (2 for SFM, DMo, 24 for MFm) +sim_annual_v1['numunits'] = numunits/2 +sim_annual_v1['lastmod']=dt.datetime.now() + +#rearrange columns +sim_annual_f = sim_annual_v1[['TechID', 'SizingID', 'BldgType','BldgVint','BldgLoc','BldgHVAC','tstat', + 'normunit', 'numunits', 'measarea', 'kwh_tot', 'kwh_ltg', 'kwh_task', + 'kwh_equip', 'kwh_htg', 'kwh_clg', 'kwh_twr', 'kwh_aux', 'kwh_vent', + 'kwh_venthtg', 'kwh_ventclg', 'kwh_refg', 'kwh_hpsup', 'kwh_shw', + 'kwh_ext', 'thm_tot', 'thm_equip', 'thm_htg', 'thm_shw', 'deskw_ltg', + 'deskw_equ', 'lastmod']] +# %% +##Hourly Data final field fixes + +#update field names based on what it contains +df_tmp = parse_measure_name2(sim_hourly_wb_v1['ID'],verify=True) +sim_hourly_wb_v1['BldgVint'] = df_tmp['BldgVint'] +sim_hourly_wb_v1['BldgHVAC'] = df_tmp['BldgHVAC'] +sim_hourly_wb_v1['BldgType'] = df_tmp['BldgType'] +del df_tmp +sim_hourly_wb_v1['SizingID'] = 'None' +sim_hourly_wb_v1['tstat'] = 0 +sim_hourly_wb_v1['enduse'] = 0 +sim_hourly_wb_v1['lastmod']=dt.datetime.now() + +#rearrange columns +sim_hourly_f = sim_hourly_wb_v1[['TechID', 'SizingID', 'BldgType', 'BldgVint', 'BldgLoc','BldgHVAC','tstat', 'enduse', 'daynum', + 'hr01', 'hr02', 'hr03', 'hr04', 'hr05', 'hr06', 'hr07', 'hr08', 'hr09', 'hr10', 'hr11', + 'hr12', 'hr13', 'hr14', 'hr15', 'hr16', 'hr17', 'hr18', 'hr19', 'hr20', + 'hr21', 'hr22', 'hr23', 'hr24', 'lastmod']] +# %% +##STEP 4: Measure setup file (current_msr_mat.csv) + +# Creating current_msr_mat and finalzing TechID's + +metadata_cols = sim_annual_f[['TechID', 'BldgLoc', 'BldgType', 'BldgVint', 'BldgHVAC', 'SizingID', + 'tstat', 'normunit']] + +#check unique TechID cases +metadata_cols['TechID'].unique() +# %% +#TechID identification from Master table +#if looping over all HVAC types, ignore BldgHVAC filter +PreTechIDs = df_measure[['PreTechID','Common_PreTechID']].drop_duplicates() +StdTechIDs = df_measure[['StdTechID','Common_StdTechID']].drop_duplicates() +MeasTechIDs = df_measure[['MeasTechID','Common_MeasTechID']].drop_duplicates() +# %% +#filter out each pre, std, msr using the Common TechIDs from master table +metadata_pre = metadata_cols[metadata_cols['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +metadata_std = metadata_cols[metadata_cols['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +metadata_msr = metadata_cols[metadata_cols['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] + +# %% +#rename to Pre, Std or Msr +#both Std and Pre are baseline for SEER rated AC measures +metadata_pre = metadata_pre.rename(columns={'TechID':'PreTechID'}) +metadata_std = metadata_std.rename(columns={'TechID':'StdTechID'}) +metadata_msr = metadata_msr.rename(columns={'TechID':'MeasTechID'}) +# %% +#Changing common TechID to actual TechIDs if needed. +#might only apply to SEER AC/HP + +#create full pre_metadata sets for different names but the same TechID +# commom_preTechID = PreTechIDs['Common_PreTechID'].unique()[0] +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + metadata_pre_full = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + metadata_pre_mod = metadata_pre[metadata_pre['PreTechID']==common_id].copy() + metadata_pre_mod['PreTechID'] = new_id + #merge to final df + metadata_pre_full = pd.concat([metadata_pre_full, metadata_pre_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_pre_full = metadata_pre.copy() + + +# %% +#create std_metadata sets, assigning appropriate final TechIDs +if (False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID'])): + metadata_std_full = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + metadata_std_mod = metadata_std[metadata_std['StdTechID']==common_id].copy() + #Change into final techID name (new) + metadata_std_mod['StdTechID'] = new_id + #merge to final df + metadata_std_full = pd.concat([metadata_std_full, metadata_std_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_std_full = metadata_std.copy() +# %% +#create msr_metadata sets, assigning appropriate final TechIDs +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + metadata_msr_full = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Identify corresponding common TechID (the last 9 characters indicating SEER levels) + metadata_msr_mod = metadata_msr[metadata_msr['MeasTechID']==common_id].copy() + #Change into final TechID name + metadata_msr_mod['MeasTechID'] = new_id + #merge to final df + metadata_msr_full = pd.concat([metadata_msr_full, metadata_msr_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_msr_full = metadata_msr.copy() +# %% +#create raw merged current_msr_mat +#need to delete/drop incorrect sets +if np.NaN in list(StdTechIDs['StdTechID'].unique()): + df_measure_set_full = pd.merge(metadata_pre_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) +elif np.NaN in list(PreTechIDs['PreTechID'].unique()): + df_measure_set_full = pd.merge(metadata_std_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) +else: + df_measure_baseline_full = pd.merge(metadata_pre_full, metadata_std_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) + df_measure_set_full = pd.merge(df_measure_baseline_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) + +# %% +#Unique sets of each MeasureID with their TechID triplets +TechID_triplets = df_measure[['EnergyImpactID','MeasureID', 'PreTechID', 'StdTechID','MeasTechID']].drop_duplicates() +# %% +#to match TechID triplets, merge on these 3 fields, keeping only valid TechID Triplets +if np.NaN in list(StdTechIDs['StdTechID'].unique()): + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['PreTechID','MeasTechID']) +elif np.NaN in list(PreTechIDs['PreTechID'].unique()): + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['StdTechID','MeasTechID']) +else: + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['PreTechID','StdTechID','MeasTechID']) + + + +# %% +#add placeholders, rearrange fields +current_msr_mat_proto['PreSizingID']='None' +current_msr_mat_proto['StdSizingID']='None' +current_msr_mat_proto['MsrSizingID']='None' +current_msr_mat_proto['SizingSrc']=np.nan + +#to be worked on: need to add corresponding indicator for what enduse it is for end use loadshape connections +current_msr_mat_proto['EU_HrRepVar']=np.nan + +current_msr_mat = current_msr_mat_proto[['MeasureID', 'BldgType', 'BldgVint','BldgLoc','BldgHVAC','tstat','PreTechID','PreSizingID', + 'StdTechID', 'StdSizingID','MeasTechID','MsrSizingID','SizingSrc','EU_HrRepVar','normunit']] +current_msr_mat = current_msr_mat.rename(columns={'normunit':'NormUnit'}) + +#%% +#check length of current_msr_mat +len(current_msr_mat) + +# %% +##STEP 5: Clean Up Sequence +#Creating updated Sim_annual and Sim_hourly data with distinguished TechID names if needed. +sim_annual_pre_common = sim_annual_f[sim_annual_f['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +sim_annual_std_common = sim_annual_f[sim_annual_f['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +sim_annual_msr_common = sim_annual_f[sim_annual_f['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] +# %% +#Add a TechID col renaming the common TechID to the specific TechID using PreTechIDs, StdTechIDs, MeasTechIDs + +#create full pre sim_annual sets for different names but the same TechID +# commom_preTechID = PreTechIDs['Common_PreTechID'].unique()[0] +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + sim_annual_pre = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + sim_annual_pre_mod = sim_annual_pre_common[sim_annual_pre_common['TechID']==common_id].copy() + sim_annual_pre_mod['TechID'] = new_id + #merge to final df + sim_annual_pre = pd.concat([sim_annual_pre, sim_annual_pre_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_pre = sim_annual_pre_common.copy() + +# %% +# create full std sim_annual sets for different names but the same TechID +if False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID']): + sim_annual_std = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_annual_std_mod = sim_annual_std_common[sim_annual_std_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_annual_std_mod['TechID'] = new_id + #merge to final df + sim_annual_std = pd.concat([sim_annual_std, sim_annual_std_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_std = sim_annual_std_common.copy() +# %% +# create full msr sim_annual sets for different names but the same TechID +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + sim_annual_msr = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_annual_msr_mod = sim_annual_msr_common[sim_annual_msr_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_annual_msr_mod['TechID'] = new_id + #merge to final df + sim_annual_msr = pd.concat([sim_annual_msr, sim_annual_msr_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_msr = sim_annual_msr_common.copy() + +# %% +#final merge sim_annual +sim_annual_final = pd.concat([sim_annual_pre, sim_annual_std, sim_annual_msr]) +# %% + +###same deal with with hourly data, separate into pre std msr, change into specific TechID +sim_hourly_pre_common = sim_hourly_f[sim_hourly_f['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +sim_hourly_std_common = sim_hourly_f[sim_hourly_f['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +sim_hourly_msr_common = sim_hourly_f[sim_hourly_f['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] + +# %% +#Pre hourly +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + sim_hourly_pre = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + sim_hourly_pre_mod = sim_hourly_pre_common[sim_hourly_pre_common['TechID']==common_id].copy() + sim_hourly_pre_mod['TechID'] = new_id + #merge to final df + sim_hourly_pre = pd.concat([sim_hourly_pre, sim_hourly_pre_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_pre = sim_hourly_pre_common.copy() +# %% +#Std hourly +if False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID']): + sim_hourly_std = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_hourly_std_mod = sim_hourly_std_common[sim_hourly_std_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_hourly_std_mod['TechID'] = new_id + #merge to final df + sim_hourly_std = pd.concat([sim_hourly_std, sim_hourly_std_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_std = sim_hourly_std_common.copy() +# %% +#Msr hourly +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + sim_hourly_msr = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_hourly_msr_mod = sim_hourly_msr_common[sim_hourly_msr_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_hourly_msr_mod['TechID'] = new_id + #merge to final df + sim_hourly_msr = pd.concat([sim_hourly_msr, sim_hourly_msr_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_msr = sim_hourly_msr_common.copy() + +# %% +#final merge sim_hourly +sim_hourly_final = pd.concat([sim_hourly_pre, sim_hourly_std, sim_hourly_msr]) + +# %% +##Final export of all processed data pre-SQL process +#change directory to wherever desired, if needed + +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) + +current_msr_mat.to_csv('current_msr_mat.csv', index=False) +sim_annual_final.to_csv('sim_annual.csv', index=False) +sim_hourly_final.to_csv('sim_hourly_wb.csv', index=False) + + +# %% diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/post-process/MFm.py b/residential measures/SWHC049-08 SEER Rated AC HP/post-process/MFm.py new file mode 100644 index 000000000..0cd1e45e0 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/post-process/MFm.py @@ -0,0 +1,654 @@ +#%% +##STEP 0: Setup (import all necessary libraries) +import pandas as pd +import numpy as np +import os +import sys +import datetime as dt +os.chdir(os.path.dirname(__file__)) #resets to current script directory +# %% +#Read master workbook for measure / tech list +df_master = pd.read_excel('DEER_EnergyPlus_Modelkit_Measure_list_working.xlsx', sheet_name='Measure_list', skiprows=4) + +measure_group_names = list(df_master['Measure Group Name'].unique()) + +# %% +#generate unique list of measure names +measures = list(df_master['Measure (general name)'].unique()) +# %% +#Shows list of measure names +print(measures) +#%% +#Define measure name here +measure_name = 'SEER Rated AC HP' + +# %% +#MFm only script +####Define path +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +os.chdir("../..") #go up two directory +print(os.path.abspath(os.curdir)) + +path = 'residential measures/SWHC049-06 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_MFm_New' +# %% +#extract only the 5th portion of the measure group name for expected_att +#split argument 4 means only split 4 times maximum +techgroup_techtypes = [i.split('&', 4)[-1] for i in measure_group_names] +tech_uniques = list(np.unique((np.array(techgroup_techtypes)))) +# Name parsing function per Amine +# This dictionary of attributes should be updated +expected_att = { + 'BldgType': ['MFm','SFm', 'DMo'], + 'Story': ['0','1','2'], # NA for Not Applicable + 'BldgHVAC': ['rDXGF','rDXHP','rNCEH','rNCGF'], + 'BldgVint': ['Ex','New'], + 'Measure': tech_uniques +} + +# function to parse meta data from & delimited case file names (Measure Group Name from master spreadsheet) +def parse_measure_name(measure_name): + #split at most 4 times for 5 descriptor fields + measure_name_split = measure_name.split('&', 4) + # Check here if the presented name has 5 attributes as expected: + if not len(measure_name_split) == 5: + sys.exit('The case name must have at least 5 attributes similar to < BldgType&Story&BldgHVAC&BldgVint&TechGroup__TechType >') + + attributes = list(expected_att.keys()) + measure_name_dict = {attributes[i]: measure_name_split[i] for i in range(0,5)} + + # Check here if the presented attributes are as expected: + for att in attributes: + if measure_name_dict[att] not in expected_att[att]: + sys.exit(f'Attribute <{measure_name_dict[att]}> was not expected') + + + return measure_name_dict # returns a dictionary + +def parse_measure_name2(cohort_names: pd.Series, verify: bool = False) -> pd.DataFrame: + '''Returns a DataFrame with five columns (all type string): + ["BldgType","Story","BldgHVAC","BldgVint","TechGroup__TechType"] + Each cohort name must match the pattern: + "BldgType&Story&BldgHVAC&BldgVint&TechGroup__TechType" + Only alphanumeric characters are allowed [a-zA-Z0-9_], except TechGroup__TechType may contain ampersand (&). + + Parameters + ---------- + cohort_names : pandas.Series + The cohort names as from cohorts.csv. + verify : bool, default=False + If true and name parts do not match `expected_att`, raise an exception. + + Returns + ------- + pandas.DataFrame + Structure containing the parts of cohort name. + ''' + result = cohort_names.str.extract( + r'(?P\w+)&(?P\w+)&(?P\w+)&(?P\w+)&(?P[^/]+)' + ) + if verify: + # Check for missing descriptor fields + missing = result.isna() + if missing.any().any(): + example = cohort_names[missing.any(axis=1)].iloc[0] + raise ValueError(f'Missing descriptor field, e.g. cohort = "{example}"') + # Check for unrecognized fields + for attr_name,attr_val in expected_att.items(): + unrecognized = ~result[attr_name].isin(attr_val) + if unrecognized.any(): + example = result[attr_name][unrecognized].iloc[0] + raise ValueError(f'Unrecognized descriptor field, e.g. {attr_name} = "{example}"') + result.rename({'Measure':'TechGroup__TechType'},axis=1,inplace=True) + return result + +#function to melt long 8760 col into 24col x365row format +def long2wide_pivot(df, name): + ''' + customized function. + input df is long 8760, 1 column format, with the daynum(of365) and hour of day(of24) mapped. + id is the unique identifier. + + output df is the 24col x 365row format of the 8760, with the corresponding id. + ''' + df_wide = df.pivot(index='daynum',columns='Hour', values=df.columns[0]).reset_index().rename_axis('', axis=1) + df_wide['ID']=name + #df_wide = pd.merge(df_wide, df_ag_key, on='ID') + + return df_wide + +#function to uses the “File Name” column from the results-summary csv to identify directory structure (an organized table) of a batch run +# and uses the structure to construct a semi-organized annual outputs table. +def annual_raw_parsing(df, cohort_dict): + #create separated meta data cols + df['BldgLoc'] = split_meta_cols_eu[0] + + df['BldgType'] = cohort_dict['BldgType'] + df['BldgHVAC'] = cohort_dict['BldgHVAC'] + df['BldgVint'] = cohort_dict['BldgVint'] + + df['Story'] = cohort_dict['Story'] + + df['TechGroup_TechType'] = cohort_dict['Measure'] + + df['TechID'] = split_meta_cols_eu[2] + df['file'] = split_meta_cols_eu[3] + + annual_df_v1 = df[['TechID', 'file', 'BldgLoc', 'BldgType','BldgHVAC','BldgVint','Story', 'TechGroup_TechType','Total (kWh)', 'Heating (kWh)', 'Cooling (kWh)', + 'Interior Lighting (kWh)', 'Exterior Lighting (kWh)', + 'Interior Equipment (kWh)', 'Exterior Equipment (kWh)', 'Fans (kWh)', + 'Pumps (kWh)', 'Heat Rejection (kWh)', 'Humidification (kWh)', + 'Heat Recovery (kWh)', 'Water Systems (kWh)', 'Refrigeration (kWh)', + 'Generators (kWh)', 'Heating Elec (kWh)', 'Cooling Elec (kWh)', + 'Heating NG (kWh)', 'Cooling NG (kWh)', 'Interior Equipment Elec (kWh)', + 'Interior Equipment NG (kWh)']] + + return annual_df_v1 + +#function to merge and rearrange specific annual consumption end-use fields into the format required +def end_use_rearrange(df_in): + df_in['kwh_tot'] = (df_in['Heating Elec (kWh)'] + \ + df_in['Cooling Elec (kWh)'] +\ + df_in['Interior Equipment Elec (kWh)'] +\ + df_in['Interior Lighting (kWh)'] +\ + df_in['Exterior Lighting (kWh)'] +\ + df_in['Fans (kWh)']+\ + df_in['Pumps (kWh)']) + + df_in['kwh_ltg'] = (df_in['Interior Lighting (kWh)'] +\ + df_in['Exterior Lighting (kWh)']) + + df_in['kwh_task'] = 0 # placeholder (task lighting load?) + + df_in['kwh_equip'] = df_in['Interior Equipment Elec (kWh)'] +\ + df_in['Exterior Equipment (kWh)'] + + df_in['kwh_htg'] = df_in['Heating Elec (kWh)'] + df_in['kwh_clg'] = df_in['Cooling Elec (kWh)'] + df_in['kwh_twr'] = 0 #place holder (tower kwh load?) + df_in['kwh_aux'] = 0 #place holder (aux equipment kwh load?) + + df_in['kwh_vent'] = df_in['Fans (kWh)'] #use fan kWh as vent load for now + + df_in['kwh_venthtg'] =0 #placeholders fields for now + df_in['kwh_ventclg'] =0 + df_in['kwh_refg'] = 0 + df_in['kwh_hpsup'] = 0 + df_in['kwh_shw'] = 0 + df_in['kwh_ext'] = 0 + + df_in['thm_tot'] = (df_in['Heating NG (kWh)'] +\ + df_in['Cooling NG (kWh)'] +\ + df_in['Interior Equipment NG (kWh)'] +\ + df_in['Water Systems (kWh)'])/29.3 + + df_in['thm_equip'] = df_in['Interior Equipment NG (kWh)']/29.3 + + df_in['thm_htg'] = df_in['Heating NG (kWh)']/29.3 + + df_in['thm_shw'] = df_in['Water Systems (kWh)']/29.3 + + df_in['deskw_ltg'] = 1 #placeholders fields for now + df_in['deskw_equ'] = 1 + + return df_in + +# %% +#create measure specific Master table based on Measure selected +df_measure = df_master[df_master['Measure (general name)'] == measure_name] +case_cohort_list = df_measure['Measure Group Name'].unique() + + +# %% +##STEP 1: Annual data extraction / transformation + +df_raw = pd.read_csv(path+'/results-summary.csv', usecols=['File Name']) +num_runs = len(df_raw['File Name'].dropna().unique()) - 1 +#Read annual data +annual_df = pd.read_csv(path+'/results-summary.csv', nrows=num_runs, skiprows=num_runs+2) +split_meta_cols_eu = annual_df['File Name'].str.split('/', expand=True) + +#if looping over multiple folders/cohort cases, use a list +cohort_cases = list(split_meta_cols_eu[1].unique()) + +sim_annual_proto = pd.DataFrame() +for case in cohort_cases: + print(f'processing all annual data that are grouped in {case}') + cohort_dict = parse_measure_name(case) + sim_annual_i = annual_raw_parsing(annual_df[annual_df['File Name'].str.contains(case)].copy(), cohort_dict) + sim_annual_proto = pd.concat([sim_annual_proto, sim_annual_i]) + print('ok.') +sim_annual_proto = end_use_rearrange(sim_annual_proto) +sim_annual_v1 = sim_annual_proto[['TechID', 'BldgLoc', 'BldgType', 'BldgHVAC', 'BldgVint', 'kwh_tot', 'kwh_ltg', 'kwh_task', + 'kwh_equip', 'kwh_htg', 'kwh_clg', 'kwh_twr', 'kwh_aux', 'kwh_vent', + 'kwh_venthtg', 'kwh_ventclg', + 'kwh_refg', 'kwh_hpsup', 'kwh_shw', 'kwh_ext', 'thm_tot', 'thm_equip', + 'thm_htg', 'thm_shw', 'deskw_ltg', 'deskw_equ']].drop_duplicates().copy() + +# %% +##STEP 2: Hourly data extraction / transformation +#Read 8760 map +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +annual_map = pd.read_excel('annual8760map.xlsx') + +# %% +os.chdir("../..") #go up two directory +print(os.path.abspath(os.curdir)) +hrly_path = path + '/runs' + +#extract data per bldgtype-bldghvac-bldgvint group +hourly_df = pd.DataFrame(index=range(0,8760)) +#extract num_runs / split_meta_cols_eu +df_raw = pd.read_csv(path+'/'+'/results-summary.csv', usecols=['File Name']) +num_runs = len(df_raw['File Name'].dropna().unique()) - 1 +annual_df = pd.read_csv(path+'/'+'/results-summary.csv', nrows=num_runs, skiprows=num_runs+2) +split_meta_cols_eu = annual_df['File Name'].str.split('/', expand=True) +for i in range(0,num_runs): + print(f"merging record {i}") + + #loop path of each file, read corresponding file + full_path = hrly_path + "/" + split_meta_cols_eu.iloc[i][0] + "/" + split_meta_cols_eu.iloc[i][1] + "/" + split_meta_cols_eu.iloc[i][2] + "/instance-var.csv" + df = pd.read_csv(full_path, low_memory=False) + + #remove traling spaces on col headers + df.columns = df.columns.str.rstrip() + + #extract the last column (the total elec hrly profile) + #if for enduse hourly, then extract the relevant end use column + extracted_df = pd.DataFrame(df['Electricity:Facility [J](Hourly)']) + + #create the column name based on the permutations + col_name = split_meta_cols_eu.iloc[i][0] + "/" + split_meta_cols_eu.iloc[i][1] + "/" + split_meta_cols_eu.iloc[i][2] + "/instance-var.csv" + + #change column name + extracted_df = extracted_df.set_axis([col_name],axis=1) + if len(extracted_df)!=8760: + #8/31/2022 update, need to make the final length 8808. Snip data based on difference to 8760 + record_count_diff = len(extracted_df) - 8760 + print(f'extra records: {str(len(extracted_df))}, snipping away {record_count_diff} records and changing to 8760') + extracted_df = extracted_df.iloc[record_count_diff:].reset_index(drop=True) + + #left-merge onto big df + hourly_df = hourly_df.merge(extracted_df, left_index=True, right_index=True) +# %% +fyr_hrly = hourly_df +#rearrange 1-column 8760 format to 365x24 wide format for all runs in hourly_df +converted_df = pd.DataFrame() + +for i in range(0,len(fyr_hrly.columns)): + + #isolate single column + hrly_df = pd.DataFrame(fyr_hrly.iloc[:,i]) + + #create separate metadata columns + col_names = hrly_df.columns[0].split('/') + + #create new key column for merge + hrly_df['hr in 8760'] = (hrly_df.index) + 1 + + #merge based on "hr in 8760" column, the 8760 map + hrly_mapped = pd.merge(hrly_df, annual_map, on='hr in 8760') + + #transform data format + hrly_wide = long2wide_pivot(hrly_mapped, hrly_mapped.columns[0]) + + #add meta data col + hrly_wide['BldgLoc'] = col_names[0] + hrly_wide['BldgType'] = col_names[1] + hrly_wide['TechID'] = col_names[2] + hrly_wide['file'] = col_names[3] + + #append to master df + #converted_df = converted_df.append(hrly_wide) #deprecated method + converted_df = pd.concat([converted_df, hrly_wide]) + print(f"col {i} transformed.") +#%% +#rearrange columns +sim_hourly_wb_proto = converted_df[['TechID','file','BldgLoc','BldgType','ID','daynum',1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, + 24]].copy() +#hourly data conversion +#convert unit (J) to (kWh) for hourly + +sim_hourly_wb_proto['hr01'] = sim_hourly_wb_proto[1]/3600000 +sim_hourly_wb_proto['hr02'] = sim_hourly_wb_proto[2]/3600000 +sim_hourly_wb_proto['hr03'] = sim_hourly_wb_proto[3]/3600000 +sim_hourly_wb_proto['hr04'] = sim_hourly_wb_proto[4]/3600000 +sim_hourly_wb_proto['hr05'] = sim_hourly_wb_proto[5]/3600000 +sim_hourly_wb_proto['hr06'] = sim_hourly_wb_proto[6]/3600000 +sim_hourly_wb_proto['hr07'] = sim_hourly_wb_proto[7]/3600000 +sim_hourly_wb_proto['hr08'] = sim_hourly_wb_proto[8]/3600000 +sim_hourly_wb_proto['hr09'] = sim_hourly_wb_proto[9]/3600000 +sim_hourly_wb_proto['hr10'] = sim_hourly_wb_proto[10]/3600000 +sim_hourly_wb_proto['hr11'] = sim_hourly_wb_proto[11]/3600000 +sim_hourly_wb_proto['hr12'] = sim_hourly_wb_proto[12]/3600000 +sim_hourly_wb_proto['hr13'] = sim_hourly_wb_proto[13]/3600000 +sim_hourly_wb_proto['hr14'] = sim_hourly_wb_proto[14]/3600000 +sim_hourly_wb_proto['hr15'] = sim_hourly_wb_proto[15]/3600000 +sim_hourly_wb_proto['hr16'] = sim_hourly_wb_proto[16]/3600000 +sim_hourly_wb_proto['hr17'] = sim_hourly_wb_proto[17]/3600000 +sim_hourly_wb_proto['hr18'] = sim_hourly_wb_proto[18]/3600000 +sim_hourly_wb_proto['hr19'] = sim_hourly_wb_proto[19]/3600000 +sim_hourly_wb_proto['hr20'] = sim_hourly_wb_proto[20]/3600000 +sim_hourly_wb_proto['hr21'] = sim_hourly_wb_proto[21]/3600000 +sim_hourly_wb_proto['hr22'] = sim_hourly_wb_proto[22]/3600000 +sim_hourly_wb_proto['hr23'] = sim_hourly_wb_proto[23]/3600000 +sim_hourly_wb_proto['hr24'] = sim_hourly_wb_proto[24]/3600000 + +#rearrange columns +sim_hourly_wb_v1 = sim_hourly_wb_proto[['TechID','file','BldgLoc','BldgType','ID','daynum','hr01','hr02','hr03','hr04','hr05','hr06', + 'hr07', 'hr08', 'hr09', 'hr10', 'hr11', 'hr12', + 'hr13', 'hr14', 'hr15', 'hr16', 'hr17', 'hr18', + 'hr19', 'hr20', 'hr21', 'hr22', 'hr23', 'hr24']].copy() +# %% +##STEP 3: Normalizing Units +bldgtype = 'MFm' +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +df_normunits = pd.read_excel('Normunits.xlsx', sheet_name=bldgtype) +numunits_vals = df_normunits[df_normunits['Normunit'] == df_measure['Normunit'].unique()[0]][['CZ','Value', 'Msr','BldgVint']] +#%% +#create numunits object based on what normunit it uses. +#numunits can be a single value, or a dictionary +if len(numunits_vals) == 1: + numunits = list(numunits_vals['Value'])[0] +elif (measure_name == 'Wall Insulation') or (measure_name == 'Ceiling Insulation'): + numunits = list(numunits_vals[numunits_vals['Msr'] == measure_name]['Value'])[0] +elif measure_name == 'PTAC / PTHP': + #create aligned lists for numunit dictionary + cz = list(numunits_vals['CZ']) + vint = list(numunits_vals['BldgVint']) + nvals = list(numunits_vals['Value']) + #create dictionary of {(cz,vintage):numunits} + numunits = {(cz[i],vint[i]):nvals[i] for i in range(len(cz))} +else: + pass + +# %% +##Annual Data final field fixes +#note normunit = building area (conditioned) +sim_annual_v1['SizingID'] = 'None' +sim_annual_v1['tstat'] = 0 +#now Norm unit is read from measure master table +sim_annual_v1['normunit'] = df_measure['Normunit'].unique()[0] +#make this automatic as well +sim_annual_v1['measarea'] = 24576 #from MFm model outputs htmls + +#apply normunits where appropriate +#num unit will be per dwelling, so divide by num of dwellings (2 for SFM, DMo, 24 for MFm) + +if measure_name == 'PTAC / PTHP': + #Map special dictionary to the correct values + sim_annual_v1['numunits'] = pd.Series(list(zip(sim_annual_v1['BldgLoc'],sim_annual_v1['BldgVint']))).map(numunits)/24 +else: + sim_annual_v1['numunits'] = numunits/24 + + +sim_annual_v1['lastmod']=dt.datetime.now() + +#rearrange columns +sim_annual_f = sim_annual_v1[['TechID', 'SizingID', 'BldgType','BldgVint','BldgLoc','BldgHVAC','tstat', + 'normunit', 'numunits', 'measarea', 'kwh_tot', 'kwh_ltg', 'kwh_task', + 'kwh_equip', 'kwh_htg', 'kwh_clg', 'kwh_twr', 'kwh_aux', 'kwh_vent', + 'kwh_venthtg', 'kwh_ventclg', 'kwh_refg', 'kwh_hpsup', 'kwh_shw', + 'kwh_ext', 'thm_tot', 'thm_equip', 'thm_htg', 'thm_shw', 'deskw_ltg', + 'deskw_equ', 'lastmod']] +# %% +##Hourly Data final field fixes + +#update field names based on what it contains +df_tmp = parse_measure_name2(sim_hourly_wb_v1['ID'],verify=True) +sim_hourly_wb_v1['BldgVint'] = df_tmp['BldgVint'] +sim_hourly_wb_v1['BldgHVAC'] = df_tmp['BldgHVAC'] +sim_hourly_wb_v1['BldgType'] = df_tmp['BldgType'] +del df_tmp +sim_hourly_wb_v1['SizingID'] = 'None' +sim_hourly_wb_v1['tstat'] = 0 +sim_hourly_wb_v1['enduse'] = 0 +sim_hourly_wb_v1['lastmod']=dt.datetime.now() + +#rearrange columns +sim_hourly_f = sim_hourly_wb_v1[['TechID', 'SizingID', 'BldgType', 'BldgVint', 'BldgLoc','BldgHVAC','tstat', 'enduse', 'daynum', + 'hr01', 'hr02', 'hr03', 'hr04', 'hr05', 'hr06', 'hr07', 'hr08', 'hr09', 'hr10', 'hr11', + 'hr12', 'hr13', 'hr14', 'hr15', 'hr16', 'hr17', 'hr18', 'hr19', 'hr20', + 'hr21', 'hr22', 'hr23', 'hr24', 'lastmod']] +# %% +##STEP 4: Measure setup file (current_msr_mat.csv) + +# Creating current_msr_mat and finalzing TechID's + +metadata_cols = sim_annual_f[['TechID', 'BldgLoc', 'BldgType', 'BldgVint', 'BldgHVAC', 'SizingID', + 'tstat', 'normunit']] + +#check unique TechID cases +metadata_cols['TechID'].unique() +# %% +#TechID identification from Master table +#if looping over all HVAC types, ignore BldgHVAC filter +PreTechIDs = df_measure[['PreTechID','Common_PreTechID']].drop_duplicates() +StdTechIDs = df_measure[['StdTechID','Common_StdTechID']].drop_duplicates() +MeasTechIDs = df_measure[['MeasTechID','Common_MeasTechID']].drop_duplicates() +# %% +#filter out each pre, std, msr using the Common TechIDs from master table +metadata_pre = metadata_cols[metadata_cols['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +metadata_std = metadata_cols[metadata_cols['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +metadata_msr = metadata_cols[metadata_cols['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] + +# %% +#rename to Pre, Std or Msr +#both Std and Pre are baseline for SEER rated AC measures +metadata_pre = metadata_pre.rename(columns={'TechID':'PreTechID'}) +metadata_std = metadata_std.rename(columns={'TechID':'StdTechID'}) +metadata_msr = metadata_msr.rename(columns={'TechID':'MeasTechID'}) +# %% +#Changing common TechID to actual TechIDs if needed. +#might only apply to SEER AC/HP + +#create full pre_metadata sets for different names but the same TechID +# commom_preTechID = PreTechIDs['Common_PreTechID'].unique()[0] +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + metadata_pre_full = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + metadata_pre_mod = metadata_pre[metadata_pre['PreTechID']==common_id].copy() + metadata_pre_mod['PreTechID'] = new_id + #merge to final df + metadata_pre_full = pd.concat([metadata_pre_full, metadata_pre_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_pre_full = metadata_pre.copy() + + +# %% +#create std_metadata sets, assigning appropriate final TechIDs +if False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID']): + metadata_std_full = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + metadata_std_mod = metadata_std[metadata_std['StdTechID']==common_id].copy() + #Change into final techID name (new) + metadata_std_mod['StdTechID'] = new_id + #merge to final df + metadata_std_full = pd.concat([metadata_std_full, metadata_std_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_std_full = metadata_std.copy() +# %% +#create msr_metadata sets, assigning appropriate final TechIDs +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + metadata_msr_full = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Identify corresponding common TechID (the last 9 characters indicating SEER levels) + metadata_msr_mod = metadata_msr[metadata_msr['MeasTechID']==common_id].copy() + #Change into final TechID name + metadata_msr_mod['MeasTechID'] = new_id + #merge to final df + metadata_msr_full = pd.concat([metadata_msr_full, metadata_msr_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_msr_full = metadata_msr.copy() +# %% +#create raw merged current_msr_mat +#need to delete/drop incorrect sets +if np.NaN in list(StdTechIDs['StdTechID'].unique()): + df_measure_set_full = pd.merge(metadata_pre_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) +elif np.NaN in list(PreTechIDs['PreTechID'].unique()): + df_measure_set_full = pd.merge(metadata_std_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) +else: + df_measure_baseline_full = pd.merge(metadata_pre_full, metadata_std_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) + df_measure_set_full = pd.merge(df_measure_baseline_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) + +# %% +#Unique sets of each MeasureID with their TechID triplets +TechID_triplets = df_measure[['EnergyImpactID','MeasureID', 'PreTechID', 'StdTechID','MeasTechID']].drop_duplicates() +# %% +#to match TechID triplets, merge on these 3 fields, keeping only valid TechID Triplets +if np.NaN in list(StdTechIDs['StdTechID'].unique()): + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['PreTechID','MeasTechID']) +elif np.NaN in list(PreTechIDs['PreTechID'].unique()): + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['StdTechID','MeasTechID']) +else: + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['PreTechID','StdTechID','MeasTechID']) + +# %% +#add placeholders, rearrange fields +current_msr_mat_proto['PreSizingID']='None' +current_msr_mat_proto['StdSizingID']='None' +current_msr_mat_proto['MsrSizingID']='None' +current_msr_mat_proto['SizingSrc']=np.nan + +#to be worked on: need to add corresponding indicator for what enduse it is for end use loadshape connections +current_msr_mat_proto['EU_HrRepVar']=np.nan + +current_msr_mat = current_msr_mat_proto[['MeasureID', 'BldgType', 'BldgVint','BldgLoc','BldgHVAC','tstat','PreTechID','PreSizingID', + 'StdTechID', 'StdSizingID','MeasTechID','MsrSizingID','SizingSrc','EU_HrRepVar','normunit']] +current_msr_mat = current_msr_mat.rename(columns={'normunit':'NormUnit'}) + +#%% +#check length of current_msr_mat +len(current_msr_mat) + +# %% +##STEP 5: Clean Up Sequence +#Creating updated Sim_annual and Sim_hourly data with distinguished TechID names +sim_annual_pre_common = sim_annual_f[sim_annual_f['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +sim_annual_std_common = sim_annual_f[sim_annual_f['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +sim_annual_msr_common = sim_annual_f[sim_annual_f['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] +# %% +#Add a TechID col renaming the common TechID to the specific TechID using PreTechIDs, StdTechIDs, MeasTechIDs + +#create full pre sim_annual sets for different names but the same TechID +# commom_preTechID = PreTechIDs['Common_PreTechID'].unique()[0] +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + sim_annual_pre = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + sim_annual_pre_mod = sim_annual_pre_common[sim_annual_pre_common['TechID']==common_id].copy() + sim_annual_pre_mod['TechID'] = new_id + #merge to final df + sim_annual_pre = pd.concat([sim_annual_pre, sim_annual_pre_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_pre = sim_annual_pre_common.copy() + +# %% +# create full std sim_annual sets for different names but the same TechID +if False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID']): + sim_annual_std = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_annual_std_mod = sim_annual_std_common[sim_annual_std_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_annual_std_mod['TechID'] = new_id + #merge to final df + sim_annual_std = pd.concat([sim_annual_std, sim_annual_std_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_std = sim_annual_std_common.copy() +# %% +# create full msr sim_annual sets for different names but the same TechID +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + sim_annual_msr = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_annual_msr_mod = sim_annual_msr_common[sim_annual_msr_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_annual_msr_mod['TechID'] = new_id + #merge to final df + sim_annual_msr = pd.concat([sim_annual_msr, sim_annual_msr_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_msr = sim_annual_msr_common.copy() + +# %% +#final merge sim_annual +sim_annual_final = pd.concat([sim_annual_pre, sim_annual_std, sim_annual_msr]) +# %% + +###same deal with with hourly data, separate into pre std msr, change into specific TechID +sim_hourly_pre_common = sim_hourly_f[sim_hourly_f['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +sim_hourly_std_common = sim_hourly_f[sim_hourly_f['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +sim_hourly_msr_common = sim_hourly_f[sim_hourly_f['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] + +# %% +#Pre hourly +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + sim_hourly_pre = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + sim_hourly_pre_mod = sim_hourly_pre_common[sim_hourly_pre_common['TechID']==common_id].copy() + sim_hourly_pre_mod['TechID'] = new_id + #merge to final df + sim_hourly_pre = pd.concat([sim_hourly_pre, sim_hourly_pre_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_pre = sim_hourly_pre_common.copy() +# %% +#Std hourly +if False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID']): + sim_hourly_std = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_hourly_std_mod = sim_hourly_std_common[sim_hourly_std_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_hourly_std_mod['TechID'] = new_id + #merge to final df + sim_hourly_std = pd.concat([sim_hourly_std, sim_hourly_std_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_std = sim_hourly_std_common.copy() +# %% +#Msr hourly +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + sim_hourly_msr = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_hourly_msr_mod = sim_hourly_msr_common[sim_hourly_msr_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_hourly_msr_mod['TechID'] = new_id + #merge to final df + sim_hourly_msr = pd.concat([sim_hourly_msr, sim_hourly_msr_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_msr = sim_hourly_msr_common.copy() + +# %% +#final merge sim_hourly +sim_hourly_final = pd.concat([sim_hourly_pre, sim_hourly_std, sim_hourly_msr]) + +# %% +##Final export of all processed data pre-SQL process +#change directory to wherever desired, if needed +current_msr_mat.to_csv('current_msr_mat.csv', index=False) +sim_annual_final.to_csv('sim_annual.csv', index=False) +sim_hourly_final.to_csv('sim_hourly_wb.csv', index=False) + diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/post-process/SFm.py b/residential measures/SWHC049-08 SEER Rated AC HP/post-process/SFm.py new file mode 100644 index 000000000..115c7d919 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/post-process/SFm.py @@ -0,0 +1,884 @@ +#%% +##STEP 0: Setup (import all necessary libraries) +import pandas as pd +import numpy as np +import os +import sys +import datetime as dt +os.chdir(os.path.dirname(__file__)) #resets to current script directory +# %% +#Read master workbook for measure / tech list +df_master = pd.read_excel('DEER_EnergyPlus_Modelkit_Measure_list_working.xlsx', sheet_name='Measure_list', skiprows=4) + +measure_group_names = list(df_master['Measure Group Name'].unique()) + +# %% +#generate unique list of measure names +measures = list(df_master['Measure (general name)'].unique()) +# %% +#Shows list of measure names +print(measures) +#%% +#Define measure name here +measure_name = 'SEER Rated AC HP' + +# %% +#SFm only script +####Define path +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +os.chdir("../..") #go up two directory +print(os.path.abspath(os.curdir)) + +#input the two subdirectory of SFm, one being 1975, the other 1985. If New vintage, input path at path_new and leave other blank. +path_1975 = 'residential measures/SWHC049-06 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1975' +path_1985 = 'residential measures/SWHC049-06 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_1985' +path_new = 'residential measures/SWHC049-06 SEER Rated AC HP/SWHC049-06 SEER Rated AC HP_SFm_New' + +MODE_NEW_VINTAGE = False +if MODE_NEW_VINTAGE: + paths = [path_new] +else: + paths = [path_1975, path_1985] + +# %% +#extract only the 5th portion of the measure group name for expected_att +#split argument 4 means only split 4 times maximum +techgroup_techtypes = [i.split('&', 4)[-1] for i in measure_group_names] +tech_uniques = list(np.unique((np.array(techgroup_techtypes)))) +# Name parsing function per Amine +# This dictionary of attributes should be updated +expected_att = { + 'BldgType': ['MFm','SFm', 'DMo'], + 'Story': ['0','1','2'], # NA for Not Applicable + 'BldgHVAC': ['rDXGF','rDXHP','rNCEH','rNCGF'], + 'BldgVint': ['Ex','New'], + 'Measure': tech_uniques +} +# function to parse meta data from & delimited case file names (Measure Group Name from master spreadsheet) +def parse_measure_name(measure_name): + #split at most 4 times for 5 descriptor fields + measure_name_split = measure_name.split('&', 4) + # Check here if the presented name has 5 attributes as expected: + if not len(measure_name_split) == 5: + sys.exit('The case name must have at least 5 attributes similar to < BldgType&Story&BldgHVAC&BldgVint&TechGroup__TechType >') + + attributes = list(expected_att.keys()) + measure_name_dict = {attributes[i]: measure_name_split[i] for i in range(0,5)} + + # Check here if the presented attributes are as expected: + for att in attributes: + if measure_name_dict[att] not in expected_att[att]: + sys.exit(f'Attribute <{measure_name_dict[att]}> was not expected') + + + return measure_name_dict # returns a dictionary + +def parse_measure_name2(cohort_names: pd.Series, verify: bool = False) -> pd.DataFrame: + '''Returns a DataFrame with five columns (all type string): + ["BldgType","Story","BldgHVAC","BldgVint","TechGroup__TechType"] + Each cohort name must match the pattern: + "BldgType&Story&BldgHVAC&BldgVint&TechGroup__TechType" + Only alphanumeric characters are allowed [a-zA-Z0-9_], except TechGroup__TechType may contain ampersand (&). + + Parameters + ---------- + cohort_names : pandas.Series + The cohort names as from cohorts.csv. + verify : bool, default=False + If true and name parts do not match `expected_att`, raise an exception. + + Returns + ------- + pandas.DataFrame + Structure containing the parts of cohort name. + ''' + result = cohort_names.str.extract( + r'(?P\w+)&(?P\w+)&(?P\w+)&(?P\w+)&(?P[^/]+)' + ) + if verify: + # Check for missing descriptor fields + missing = result.isna() + if missing.any().any(): + example = cohort_names[missing.any(axis=1)].iloc[0] + raise ValueError(f'Missing descriptor field, e.g. cohort = "{example}"') + # Check for unrecognized fields + for attr_name,attr_val in expected_att.items(): + unrecognized = ~result[attr_name].isin(attr_val) + if unrecognized.any(): + example = result[attr_name][unrecognized].iloc[0] + raise ValueError(f'Unrecognized descriptor field, e.g. {attr_name} = "{example}"') + result.rename({'Measure':'TechGroup__TechType'},axis=1,inplace=True) + return result + +#function to melt long 8760 col into 24col x365row format +def long2wide_pivot(df, name): + ''' + customized function. + input df is long 8760, 1 column format, with the daynum(of365) and hour of day(of24) mapped. + id is the unique identifier. + + output df is the 24col x 365row format of the 8760, with the corresponding id. + ''' + df_wide = df.pivot(index='daynum',columns='Hour', values=df.columns[0]).reset_index().rename_axis('', axis=1) + df_wide['ID']=name + #df_wide = pd.merge(df_wide, df_ag_key, on='ID') + + return df_wide + +#function to uses the “File Name” column from the results-summary csv to identify directory structure (an organized table) of a batch run +# and uses the structure to construct a semi-organized annual outputs table. +def annual_raw_parsing(df, cohort_dict): + #create separated meta data cols + df['BldgLoc'] = split_meta_cols_eu[0] + + df['BldgType'] = cohort_dict['BldgType'] + df['BldgHVAC'] = cohort_dict['BldgHVAC'] + df['BldgVint'] = cohort_dict['BldgVint'] + + df['Story'] = cohort_dict['Story'] + + df['TechGroup_TechType'] = cohort_dict['Measure'] + + df['TechID'] = split_meta_cols_eu[2] + df['file'] = split_meta_cols_eu[3] + + annual_df_v1 = df[['TechID', 'file', 'BldgLoc', 'BldgType','BldgHVAC','BldgVint','Story', 'TechGroup_TechType','Total (kWh)', 'Heating (kWh)', 'Cooling (kWh)', + 'Interior Lighting (kWh)', 'Exterior Lighting (kWh)', + 'Interior Equipment (kWh)', 'Exterior Equipment (kWh)', 'Fans (kWh)', + 'Pumps (kWh)', 'Heat Rejection (kWh)', 'Humidification (kWh)', + 'Heat Recovery (kWh)', 'Water Systems (kWh)', 'Refrigeration (kWh)', + 'Generators (kWh)', 'Heating Elec (kWh)', 'Cooling Elec (kWh)', + 'Heating NG (kWh)', 'Cooling NG (kWh)', 'Interior Equipment Elec (kWh)', + 'Interior Equipment NG (kWh)']] + + return annual_df_v1 + +#function to merge and rearrange specific annual consumption end-use fields into the format required +def end_use_rearrange(df): + #end use rearrangement + df['kwh_tot'] = (df['Heating Elec (kWh)'] + \ + df['Cooling Elec (kWh)'] +\ + df['Interior Equipment Elec (kWh)'] +\ + df['Interior Lighting (kWh)'] +\ + df['Exterior Lighting (kWh)'] +\ + df['Fans (kWh)']+\ + df['Pumps (kWh)']) + + df['kwh_ltg'] = (df['Interior Lighting (kWh)'] +\ + df['Exterior Lighting (kWh)']) + + df['kwh_task'] = 0 # placeholder (task lighting load?) + + df['kwh_equip'] = df['Interior Equipment Elec (kWh)'] +\ + df['Exterior Equipment (kWh)'] + + df['kwh_htg'] = df['Heating Elec (kWh)'] + + df['kwh_clg'] = df['Cooling Elec (kWh)'] + + df['kwh_twr'] = 0 #place holder (tower kwh load?) + df['kwh_aux'] = 0 #place holder (aux equipment kwh load?) + df['kwh_vent'] = df['Fans (kWh)'] #use fan kWh as vent load for now + + df['kwh_venthtga'] =0 #placeholders fields.. + df['kwh_ventclga'] =0 + + df['kwh_venthtgb'] =0 + df['kwh_ventclgb'] =0 + + df['kwh_refg'] = 0 + df['kwh_hpsup'] = 0 + df['kwh_shw'] = 0 + df['kwh_ext'] = 0 + + df['thm_tot'] = (df['Heating NG (kWh)'] +\ + df['Cooling NG (kWh)'] +\ + df['Interior Equipment NG (kWh)'] +\ + df['Water Systems (kWh)'])/29.3 + + df['thm_equip'] = df['Interior Equipment NG (kWh)']/29.3 + + df['thm_htg'] = df['Heating NG (kWh)']/29.3 + + df['thm_shw'] = df['Water Systems (kWh)']/29.3 + + df['deskw_ltg'] = 1 #placeholders fields for now + df['deskw_equ'] = 1 + + annual_df_final = df[['TechID', 'BldgLoc', 'BldgType','BldgHVAC', 'BldgVint', 'kwh_tot', 'kwh_ltg', 'kwh_task', + 'kwh_equip', 'kwh_htg', 'kwh_clg', 'kwh_twr', 'kwh_aux', 'kwh_vent', + 'kwh_venthtga', 'kwh_ventclga', 'kwh_venthtgb', 'kwh_ventclgb', + 'kwh_refg', 'kwh_hpsup', 'kwh_shw', 'kwh_ext', 'thm_tot', 'thm_equip', + 'thm_htg', 'thm_shw']] + + return annual_df_final + +# %% +#create measure specific Master table based on Measure selected +df_measure = df_master[df_master['Measure (general name)'] == measure_name] +case_cohort_list = df_measure['Measure Group Name'].unique() + +# %% +##STEP 1: Annual data extraction / transformation +sim_annual_raw = pd.DataFrame() +for path in paths: + print(f'processing data in {path}') + df_raw = pd.read_csv(path+'/results-summary.csv', usecols=['File Name']) + num_runs = len(df_raw['File Name'].dropna().unique()) - 1 + #Read annual data + annual_df = pd.read_csv(path+'/results-summary.csv', nrows=num_runs, skiprows=num_runs+2) + split_meta_cols_eu = annual_df['File Name'].str.split('/', expand=True) + + #looping over multiple folders/cohort cases, use a list + cohort_cases = list(split_meta_cols_eu[1].unique()) + sim_annual_proto = pd.DataFrame() + for case in cohort_cases: + print(f'processing all annual data that are grouped in {case}') + cohort_dict = parse_measure_name(case) + sim_annual_i = annual_raw_parsing(annual_df[annual_df['File Name'].str.contains(case)].copy(), cohort_dict) + sim_annual_proto = pd.concat([sim_annual_proto, sim_annual_i]) + print('ok.') + sim_annual_raw = pd.concat([sim_annual_raw, sim_annual_proto]) + +#%% + +#seperate into 1-story and 2-story, SFm, New vintage, (no need to separate DXGF and NCGF if combined) + +sim_annual_1s = sim_annual_raw[sim_annual_raw['Story']=='1'].copy() +sim_annual_2s = sim_annual_raw[sim_annual_raw['Story']=='2'].copy() +# %% +#apply enduse rearrangement +sim_annual_1s_v1 = end_use_rearrange(sim_annual_1s) +sim_annual_2s_v1 = end_use_rearrange(sim_annual_2s) + + +# %% +##STEP 2: Hourly data extraction / transformation +#Read 8760 map +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +annual_map = pd.read_excel('annual8760map.xlsx') +hrly_paths = paths + + +#%% +os.chdir("../..") #go up two directories +print(os.path.abspath(os.curdir)) + +sim_hourly_raw = pd.DataFrame() + +for path in paths: + print(f'processing data in {path}') + hrly_path = path + '/runs' + + #extract data per bldgtype-bldghvac-bldgvint group + hourly_df = pd.DataFrame(index=range(0,8760)) + #extract num_runs / split_meta_cols_eu + df_raw = pd.read_csv(path+'/results-summary.csv', usecols=['File Name']) + num_runs = len(df_raw['File Name'].dropna().unique()) - 1 + annual_df = pd.read_csv(path+'/results-summary.csv', nrows=num_runs, skiprows=num_runs+2) + split_meta_cols_eu = annual_df['File Name'].str.split('/', expand=True) + for i in range(0,num_runs): + print(f"merging record {i}") + + #loop path of each file, read corresponding file + full_path = hrly_path + "/" + split_meta_cols_eu.iloc[i][0] + "/" + split_meta_cols_eu.iloc[i][1] + "/" + split_meta_cols_eu.iloc[i][2] + "/instance-var.csv" + df = pd.read_csv(full_path, low_memory=False) + + #remove traling spaces on col headers + df.columns = df.columns.str.rstrip() + + #extract the last column (the total elec hrly profile) + #if for enduse hourly, then extract the relevant end use column + extracted_df = pd.DataFrame(df['Electricity:Facility [J](Hourly)']) + + #create the column name based on the permutations + col_name = split_meta_cols_eu.iloc[i][0] + "/" + split_meta_cols_eu.iloc[i][1] + "/" + split_meta_cols_eu.iloc[i][2] + "/instance-var.csv" + + #change column name + extracted_df = extracted_df.set_axis([col_name],axis=1) + if len(extracted_df)!=8760: + #8/31/2022 update, need to make the final length 8808. Snip data based on difference to 8760 + record_count_diff = len(extracted_df) - 8760 + print(f'extra records: {str(len(extracted_df))}, snipping away {record_count_diff} records and changing to 8760') + extracted_df = extracted_df.iloc[record_count_diff:].reset_index(drop=True) + + #left-merge onto big df + hourly_df = hourly_df.merge(extracted_df, left_index=True, right_index=True) + + + fyr_hrly = hourly_df + #rearrange 1-column 8760 format to 365x24 wide format for all runs in hourly_df + converted_df = pd.DataFrame() + + for i in range(0,len(fyr_hrly.columns)): + + #isolate single column + hrly_df = pd.DataFrame(fyr_hrly.iloc[:,i]) + + #create separate metadata columns + col_names = hrly_df.columns[0].split('/') + + #create new key column for merge + hrly_df['hr in 8760'] = (hrly_df.index) + 1 + + #merge based on "hr in 8760" column, the 8760 map + hrly_mapped = pd.merge(hrly_df, annual_map, on='hr in 8760') + + #transform data format + hrly_wide = long2wide_pivot(hrly_mapped, hrly_mapped.columns[0]) + + #add meta data col + hrly_wide['BldgLoc'] = col_names[0] + hrly_wide['BldgType'] = col_names[1] + hrly_wide['TechID'] = col_names[2] + hrly_wide['file'] = col_names[3] + + #append to master df + #converted_df = converted_df.append(hrly_wide) #deprecated method + converted_df = pd.concat([converted_df, hrly_wide]) + print(f"col {i} transformed.") + + sim_hourly_raw = pd.concat([sim_hourly_raw, converted_df]) + + +# %% +#rearrange columns +sim_hourly_wb_proto = sim_hourly_raw[['TechID','file','BldgLoc','BldgType','ID','daynum',1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, + 24]].copy() + +#hourly data conversion +#convert unit (J) to (kWh) for hourly + +sim_hourly_wb_proto['hr01'] = sim_hourly_wb_proto[1]/3600000 +sim_hourly_wb_proto['hr02'] = sim_hourly_wb_proto[2]/3600000 +sim_hourly_wb_proto['hr03'] = sim_hourly_wb_proto[3]/3600000 +sim_hourly_wb_proto['hr04'] = sim_hourly_wb_proto[4]/3600000 +sim_hourly_wb_proto['hr05'] = sim_hourly_wb_proto[5]/3600000 +sim_hourly_wb_proto['hr06'] = sim_hourly_wb_proto[6]/3600000 +sim_hourly_wb_proto['hr07'] = sim_hourly_wb_proto[7]/3600000 +sim_hourly_wb_proto['hr08'] = sim_hourly_wb_proto[8]/3600000 +sim_hourly_wb_proto['hr09'] = sim_hourly_wb_proto[9]/3600000 +sim_hourly_wb_proto['hr10'] = sim_hourly_wb_proto[10]/3600000 +sim_hourly_wb_proto['hr11'] = sim_hourly_wb_proto[11]/3600000 +sim_hourly_wb_proto['hr12'] = sim_hourly_wb_proto[12]/3600000 +sim_hourly_wb_proto['hr13'] = sim_hourly_wb_proto[13]/3600000 +sim_hourly_wb_proto['hr14'] = sim_hourly_wb_proto[14]/3600000 +sim_hourly_wb_proto['hr15'] = sim_hourly_wb_proto[15]/3600000 +sim_hourly_wb_proto['hr16'] = sim_hourly_wb_proto[16]/3600000 +sim_hourly_wb_proto['hr17'] = sim_hourly_wb_proto[17]/3600000 +sim_hourly_wb_proto['hr18'] = sim_hourly_wb_proto[18]/3600000 +sim_hourly_wb_proto['hr19'] = sim_hourly_wb_proto[19]/3600000 +sim_hourly_wb_proto['hr20'] = sim_hourly_wb_proto[20]/3600000 +sim_hourly_wb_proto['hr21'] = sim_hourly_wb_proto[21]/3600000 +sim_hourly_wb_proto['hr22'] = sim_hourly_wb_proto[22]/3600000 +sim_hourly_wb_proto['hr23'] = sim_hourly_wb_proto[23]/3600000 +sim_hourly_wb_proto['hr24'] = sim_hourly_wb_proto[24]/3600000 + +#rearrange columns +sim_hourly_wb_v1 = sim_hourly_wb_proto[['TechID','file','BldgLoc','BldgType','ID','daynum','hr01','hr02','hr03','hr04','hr05','hr06', + 'hr07', 'hr08', 'hr09', 'hr10', 'hr11', 'hr12', + 'hr13', 'hr14', 'hr15', 'hr16', 'hr17', 'hr18', + 'hr19', 'hr20', 'hr21', 'hr22', 'hr23', 'hr24']] +# %% +#separate into 1s and 2s for hourly +sim_hourly_wb_1s_v1 = sim_hourly_wb_v1[sim_hourly_wb_v1['BldgType'].str.contains('&1&')].copy() +sim_hourly_wb_2s_v1 = sim_hourly_wb_v1[sim_hourly_wb_v1['BldgType'].str.contains('&2&')].copy() +# %% +##STEP 3: 1-S, 2-S combination, and Normalizing Units +# annual data +rename_1s_fields = {'kwh_tot':'kwh_tot1', + 'kwh_ltg':'kwh_ltg1', + 'kwh_task':'kwh_task1', + 'kwh_equip':'kwh_equip1', + 'kwh_htg':'kwh_htg1', + 'kwh_clg':'kwh_clg1', + 'kwh_twr':'kwh_twr1', + 'kwh_aux':'kwh_aux1', + 'kwh_vent':'kwh_vent1', + 'kwh_venthtga':'kwh_venthtg1a', + 'kwh_ventclga':'kwh_ventclg1a', + 'kwh_venthtgb':'kwh_venthtg1b', + 'kwh_ventclgb':'kwh_ventclg1b', + 'kwh_refg':'kwh_refg1', + 'kwh_hpsup':'kwh_hpsup1', + 'kwh_shw':'kwh_shw1', + 'kwh_ext':'kwh_ext1', + 'thm_tot':'thm_tot1', + 'thm_htg':'thm_htg1', + 'thm_equip':'thm_equip1', + 'thm_shw':'thm_shw1'} + +rename_2s_fields = {'kwh_tot':'kwh_tot2', + 'kwh_ltg':'kwh_ltg2', + 'kwh_task':'kwh_task2', + 'kwh_equip':'kwh_equip2', + 'kwh_htg':'kwh_htg2', + 'kwh_clg':'kwh_clg2', + 'kwh_twr':'kwh_twr2', + 'kwh_aux':'kwh_aux2', + 'kwh_vent':'kwh_vent2', + 'kwh_venthtga':'kwh_venthtg2a', + 'kwh_ventclga':'kwh_ventclg2a', + 'kwh_venthtgb':'kwh_venthtg2b', + 'kwh_ventclgb':'kwh_ventclg2b', + 'kwh_refg':'kwh_refg2', + 'kwh_hpsup':'kwh_hpsup2', + 'kwh_shw':'kwh_shw2', + 'kwh_ext':'kwh_ext2', + 'thm_tot':'thm_tot2', + 'thm_htg':'thm_htg2', + 'thm_equip':'thm_equip2', + 'thm_shw':'thm_shw2'} + +#rename columns +sim_annual_1s = sim_annual_1s_v1.rename(columns=rename_1s_fields) +sim_annual_2s = sim_annual_2s_v1.rename(columns=rename_2s_fields) + +# %% +####Finalize Norm units +#Read from normunit table +bldgtype = 'SFm' +os.chdir(os.path.dirname(__file__)) #resets to current script directory +print(os.path.abspath(os.curdir)) +df_normunits = pd.read_excel('Normunits.xlsx', sheet_name=bldgtype) +numunits_vals = df_normunits[df_normunits['Normunit'] == df_measure['Normunit'].unique()[0]][['CZ','Value', 'Msr','BldgVint']] + +#%% + +#create numunits object based on what normunit it uses. +#numunits can be a single value, or a dictionary +if len(numunits_vals) == 1: + numunits = numunits_vals[0] +elif df_measure['Normunit'].unique()[0] == 'Area-ft2-BA': + cz = list(numunits_vals['CZ']) + nvals = list(numunits_vals['Value']) + #create dictionary of {cz:values} + numunits = {cz[i]:nvals[i] for i in range(len(cz))} +elif (measure_name == 'Wall Insulation') or (measure_name == 'Ceiling Insulation'): + #filter to the corresponding measure + numunits_vals = numunits_vals[numunits_vals['Msr'] == measure_name] + #create aligned lists for numunit dictionary + cz = list(numunits_vals['CZ']) + nvals = list(numunits_vals['Value']) + #create dictionary of {cz:values} + numunits = {cz[i]:nvals[i] for i in range(len(cz))} + +elif measure_name == 'PTAC / PTHP': + #create aligned lists for numunit dictionary + cz = list(numunits_vals['CZ']) + vint = list(numunits_vals['BldgVint']) + nvals = list(numunits_vals['Value']) + #create dictionary of {(cz,vintage):numunits} + numunits = {(cz[i],vint[i]):nvals[i] for i in range(len(cz))} +else: + pass + +# %% +#note HVAC type of this dataset +print(sim_annual_1s['BldgHVAC'].unique()) + +#note HVAC type and its corresponding normalizing unit +#num unit will be per dwelling, so use normunit / num of dwellings (2 for SFM & DMo, 24 for MFm) +sim_annual_1s.reset_index(inplace=True) +sim_annual_1s['SizingID'] = 'None' +sim_annual_1s['tstat'] = 0 +sim_annual_1s['normunit'] = df_measure['Normunit'].unique()[0] + +#apply numunits appropriately +if (measure_name == 'Wall Insulation') or (measure_name == 'Ceiling Insulation'): + sim_annual_1s['numunits'] = (sim_annual_1s['BldgLoc'].map(numunits))/2 +elif df_measure['Normunit'].unique()[0] == 'Area-ft2-BA': + sim_annual_1s['numunits'] = (sim_annual_1s['BldgLoc'].map(numunits))/2 +elif measure_name == 'PTAC / PTHP': + sim_annual_1s['numunits'] = (pd.Series(list(zip(sim_annual_1s['BldgLoc'],sim_annual_1s['BldgVint']))).map(numunits))/2 +else: + sim_annual_1s['numunits'] = numunits/2 + +#%% +sim_annual_2s.reset_index(inplace=True) +sim_annual_2s['SizingID'] = 'None' +sim_annual_2s['tstat'] = 0 +sim_annual_2s['normunit'] = df_measure['Normunit'].unique()[0] + +#apply numunits appropriately +if (measure_name == 'Wall Insulation') or (measure_name == 'Ceiling Insulation'): + sim_annual_2s['numunits'] = (sim_annual_2s['BldgLoc'].map(numunits))/2 +elif df_measure['Normunit'].unique()[0] == 'Area-ft2-BA': + sim_annual_2s['numunits'] = (sim_annual_2s['BldgLoc'].map(numunits))/2 +elif measure_name == 'PTAC / PTHP': + sim_annual_2s['numunits'] = (pd.Series(list(zip(sim_annual_2s['BldgLoc'],sim_annual_2s['BldgVint']))).map(numunits))/2 +else: + sim_annual_2s['numunits'] = numunits/2 + +#%% + +#merge 1-s and 2-s results back together side by side +sim_annual_final = pd.merge(sim_annual_1s, sim_annual_2s, on=['TechID', 'SizingID', 'BldgType', 'BldgLoc','BldgHVAC','BldgVint','tstat','normunit','numunits']) +sim_annual_final['lastmod']=dt.datetime.now() + +#%% +#rearrange columns +sim_annual_f = sim_annual_final[['TechID', 'SizingID', 'BldgType','BldgVint','BldgLoc','BldgHVAC','tstat', + 'normunit', 'numunits', 'kwh_tot1', 'kwh_ltg1', 'kwh_task1', + 'kwh_equip1', 'kwh_htg1', 'kwh_clg1', 'kwh_twr1', 'kwh_aux1', + 'kwh_vent1', 'kwh_venthtg1a', 'kwh_ventclg1a', 'kwh_venthtg1b', + 'kwh_ventclg1b', 'kwh_refg1', 'kwh_hpsup1', 'kwh_shw1', 'kwh_ext1', + 'thm_tot1', 'thm_equip1', 'thm_htg1', 'thm_shw1','kwh_tot2', 'kwh_ltg2', + 'kwh_task2', 'kwh_equip2', 'kwh_htg2', 'kwh_clg2', 'kwh_twr2', + 'kwh_aux2', 'kwh_vent2', 'kwh_venthtg2a', 'kwh_ventclg2a', + 'kwh_venthtg2b', 'kwh_ventclg2b', 'kwh_refg2', 'kwh_hpsup2', 'kwh_shw2', + 'kwh_ext2', 'thm_tot2', 'thm_equip2', 'thm_htg2', 'thm_shw2', 'lastmod']] +# %% +###Finalize Hourly data + +#hourly data +#1story +#rename some fields to fit MC3 output +#add some placeholder fields to fit MC3 output +df_tmp = parse_measure_name2(sim_hourly_wb_1s_v1['ID'],verify=True) +sim_hourly_wb_1s_v1['BldgVint'] = df_tmp['BldgVint'] +sim_hourly_wb_1s_v1['BldgHVAC'] = df_tmp['BldgHVAC'] +sim_hourly_wb_1s_v1['BldgType'] = df_tmp['BldgType'] +del df_tmp +sim_hourly_wb_1s_v1['SizingID'] = 'None' +sim_hourly_wb_1s_v1['tstat'] = 0 +sim_hourly_wb_1s_v1['enduse'] = 0 + +#2story +#rename some fields to fit MC3 output +#add some placeholder fields to fit MC3 output +df_tmp = parse_measure_name2(sim_hourly_wb_2s_v1['ID'],verify=True) +sim_hourly_wb_2s_v1['BldgVint'] = df_tmp['BldgVint'] +sim_hourly_wb_2s_v1['BldgHVAC'] = df_tmp['BldgHVAC'] +sim_hourly_wb_2s_v1['BldgType'] = df_tmp['BldgType'] +del df_tmp +sim_hourly_wb_2s_v1['SizingID'] = 'None' +sim_hourly_wb_2s_v1['tstat'] = 0 +sim_hourly_wb_2s_v1['enduse'] = 0 +# %% +rename_1s_hrly = {'hr01':'hr01a', + 'hr02':'hr02a', + 'hr03':'hr03a', + 'hr04':'hr04a', + 'hr05':'hr05a', + 'hr06':'hr06a', + 'hr07':'hr07a', + 'hr08':'hr08a', + 'hr09':'hr09a', + 'hr10':'hr10a', + 'hr11':'hr11a', + 'hr12':'hr12a', + 'hr13':'hr13a', + 'hr14':'hr14a', + 'hr15':'hr15a', + 'hr16':'hr16a', + 'hr17':'hr17a', + 'hr18':'hr18a', + 'hr19':'hr19a', + 'hr20':'hr20a', + 'hr21':'hr21a', + 'hr22':'hr22a', + 'hr23':'hr23a', + 'hr24':'hr24a'} +rename_2s_hrly = {'hr01':'hr01b', + 'hr02':'hr02b', + 'hr03':'hr03b', + 'hr04':'hr04b', + 'hr05':'hr05b', + 'hr06':'hr06b', + 'hr07':'hr07b', + 'hr08':'hr08b', + 'hr09':'hr09b', + 'hr10':'hr10b', + 'hr11':'hr11b', + 'hr12':'hr12b', + 'hr13':'hr13b', + 'hr14':'hr14b', + 'hr15':'hr15b', + 'hr16':'hr16b', + 'hr17':'hr17b', + 'hr18':'hr18b', + 'hr19':'hr19b', + 'hr20':'hr20b', + 'hr21':'hr21b', + 'hr22':'hr22b', + 'hr23':'hr23b', + 'hr24':'hr24b'} + +#rename hourly columns +sim_hourly_1s = sim_hourly_wb_1s_v1.rename(columns=rename_1s_hrly) +sim_hourly_2s = sim_hourly_wb_2s_v1.rename(columns=rename_2s_hrly) + +#rearrange cols +sim_hourly_1s_re = sim_hourly_1s[['TechID','SizingID','BldgType','BldgVint','BldgLoc','BldgHVAC','tstat','enduse','daynum','hr01a', + 'hr02a', 'hr03a', 'hr04a', 'hr05a', 'hr06a', 'hr07a', 'hr08a', 'hr09a', + 'hr10a', 'hr11a', 'hr12a', 'hr13a', 'hr14a', 'hr15a', 'hr16a', 'hr17a', + 'hr18a', 'hr19a', 'hr20a', 'hr21a', 'hr22a', 'hr23a', 'hr24a']] + +sim_hourly_2s_re = sim_hourly_2s[['TechID','SizingID','BldgType','BldgVint','BldgLoc','BldgHVAC','tstat','enduse','daynum','hr01b', + 'hr02b', 'hr03b', 'hr04b', 'hr05b', 'hr06b', 'hr07b', 'hr08b', 'hr09b', + 'hr10b', 'hr11b', 'hr12b', 'hr13b', 'hr14b', 'hr15b', 'hr16b', 'hr17b', + 'hr18b', 'hr19b', 'hr20b', 'hr21b', 'hr22b', 'hr23b', 'hr24b']] + +#merge columns of 1s and 2s +sim_hourly_final = pd.merge(sim_hourly_1s_re, sim_hourly_2s_re, on=['TechID', 'SizingID','BldgType','BldgVint','BldgLoc','BldgHVAC','tstat','enduse','daynum']) +sim_hourly_final['lastmod']=dt.datetime.now() + +#%% +#Create CZ:VintYear dictionary based on prototype definitions +cz_list1 = ['CZ01','CZ02','CZ03','CZ04','CZ05','CZ06','CZ07','CZ08','CZ09'] +cz_list2 = ['CZ10','CZ11','CZ12','CZ13','CZ14','CZ15','CZ16'] + +cz_vint_dict1 = {i:'1975' for i in cz_list1} +cz_vint_dict2 = {i:'1985' for i in cz_list2} + +cz_vint_dict = cz_vint_dict1 | cz_vint_dict2 + +#%% +if MODE_NEW_VINTAGE: + pass +else: + ##BldgVint label correction for NumStor weights + sim_annual_f['BldgVint'] = sim_annual_f['BldgLoc'].map(cz_vint_dict) + sim_hourly_final['BldgVint'] = sim_hourly_final['BldgLoc'].map(cz_vint_dict) + +# %% +##STEP 4: Measure setup file (current_msr_mat.csv) + +# Creating current_msr_mat and finalzing TechID's + +metadata_cols = sim_annual_f[['TechID', 'BldgLoc', 'BldgType', 'BldgVint', 'BldgHVAC', 'SizingID', + 'tstat', 'normunit']] + +#check unique TechID cases +metadata_cols['TechID'].unique() +# %% +#TechID identification from Master table +#if looping over all HVAC types, ignore BldgHVAC filter +PreTechIDs = df_measure[['PreTechID','Common_PreTechID']].drop_duplicates() +StdTechIDs = df_measure[['StdTechID','Common_StdTechID']].drop_duplicates() +MeasTechIDs = df_measure[['MeasTechID','Common_MeasTechID']].drop_duplicates() +# %% +#filter out each pre, std, msr using the Common TechIDs from master table +metadata_pre = metadata_cols[metadata_cols['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +metadata_std = metadata_cols[metadata_cols['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +metadata_msr = metadata_cols[metadata_cols['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] + +# %% +#rename to Pre, Std or Msr +#both Std and Pre are baseline for SEER rated AC measures +metadata_pre = metadata_pre.rename(columns={'TechID':'PreTechID'}) +metadata_std = metadata_std.rename(columns={'TechID':'StdTechID'}) +metadata_msr = metadata_msr.rename(columns={'TechID':'MeasTechID'}) +# %% +#Changing common TechID to actual TechIDs if needed. +#might only apply to SEER AC/HP + +#create full pre_metadata sets for different names but the same TechID +# commom_preTechID = PreTechIDs['Common_PreTechID'].unique()[0] +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + metadata_pre_full = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + metadata_pre_mod = metadata_pre[metadata_pre['PreTechID']==common_id].copy() + metadata_pre_mod['PreTechID'] = new_id + #merge to final df + metadata_pre_full = pd.concat([metadata_pre_full, metadata_pre_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_pre_full = metadata_pre.copy() + + +# %% +#create std_metadata sets, assigning appropriate final TechIDs +if False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID']): + metadata_std_full = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + metadata_std_mod = metadata_std[metadata_std['StdTechID']==common_id].copy() + #Change into final techID name (new) + metadata_std_mod['StdTechID'] = new_id + #merge to final df + metadata_std_full = pd.concat([metadata_std_full, metadata_std_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_std_full = metadata_std.copy() +# %% +#create msr_metadata sets, assigning appropriate final TechIDs +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + metadata_msr_full = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Identify corresponding common TechID (the last 9 characters indicating SEER levels) + metadata_msr_mod = metadata_msr[metadata_msr['MeasTechID']==common_id].copy() + #Change into final TechID name + metadata_msr_mod['MeasTechID'] = new_id + #merge to final df + metadata_msr_full = pd.concat([metadata_msr_full, metadata_msr_mod]) +else: + print('same TechID, proceeding without changing names') + metadata_msr_full = metadata_msr.copy() +# %% +#create raw merged current_msr_mat +#need to delete/drop incorrect sets +if np.NaN in list(StdTechIDs['StdTechID'].unique()): + df_measure_set_full = pd.merge(metadata_pre_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) +elif np.NaN in list(PreTechIDs['PreTechID'].unique()): + df_measure_set_full = pd.merge(metadata_std_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) +else: + df_measure_baseline_full = pd.merge(metadata_pre_full, metadata_std_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) + df_measure_set_full = pd.merge(df_measure_baseline_full, metadata_msr_full, on=['BldgLoc','BldgType','BldgVint','BldgHVAC','SizingID','tstat','normunit']) +# %% +#Unique sets of each MeasureID with their TechID triplets +TechID_triplets = df_measure[['EnergyImpactID','MeasureID', 'PreTechID', 'StdTechID','MeasTechID']].drop_duplicates() +# %% +#to match TechID triplets, merge on these 3 fields, keeping only valid TechID Triplets +if np.NaN in list(StdTechIDs['StdTechID'].unique()): + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['PreTechID','MeasTechID']) +elif np.NaN in list(PreTechIDs['PreTechID'].unique()): + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['StdTechID','MeasTechID']) +else: + current_msr_mat_proto = pd.merge(df_measure_set_full, TechID_triplets, on=['PreTechID','StdTechID','MeasTechID']) + +# %% +#add placeholders, rearrange fields +current_msr_mat_proto['PreSizingID']='None' +current_msr_mat_proto['StdSizingID']='None' +current_msr_mat_proto['MsrSizingID']='None' +current_msr_mat_proto['SizingSrc']=np.nan + +#to be worked on: need to add corresponding indicator for what enduse it is for end use loadshape connections +current_msr_mat_proto['EU_HrRepVar']=np.nan + +current_msr_mat = current_msr_mat_proto[['MeasureID', 'BldgType', 'BldgVint','BldgLoc','BldgHVAC','tstat','PreTechID','PreSizingID', + 'StdTechID', 'StdSizingID','MeasTechID','MsrSizingID','SizingSrc','EU_HrRepVar','normunit']] +current_msr_mat = current_msr_mat.rename(columns={'normunit':'NormUnit'}) + +#%% +#check length of current_msr_mat +len(current_msr_mat) + +# %% +##STEP 5: Clean Up Sequence +# Creating updated Sim_annual and Sim_hourly data with distinguished TechID names +sim_annual_pre_common = sim_annual_f[sim_annual_f['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +sim_annual_std_common = sim_annual_f[sim_annual_f['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +sim_annual_msr_common = sim_annual_f[sim_annual_f['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] +# %% +#Add a TechID col renaming the common TechID to the specific TechID using PreTechIDs, StdTechIDs, MeasTechIDs + +#create full pre sim_annual sets for different names but the same TechID +# commom_preTechID = PreTechIDs['Common_PreTechID'].unique()[0] +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + sim_annual_pre = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + sim_annual_pre_mod = sim_annual_pre_common[sim_annual_pre_common['TechID']==common_id].copy() + sim_annual_pre_mod['TechID'] = new_id + #merge to final df + sim_annual_pre = pd.concat([sim_annual_pre, sim_annual_pre_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_pre = sim_annual_pre_common.copy() + +# %% +# create full std sim_annual sets for different names but the same TechID +if False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID']): + sim_annual_std = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_annual_std_mod = sim_annual_std_common[sim_annual_std_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_annual_std_mod['TechID'] = new_id + #merge to final df + sim_annual_std = pd.concat([sim_annual_std, sim_annual_std_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_std = sim_annual_std_common.copy() +# %% +# create full msr sim_annual sets for different names but the same TechID +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + sim_annual_msr = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_annual_msr_mod = sim_annual_msr_common[sim_annual_msr_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_annual_msr_mod['TechID'] = new_id + #merge to final df + sim_annual_msr = pd.concat([sim_annual_msr, sim_annual_msr_mod]) +else: + print('same TechID, proceeding without changing names') + sim_annual_msr = sim_annual_msr_common.copy() +# %% +#final merge sim_annual +sim_annual_final = pd.concat([sim_annual_pre, sim_annual_std, sim_annual_msr]) +# %% + +###same deal with with hourly data, separate into pre std msr, change into specific TechID +sim_hourly_pre_common = sim_hourly_final[sim_hourly_final['TechID'].isin(PreTechIDs['Common_PreTechID'].unique())] +sim_hourly_std_common = sim_hourly_final[sim_hourly_final['TechID'].isin(StdTechIDs['Common_StdTechID'].unique())] +sim_hourly_msr_common = sim_hourly_final[sim_hourly_final['TechID'].isin(MeasTechIDs['Common_MeasTechID'].unique())] + +# %% +#Pre hourly +if False in list(PreTechIDs['PreTechID']==PreTechIDs['Common_PreTechID']): + sim_hourly_pre = pd.DataFrame() + for _, (common_id, new_id) in PreTechIDs[['Common_PreTechID', 'PreTechID']].iterrows(): + print(f'changing to specific PreTechID {new_id}') + sim_hourly_pre_mod = sim_hourly_pre_common[sim_hourly_pre_common['TechID']==common_id].copy() + sim_hourly_pre_mod['TechID'] = new_id + #merge to final df + sim_hourly_pre = pd.concat([sim_hourly_pre, sim_hourly_pre_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_pre = sim_hourly_pre_common.copy() +# %% +#Std hourly +if False in list(StdTechIDs['StdTechID']==StdTechIDs['Common_StdTechID']): + sim_hourly_std = pd.DataFrame() + for common_id, new_id in zip(StdTechIDs['Common_StdTechID'], StdTechIDs['StdTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_hourly_std_mod = sim_hourly_std_common[sim_hourly_std_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_hourly_std_mod['TechID'] = new_id + #merge to final df + sim_hourly_std = pd.concat([sim_hourly_std, sim_hourly_std_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_std = sim_hourly_std_common.copy() +# %% +#Msr hourly +if False in list(MeasTechIDs['MeasTechID']==MeasTechIDs['Common_MeasTechID']): + sim_hourly_msr = pd.DataFrame() + for common_id, new_id in zip(MeasTechIDs['Common_MeasTechID'], MeasTechIDs['MeasTechID']): + print(f'common is {common_id}, changing into new id is {new_id}') + #Isolate specific common id (old) + sim_hourly_msr_mod = sim_hourly_msr_common[sim_hourly_msr_common['TechID']==common_id].copy() + #Change into final techID name (new) + sim_hourly_msr_mod['TechID'] = new_id + #merge to final df + sim_hourly_msr = pd.concat([sim_hourly_msr, sim_hourly_msr_mod]) +else: + print('same TechID, proceeding without changing names') + sim_hourly_msr = sim_hourly_msr_common.copy() + +# %% +#final merge sim_hourly +sim_hourly_final = pd.concat([sim_hourly_pre, sim_hourly_std, sim_hourly_msr]) +# %% +##Final export of all processed data pre-SQL process +#change directory to wherever desired, if needed +current_msr_mat.to_csv('current_msr_mat.csv', index=False) +sim_annual_final.to_csv('sfm_annual.csv', index=False) +sim_hourly_final.to_csv('sfm_hourly_wb.csv', index=False) + +# %% diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/post-process/run_residential_processing_SWHC049.psql b/residential measures/SWHC049-08 SEER Rated AC HP/post-process/run_residential_processing_SWHC049.psql new file mode 100644 index 000000000..20f842e09 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/post-process/run_residential_processing_SWHC049.psql @@ -0,0 +1,199 @@ +/* +run_step5.psql +Nicholas Fette, 2023-01-05 + +Import all the results data into PostgreSQL, and run all the post-processing scripts. +Warning: deletes the results data currently in the database. + +Usage on command line: + cd "C:/.../DEER-Prototypes-EnergyPlus/scripts/" + psql -d "dbname" -U "dbuser" -f "run_step5.psql" -v import_sfm= -v import_sim= +To trigger additional steps for Duct_Opt or Duct_Seal + psql -d "dbname" -U "dbuser" -f "run_step5.psql" -v Duct_Opt= + psql -d "dbname" -U "dbuser" -f "run_step5.psql" -v Duct_Seal= + +If psql is not recognized, you may need to configure the PATH. +After installing one of pgAdmin, dbeaver, or postgresql for example: + set "path=%PATH%;%LOCALAPPDATA%\Programs\pgAdmin 4\v6\runtime" + set "path=%PATH%;C:\Program Files\PostgreSQL\15\bin" + +Within an open interactive psql session: + \cd 'C:/.../DEER-Prototypes-EnergyPlus/scripts/' + \i run_step5.psql +*/ + +\set ON_ERROR_STOP on + +-- Uncomment these lines to import sfm and sim files respectively. +\set import_sfm +\set import_sim + +-- Configure the location from which to get CSV files. +-- Alternatively, specify these on command line. +-- E.g, psql ... -v file0="./folder/current_msr_mat.csv" -v file1="sim_annual.csv" -v file2="sim_hourly_wb.csv" -v file3="sfm_annual.csv" -v file4="sfm_hourly_wb.csv" +\if :{?file0} + --pass +\else + \set file0 'results/current_msr_mat.csv' +\endif +\if :{?file1} + --pass +\else + \set file1 'results/sim_annual.csv' +\endif +\if :{?file2} + --pass +\else + \set file2 'results/sim_hourly_wb.csv' +\endif +\if :{?file3} + --pass +\else + \set file3 'results/sfm_annual.csv' +\endif +\if :{?file4} + --pass +\else + \set file4 'results/sfm_hourly_wb.csv' +\endif + +-- Uncomment these lines if need to apply corrections. +-- Or, use command line arguments: -v Duct_Opt= -v Duct_Seal= +--\set Duct_Opt +--\set Duct_Seal + + +CREATE SCHEMA IF NOT EXISTS "MC_results_SWHC049-08"; +SET search_path TO "MC_results_SWHC049-08"; + +\echo Import current_msr_mat +\i 'schema/create_current_msr_mat.sql' +truncate "current_msr_mat"; + +\copy "current_msr_mat" FROM 'results/DMo_All/current_msr_mat.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "current_msr_mat" FROM 'results/MFm_Ex/current_msr_mat.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "current_msr_mat" FROM 'results/MFm_New/current_msr_mat.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "current_msr_mat" FROM 'results/SFm_Ex/current_msr_mat.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "current_msr_mat" FROM 'results/SFm_New/current_msr_mat.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo Clean up current_msr_mat artifacts created by Python data transformation +DELETE FROM "current_msr_mat" WHERE "MeasureID" like '%-NC' and "BldgVint" = 'Ex'; +DELETE FROM "current_msr_mat" WHERE "MeasureID" not like '%-NC' and "BldgVint" = 'New'; + +\echo Import sim_annual +\i 'schema/create_sim_annual.sql' +truncate "sim_annual"; +-- If data comes from multiple folders, uncomment lines below. +\copy "sim_annual" FROM 'results/DMo_All/sim_annual.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "sim_annual" FROM 'results/MFm_Ex/sim_annual.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "sim_annual" FROM 'results/MFm_New/sim_annual.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo Import sim_hourly_wb +\i 'schema/create_sim_hourly_wb.sql' +truncate "sim_hourly_wb"; +-- If data comes from multiple folders, uncomment lines below. +\copy "sim_hourly_wb" FROM 'results/DMo_All/sim_hourly_wb.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "sim_hourly_wb" FROM 'results/MFm_Ex/sim_hourly_wb.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "sim_hourly_wb" FROM 'results/MFm_New/sim_hourly_wb.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo Import sfm_annual +\i 'schema/create_sfm_annual.sql' +truncate "sfm_annual"; +\copy "sfm_annual" FROM 'results/SFm_Ex/sfm_annual.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "sfm_annual" FROM 'results/SFm_New/sfm_annual.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo Import sfm_hourly_wb +\i 'schema/create_sfm_hourly_wb.sql' +truncate "sfm_hourly_wb"; +\copy "sfm_hourly_wb" FROM 'results/SFm_Ex/sfm_hourly_wb.csv' WITH (FORMAT csv, HEADER MATCH) +\copy "sfm_hourly_wb" FROM 'results/SFm_New/sfm_hourly_wb.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo Loading support tables +\echo FloorArea_2022 +\i 'schema/create_FloorArea_2022.sql' +truncate "FloorArea_2022"; +\copy "FloorArea_2022" FROM 'energy savings/FloorArea_2022.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo NumBldgs +\i 'schema/create_NumBldgs.sql' +truncate "NumBldgs"; +\copy "NumBldgs" FROM 'energy savings/NumBldgs.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo NumStor +\i 'schema/create_NumStor.sql' +truncate "NumStor"; +\copy "NumStor" FROM 'energy savings/NumStor.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo ImpactProfiles +\i 'energy savings/ImpactProfiles.sql' + +\echo peakperspec +\i 'schema/create_peakperspec.sql' +truncate "peakperspec"; +\copy "peakperspec" FROM 'energy savings/peakperspec.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo wts_res_hvac +\i 'schema/create_wts_res_hvac.sql' +truncate "wts_res_hvac"; +\copy "wts_res_hvac" FROM 'energy savings/wts_res_hvac.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo wts_res_bldg_2022 +\i 'schema/create_wts_res_bldg_2022.sql' +truncate "wts_res_bldg_2022"; +\copy "wts_res_bldg_2022" FROM 'energy savings/wts_res_bldg.csv' WITH (FORMAT csv, HEADER MATCH) + +\echo Run step R1 +\i 'energy savings/R1_Wt_NumStories_Annual.sql' +\echo Run step R2 +\i 'energy savings/R2_Wt_NumStories_Hourly.sql' +\echo Run step R3 +\i 'energy savings/R3_Sum_Annual.sql' +\echo Run step R4 +\i 'energy savings/R4_Sum_Hourly.sql' + +\echo Run step P1 +\i 'energy savings/P1-Create-sim_peakper_2022.sql' +\echo Run step P2 +\i 'energy savings/P2-Calc_MsrImpacts_2022.sql' + +-- Only run these for duct optimization. +\if :{?Duct_Opt} + \i 'energy savings/P2.1A-Duct_Opt_correction_factor_2022.sql' + \i 'energy savings/P2.1B-Duct_Opt_correction_factor_2022.sql' +\endif + +-- Only run these for duct seal. +\if :{?Duct_Seal} + \i 'energy savings/P2.1A-Duct_Seal_correction_factor_2022.sql' + \i 'energy savings/P2.1B-Duct_Seal_correction_factor_2022.sql' +\endif + +\echo Run step P3 +\i 'energy savings/P3-HVAC_wt_Mult.sql' +\echo Run step P4 +\i 'energy savings/P4-HVAC_wt_sum.sql' +\echo Run step P5 +\i 'energy savings/P5_VintSub_2022_all.sql' +\echo Run step P6 +\i 'energy savings/P6_BldgMult_2022.sql' +\echo Run step P7 +\i 'energy savings/P7_SumBldg_2022.sql' + +\echo Run step P8 +\i 'energy savings/P8_RoundDEER_2022.sql' + + +\echo Write table current_msr_mat to CSV file (in the current directory). +\copy "current_msr_mat" to 'results/combined_current_msr_mat.csv' WITH (FORMAT csv, HEADER) + +\echo Write table sim_peakper to CSV file (in the current directory). +\copy "sim_peakper" to 'results/P1_sim_peakper.csv' WITH (FORMAT csv, HEADER) + +\echo Write table meas_impacts_2022 to CSV file (in the current directory). +\copy "meas_impacts_2022" to 'results/P2_meas_impacts_2022.csv' WITH (FORMAT csv, HEADER) + +\echo Write table meas_impacts_wtd_2022 to CSV file (in the current directory). +\copy "meas_impacts_wtd_2022" to 'results/P7_meas_impacts_wtd_2022.csv' WITH (FORMAT csv, HEADER) + +\echo Write table meas_impacts_2022_res to CSV file (in the current directory). +\copy "meas_impacts_2022_res" to 'results/P8_meas_impacts_2022_res.csv' WITH (FORMAT csv, HEADER) diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/query_swhc049.txt b/residential measures/SWHC049-08 SEER Rated AC HP/query_swhc049.txt new file mode 100644 index 000000000..6eff252b1 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/query_swhc049.txt @@ -0,0 +1,39 @@ +InputVerificationandResultsSummary/Entire Facility/General/Value/Program Version and Build +InputVerificationandResultsSummary/Entire Facility/General/Value/Weather File +InputVerificationandResultsSummary/Entire Facility/Zone Summary/Area/Conditioned Total +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Utility Use Per Conditioned Floor Area/Electricity Intensity/HVAC +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Utility Use Per Conditioned Floor Area/Natural Gas Intensity/HVAC +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Cooling +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Interior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Exterior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Interior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Exterior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Fans +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Pumps +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heat Rejection +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Humidification +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Heat Recovery +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Water Systems +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Refrigeration +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Generators +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Total End Uses +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heating +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Cooling +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Interior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Exterior Lighting +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Interior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Exterior Equipment +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Fans +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Pumps +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heat Rejection +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Humidification +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Heat Recovery +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Water Systems +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Refrigeration +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Generators +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Total End Uses +ComponentSizingSummary/Entire Facility/AirLoopHVAC:Unitary:Furnace:HeatCool/Nominal Heating Capacity/*, HeatCapDXGF +ComponentSizingSummary/Entire Facility/AirLoopHVAC:Unitary:Furnace:HeatCool/Nominal Cooling Capacity/*, CoolCapDXGF +ComponentSizingSummary/Entire Facility/AirLoopHVAC:UnitarySystem/Design Size Nominal Heating Capacity/*, HeatCapDXHP +ComponentSizingSummary/Entire Facility/AirLoopHVAC:UnitarySystem/Design Size Nominal Cooling Capacity/*, CoolCapDXHP diff --git a/residential measures/SWHC049-08 SEER Rated AC HP/rakefile.rb b/residential measures/SWHC049-08 SEER Rated AC HP/rakefile.rb new file mode 100644 index 000000000..4ed80a718 --- /dev/null +++ b/residential measures/SWHC049-08 SEER Rated AC HP/rakefile.rb @@ -0,0 +1,1010 @@ +# Copyright (c) 2011-2020 Big Ladder Software LLC. All rights reserved. +# See the file "license.txt" for additional terms and conditions. + +if (not defined?(Modelkit)) + begin + require("modelkit") + rescue LoadError => exception + args = ARGV.join(" ") + puts exception + puts "\e[1m\e[31mERROR: This rakefile requires the Modelkit library. Make sure that you have the\nModelkit gem installed in your local Rubygems environment, or try running the\nrakefile using your stand-alone installation of Modelkit by typing:\e[0m\n \e[1mmodelkit rake #{args}\e[0m" + exit + end +end + + +require("pathname") +require("json") + +require("modelkit/config") +require("modelkit/multitable") +require("modelkit/parametrics") +require("modelkit/parametrics/worksheet") +require("modelkit/energyplus") + + +# Add to modelkit-energyplus: +# other args: +# - which design days +# - water mains temp? +# - daylight saving time? +def generate_site_pxt(idd, ddy_path, site_path) + site_file = File.open(site_path, "w") + + if (File.exists?(ddy_path)) + input_file = OpenStudio::InputFile.open(idd, ddy_path) + else + raise("file not found: #{ddy_path.inspect}") + end + + site_locations = input_file.find_objects_by_class_name("Site:Location").to_a + + if (site_locations.empty?) + raise("could not find Site:Location object in #{ddy_path.inspect}") + else + site_file.puts(site_locations.first.to_idf) + end + + all_design_days = input_file.find_objects_by_class_name("SizingPeriod:DesignDay").to_a + selected_design_days = all_design_days.select { |dd| dd.name[/Ann Htg 99.6% Condns DB|Ann Clg 0?.4% Condns DB/i] } + + if (selected_design_days.length < 2) + puts "warning: could not find requested design days; including all design days\n" + selected_design_days = all_design_days + end + + # Write design days to site file. + selected_design_days.each { |dd| site_file.puts(dd.to_idf) } + + +# 'CorrelationFromWeatherFile' is available starting in EP 9.0. + +# Does this work for design-day only runs? +# Seems to work for annual. + site_file.puts("\n\nSite:WaterMainsTemperature,\n CorrelationFromWeatherFile;\n") + + daylight_saving_time = input_file.find_objects_by_class_name("RunPeriodControl:DaylightSavingTime").to_a + if (not daylight_saving_time.empty?) + site_file.puts + site_file.puts(daylight_saving_time.first.to_idf) + end + + site_file.close +end + + +# NOPUB Should move into Modelkit somewhere. +# Support for running simulations in parallel. +require("open3") +require("set") + +$child_pids = Set.new # Global tracking of child PIDs + +# Return PID? +def run_process(command, dir) + # NOTE: Separate processes are required to make the EnergyPlus runs thread safe! + Open3.popen3(command, :chdir => dir) do |stdin, stdout, stderr, thread| + $child_pids.add(thread.pid) + # This might work with just an instance variable or similar. + + stdin.close # All input already sent with command + + file_out = File.open("#{dir}/stdout", "w") + file_err = File.open("#{dir}/stderr", "w") + + while (line = stdout.gets) + file_out.puts(line) + #@proc_out.call(line) if (@proc_out) + end + + # This is probably not right. + while (line = stderr.gets) + file_err.puts(line) + #@proc_err.call(line) if (@proc_err) + end + + stdout.close + stderr.close + + file_out.close + file_err.close + + #print "Completed: #{File.basename(dir)}\n" + $child_pids.delete(thread.pid) + end +end + +# Search up through parent directories for one or more possible file names. +def search_parent_dirs(start_dir, *file_names) + path = nil + dir_names = start_dir.to_s.split("/") + while (not dir_names.empty?) do + file_names.each do |file_name| + test_path = "#{dir_names.join("/")}/#{file_name}" + if (File.exist?(test_path)) + path = test_path + break + end + end + break if (path) + dir_names.pop + end + return(path) +end + +# Search for a file name or partial path in an array of provided directories. +# Directories are expected to already be absolute paths. +def resolve_path(path, dirs) + resolved_path = nil + dirs.each do |dir| + expanded_path = File.expand_path(path, dir) + if (File.exist?(expanded_path)) + resolved_path = expanded_path + break + end + end + return(resolved_path) +end + +# Clean up any previous output files left behind if 'compose' or 'run' fails. +# Leftover files can be processed unintentionally by downstream tasks and +# ultimately generate false results. +def clean_energyplus_output_files(dir) + # Not all of these files might be present. Others might be present and unhandled. + paths = [ + "#{dir}/instance-out.err", + "#{dir}/instance-out.rdd", + "#{dir}/instance-out.sql", # Most important for downstream tasks + "#{dir}/instance-tbl.htm", + "#{dir}/instance-var.csv", + "#{dir}/stderr", + "#{dir}/stdout" + ] + FileUtils.rm_f(paths) +end + + +# Rake stubbornly sets the working directory to wherever the Rakefile is located. +# The target directory could optionally be set from a CLI option instead. +study_dir = Rake.application.original_dir + +climates_csv_path = "#{study_dir}/climates.csv" +cohorts_csv_path = "#{study_dir}/cohorts.csv" + +query_path = "#{study_dir}/query.txt" +results_summary_path = "#{study_dir}/results-summary.csv" +results_profile_elec_path = "#{study_dir}/results-profile-elec.csv" +results_profile_gas_path = "#{study_dir}/results-profile-gas.csv" +results_paths = [results_summary_path, results_profile_elec_path, results_profile_gas_path] + +cases_dir = "#{study_dir}/cases" +runs_dir = "#{study_dir}/runs" +runs_pathname = Pathname.new(runs_dir) + +MUTEX = Mutex.new # Thread lock for when something needs to run in a single thread + +config_path = search_parent_dirs(study_dir, ".modelkit-config") +if (not config_path) + raise("modelkit-config file not found in working directory or any parent directory") +else + CONFIG = Modelkit::Config.new(config_path) + puts "Using modelkit-config at #{config_path}\n" +end + +config = Hash.new +[:prototypes_dir, :templates_dir, :weather_dir, :codes_dir].each do |key| + config[key] = [] + field = key.to_s.gsub(/_/, "-") + if (not CONFIG[field]) + raise("#{field} variable missing in modelkit-config") + else + config_paths = CONFIG[field].split(/\s*;\s*/) # Split string with semicolons into array of paths + config_paths.each do |path| + # Resolve path relative to modelkit-config file and normalize the slashes. + config[key] << File.expand_path(path.strip.gsub(/\\/, "/"), File.dirname(config_path)) + end + end +end + +max_workers = CONFIG["max-workers"] +if (max_workers.nil?) + max_workers = 1 +end + +global_pxv_path = search_parent_dirs(study_dir, "global.pxv") +if (global_pxv_path) + puts "Using global.pxv at #{global_pxv_path}\n" +end + +rake_tasks = Rake.application.top_level_tasks +rake_task_name = rake_tasks.first # Multiple tasks are allowed, but assume one + +rake_options = Rake.application.options +rake_options.always_multitask = true # --multitask, -m +#rake_options.job_stats = true # --job-stats true | :history +rake_options.thread_pool_size = max_workers - 1 # --jobs, -j (default 12 on Mac) + +if (rake_options.dryrun or rake_options.show_all_tasks or + rake_options.show_prereqs or rake_options.show_tasks) + # These are information-only requests. Rake nonetheless registers as invoked + # with the "default" task name but nothing actually gets run. + rake_task_name = "none" +end + + +# Show threads message and info about how to change +# Running with 8 threads (edit .modelkit-config to change). +# Type Ctrl+C to cancel all tasks. + +require "io/console" # need this anyway for progress bar + +#$stdin.echo = false # turn off echo; in Mac shows a cursor with a key icon +# This prevents the user from over-typing the output stream. + +# also try switching to raw mode--should also block user input; maybe no key icon? + +#print "\e[?25l" # hide the cursor; MUST remember to show it again on exit or else it's permanent for the session! + + +trap("INT") do # Ctrl+C (polite kill) + puts "Canceling all tasks.\n" + if ($child_pids) + $child_pids.each { |pid| Process.kill("KILL", pid) } + end + exit +end + +if (Modelkit::Platform.unix?) + trap("TSTP") do # Ctrl+Z (suspend) + puts "Suspending all tasks. Type 'fg' to resume.\n" + exit + end +end + +if (not rake_task_name =~ /^(prune|clean|none)$/) + +# If possible, detect if any tasks will be run before showing this message: +puts "\e[1mType Ctrl+C to cancel all tasks.\e[0m\n" + +end + +# modelkit rake -A crashes for some reason + +# NOPUB Some of above could be included here too. +# Don't evaluate worksheets and generate file tasks if not necessary! +# NOTE: prune does need to evaluate worksheets. +if (not rake_task_name =~ /^(clean|none)$/) + + pxv_paths = [] + site_paths = [] + + compose_idf_paths = [] + + + #rename size_ to sizerun_ size_run_ sizing_run_ + size_ref_paths = [] + size_idf_paths = [] + size_sql_paths = [] + size_json_paths = [] + + hardsize_idf_paths = [] + + run_sql_paths = [] + run_csv_paths = [] + + + + old_site_paths = Dir.glob("#{runs_dir}/*/site.pxt") + old_pxv_paths = Dir.glob("#{runs_dir}/**/instance.pxv") + + climates = Modelkit::Worksheet.open(climates_csv_path) + cohorts = Modelkit::Worksheet.open(cohorts_csv_path) + + climate_pattern = ENV["CLIMATE"] || "" + + new_case_csv = "skip,case_name\n,defaults\n" # Could be read from config instead + + cohorts_first_pass = true + + puts "Evaluating worksheets...\n" + + csv_table = climates.each_row do |row1, index1, variables1, parameters1| + #puts "climate_index = #{index1}" + + if (not variables1.key?(:climate)) + raise("required column \"climate\" is missing in #{File.basename(climates_csv_path)}") + end + + climate_name = variables1[:climate].to_s.strip # Could have been converted to non-string by Util.value_from_string + if (climate_name.empty?) + raise("climate field cannot be blank for row #{index1 + 2} of #{File.basename(climates_csv_path)}") + end + + next if (not climate_name =~ Regexp.new(climate_pattern)) + + FileUtils.mkdir_p("#{runs_dir}/#{climate_name}") + + site_path = "#{runs_dir}/#{climate_name}/site.pxt" + if (site_paths.include?(site_path)) + puts "warning: duplicate name #{climate_name.inspect} in climate column at row #{index1 + 2} in #{File.basename(climates_csv_path)}; row will be skipped" + next + end + + site_paths << site_path + + if (not variables1.key?(:weather_file)) + raise("required column \"weather_file\" is missing in #{File.basename(climates_csv_path)}") + end + + weather_name = variables1[:weather_file].to_s.strip # Could have been converted to non-string by Util.value_from_string + if (weather_name.empty?) + raise("weather_file field cannot be blank for row #{index1 + 2} of #{File.basename(climates_csv_path)}") + end + + epw_path = resolve_path(weather_name, config[:weather_dir]) + if (not epw_path) + puts "Could not resolve path #{weather_name.inspect} from possible paths:\n" + config[:weather_dir].each { |dir| puts " #{File.expand_path(weather_name, dir).inspect}\n" } + puts "Check the weather-dir variable in modelkit-config file.\n" + raise("weather file #{weather_name.inspect} not found for row #{index1 + 2} of #{File.basename(climates_csv_path)}") + end + + if (not File.file?(epw_path)) + raise("weather file #{epw_path.inspect} is not a file for row #{index1 + 2} of #{File.basename(climates_csv_path)}") + end + + ddy_path = "#{File.dirname(epw_path)}/#{File.basename(epw_path, ".*")}.ddy" # Ensure ddy is from same directory as resolved epw file + if (not File.exist?(ddy_path)) + puts "Weather file path resolved to #{epw_path.inspect}\n" + raise("ddy file #{ddy_path.inspect} not found for row #{index1 + 2} of #{File.basename(climates_csv_path)}") + end + + # This file only exists to indicate if the weather file changes for dependency purposes. + # The weather file is the one input that is separate from instance parameters. + weather_path = "#{runs_dir}/#{climate_name}/weather" + pathname = Pathname.new(weather_path).relative_path_from(runs_pathname) + + if (File.exist?(weather_path)) + old_epw_path = File.read(weather_path) + if (epw_path != old_epw_path) + puts "Updating: #{pathname}\n" + File.write(weather_path, epw_path) + end + else + puts "Writing: #{pathname}\n" + File.write(weather_path, epw_path) + end + + # generate site.pxt from .ddy file + file site_path => [weather_path, ddy_path] do + idd = open_data_dictionary + pathname = Pathname.new(site_path).relative_path_from(runs_pathname) + puts "Generating: #{pathname}\n" + generate_site_pxt(idd, ddy_path, site_path) + end + + if (variables1.key?(:codes_file)) # NOTE: codes_file is an optional column + codes_name = variables1[:codes_file].to_s.strip # Could have been converted to non-string by Util.value_from_string + if (codes_name.empty?) + raise("codes_file field cannot be blank for row #{index1 + 2} of #{File.basename(climates_csv_path)}") + end + + codes_path = resolve_path(codes_name, config[:codes_dir]) + if (not codes_path) + puts "Could not resolve path #{codes_name.inspect} from possible paths:\n" + config[:codes_dir].each { |dir| puts " #{File.expand_path(codes_name, dir).inspect}\n" } + puts "Check the codes-dir variable in modelkit-config file.\n" + raise("codes file #{codes_name.inspect} not found for row #{index1 + 2} of #{File.basename(climates_csv_path)}") + end + + if (not File.file?(codes_path)) + raise("codes file #{codes_path.inspect} is not a file for row #{index1 + 2} of #{File.basename(climates_csv_path)}") + end + + codes_table = Modelkit::MultiTable.new(codes_path) + + else + codes_table = nil # Must set something to pass to next worksheet + end + + variables1[:codes] = codes_table # For backwards compatibility + + # Make sure objects passed in are not mutated by the Worksheet. Make dupes? + + cohort_names = [] # Accumulate names to check for duplicates + + cohorts.each_row(variables1) do |_, index2, variables2, parameters2| + #puts " cohort_index = #{index2}" + + # NOTE: Variables from outer worksheet (variables1) are copied into this worksheet. + # Changes to the variables here (variables2) do not propagate back up. + + if (not variables2.key?(:cohort)) + raise("required column \"cohort\" is missing in #{File.basename(cohorts_csv_path)}") + end + + cohort_name = variables2[:cohort].to_s.strip # Could have been converted to non-string by Util.value_from_string + if (cohort_name.empty?) + raise("cohort field cannot be blank for row #{index2 + 2} of #{File.basename(cohorts_csv_path)}") + end + + if (cohort_names.include?(cohort_name)) + if (cohorts_first_pass) # Only warn about this row once + puts "warning: duplicate name #{cohort_name.inspect} in cohort column at row #{index2 + 2} in #{File.basename(cohorts_csv_path)}; row will be skipped" + end + next + end + + cohort_names << cohort_name + + cases_csv_path = "#{cases_dir}/#{cohort_name}.csv" + cases_csv_short_path = "#{File.basename(cases_dir)}/#{cohort_name}.csv" + if (not File.exist?(cases_csv_path)) + puts("Cases worksheet #{cases_csv_short_path.inspect} not found for row #{index2 + 2} of #{File.basename(cohorts_csv_path)}\n") + puts("Creating: #{cases_csv_short_path}\n") + FileUtils.mkdir_p(cases_dir) + File.write(cases_csv_path, new_case_csv) + end + + if (not variables2.key?(:root)) + raise("required column \"root\" is missing in #{File.basename(cohorts_csv_path)}") + end + + root_name = variables2[:root].to_s.strip # Could have been converted to non-string by Util.value_from_string + if (root_name.empty?) + raise("root field cannot be blank for row #{index2 + 2} of #{File.basename(cohorts_csv_path)}") + end + + root_path = resolve_path(root_name, config[:prototypes_dir]) + if (not root_path) + puts "Could not resolve path #{root_name.inspect} from possible paths:\n" + config[:prototypes_dir].each { |dir| puts " #{File.expand_path(root_name, dir).inspect}\n" } + puts "Check the prototypes-dir variable in modelkit-config file.\n" + raise("root template #{root_name.inspect} not found for row #{index2 + 2} of #{File.basename(cohorts_csv_path)}") + end + + if (not File.file?(root_path)) + raise("root template #{root_path.inspect} is not a file for row #{index2 + 2} of #{File.basename(cohorts_csv_path)}") + end + + case_names = [] # Accumulate names to check for duplicates + + # Better to pre-read and cache this outside the looping? + # There are only N worksheets...1 per building type. + cases = Modelkit::Worksheet.open(cases_csv_path) + + cases.each_row(variables2) do |_, index3, variables3, parameters3| + #puts " case_index = #{index3}" + + # NOTE: Variables from outer worksheet (variables2) are copied into this worksheet. + # Changes to the variables here (variables3) do not propagate back up. + + if (not variables3.key?(:case_name)) + raise("required column \"case_name\" is missing in #{File.basename(cases_dir)}/#{File.basename(cases_csv_path)}") + end + + case_name = variables3[:case_name].to_s.strip # Could have been converted to non-string by Util.value_from_string + if (case_name.empty?) + raise("case_name field cannot be blank for row #{index3 + 2} of #{File.basename(cases_dir)}/#{File.basename(cases_csv_path)}") + end + + if (case_names.include?(case_name)) + if (cohorts_first_pass) # Only warn about this row once + puts "warning: duplicate name #{case_name.inspect} in case_name column at row #{index3 + 2} in #{File.basename(cases_dir)}/#{File.basename(cases_csv_path)}; row will be skipped" + end + next + end + + case_names << case_name + run_name = "#{climate_name}/#{cohort_name}/#{case_name}" + case_dir = "#{runs_dir}/#{run_name}" + FileUtils.mkdir_p(case_dir) + + # better to create this dynamically in cases.csv by combining variables from other layers. + # all variables need to be propagated first from layer to layer. + # for example: + # :run_name + # %= "My Prefix Something: #{climate}/#{cohort}/#{case_name}" + pxv_string = ":run_name => #{run_name.inspect},\n" + + parameters = parameters1 | parameters2 | parameters3 + parameters.each do |key, value| + value_inspect = value.inspect + if (value.kind_of?(String)) + # Using `inspect` on strings is useful because it reveals invisible + # characters and invalid byte sequences. The downside is that the + # string must be unescaped. + value_inspect.gsub!(/\\\\/, "\\") + end + pxv_string << ":#{key} => #{value_inspect},\n" + end + + pxv_path = "#{case_dir}/instance.pxv" + pxv_paths << pxv_path + + pathname = Pathname.new(pxv_path).relative_path_from(runs_pathname) + + if (File.exist?(pxv_path)) + old_pxv_string = File.read(pxv_path) + if (pxv_string != old_pxv_string) + puts "Updating: #{pathname}\n" + File.write(pxv_path, pxv_string) + end + else + puts "Writing: #{pathname}\n" + File.write(pxv_path, pxv_string) + end + + compose_idf_path = "#{case_dir}/instance.idf" + compose_idf_paths << compose_idf_path + + if (variables3[:sizing_case]) + size_name = "#{climate_name}/#{cohort_name}/#{variables3[:sizing_case]}" + size_dir = "#{runs_dir}/#{size_name}" + size_ref_path = "#{size_dir}/instance.idf" + + size_idf_path = "#{size_dir}/instance-size.idf" + size_sql_path = "#{size_dir}/instance-size-out.sql" + size_json_path = "#{size_dir}/instance-size-out.json" + + if (size_ref_paths.include?(size_ref_path)) + # Avoid creating redundant tasks when multiple cases reference same sizing case. + create_sizing_tasks = false + else + create_sizing_tasks = true + + size_ref_paths << size_ref_path + size_idf_paths << size_idf_path + size_sql_paths << size_sql_path + size_json_paths << size_json_path + end + + hardsize_idf_path = "#{case_dir}/instance-hardsize.idf" + hardsize_idf_paths << hardsize_idf_path + + run_idf_path = hardsize_idf_path # Which input file to run + + run_sql_path = "#{case_dir}/instance-hardsize-out.sql" + run_sql_paths << run_sql_path + + run_csv_path = "#{case_dir}/instance-hardsize-var.csv" + run_csv_paths << run_csv_path + + else + # Autosize-only run. + size_ref_path = nil + + run_idf_path = compose_idf_path # Which input file to run + + run_sql_path = "#{case_dir}/instance-out.sql" + run_sql_paths << run_sql_path + + run_csv_path = "#{case_dir}/instance-var.csv" + run_csv_paths << run_csv_path + end + + # Compose input file from parameter file. + # need more dependencies here: template files + file compose_idf_path => [site_path, root_path, pxv_path, global_pxv_path].compact do # If no path for global.pxv, remove nil element + pathname = Pathname.new(compose_idf_path).relative_path_from(runs_pathname) + puts "Composing: #{pathname}\n" + + clean_energyplus_output_files(File.dirname(compose_idf_path)) + + site_dir = File.dirname(site_path) + + begin + Modelkit::Parametrics.template_compose(root_path, + :annotate => CONFIG["template-compose.annotate"], + :indent => CONFIG["template-compose.indent"], + :esc_line => CONFIG["template-compose.esc-line"], + :dirs => [site_dir, *config[:templates_dir]], + :files => [global_pxv_path, pxv_path].compact, # If no path for global.pxv, remove nil element + :output => compose_idf_path) + rescue Exception => exception + puts "#{exception.class.name}: #{exception.message}\n" + puts "#{exception.backtrace.first}\n" if (not SyntaxError === exception) + puts "Skipping: #{pathname}\n" + end + end + + if (create_sizing_tasks) + # Generate a modified input file in order to run a design-day-only simulation. + # NOTE: This can be eliminated if a design-day option is added to energyplus-run. + file size_idf_path => size_ref_path do + pathname = Pathname.new(size_idf_path).relative_path_from(runs_pathname) + puts "Generating size run: #{pathname}\n" + + FileUtils.cp(size_ref_path, size_idf_path) + + idd = open_data_dictionary + input_file = OpenStudio::InputFile.open(idd, size_idf_path) + + sc_objs = input_file.find_objects_by_class_name("SimulationControl") + if sc_objs.length != 1 + raise "More than one SimulationControl object found" + end + sc = sc_objs[0] + sc.fields[1] = "Yes" + sc.fields[2] = "Yes" + sc.fields[3] = "Yes" + sc.fields[4] = "Yes" + sc.fields[5] = "No" + + input_file.write(size_idf_path) + end + + # Run sizing input files for design days only. + file size_sql_path => size_idf_path do + pathname = Pathname.new(size_idf_path).relative_path_from(runs_pathname) + puts "Running size run: #{pathname}\n" + + command = "modelkit-energyplus energyplus-run --weather=\"#{epw_path}\" \"#{size_idf_path}\"" + run_process(command, size_dir) + end + + # Generate size data file (instance-size-out.json). + file size_json_path => size_sql_path do + pathname = Pathname.new(size_json_path).relative_path_from(runs_pathname) + puts "Extracting size data: #{pathname}\n" + + # Make a copy to work on because the original gets overwritten by EnergyPlus.size. + temp_path = "#{File.dirname(size_idf_path)}/instance-temp.idf" + FileUtils.cp(size_idf_path, temp_path) + + idd = open_data_dictionary + input_file = OpenStudio::InputFile.open(idd, temp_path) + sql = Modelkit::EnergyPlus::SQLOutput.new(size_sql_path) + + # This will be fixed to only generate JSON and not modify the input file. + _, count, output_file = Modelkit::EnergyPlus.size( + sql, input_file, {json: size_json_path, version: "9-2"}) + #puts("#{count} modifications made") + + FileUtils.rm_f(temp_path) + end + end + + if (hardsize_idf_path) + # This would be a reasonable place to use `multitask` because compose_idf_path and + # size_json_path are independent and can be run concurrently. However, it seems + # like `multitask` doesn't compare timestamps like `file` does. Instead it + # always runs like a regular `task`. + file hardsize_idf_path => [compose_idf_path, size_json_path] do + pathname = Pathname.new(hardsize_idf_path).relative_path_from(runs_pathname) + puts "Applying hard sizes: #{pathname}\n" + + idd = open_data_dictionary + input_file = OpenStudio::InputFile.open(idd, compose_idf_path) + + json_string = File.read(size_json_path) + value_map = JSON.parse(json_string, {:symbolize_names=>true}) + output_file, count = Modelkit::EnergyPlus.modify_objects(input_file, value_map) + #puts("#{count} modifications made") + + # Set SimulationControl fields 1, 2, and 3 to "No", "No", and "No" + sc_objs = output_file.find_objects_by_class_name("SimulationControl") + if sc_objs.length != 1 + raise "More than one SimulationControl object found" + end + sc = sc_objs[0] + sc.fields[1] = "No" + sc.fields[2] = "No" + sc.fields[3] = "No" + # Remove Sizing:Zone and Sizing:System objects + sizing_zones = output_file.find_objects_by_class_name("Sizing:Zone") + sizing_systems = output_file.find_objects_by_class_name("Sizing:System") + sizing_plants = output_file.find_objects_by_class_name("Sizing:Plant") + (sizing_zones + sizing_systems + sizing_plants).each {|x| output_file.delete_object(x)} + + output_file.write(hardsize_idf_path) + end + end + + # Run input file in a separate process. + file run_sql_path => [epw_path, run_idf_path] do + # Not sure why this check is needed; seems to try to run if even IDF does not exist. + # May need in other places, like sizing run. + next if (not File.exist?(run_idf_path)) + + pathname = Pathname.new(run_idf_path).relative_path_from(runs_pathname) + puts "Running: #{pathname}\n" + + # Because this is spawned to the shell, .modelkit-config options will be + # automatically applied. + # NOTE: If modelkit-energyplus was thread safe, would not have to run this + # as a separate process. + command = "modelkit-energyplus energyplus-run --weather=\"#{epw_path}\" \"#{run_idf_path}\"" + run_process(command, case_dir) + #$bar.inc + end + + + # see discussion with Michael + file run_csv_path => run_sql_path + + # deleting instance-out.csv breaks it; doesn't know how to recover + + end + end + + cohorts_first_pass = false + end + + + prune_paths = (old_site_paths - site_paths) + (old_pxv_paths - pxv_paths) + + if (not prune_paths.empty? and not rake_task_name =~ /^(prune|clean|none)$/) + puts "\e[1m\e[33mNote: There are cases in the runs directory that are not referenced by any\n" \ + "worksheet. You may want to delete them by typing:\e[0m\n \e[1mmodelkit rake prune\e[0m\n" + end + +end + + +desc "Generate case files" +task :cases do + # No operation; cases are generated when worksheets are evaluated. +end + + +desc "Delete unreferenced files" +task :prune do + if (prune_paths.empty?) + puts "Prune has nothing to delete." + else + prune_dirs = [] + puts "\e[1m\e[31mPrune will delete the following files:\e[0m" + +# show each as: dirname/* (106 files) + + prune_paths.each do |path| + dir = File.dirname(path) + prune_dirs << dir + pathname = Pathname.new(dir).relative_path_from(runs_pathname) + puts " \e[31m#{pathname}\e[0m" + end + print "\e[1m\e[31mConfirm (y/n)?\e[0m " + + input = ENV["CONFIRM"] || $stdin.gets || "" + if (ENV["CONFIRM"] or not $stdin.tty?) + puts input # Echo when not already written to STDOUT + end + + $start_time = Time.now # Reset to cut out wait time on the user prompt + if (input.strip =~ /^y/i) + puts "Pruning files..." + + # maybe don't have to repeat this--already said what was to be deleted + prune_dirs.each do |dir| + pathname = Pathname.new(dir).relative_path_from(runs_pathname) + puts "Deleting: #{pathname}" + FileUtils.rm_rf(dir) + end + else + puts "Task canceled." + end + end +end + + +desc "Delete all files and results" +task :clean do + paths = []; names = [] + [runs_dir, *results_paths].each do |path| + if (File.directory?(path)) + count = Dir.glob("#{path}/**/*").count { |f| File.file?(f) } + if (count.nonzero?) + paths << Dir.glob("#{path}/*") + names << "#{File.basename(path)}/* (#{count} files)" + end + elsif (File.file?(path)) + paths << path + names << File.basename(path) + end + end + + if (paths.empty?) + puts "Clean has nothing to delete." + else + puts "\e[1m\e[31mClean will delete the following files:\e[0m" + names.each { |name| puts " \e[31m#{name}\e[0m"} + print "\e[1m\e[31mConfirm (y/n)?\e[0m " + + input = ENV["CONFIRM"] || $stdin.gets || "" + if (ENV["CONFIRM"] or not $stdin.tty?) + puts input # Echo when not already written to STDOUT + end + + $start_time = Time.now # Reset to cut out wait time on the user prompt + if (input.strip =~ /^y/i) + puts "Cleaning files..." + FileUtils.rm_rf(paths) + else + puts "Task canceled." + end + end +end + + +desc "Generate site files (site.pxt)" +multitask :sites => site_paths + + +desc "Compose input files" +multitask :compose => compose_idf_paths + + +# Generate size input files +multitask :"size-idf" => size_idf_paths + + +# Run size input files +multitask :"size-sql" => size_sql_paths + + +# Extract size data +multitask :"size-json" => size_json_paths + + +desc "Apply hard sizes to input files" +multitask :hardsize => hardsize_idf_paths + + +desc "Run input files" +multitask :run => run_sql_paths + + +file query_path do + puts "Query file not found.\n" + query = +"AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Energy Per Total Building Area/Net Site Energy, Net Site EUI +AnnualBuildingUtilityPerformanceSummary/Entire Facility/Site and Source Energy/Total Energy/Net Site Energy, Net Site Energy +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Electricity/Total End Uses, Electricity +AnnualBuildingUtilityPerformanceSummary/Entire Facility/End Uses/Natural Gas/Total End Uses, Natural Gas\n" + File.write(query_path, query) + puts "Writing default query file: #{query_path}\n" +end + + +file results_summary_path => [*run_sql_paths, query_path] do + pathname = Pathname.new(results_summary_path).relative_path_from(Pathname.new(study_dir)) + puts "Processing: #{pathname}\n" + + short_paths = run_sql_paths.map { |path| Pathname.new(path).relative_path_from(runs_pathname) } + Modelkit::EnergyPlus.sql(short_paths, query_path, :dir => runs_dir, :output => results_summary_path) +end + + +file results_profile_elec_path => run_csv_paths do + aggregate_profiles("Electricity:Facility", results_profile_elec_path, run_csv_paths, runs_pathname, study_dir) +end + + +file results_profile_gas_path => run_csv_paths do + aggregate_profiles("Gas:Facility", results_profile_gas_path, run_csv_paths, runs_pathname, study_dir) +end + + +desc "Aggregate the simulation results" +task :results => results_paths + + +task :default => :results + + +def aggregate_profiles(column_name, output_path, run_csv_paths, runs_pathname, study_dir) + pathname = Pathname.new(output_path).relative_path_from(Pathname.new(study_dir)) + puts "Processing: #{pathname}\n" + + short_paths = run_csv_paths.map { |path| Pathname.new(path).relative_path_from(runs_pathname) } + + columns = [] + column_header = nil + date_time = true + short_paths.each do |short_path| + csv_path = "#{runs_pathname}/#{short_path}" + if (File.exist?(csv_path)) + csv = CSV.read(csv_path, :headers=>true) + if (date_time) + column = csv["Date/Time"] + column.unshift("Date/Time") # Add header + columns << column + date_time = false + end + if (not column_header) + # Match column name to the header while ignoring units/interval, i.e., [J](Hourly). + column_header = csv.headers.find { |header| header.match(column_name) } + end + column = csv[column_header] + column.unshift(short_path) # Add header + columns << column + else + puts "warning: file not found: #{csv_path}\n" + end + end + + File.open(output_path, "w") do |file| + columns.transpose.each { |row| file.puts(row.join(",")) } + end +end + + +# NOPUB consider building this into modelkit-energyplus. +# basically caches IDD path and avoids concurrent openings. + +# Open the EnergyPlus IDD if needed, but only do it once. +def open_data_dictionary + MUTEX.synchronize do # Lock to prevent opening multiple times concurrently + if (@idd.nil?) + puts "Opening Energy+.idd...\n" + + if (path = CONFIG["energyplus-run.engine"]) + path = File.expand_path(path.gsub(/\\/, "/")) # Resolve path and normalize + if (File.exist?(path)) + idd_path = "#{path}/Energy+.idd" + if (not File.exist?(idd_path)) + raise("Energy+.idd not found in specified EnergyPlus directory: #{path}") + end + else + raise("EnergyPlus directory not found: #{path}") + end + else + raise("energyplus-run.engine field missing in .modelkit-config") + end + + @idd = OpenStudio::DataDictionary.open(idd_path) + end + end + return(@idd) +end + + +# NICE, works +#require "rake/cpu_counter" +#puts "cpu=#{Rake::CpuCounter.count}" + +# Almost works but not quite: + +# shows what command was invoked from CLI +# if blank (even with -T), it's "default". +#puts "top level:" +# cli_tasks = Rake.application.top_level_tasks +# cli_task_name = cli_tasks.first # could be more than one; just grab first for now +# puts "cli_task_name=#{cli_task_name}" # returns String + +# cli_task = Rake.application.tasks.find { |t| t.name == cli_task_name } # returns Rake::Task +# puts "cli_task=#{cli_task}" +# + +# +## Rake has this builtin: +# Rake.application.lookup(task_name) => task + +# work_to_do = false +# if (cli_task.needed?) +# # Just because needed doesn't mean there is any work to do--check prereqs! +# cli_task.prerequisite_tasks.each do |prereq| +# if (prereq.needed?) +# work_to_do = true +# break +# end +# end +# end +# +# if (work_to_do) +# puts "Work to do!" +# else +# puts "Up to date; nothing to do." +# end + + +$start_time = Time.now +#$bar = RakeProgressbar.new(run_sql_paths.length) + +at_exit do + #$bar.finished + if (not rake_task_name =~ /^none$/) + puts "Elapsed task duration: #{Time.now - $start_time} sec" + end +end