Project – Data Analysis and User Interface
Overview
Your team will use the data previously logged and then save it as Excel files. Then MATLAB will be used to
ead in the data and produce plots and a user interface to make predictions about cooling objects.
Data Entry
Open all of your CSV files in Excel 2016 and save them as worksheets in the Cool It Excel Workbook
template file provided. Give the worksheets meaningful names and add the sheet names to the
Data Summary sheet which already exists.
Using MATLAB, read the Data Summary sheet from the Excel file. Then using loops and the sheet
names listed in the Data Summary sheet, read in the data from each of the sheets without
hardcoding any sheet names, etc. Store each matrix in a cell of a cell a
ay of size N x 2 (where N
is the number of cylinders and spheres tested). The first column will contain the room
temperature data matrix and the second column will contain the cooling data matrix.
Read data provided as an Excel file containing the Table 1: Material Properties worksheet to you
MATLAB program.
Do not re‐a
ange data or do any calculations in Excel.
You will submit your Excel file along with your MATLAB files.
Analysis ‐ introduction
All plots created in this project will include at least one logarithmic‐scale axis. Axis limits (minimum and
maximum axis values) on logarithmic axes must be even powers of ten and which contain the full range
of data being plotted. For example, axis limits of 0.1 to 10 are acceptable, while axis limits of 0.3 to 3 are
not.
Analysis – create two temperature‐decline plots
We will assume temperature difference declines following an exponential decay curve (see Equation 2 on
the first page). Although the exponent is expected to be negative, we will work with positive values fo
the cooling factor, r, by defining the exponent in the cooling equation to be –r.
Create and use a user‐defined function, named as described in the Submission section below, to plot
multiple data series on a proper plot of temperature change (ΔT) [°C] as a function of time (t) [min]. Avoid
the mistake of plotting temperature vs. time! All proper‐plot rules (Chapter 11.2) apply. Make one o
oth axes logarithmic as needed to linearize the data (make it appear linear). Add an appropriate trendline
(TL) to each data series. Review Chapters 12 and 13 for guidance on which TL type to select for your data.
You only need to add one TL equation to each of your temperature change plots. The TL equation should
not overlap any data markers of trendlines on your plot.
Call this function twice to prepare two proper plots. Call the plotting function once to plot cooling data
for all the uniform area spheres; and a second time to plot cooling data for all uniform mass & specific
heat cylinders. Your code should identify which objects belong in each plot.
Analysis – create two parameter plots
The cooling factor, r, in units of minutes‐1 [1/min], is expected to be a function of the surface area of the
object, A, the convective heat transfer coefficient, h, (which we will assume is the same in each of ou
experiments) and the total heat capacity, m CP (see Equation 3 on page 1). Expressed mathematically, r =
f(A, h, m CP).
Create a second user‐defined function, named as described in the Submission section below, to create a
proper plot with a single data series. This function should use logarithmic axes, as needed, to make the
data appear linear. The function will apply a trendline (select the appropriate type) and add a TL equation
which should not overlap any data markers of trendlines on your plot.
Call this function once to create a proper plot showing how the cooling factor depends on surface area
(with heat transfer coefficient and total heat capacity held constant). Call this function a second time to
create a proper plot showing how the cooling factor depends on total heat capacity (with surface area
and heat transfer coefficient held constant).
Use exponents determined from these two plots, which illustrate r = f(A) and r = f(m CP), along with the
understanding that units must cancel co
ectly in any physics equation, to construct the predictive
equation for r which includes the following variables: h, A, and (m CP).
Heat transfer coefficient, h
A heat transfer coefficient (h) [W / (m² K)] can be calculated from data recorded for each measured object
using the equation for r, determined above. Determine mean, median and standard deviation of these
heat transfer coefficients using built‐in MATLAB functions and report these values in the Command
Window as follows. (The following numbers are made‐up values.)
Heat Transfer Coefficient:
Mean = 12.61 [W/(m^2 K)]
Median = 12.42 [W/(m^2 K)]
StdDev = 0.96 [W/(m^2 K)]
User Interface
Create a user‐interface, using menus, to make predictions about cooling objects. The user will indicate,
using a menu, whether they want to calculate a cooling time to reach a specified final temperature or to
calculate a final temperature for a specified cooling time. When determining a cooling time, the use
should be prompted to provide the room temperature (limited to 0 to 100 °C), an initial temperature
(limited to room temperature to 100 °C), and a final temperature (limited to room temperature to initial
temperature). In the case of determining a final temperature, the user will be asked to input a cooling
time (limited to 0 to 30 minutes), as well as room temperature (limited to 0 to 100 °C) and initial
temperature (limited to room temperature to 100 °C).
The user will select a shape (sphere, cylinder or rectangular block). Depending on the shape selected, the
user will be prompted to enter diameter, length, width, and/or thickness (all in units of inches), as needed
for each shape. Block physically impossible input data. The user will not be asked to enter a mass.
The user will also select a material from the list provided in Table 1: Material Properties, above. As an
option, allow the user to select “Other” as a material option. Here the user is indicating that they wish to
enter information for a material that is not included on the provided list. In that case, prompt the user to
enter the name of the material, its specific gravity and its specific heat. These must be limited to positive
values.
If the user enters any invalid input value, warn the user indicating what they did wrong and how to co
ect
the problem. Continue asking for valid input until they enter valid input. If the user closes any menu, ask
the user if they wish to exit the program.
After the output has been given for a prediction, your code will ask the user whether they wish to re‐run
the program to make another predication based on new user input.
Formatted Output
Your code will generate formatted output to the command window reporting the user’s input values as
well as the predicted values (with units) of the cooling factor, r, and the predicted time in minutes or final
temperature in degrees Celsius matching the pattern of the following examples. (The values presented
here are made‐up.) To test your code, predict situations (test cases) for which you recorded data earlier.
When of predicting a cooling time, your output should match the format example below.
For a cylinder made of aluminum with a diameter of 0.375 [in] and a length of
4.305 [in], the cooling factor is 0.123 [put co
ect units here]. With a room
temperature of 22.1 [°C], cooling by natural convection from an initial
temperature of 85.0 [°C] to a final temperature of 58.3 [°C] is predicted to
take 12.4 [min].
When predicting a final temperature, your output should match the format example below.
For a sphere made of steel with a diameter of 1.000 inches, the cooling
factor is 0.123 [put co
ect units here]. With a room temperature of 22 [°C], afte
cooling for 8.0 minutes by natural convection from an initial temperature of
80.0 [°C], the final temperature is predicted to be 65.4 [°C].