Fixed issue with additional column for tech performance during series air source run
This commit is contained in:
parent
380c6644a3
commit
a8e44d5e30
|
@ -71,6 +71,17 @@ class HeatPumpExport:
|
||||||
Write headers to the various csv file generated by insel
|
Write headers to the various csv file generated by insel
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
file_one_headers = ['Year', ' Month', ' Day', 'Hour', 'Minute', 'HP Heat Output (kW)',
|
||||||
|
'HP Electricity Consumption (kW)', 'HP COP', 'TES Charging Rate (kg/s)',
|
||||||
|
'TES Discharging Rate (kg/s)', 'TES Node 1 Temperature', 'TES Node 2 Temperature',
|
||||||
|
'TES Node 3 Temperature', 'TES Node 4 Temperature', 'TES Energy Content (J)',
|
||||||
|
'TES Energy Content (kWh)', 'TES Energy Content Variation (kWh)',
|
||||||
|
'Auxiliary Heater Fuel Flow Rate (kg/s)', 'Auxiliary Heater Energy Input (kW)',
|
||||||
|
'HP Operational Cost (CAD)', 'Auxiliary Heater Operational Cost (CAD)',
|
||||||
|
'Operational CO2 Emissions of HP (g)',
|
||||||
|
'Operational CO2 Emissions of Auxiliary Heater (g)',
|
||||||
|
'Return Temperature', 'Demand (kW)', 'Test Column']
|
||||||
|
|
||||||
header_data = {
|
header_data = {
|
||||||
self._input_data['fileOut1']: ['Year', ' Month', ' Day', 'Hour', 'Minute', 'HP Heat Output (kW)',
|
self._input_data['fileOut1']: ['Year', ' Month', ' Day', 'Hour', 'Minute', 'HP Heat Output (kW)',
|
||||||
'HP Electricity Consumption (kW)', 'HP COP', 'TES Charging Rate (kg/s)',
|
'HP Electricity Consumption (kW)', 'HP COP', 'TES Charging Rate (kg/s)',
|
||||||
|
@ -81,7 +92,7 @@ class HeatPumpExport:
|
||||||
'HP Operational Cost (CAD)', 'Auxiliary Heater Operational Cost (CAD)',
|
'HP Operational Cost (CAD)', 'Auxiliary Heater Operational Cost (CAD)',
|
||||||
'Operational CO2 Emissions of HP (g)',
|
'Operational CO2 Emissions of HP (g)',
|
||||||
'Operational CO2 Emissions of Auxiliary Heater (g)',
|
'Operational CO2 Emissions of Auxiliary Heater (g)',
|
||||||
'Return Temperature', 'Demand (kW)', 'Test Column'],
|
'Return Temperature', 'Demand (kW)'],
|
||||||
self._input_data['fileOut2']: ['Day', 'Operational Daily Emissions from Heat Pumps (g)',
|
self._input_data['fileOut2']: ['Day', 'Operational Daily Emissions from Heat Pumps (g)',
|
||||||
'Operational Daily Emissions from Auxiliary Heater (g)'],
|
'Operational Daily Emissions from Auxiliary Heater (g)'],
|
||||||
self._input_data['fileOut3']: ['Month', 'Monthly Operational Costs of Heat Pumps (CAD)',
|
self._input_data['fileOut3']: ['Month', 'Monthly Operational Costs of Heat Pumps (CAD)',
|
||||||
|
@ -100,6 +111,11 @@ class HeatPumpExport:
|
||||||
for file_path, header in header_data.items():
|
for file_path, header in header_data.items():
|
||||||
file_path = file_path.strip("'")
|
file_path = file_path.strip("'")
|
||||||
df = pd.read_csv(file_path, header=None, sep='\s+')
|
df = pd.read_csv(file_path, header=None, sep='\s+')
|
||||||
|
# ignore ambient temperature for air source series run
|
||||||
|
if df.shape[1] > 25:
|
||||||
|
df.drop(columns=df.columns[-1],
|
||||||
|
axis=1,
|
||||||
|
inplace=True)
|
||||||
df.to_csv(file_path, header=header)
|
df.to_csv(file_path, header=header)
|
||||||
|
|
||||||
def _update_input_data_with_files(self):
|
def _update_input_data_with_files(self):
|
||||||
|
@ -215,4 +231,3 @@ class HeatPumpExport:
|
||||||
s = pd.Series(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "Total"])
|
s = pd.Series(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "Total"])
|
||||||
df = df.set_index([s])
|
df = df.set_index([s])
|
||||||
df.to_csv(self._output_path)
|
df.to_csv(self._output_path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user