WRG_Effizienz
Bibliotheken importieren
# Name des aktuellen Notebooks für die exportierten Datein
file_name = "WRG_Effizienz"
# Ordner auf dem Server (nach files/)
ftp_folder = 'Notebooks/Auswertung'
## Bibliotheken, Module und Text- bzw- Grafikformatierungen aus zentraler Datei laden
%run ../Template/libraries_and_styles.ipynb
## Warum auch immer muss rcParams.update() in eine eigene Zelle...
mpl.rcParams.update(params)
Daten Import
daten1 = pd.read_csv('../1_Daten/Arbeitsdaten/Daten_15s.csv')
daten1["Zeit"] = pd.to_datetime(daten1["Zeit"],dayfirst=True)
daten1.set_index(['Zeit'], inplace=True)
## Messung mit 4 x Testo 480 im Zeitraum:
## 2017-12-05 10:00:00 bis 2017-12-12 10:18:00
#wrg = pd.read_csv("MA_WGR_Daten_Testo.csv",sep=";",decimal=",",encoding="cp1252")
# drei Dateien kombiniert:
# '2017-12-05 10:00:00' : '2017-12-12 10:18:00'
# '2018-01-30 11:11:00' : '2018-02-12 12:36:00'
# '2018-02-15 16:40:00' : '2018-02-23 14:38:00'
wrg = pd.read_csv("testo.csv",sep=",",decimal=".")
wrg['Datum'] = pd.to_datetime(wrg["Datum"],dayfirst=True,)
wrg.set_index(["Datum"], inplace=True)
wrg.columns = ['Außenluft_C', 'Außenluft_rF', 'Zuluft_C', 'Zuluft_rF', 'Abluft_C','Abluft_rF', 'Fortluft_C', 'Fortluft_rF']
wrg.resample('15s')#.fillna(method='ffill').interpolate()
## Aus der Kalibrierung vom 25.03.2019 gegen das Testo480
## Excel MA_Testo_174_Kalibrierung
wrg['Abluft_rF'] = wrg['Abluft_rF'] * 1.0386 - 0.0826
wrg['Fortluft_rF'] = wrg['Fortluft_rF'] * 0.9522 + 2.5642
wrg['Außenluft_rF'] = wrg['Außenluft_rF'] * 1.0568 + 3.1864
wrg['Zuluft_rF'] = wrg['Zuluft_rF'] * 1.0489 + 2.9552
wrg['Abluft_C'] = wrg['Abluft_C'] * 1.0447 - 0.5989
wrg['Fortluft_C'] = wrg['Fortluft_C'] * 1.0002 + 0.2829
wrg['Außenluft_C'] = wrg['Außenluft_C'] * 1.0191 - 0.809
wrg['Zuluft_C'] = wrg['Zuluft_C'] * 1.0059 - 0.3276
#################################### INSERT HERE ####################################
## Referenz:
## kal['ref_rF'] = (kal.Abluft_rF + kal.Fortluft_rF ) / 2
## kal['ref_C'] = (kal.Abluft_C + kal.Fortluft_C + kal.Zuluft_C) / 3
# wrg['Abluft_rF'] = wrg['Abluft_rF'] * 0.828993573070746 + 6.801455317349444
# wrg['Fortluft_rF'] = wrg['Fortluft_rF'] * 1.0674200418092923 + -2.6412934624410167
# wrg['Außenluft_rF'] = wrg['Außenluft_rF'] * 0.8002161817773167 + 5.231630936999777
# wrg['Zuluft_rF'] = wrg['Zuluft_rF'] * 0.9223667924445846 + 1.4339541677129877
# wrg['Abluft_C'] = wrg['Abluft_C'] * 1.0209706144779265 + -0.4144120307172744
# wrg['Fortluft_C'] = wrg['Fortluft_C'] * 0.9647290370199838 + 0.6981836985112495
# wrg['Außenluft_C'] = wrg['Außenluft_C'] * 1.1242036726591484 + -2.0880414590720107
# wrg['Zuluft_C'] = wrg['Zuluft_C'] * 0.9913301797188931 + 0.1560904830431007
## Merge DataFrames
daten = daten1.merge(wrg, left_index=True, right_index=True, how='outer')
# daten.fillna(0,inplace=True)
daten['L_Zuluft_VPunkt'] = daten['L_Zuluft_1_VPunkt'] + daten['L_Zuluft_2_VPunkt'] + daten['L_Zuluft_3_VPunkt']
## nur in diesem Zeitraum sind die externen daten_ext verfügbar
daten_ext = daten.loc['2017-12-05 10:00:00': '2018-02-23 14:38:00']
daten_ext.Außenluft_C.loc['2018-01-30 11:10:00' : '2018-02-12 12:36:00'].head(8)
2018-01-30 11:10:00 NaN
2018-01-30 11:10:15 NaN
2018-01-30 11:10:30 NaN
2018-01-30 11:10:45 NaN
2018-01-30 11:11:00 18.65581
2018-01-30 11:11:15 18.65581
2018-01-30 11:11:30 18.65581
2018-01-30 11:11:45 18.65581
Name: Außenluft_C, dtype: float64
Testo Messdaten
fig, (ax, ax2) = plt.subplots(2, sharex=True)
# erster Plot
daten_ext['Abluft_C'].plot(ax=ax,color=colo('orange',1), linewidth=0.5, label = 'Abluft')
daten_ext['Zuluft_C'].plot(ax=ax,color=colo('rot',1), linewidth=0.5, label = 'Zuluft')
daten_ext['Fortluft_C'].plot(ax=ax,color=colo('violet',1), linewidth=0.5, label = 'Fortluft')
daten_ext['Außenluft_C'].plot(ax=ax,color=colo('blau',1), linewidth=0.5, label = 'Außenluft')
# zweiter Plot
daten_ext['Abluft_rF'].plot(ax=ax2,color=colo('orange',1), linewidth=0.5, label = 'Abluft')
daten_ext['Zuluft_rF'].plot(ax=ax2,color=colo('rot',1), linewidth=0.5, label = 'Zuluft')
daten_ext['Fortluft_rF'].plot(ax=ax2,color=colo('violet',1), linewidth=0.5, label = 'Fortluft')
daten_ext['Außenluft_rF'].plot(ax=ax2,color=colo('blau',1), linewidth=0.5, label = 'Außenluft')
# Achsen
ax.set_ylabel(r'\textbf{Temp.}')
ax2.set_ylabel(r'\textbf{rel. LF.}')
ax.set(ylim=0)
ax.set_xlabel('')
ax2.set_xlabel('')
# ax2.xaxis.set_tick_params(rotation=0, right=15)
# ax2.xaxis.set_major_formatter(mdates.DateFormatter('%d.%m.'))
# ax2.set_xticklabels(ha='center')
# ax2.axes.get_xaxis().set_ticks([])
# ax2.set(xlim=[pd.to_datetime("12.05.17 10:00:00"),pd.to_datetime("12.12.17 10:18:00")])
# xlabels = ['6. Dez','7.','8.','9.','10.','11.','12.']
# ax2.set_xticklabels(xlabels, rotation=0, ha='center')
# Legende
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=4, loc=1)
set_legend_linewidth(legend)
plt.savefig(output_folder + '/' + file_name + '_Testo_Messdaten_ext.pdf')
#https://github.com/bendichter/brokenaxes
#https://matplotlib.org/3.1.0/gallery/subplots_axes_and_figures/broken_axis.html
Effizienz berechnen
## Enthalpien in den Luftströmen daten_ext
daten_ext['W_Luftdruck'] = 101.325 ## 101,3 kPa = 1,013 bar
daten_ext['h11_Abluft'] = psy.Enthalpy_Air_H2O(daten_ext['Abluft_C'], psy.Hum_rat2(daten_ext['Abluft_C'], daten_ext['Abluft_rF']/100, daten_ext['W_Luftdruck']))
daten_ext['h12_Fortluft'] = psy.Enthalpy_Air_H2O(daten_ext['Fortluft_C'], psy.Hum_rat2(daten_ext['Fortluft_C'], daten_ext['Fortluft_rF']/100, daten_ext['W_Luftdruck']))
daten_ext['h21_Außenluft'] = psy.Enthalpy_Air_H2O(daten_ext['Außenluft_C'], psy.Hum_rat2(daten_ext['Außenluft_C'], daten_ext['Außenluft_rF']/100, daten_ext['W_Luftdruck']))
daten_ext['h22_Zuluft'] = psy.Enthalpy_Air_H2O(daten_ext['Zuluft_C'], psy.Hum_rat2(daten_ext['Zuluft_C'], daten_ext['Zuluft_rF']/100, daten_ext['W_Luftdruck']))
## Effizienz der Wärmerückgewinnung
daten_ext['EÜG_Fortluft'] = (daten_ext['h11_Abluft'] - daten_ext['h12_Fortluft']) / (daten_ext['h11_Abluft'] - daten_ext['h21_Außenluft']) * 100
daten_ext['EÜG_Außenluft'] = (daten_ext['h22_Zuluft'] - daten_ext['h21_Außenluft']) / (daten_ext['h11_Abluft'] - daten_ext['h21_Außenluft']) * 100
## Rückwärmezahl
daten_ext['RWZ_Außenluft'] = (daten_ext['Abluft_C'] - daten_ext['Fortluft_C']) / (daten_ext['Abluft_C'] - daten_ext['Außenluft_C']) * 100
## Wassergehalte (WG) in den Luftströmen daten_ext
daten_ext['Abluft_WG'] = psy.Hum_rat2(daten_ext['Abluft_C'], daten_ext['Abluft_rF']/100, daten_ext['W_Luftdruck'])* 10000
daten_ext['Fortluft_WG'] = psy.Hum_rat2(daten_ext['Fortluft_C'], daten_ext['Fortluft_rF']/100, daten_ext['W_Luftdruck'])* 10000
daten_ext['Zuluft_WG'] = psy.Hum_rat2(daten_ext['Zuluft_C'], daten_ext['Zuluft_rF']/100, daten_ext['W_Luftdruck'])* 10000
daten_ext['Außenluft_WG'] = psy.Hum_rat2(daten_ext['Außenluft_C'], daten_ext['Außenluft_rF']/100, daten_ext['W_Luftdruck'])* 10000
## Gewicht der feuchten Luft
daten_ext['Außenluft_Masse'] = psy.Dry_Air_Density(daten_ext['W_Luftdruck'], daten_ext['Außenluft_C'], psy.Hum_rat2( daten_ext['Außenluft_C'], daten_ext['Außenluft_rF']/100, daten_ext['W_Luftdruck'])) * (1 + psy.Hum_rat2( daten_ext['Außenluft_C'], daten_ext['Außenluft_rF']/100, daten_ext['W_Luftdruck']))
daten_ext['Fortluft_Masse'] = psy.Dry_Air_Density(daten_ext['W_Luftdruck'], daten_ext['Fortluft_C'], psy.Hum_rat2( daten_ext['Fortluft_C'], daten_ext['Fortluft_rF']/100, daten_ext['W_Luftdruck'])) * (1 + psy.Hum_rat2( daten_ext['Fortluft_C'], daten_ext['Fortluft_rF']/100, daten_ext['W_Luftdruck']))
## Energie der Luftmassenströme
daten_ext['Außenluft_Energie'] = daten_ext['h21_Außenluft'] * daten_ext['Außenluft_Masse'] * daten_ext['L_Zuluft_VPunkt'] * (1/3600) ## kJ in kWh
daten_ext['Fortluftluft_Energie'] = daten_ext['h12_Fortluft'] * daten_ext['Fortluft_Masse'] * daten_ext['L_Zuluft_VPunkt'] * (1/3600) ## kJ in kWh
daten_ext['verlorene_Energie'] = daten_ext['Fortluftluft_Energie'] - daten_ext['Außenluft_Energie']
Plot EÜG
daten_ext['Zuluft_Druck_Schwelle_unten'] = 80
daten_ext['Zuluft_Druck_Schwelle_oben'] = 93
daten_ext['EÜG_Fortluft_bereinigt_unten'] = np.where(daten_ext['L_Zuluft_Druck'] < daten_ext['Zuluft_Druck_Schwelle_unten'], np.NaN,daten_ext['EÜG_Fortluft'])
daten_ext['EÜG_Außenluft_bereinigt_unten'] = np.where(daten_ext['L_Zuluft_Druck'] < daten_ext['Zuluft_Druck_Schwelle_unten'], np.NaN,daten_ext['EÜG_Außenluft'])
daten_ext['RWZ_Außenluft_bereinigt_unten'] = np.where(daten_ext['L_Zuluft_Druck'] < daten_ext['Zuluft_Druck_Schwelle_unten'], np.NaN,daten_ext['RWZ_Außenluft'])
daten_ext['EÜG_Fortluft_bereinigt'] = np.where(daten_ext['L_Zuluft_Druck'] > daten_ext['Zuluft_Druck_Schwelle_oben'], np.NaN,daten_ext['EÜG_Fortluft_bereinigt_unten'])
daten_ext['EÜG_Außenluft_bereinigt'] = np.where(daten_ext['L_Zuluft_Druck'] > daten_ext['Zuluft_Druck_Schwelle_oben'], np.NaN,daten_ext['EÜG_Außenluft_bereinigt_unten'])
daten_ext['RWZ_Außenluft_bereinigt'] = np.where(daten_ext['L_Zuluft_Druck'] > daten_ext['Zuluft_Druck_Schwelle_oben'], np.NaN,daten_ext['RWZ_Außenluft_bereinigt_unten'])
daten_ext['EÜG_Fortluft_mean'] = daten_ext['EÜG_Fortluft_bereinigt'].mean()
daten_ext['EÜG_Außenluft_mean'] = daten_ext['EÜG_Außenluft_bereinigt'].mean()
daten_ext['RWZ_Außenluft_mean'] = daten_ext['RWZ_Außenluft_bereinigt'].mean()
## Plot
fig, ax = plt.subplots()
## Druck
# daten_ext['L_Zuluft_Druck'].plot(ax=ax,color=colo('orange',.8), linewidth=0.5, label = 'Zuluft Druck')
daten_ext['Zuluft_Druck_Schwelle_unten'].plot(ax=ax,color=colo('black',1), linewidth=0.5, label = '__nolable__')
daten_ext['Zuluft_Druck_Schwelle_oben'].plot(ax=ax,color=colo('black',1), linewidth=0.5, label = '__nolable__')
ax.fill_between(daten_ext.index, 0, 1, where=daten_ext['EÜG_Außenluft_bereinigt']>1, alpha=0.1, transform=ax.get_xaxis_transform())
# EÜG, EÜG fett, EÜG Durchschnitt
daten_ext['EÜG_Außenluft'].plot(ax=ax,color=colo('grün',1), linewidth=0.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft'].plot(ax=ax,color=colo('rot',1), linewidth=0.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft'].plot(ax=ax,color=colo('black',1), linewidth=0.5, label = 'RWZ_Außenluft')
# EÜG in Druckintervall
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=1, label = '__nolable__')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=1, label = '__nolable__')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=1, label = '__nolable__')
# EÜG Durchschnitt
daten_ext['EÜG_Fortluft_mean'].plot(ax=ax,color=colo('rot',1.5), linewidth=0.5, label = '__nolable__')
daten_ext['EÜG_Außenluft_mean'].plot(ax=ax,color=colo('grün',1.5), linewidth=0.5, label = '__nolable__')
daten_ext['RWZ_Außenluft_mean'].plot(ax=ax,color=colo('black',1.5), linewidth=0.5, label = '__nolable__')
# Korrelation zu Außenluft?
ax2 = ax.twinx()
daten_ext['Außenluft_C'].plot(ax=ax2,color=colo('blau',1), linewidth=0.8, label = 'Außen Temperatur')
## Achsen
# ax2 = plt.gca()
# ax2.axes.xaxis.set_ticklabels([])
# ax = plt.gca()
# ax.axes.xaxis.set_ticklabels([])
# plt.xticks([])
# ax.set(xlim=[pd.to_datetime("12.05.17 10:00:00"),pd.to_datetime("12.12.17 10:18:00")])
# xlabels = ['6. Dez','7.','8.','9.','10.','11.','12.']
# ax.set_xticklabels(xlabels, rotation=0, ha='center')
ax.set(ylabel="Energie(kWh)", xlabel="Zeit",ylim=[30,100])
ax2.set(ylabel="Temperatur(C)", xlabel="Zeit",ylim=[2,10])
ax.set_xlabel('')
## Legende
h0, l0 = ax.get_legend_handles_labels()
h2, l2 = ax2.get_legend_handles_labels()
legend = plt.legend(h0+h2, l0+l2, ncol=3, loc=1)
set_legend_linewidth(legend)
plt.savefig(output_folder + '/' + file_name + '_Druck_EUeG.pdf')
plt.show()
Ausschnitte
## Eins
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2017-12-05 10:00:00"),pd.to_datetime("2017-12-12 10:18:00 ")])
plt.show()
# Zwei
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2018-01-30 11:11:00"),pd.to_datetime("2018-02-12 12:36:00")])
plt.show()
# Drei
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2018-02-15 16:40:00"),pd.to_datetime("2018-02-23 14:38:00")])
plt.show()
# Ausschitte von den Ausschnitten
# Eins
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2017-12-06 12:00:00"),pd.to_datetime("2017-12-06 21:18:00 ")])
plt.show()
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2017-12-08 15:00:00"),pd.to_datetime("2017-12-09 10:00:00 ")])
plt.show()
# Zwei
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2018-01-31 12:00:00"),pd.to_datetime("2018-01-31 19:18:00 ")])
plt.show()
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2018-02-09 18:00:00"),pd.to_datetime("2018-02-09 22:00:00 ")])
plt.show()
# Drei
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2018-02-16 16:00:00"),pd.to_datetime("2018-02-17 12:00:00 ")])
plt.show()
fig, ax = plt.subplots()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax,color=colo('grün',1), linewidth=.5, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax,color=colo('rot',1), linewidth=.5, label = 'EÜG_Fortluft')
daten_ext['RWZ_Außenluft_bereinigt'].plot(ax=ax,color=colo('black',1), linewidth=.5, label = 'RWZ_Außenluft')
ax.set(ylabel="Effizienz(\%)", xlabel="Zeit",ylim=[30,100])
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=3, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("2018-02-19 23:00:00"),pd.to_datetime("2018-02-20 05:00:00 ")])
plt.show()
EÜG Plot Volumenstrom
fig, ax = plt.subplots()
daten_ext['EÜG_Fortluft'].plot(ax=ax,color=colo('rot',1), linewidth=0.5, label = 'EÜG_Fortluft')
daten_ext['EÜG_Außenluft'].plot(ax=ax,color=colo('grün',1), linewidth=0.5, label = 'EÜG_Außenluft')
daten_ext['RWZ_Außenluft'].plot(ax=ax,color=colo('orange',1), linewidth=0.5, label = 'RWZ_Außenluft')
# daten_ext['L_Abluft_Druck'].plot(ax=ax,color=colo('gelb',1), linewidth=0.5, label = 'L_Abluft_Druck')
# daten_ext['L_Zuluft_Druck'].plot(ax=ax,color=colo('orange',1), linewidth=0.5, label = 'L_Zuluft_Druck')
ax.fill_between(daten_ext.index, 0, 1, where=daten_ext['EÜG_Außenluft_bereinigt']>1, alpha=0.3, transform=ax.get_xaxis_transform())
ax2 = ax.twinx()
daten_ext['L_Zuluft_VPunkt'].plot(ax=ax2,color=colo('blau',1), linewidth=0.5, label = 'L_Zuluft_VPunkt')
h0, l0 = ax.get_legend_handles_labels()
h1, l1 = ax2.get_legend_handles_labels()
legend = plt.legend(h0+h1, l0+l1, ncol=2, loc=1)
set_legend_linewidth(legend)
ax.set(ylabel="Effizienz[\%]", xlabel="",ylim=[40,90])
ax2.set(ylabel="Voluemnstrom[m3/h]", xlabel="",ylim=[800,1800])
ax.set_xlabel('')
plt.savefig(output_folder + '/' + file_name + '_Volumenstrom_EUeG.pdf')
Messdaten und EÜG
fig, (ax, ax2) = plt.subplots(2, sharex=True)
# erster Plot
daten_ext['Abluft_C'].plot(ax=ax,color=colo('orange',1), linewidth=0.5, label = 'Abluft')
daten_ext['Zuluft_C'].plot(ax=ax,color=colo('rot',1), linewidth=0.5, label = 'Zuluft')
daten_ext['Fortluft_C'].plot(ax=ax,color=colo('violet',1), linewidth=0.5, label = 'Fortluft')
daten_ext['Außenluft_C'].plot(ax=ax,color=colo('blau',1), linewidth=0.5, label = 'Außenluft')
ax1 = ax.twinx()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax1,color=colo('grün',1), linewidth=1, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax1,color=colo('rot',1), linewidth=1, label = 'EÜG_Fortluft')
## zweiter Plot
daten_ext['Abluft_rF'].plot(ax=ax2,color=colo('orange',1), linewidth=0.5, label = 'Abluft')
daten_ext['Zuluft_rF'].plot(ax=ax2,color=colo('rot',1), linewidth=0.5, label = 'Zuluft')
daten_ext['Fortluft_rF'].plot(ax=ax2,color=colo('violet',1), linewidth=0.5, label = 'Fortluft')
daten_ext['Außenluft_rF'].plot(ax=ax2,color=colo('blau',1), linewidth=0.5, label = 'Außenluft')
ax3 = ax2.twinx()
daten_ext['EÜG_Außenluft_bereinigt'].plot(ax=ax3,color=colo('grün',1), linewidth=1, label = 'EÜG_Außenluft')
daten_ext['EÜG_Fortluft_bereinigt'].plot(ax=ax3,color=colo('rot',1), linewidth=1, label = 'EÜG_Fortluft')
# Achsen
ax.set_ylabel(r'\textbf{Temp.}')
ax2.set_ylabel(r'\textbf{rel. LF.}')
ax.set(ylim=0)
ax.set_xlabel('')
ax2.set_xlabel('')
# Legende
h0, l0 = ax.get_legend_handles_labels()
h1, l1 = ax.get_legend_handles_labels()
legend = plt.legend(h0+h1, l0+l1, ncol=4, loc=1)
set_legend_linewidth(legend)
# ax.set(xlim=[pd.to_datetime("12.10.17 00:00:00"),pd.to_datetime("12.11.17 00:59:00")])
plt.savefig(output_folder + '/' + file_name + '_Messdaten_ext_EUeG.pdf')
Scatter Plot EÜG - Außentemperatur
daten_ext['Zuluft_Druck_Schwelle_unten'] = 80
daten_ext['Zuluft_Druck_Schwelle_oben'] = 93
EÜG = pd.DataFrame()
daten_ext['EÜG_Fortluft_bereinigt_unten'] = np.where(daten_ext['L_Zuluft_Druck'] < daten_ext['Zuluft_Druck_Schwelle_unten'], np.NaN,daten_ext['EÜG_Fortluft'])
EÜG['EÜG_Fortluft'] = np.where(daten_ext['L_Zuluft_Druck'] > daten_ext['Zuluft_Druck_Schwelle_oben'], np.NaN,daten_ext['EÜG_Fortluft_bereinigt_unten'])
daten_ext['EÜG_Außenluft_bereinigt_unten'] = np.where(daten_ext['L_Zuluft_Druck'] < daten_ext['Zuluft_Druck_Schwelle_unten'], np.NaN,daten_ext['EÜG_Außenluft'])
EÜG['EÜG_Außenluft'] = np.where(daten_ext['L_Zuluft_Druck'] > daten_ext['Zuluft_Druck_Schwelle_oben'], np.NaN,daten_ext['EÜG_Außenluft_bereinigt_unten'])
daten_ext['Außenluft_C_bereinigt_unten'] = np.where(daten_ext['L_Zuluft_Druck'] < daten_ext['Zuluft_Druck_Schwelle_unten'], np.NaN,daten_ext['Außenluft_C'])
EÜG['Außenluft_C'] = np.where(daten_ext['L_Zuluft_Druck'] > daten_ext['Zuluft_Druck_Schwelle_oben'], np.NaN,daten_ext['Außenluft_C_bereinigt_unten'])
EÜG.dropna(inplace=True)
EÜG.head()
X_Wert = EÜG['EÜG_Fortluft']
Y_Wert = EÜG['Außenluft_C']
fig, ax = plt.subplots()
ax.scatter(X_Wert,Y_Wert, color=colo('rot',1), linewidth=0.8, alpha = 0.8, label = 'Scatter')
ax.set_xlabel('EÜG_Fortluft')
ax.set_ylabel('Außenluft_C')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=1, loc=1 )
Kallibrierung Lufttemperaturen
Auswahl Außentemperatursensor
fig, ax = plt.subplots()
daten_ext['L_Aussenlufttemperatur_1'].plot(ax=ax,color=colo('orange',1), linewidth=0.5, label = 'L_Aussenlufttemperatur_1')
daten_ext['L_Aussenlufttemperatur_2'].plot(ax=ax,color=colo('rot',1), linewidth=0.5, label = 'L_Aussenlufttemperatur_2')
daten_ext['L_Aussentemperatur_ged'].plot(ax=ax,color=colo('grün',1), linewidth=0.5, label = 'L_Aussentemperatur_ged')
daten_ext['W_Temperatur'].plot(ax=ax,color=colo('violet',1), linewidth=0.5, label = 'W_Temperatur')
daten_ext['Außenluft_C'].plot(ax=ax,color=colo('blau',1), linewidth=0.8, label = 'Außenluft_Testo')
# Achsen
ax.set_ylabel(r'\textbf{Temp.}')
ax.set(ylim=0)
ax.set_xlabel('')
# Legende
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=1, loc=1)
set_legend_linewidth(legend)
# ax.set(xlim=[pd.to_datetime("05.01.17 00:00:00"),pd.to_datetime("30.04.18 23:59:00")])
plt.savefig(output_folder + '/' + file_name + '_Testo_Messdaten_ext.pdf')
## Polynome für Regerssionsgerade berechnen und ausgeben
korr=daten_ext[np.isfinite(daten_ext['Außenluft_C']) & np.isfinite(daten_ext['L_Aussenlufttemperatur_1'])]
w = np.polyfit(korr['L_Aussenlufttemperatur_1'],korr['Außenluft_C'],1)
p = np.poly1d(w) #polynom defined by the coefficients in w
r2_0 = r2(korr['Außenluft_C'],p(korr['L_Aussenlufttemperatur_1']))
Markdown('**L_Aussenlufttemperatur_1**<br>Bestimmtheitsmaß: '+str(r2_0)+'<br>Polynome: '+str(p))
L_Aussenlufttemperatur_1
Bestimmtheitsmaß: 0.1931502254421108
Polynome:
0.733 x + 2.56
## Polynome für Regerssionsgerade berechnen und ausgeben
korr=daten_ext[np.isfinite(daten_ext['Außenluft_C']) & np.isfinite(daten_ext['L_Aussenlufttemperatur_2'])]
w = np.polyfit(korr['L_Aussenlufttemperatur_2'],korr['Außenluft_C'],1)
p = np.poly1d(w) #polynom defined by the coefficients in w
r2_0 = r2(korr['Außenluft_C'],p(korr['L_Aussenlufttemperatur_2']))
Markdown('**L_Aussenlufttemperatur_2**<br>Bestimmtheitsmaß: '+str(r2_0)+'<br>Polynome: '+str(p))
L_Aussenlufttemperatur_2
Bestimmtheitsmaß: 0.1379321712876599
Polynome:
0.9718 x + 0.03291
Zuluft
## Polynome für Regerssionsgerade berechnen und ausgeben
korr=daten_ext[np.isfinite(daten_ext['Zuluft_C']) & np.isfinite(daten_ext['L_Zulufttemperatur'])]
w = np.polyfit(korr['L_Zulufttemperatur'],korr['Zuluft_C'],1)
p = np.poly1d(w) #polynom defined by the coefficients in w
r2_0 = r2(korr['Zuluft_C'],p(korr['L_Zulufttemperatur']))
Markdown('**Zuluft**<br>Bestimmtheitsmaß: '+str(r2_0)+'<br>Polynome: '+str(p))
Zuluft
Bestimmtheitsmaß: 0.049803008171773744
Polynome:
0.1819 x + 10.36
Abluft
## Polynome für Regerssionsgerade berechnen und ausgeben
korr=daten_ext[np.isfinite(daten_ext['Abluft_C']) & np.isfinite(daten_ext['L_Ablufttemperatur'])]
w = np.polyfit(korr['L_Ablufttemperatur'],korr['Abluft_C'],1)
p = np.poly1d(w) #polynom defined by the coefficients in w
r2_0 = r2(korr['Abluft_C'],p(korr['L_Ablufttemperatur']))
Markdown('**Abluft**<br>Bestimmtheitsmaß: '+str(r2_0)+'<br>Polynome: '+str(p))
Abluft
Bestimmtheitsmaß: 0.49138020087189493
Polynome:
0.5534 x + 8.773
Fortluft
## Polynome für Regerssionsgerade berechnen und ausgeben
korr=daten_ext[np.isfinite(daten_ext['Fortluft_C']) & np.isfinite(daten_ext['L_Fortlufttemperatur'])]
w = np.polyfit(korr['L_Fortlufttemperatur'],korr['Fortluft_C'],1)
p = np.poly1d(w) #polynom defined by the coefficients in w
r2_0 = r2(korr['Fortluft_C'],p(korr['L_Fortlufttemperatur']))
Markdown('**Fortluft**<br>Bestimmtheitsmaß: '+str(r2_0)+'<br>Polynome: '+str(p))
Fortluft
Bestimmtheitsmaß: 0.34511648977786835
Polynome:
0.7863 x + 3.061
Plot
fig, ax = plt.subplots()
daten_ext['Außenluft_C'].plot(ax=ax,color=colo('grün',.8), linewidth=0.5, label = 'Außen_e')
daten_ext['L_Aussenlufttemperatur_1'].plot(ax=ax,color=colo('grün',1.2), linewidth=0.5, label = 'Außen_i')
daten_ext['Zuluft_C'].plot(ax=ax,color=colo('rot',.8), linewidth=0.5, label = 'Zuluft_e')
daten_ext['L_Zulufttemperatur'].plot(ax=ax,color=colo('rot',1.2), linewidth=0.5, label = 'Zuluft_i')
daten_ext['Abluft_C'].plot(ax=ax,color=colo('blau',.8), linewidth=0.5, label = 'Abluft_e')
daten_ext['L_Ablufttemperatur'].plot(ax=ax,color=colo('blau',1.2), linewidth=0.5, label = 'Abluft_i')
daten_ext['Fortluft_C'].plot(ax=ax,color=colo('orange',.8), linewidth=0.5, label = 'Fortluft_e')
daten_ext['L_Fortlufttemperatur'].plot(ax=ax,color=colo('orange',1.2), linewidth=0.5, label = 'Fortluft_i')
ax.set_ylabel(r'\textbf{Temp.}')
ax.set_xlabel('')
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=4, loc=1)
set_legend_linewidth(legend)
# ax.set(xlim=[pd.to_datetime("05.01.17 00:00:00"),pd.to_datetime("30.04.18 23:59:00")])
ax.set(ylim=[0,40])
plt.savefig(output_folder + '/' + file_name + '_Kallibrierung_Lufttemp.pdf')
# daten_ext.head()
Korrektur Zuluft wg Nachheizung
Vergleich Temperaturen Nachheizer und Heizung
verg = daten#.loc['12.10.17 10:00:00':'12.11.17 10:18:00']
verg['delta_VL'] = daten['S_Heizung_VL'] - daten['L_Nacherhitzer_VL']
verg['delta_RL'] = daten['S_Heizung_RL'] - daten['L_Nacherhitzer_RL']
fig, ax = plt.subplots()
## Heizung von Kessel
verg['S_Heizung_VL'].plot(ax=ax,color=colo('orange',1), linewidth=0.5, label = 'Heizung VL')
verg['S_Heizung_RL'].plot(ax=ax,color=colo('blau',1), linewidth=0.5, label = 'Heizung RL')
## Nacherhitzer von Lüftung
verg['L_Nacherhitzer_VL'].plot(ax=ax,color=colo('rot',1), linewidth=0.5, label = 'Nacherhitzer VL')
verg['L_Nacherhitzer_RL'].plot(ax=ax,color=colo('grün',1), linewidth=0.5, label = 'Nacherhitzer RL')
# ax2 = ax.twinx()
# ## Differenzen zwischen den VLs und RLs
# verg['delta_VL'].plot(ax=ax2,color=colo('gelb',1), linewidth=0.5, label = 'Delta VL')
# verg['delta_RL'].plot(ax=ax2,color=colo('violet',1), linewidth=0.5, label = 'Delta RL')
ax.set_ylabel(r'\textbf{Temp.}')
# ax.set(ylim=0)
ax.set_xlabel('')
# ax2.set(ylim=[-5,30])
h0, l0 = ax.get_legend_handles_labels()
h2, l2 = ax2.get_legend_handles_labels()
legend = plt.legend(h0+h2, l0+l2, ncol=3, loc=1)
set_legend_linewidth(legend)
plt.savefig(output_folder + '/' + file_name + 'Vergleich_Nachheizer_Heizung_Temp.pdf')
# daten_ext.head()
Suche nach konstantem Bereich
such = daten.loc['2017-06-30 22:00:00':'2017-07-01 18:00:00']
such['delta_VL'] = such['S_Heizung_VL'] - daten['L_Nacherhitzer_VL']
such['delta_RL'] = such['S_Heizung_RL'] - daten['L_Nacherhitzer_RL']
fig, ax = plt.subplots()
## Heizung von Kessel
such['S_Heizung_VL'].plot(ax=ax,color=colo('orange',1), linewidth=0.5, label = 'Heizung VL')
such['S_Heizung_RL'].plot(ax=ax,color=colo('blau',1), linewidth=0.5, label = 'Heizung RL')
## Nacherhitzer von Lüftung
such['L_Nacherhitzer_VL'].plot(ax=ax,color=colo('rot',1), linewidth=0.5, label = 'Nacherhitzer VL')
such['L_Nacherhitzer_RL'].plot(ax=ax,color=colo('grün',1), linewidth=0.5, label = 'Nacherhitzer RL')
ax2 = ax.twinx()
## Differenzen zwischen den VLs und RLs
such['delta_VL'].plot(ax=ax2,color=colo('gelb',1), linewidth=0.5, label = 'Delta VL')
such['delta_RL'].plot(ax=ax2,color=colo('violet',1), linewidth=0.5, label = 'Delta RL')
ax.set_ylabel(r'\textbf{Temperatur (C)}')
ax2.set_ylabel(r'\textbf{Temperaturdifferent (K)}')
ax.set_xlabel('')
ax.set(ylim=[10,50])
ax2.set(ylim=[0,15])
h0, l0 = ax.get_legend_handles_labels()
h2, l2 = ax2.get_legend_handles_labels()
legend = plt.legend(h0+h2, l0+l2, ncol=3, loc=1)
set_legend_linewidth(legend)
# plt.savefig(output_folder + '/' + file_name + 'Vergleich_Nachheizer_Heizung_Temp_Such.pdf')
# such.head()
Delta zw. VLs und RLs
verg = daten#.loc['12.10.17 10:00:00':'12.11.17 10:18:00']
verg['delta_VL'] = daten['S_Heizung_VL'] - daten['L_Nacherhitzer_VL']
verg['delta_RL'] = daten['S_Heizung_RL'] - daten['L_Nacherhitzer_RL']
fig, ax = plt.subplots()
## Differenzen zwischen den VLs und RLs
verg['delta_VL'].plot(ax=ax,color=colo('gelb',1), linewidth=0.5, label = 'Delta VL')
verg['delta_RL'].plot(ax=ax,color=colo('violet',1), linewidth=0.5, label = 'Delta RL')
ax2 = ax.twinx()
# verg['L_Zuluft_VPunkt'].plot(ax=ax2,color=colo('blau',1), linewidth=0.5, label = 'L_Zuluft_VPunkt')
# verg['L_Aussenlufttemperatur_1'].plot(ax=ax2,color=colo('blau',1), linewidth=0.5, label = 'L_Aussenlufttemperatur_1')
# verg['S_Gas_Vpunkt'].plot(ax=ax2,color=colo('blau',1), linewidth=0.5, label = 'S_Gas_Vpunkt')
## Orintierungslinien
ax.axhline(0, linewidth=0.8,color='grey')
ax.axvline(pd.to_datetime('2017-05-15'), linewidth=0.5,color='black')
ax.axvline(pd.to_datetime('2017-09-13'), linewidth=0.5,color='black')
ax.axvline(pd.to_datetime('2017-11-22'), linewidth=0.5,color='black')
ax.axvline(pd.to_datetime('2018-04-10'), linewidth=0.5,color='black')
## Achsen
ax.set_ylabel(r'\textbf{Temp.}')
# ax.set(ylim=0)
ax.set_xlabel('')
# ax2.set(ylim=[-5,30])
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=2, loc=1)
set_legend_linewidth(legend)
ax.set(xlim=[pd.to_datetime("05.01.17 00:00:00"),pd.to_datetime("30.04.18 23:59:00")])
# plt.savefig(output_folder + '/' + file_name + 'Vergleich_Nachheizer_Heizung_Temp_Delta.pdf')
# daten_ext.head()
[(736450.0, 736814.9993055556)]
Histogramme gesamt
fig, ax = plt.subplots()
bins = 500
plt.hist(verg['delta_RL'], bins=bins, density =False, orientation="horizontal", color=colo('violet',1), linewidth=0.8, label = 'delta_RL', histtype='step')
plt.hist(verg['delta_VL'], bins=bins, density =False, orientation="horizontal", color=colo('gelb',.8), linewidth=0.8, label = 'delta_VL', histtype='step')
# ax.axhline(0, linewidth=0.8,color='grey')
## Achsenbeschriftung
ax.set_ylabel(r'\textbf{Temperaturdifferenz} (K)')
ax.set_xlabel(r'\textbf{Zeit} (h)')
## Legende
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=1, loc=1)
set_legend_linewidth(legend)
## Y Achse formatieren
ax.set(ylim=[-10,10])
# ax.set_yticks([60,65,70,75,80,85,90,95,100])
## X Achse skalieren mit dem Faktor 1/240, damit die 15s in Stunden abgebildet werden
ax.get_xaxis().set_major_formatter(mpl.ticker.FuncFormatter(lambda x, loc: locale.format_string('%d', x, 1))) ## dot as thousand separator
x_vals = ax.get_xticks()
ax.set_xticklabels(['{:3.0f}%'.format(x / 240) for x in x_vals])
# ax.set(xlim=[0,50000])
# ax.set_xticks([0,120000, 240000,360000,480000])
## remove minorticks
plt.tick_params(axis='x', which='minor', bottom=False)
plt.title('density=False, Bins:'+str(bins))
# plt.savefig(output_folder + '/' + file_name + '_Luftdruck_Histogramm_Sommer.pdf')
Text(0.5, 1.0, 'density=False, Bins:500')
Histogramme Sommer
sommer = verg.loc['2017-05-15':'2017-09-14']
fig, ax = plt.subplots()
bins = 500
plt.hist(sommer['delta_RL'], bins=bins, orientation="horizontal", color=colo('violet',1), linewidth=0.8, label = 'delta_RL', histtype='step')
plt.hist(sommer['delta_VL'], bins=bins, orientation="horizontal", color=colo('gelb',.8), linewidth=0.8, label = 'delta_VL', histtype='step')
ax.axhline(0, linewidth=0.8,color='grey')
## Achsenbeschriftung
ax.set_ylabel(r'\textbf{Temperaturdifferenz} (K)')
ax.set_xlabel(r'\textbf{Zeit} (h)')
## Legende
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=1, loc=1)
set_legend_linewidth(legend)
## Y Achse formatieren
ax.set(ylim=[-10,10])
# ax.set_yticks([60,65,70,75,80,85,90,95,100])
## X Achse skalieren mit dem Faktor 1/240, damit die 15s in Stunden abgebildet werden
ax.get_xaxis().set_major_formatter(mpl.ticker.FuncFormatter(lambda x, loc: locale.format_string('%d', x, 1))) ## dot as thousand separator
x_vals = ax.get_xticks()
ax.set_xticklabels(['{:3.0f}%'.format(x / 240) for x in x_vals])
# ax.set(xlim=[0,50000])
# ax.set_xticks([0,120000, 240000,360000,480000])
## remove minorticks
plt.tick_params(axis='x', which='minor', bottom=False)
plt.title('Sommer')
# plt.savefig(output_folder + '/' + file_name + '_Luftdruck_Histogramm_Sommer.pdf')
Text(0.5, 1.0, 'Sommer')
Winter1
winter1 = verg.loc['2017-09-15':'2017-11-21']
fig, ax = plt.subplots()
bins = 500
plt.hist(winter1['delta_RL'], bins=bins, orientation="horizontal", color=colo('violet',1), linewidth=0.8, label = 'delta_RL', histtype='step')
plt.hist(winter1['delta_VL'], bins=bins, orientation="horizontal", color=colo('gelb',.8), linewidth=0.8, label = 'delta_VL', histtype='step')
ax.axhline(0, linewidth=0.8,color='grey')
ax.axhline(1, linewidth=0.8,color='grey')
## Achsenbeschriftung
ax.set_ylabel(r'\textbf{Temperaturdifferenz} (K)')
ax.set_xlabel(r'\textbf{Zeit} (h)')
## Legende
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=1, loc=1)
set_legend_linewidth(legend)
## Y Achse formatieren
ax.set(ylim=[-10,10])
# ax.set_yticks([60,65,70,75,80,85,90,95,100])
## X Achse skalieren mit dem Faktor 1/240, damit die 15s in Stunden abgebildet werden
ax.get_xaxis().set_major_formatter(mpl.ticker.FuncFormatter(lambda x, loc: locale.format_string('%d', x, 1))) ## dot as thousand separator
x_vals = ax.get_xticks()
ax.set_xticklabels(['{:3.0f}%'.format(x / 240) for x in x_vals])
# ax.set(xlim=[0,50000])
# ax.set_xticks([0,120000, 240000,360000,480000])
## remove minorticks
plt.tick_params(axis='x', which='minor', bottom=False)
plt.title('Winter1')
# plt.savefig(output_folder + '/' + file_name + '_Luftdruck_Histogramm_Sommer.pdf')
Text(0.5, 1.0, 'Winter1')
Winter2
winter2 = verg.loc['2017-11-22':'2018-04-10']
fig, ax = plt.subplots()
bins = 500
plt.hist(winter2['delta_RL'], bins=bins, orientation="horizontal", color=colo('violet',1), linewidth=0.8, label = 'delta_RL', histtype='step')
plt.hist(winter2['delta_VL'], bins=bins, orientation="horizontal", color=colo('gelb',.8), linewidth=0.8, label = 'delta_VL', histtype='step')
ax.axhline(0, linewidth=0.8,color='grey')
ax.axhline(1, linewidth=0.8,color='grey')
## Achsenbeschriftung
ax.set_ylabel(r'\textbf{Temperaturdifferenz} (K)')
ax.set_xlabel(r'\textbf{Zeit} (h)')
## Legende
h0, l0 = ax.get_legend_handles_labels()
legend = plt.legend(h0, l0, ncol=1, loc=1)
set_legend_linewidth(legend)
## Y Achse formatieren
ax.set(ylim=[-10,10])
# ax.set_yticks([60,65,70,75,80,85,90,95,100])
## X Achse skalieren mit dem Faktor 1/240, damit die 15s in Stunden abgebildet werden
ax.get_xaxis().set_major_formatter(mpl.ticker.FuncFormatter(lambda x, loc: locale.format_string('%d', x, 1))) ## dot as thousand separator
x_vals = ax.get_xticks()
ax.set_xticklabels(['{:3.0f}%'.format(x / 240) for x in x_vals])
# ax.set(xlim=[0,50000])
# ax.set_xticks([0,120000, 240000,360000,480000])
## remove minorticks
plt.tick_params(axis='x', which='minor', bottom=False)
plt.title('Winter2')
# plt.savefig(output_folder + '/' + file_name + '_Luftdruck_Histogramm_Sommer.pdf')
Text(0.5, 1.0, 'Winter2')
Enthalpiedifferenz
Während der ext Messung
daten_ext['Zuluft_Dichte'] = psy.Dry_Air_Density(daten_ext['W_Luftdruck'], daten_ext['Zuluft_C'], psy.Hum_rat2( daten_ext['Zuluft_C'], daten_ext['Zuluft_rF']/100, daten_ext['W_Luftdruck'])) * (1 + psy.Hum_rat2( daten_ext['Zuluft_C'], daten_ext['Zuluft_rF']/100, daten_ext['W_Luftdruck']))
daten_ext['Enthalpie_Zuluft'] = psy.Enthalpy_Air_H2O(daten_ext['Zuluft_C'], psy.Hum_rat2(daten_ext['Zuluft_C'], daten_ext['Zuluft_rF']/100, daten_ext['W_Luftdruck']))
daten_ext['Zuluft_Energie'] = daten_ext['Enthalpie_Zuluft'] * daten_ext['Zuluft_Dichte'] * (daten_ext['L_Zuluft_VPunkt']/1000) * (1/3600) ## kJ in kWh
daten_ext['L_Nacherhitzer_Energie'] = daten_ext['S_Heizung_Vpunkt'] * (daten_ext['L_Nacherhitzer_VL'] - daten_ext['L_Nacherhitzer_RL']) * 0.998 * 0.00116 / 240
fig, ax = plt.subplots()
daten_ext['L_Nacherhitzer_Energie'].plot(ax=ax,color=colo('rot',1), linewidth=0.5, label = r'Nacherhitzer')
daten_ext['Zuluft_Energie'].plot(ax=ax,color=colo('blau',1), linewidth=0.5, label = r'Zuluft_Energie')
ax2 = ax.twinx()
daten_ext['S_Heizung_Vpunkt'].plot(ax=ax2,color=colo('gelb',1), linewidth=0.5, label = r'S_Heizung_Vpunkt')
# Achsen
ax.set_ylabel(r'\textbf{Energie} ($kWh$)')
ax.set(ylim=[0,0.04])
ax.set_xlabel('')
# Legende
h0, l0 = ax.get_legend_handles_labels()
h1, l1 = ax2.get_legend_handles_labels()
legend = plt.legend(h0+h1, l0+l1, ncol=3, loc=1)
set_legend_linewidth(legend)
Save & Upload
## Skriptlaufzeit Ende (Funktion in: libraries_and_styles.ipynb)
hours, minutes, seconds = laufzeit()
## Notebook speichern vor dem Upload (Funktion in: libraries_and_styles.ipynb)
save_notebook()
## Notebook als Markdown Datei mit eingebetten Grafiken speichern und auf den Server laden
%run ../Template/save_and_upload.ipynb
<IPython.core.display.Javascript object> Waermebilanz Uebersicht_Hydraulikkreise
