Data analysis

Analysis of data is conducted using python, specifically with the pandas dataframe here. Units are applied to numerical values with the help of pint.

Heat transfer coefficient

As per Newton’s law of cooling, \(\dot{q}'' = h\Delta T\), we can get \(h\) (W/m2-K) given \(T_\infty\) and \(\dot{q}''\). At steady state, convective heat loss from the cylinder is equal to the heat input from the heater – 45 W for this data set. The length and diameter of the cylinder are 50 cm and 3.8 cm respectively.

\(T_\infty\) was measured to be 31oC for this data set.

# packages required for analysing data
import pandas as pd, math
from pint import UnitRegistry
# setting unit configuration
unit = UnitRegistry(autoconvert_offset_to_baseunit = True)

# thermocouple data
tcdata = pd.read_csv('data/nat-conv-T.csv')
# last data (indexed as [-1]) tcdata csv file is ambient temperature
tcAmb = tcdata['Temperature (C)'].iloc[-1] * unit.degC
tcdata.head(n=8)

# other experiment settings
cylD = 0.038 * unit.m
cylL = 0.50 * unit.m
Qtot = 45 * unit.watt
# Surface temperature in Newtons law taken as average of all surface TCs
meanTs = (tcdata['Temperature (C)'][0:-1].mean() ) * unit.degC
print("{:.1f~P}".format(meanTs))
38.1 °C
# Heat flux assuming uniformly distributed heater
fluxQ = Qtot/( (math.pi) * cylD * cylL)
print("{:.1e~P}".format(fluxQ))
7.5×10² W/m²
# The corresponding convective heat transfer coefficient
h = ( fluxQ/(meanTs - tcAmb).to_base_units() )  # to base units to convert to absolute in Kelvin
print("{:.1e~P}".format(h)) # Note the number of significant digits cannot be more than 2
1.1×10² W/K/m²