Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
476 views
Kernel: Python 3 (Anaconda)

We want to calculate the energy that has been conducted through the walls of a building that we have the temperature data for.

You've done each of these pieces separately but now we are combining them.

  • Assume a UA value of 2 watts per kelvin

  • Assume q=UAΔTq = UA \Delta T is valid

  • Given a graph of a temperature difference, what is the energy lost?

Q=UAΔTΔtQ = UA \Delta T \Delta tQi=UAΔTiΔtiQ_i = UA \Delta T_i \Delta t_iQtotal=QiQ_{total} = \sum Q_i

What is Δt\Delta t?

Q=UAΔTdtQ = \int UA \Delta T dt

Since the insulation isn't changing over time, we don't need to keep the UA inside the integral.

Q=UAΔTdtQ = UA \int \Delta T dt
  • Show the reimann sum sort of thing.

  • Estimate using geometry.

  • Show how to calculate using columns.

  • Perform calculations with columns.

%matplotlib notebook # plt is the library with all the plotting import matplotlib.pyplot as plt # pd is the library with the spreadsheet functions import pandas as pd
data = pd.read_csv('2016-02-26-combined.csv', parse_dates=True) data = pd.read_csv('2016-02-16-combined.csv', parse_dates=True)
data.head()
data['temp_difference'] = data['t_in'] - data['t_out'] ((data['t_in'] - data['t_out']) * 300 * 2).sum() delta_t_seconds = 300 UA_watt_per_kelvin = 2 (data['temp_difference'] * delta_t_seconds * UA_watt_per_kelvin).sum()
151500.59999999998
plt.plot(data['time'], data['t_in']-data['t_out'], marker='o') plt.grid() plt.xlabel('time (sec)') plt.ylabel('Temp Difference (C)')
WARNING: Some output was deleted.
data['temp_difference'] = data['t_in'] - data['t_out']
151500.59999999998
power = 47 time = 3300 power * time
155100
data['Time']
0 2016-02-16 07:25:00 1 2016-02-16 07:30:00 2 2016-02-16 07:35:00 3 2016-02-16 07:40:00 4 2016-02-16 07:45:00 5 2016-02-16 07:50:00 6 2016-02-16 07:55:00 7 2016-02-16 08:00:00 8 2016-02-16 08:05:00 9 2016-02-16 08:10:00 10 2016-02-16 08:15:00 11 2016-02-16 08:20:00 12 2016-02-16 08:25:00 13 2016-02-16 08:30:00 14 2016-02-16 08:35:00 15 2016-02-16 08:40:00 16 2016-02-16 08:45:00 17 2016-02-16 08:50:00 18 2016-02-16 08:55:00 19 2016-02-16 09:00:00 20 2016-02-16 09:05:00 21 2016-02-16 09:10:00 22 2016-02-16 09:15:00 23 2016-02-16 09:20:00 24 2016-02-16 09:25:00 25 2016-02-16 09:30:00 26 2016-02-16 09:35:00 27 2016-02-16 09:40:00 28 2016-02-16 09:45:00 29 2016-02-16 09:50:00 30 2016-02-16 09:55:00 31 2016-02-16 10:00:00 32 2016-02-16 10:05:00 33 2016-02-16 10:10:00 34 2016-02-16 10:15:00 35 2016-02-16 10:20:00 36 2016-02-16 10:25:00 37 2016-02-16 10:30:00 38 2016-02-16 10:35:00 39 2016-02-16 10:40:00 40 2016-02-16 10:45:00 41 2016-02-16 10:50:00 42 2016-02-16 10:55:00 43 2016-02-16 11:00:00 44 2016-02-16 11:05:00 45 2016-02-16 11:10:00 46 2016-02-16 11:15:00 47 2016-02-16 11:20:00 48 2016-02-16 11:25:00 49 2016-02-16 11:30:00 Name: Time, dtype: object