From 9eb1708b60fa4b06af67800296e39bede8db3a73 Mon Sep 17 00:00:00 2001 From: Michel Date: Tue, 23 May 2017 16:26:31 -0400 Subject: [PATCH] Add cooling output option to extract_output.epxml_zcls_to_df --- bpeng/simulation/extract_output.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bpeng/simulation/extract_output.py b/bpeng/simulation/extract_output.py index 118a8ab..ee618a8 100644 --- a/bpeng/simulation/extract_output.py +++ b/bpeng/simulation/extract_output.py @@ -30,7 +30,8 @@ def epxml_zcls_to_df(xml_file_path, bin_num, output_details='TotalOnly'): level of details in output table options: 'TotalOnly' (table showing only total breakdown for building) 'byZone' (table showing breakdown by zone and total) - 'HeatingEnvelope' (list showing only total breakdown for building envelope components in MBH) + 'HeatingEnvelope' (showing only heating total breakdown for building envelope components in MBH) + 'CoolingEnvelope' (showing only cooling total breakdown for building envelope components in MBH) Returns: @@ -85,6 +86,9 @@ def epxml_zcls_to_df(xml_file_path, bin_num, output_details='TotalOnly'): elif output_details == 'HeatingEnvelope': envelope_col = ['Roof', 'ExteriorWall', 'GroundContactFloor', 'FenestrationConduction', 'Infiltration', 'units'] return df_out.loc[[tot_heat_name, perc_heat_name], envelope_col] + elif output_details == 'CoolingEnvelope': + envelope_col = ['Roof', 'ExteriorWall', 'GroundContactFloor', 'FenestrationConduction', 'Infiltration', 'units'] + return df_out.loc[[tot_cool_name, perc_cool_name], envelope_col] def heat_cool_dist_from_eso(eso_file_path, bin_num, time_step="Hourly"): @@ -96,7 +100,7 @@ def heat_cool_dist_from_eso(eso_file_path, bin_num, time_step="Hourly"): eso_file_path (str) path to eso file that will be parsed - bin_num (float or int) + bin_num (str, int or float) Building Identification Number time_step (str) @@ -127,13 +131,13 @@ def heat_cool_dist_from_eso(eso_file_path, bin_num, time_step="Hourly"): if (time_step == "Hourly") or (time_step is None): df_out = pd.concat([out_heat_energy_hourly, out_cool_energy_hourly], axis=1) - df_out.columns = [bin_num + ' Heating Energy (kBTU)', bin_num + ' Cooling Energy (kBTU)'] + df_out.columns = [str(bin_num) + ' Heating Energy (kBTU)', str(bin_num) + ' Cooling Energy (kBTU)'] return df_out elif time_step == "Monthly": df_out = pd.concat([out_heat_energy_monthly, out_cool_energy_monthly], axis=1) - df_out.columns = [bin_num + ' Heating Energy (mmBTU)', bin_num + ' Cooling Energy (mmBTU)'] + df_out.columns = [str(bin_num) + ' Heating Energy (mmBTU)', str(bin_num) + ' Cooling Energy (mmBTU)'] return df_out @@ -143,14 +147,15 @@ def heat_cool_dist_from_eso(eso_file_path, bin_num, time_step="Hourly"): def hvac_sizing_from_eio(eio_file_path, bin_num, output_type='TotalSizing'): """ - Extract HVAC sizing from EnergyPlus eio output files for specific building + Extract design HVAC sizing from EnergyPlus eio output files for specific building + Note: need to apply an efficiency factor for consumption Args: eio_file_path (str) path to eio file that will be parsed - bin_num (float or int) + bin_num (str, int or float) Building Identification Number output_type (str) -- GitLab