EML 3041 UF MATLAB Convection Cooling Coefficient Programming Project Project Instructions is given in the files attached. It is mostly MATLAB with a couple of handwritten questions.The data collected during the lab is also attached in a file below. Semester and Year
Spring 2020
Due Dates
Mini project 1 – Thursday, March 26 at 3:30PM
Mini project 2 – Thursday, April 16 at 3:30PM
Title
Cooling the Aluminum Cylinder Experiment to Illustrate Use of Numerical Methods
Points
100 points
Background
A solid aluminum cylinder treated as a lumped-mass1 system is immersed in a bath of iced
water. Let us develop the mathematical model for the problem to find how the temperature
of the cylinder would behave as a function of time.
When the cylinder is placed in the iced-water bath, the cylinder loses heat to its
surroundings by convection.
Rate of heat loss due to convection =???(??(??) ? ???? ).
(1)
where
??(??) = the temperature of cylinder as a function of time t, oC
? = the average convective cooling coefficient, W/(m2-oC)
?? =surface area, m2
???? =the ambient temperature of iced water, oC
The energy stored in the mass is given by
1
It implies that the internal conduction in the trunnion is large enough that the temperature throughout the
trunnion is uniform. This allows us to assume that the temperature is only a function of time and not of the
location in the trunnion. This means that if a differential equation governs this physical problem, it would
be an ordinary differential equation for a lumped system and a partial differential equation for a nonlumped system. In your heat transfer course, you will learn when a system can be considered lumped or
non-lumped. In simplistic terms, this distinction is based on the material, geometry, and heat exchange
factors of the ball with its surroundings.
Page 1 of 9
Energy stored by mass at a particular time = mC??(??)
(2)
where
m = mass of the cylinder, kg
C = specific heat of the cylinder, J/(kg- oC)
From an energy balance,
The rate at which heat is gained ? Rate at which heat is lost
= Rate at which heat is stored
gives
????(??)
0 ? ???(??(??) ? ???? ) = ???? ????
????(??(??) ? ???? ) = ????
????(??)
(3)
????
The ordinary differential equation is subjected to
??(0) = ??0
where
??0 =the initial temperature of cylinder, oC
Assuming the convective cooling coefficient, h to be a constant function of temperature,
the exact solution to the differential equation (3) is
?????
??(??) = ???? + (??0 ? ???? )?? ? ????
It can now also be written in a normalized form as
??(??)?????
??0 ?????
(4a)
?????
= ?? ?????
(4b)
Grading
This project is part of the Special Assignment/Project grade. Your solution will be graded
on the following categories:
The merit of the conceptual portion
The merit of programming portion
The format of submission
Academic Dishonesty
For this project, you may not receive ANY help from anyone outside of the instructor or
the TA. Refer to academic dishonesty policy of the University of South Florida at
http://ugs.usf.edu/policy/AcademicIntegrityOfStudents.pdf. Also, visit the new ethics
resources at USF http://www.usf.edu/ethics/index.aspx for even more information.
Learning Objectives
Identify and implement the correct procedure for a given problem
Improve existing programming skills
Reinforce prerequisite knowledge
Solve real-world problems
Page 2 of 9
Formatting
Follow the sample project format including cell formatting, published html
format, commenting, etc.
Use MATLAB to solve all the problems, unless mentioned otherwise.
Use comments, display commands and fprintf statements, sensible variable names
and units to explain your work. Use SI system of units throughout.
What to do in the laboratory
1. Fill the ice-cooler with half-water and half-ice. It is better to use the water from
the water-cooler, as it is cooler than the tap water. Keep stirring the ice, so that ice
cubes are not stuck to each other.
2. Take the thermocouple wires and connect them properly (+ to +, – to -) to the
temperature indicator. Two thermocouples are attached to illustrate the concept of
a lumped system.
3. Turn the temperature indicator on and wait for a few seconds to record the initial
temperature of the cylinder.
4. Record the temperature of the iced-water using a temperature indicator.
5. Immerse the aluminum cylinder in a bath of iced water and start the stopwatch
simultaneously. Every five to ten seconds, record the temperature of the cylinder
as a function of time.
Figure 1. Cooling the Aluminum Cylinder
Page 3 of 9
What to submit
For the hard copy, staple all the work in the following sequence.
1. Signed typed affidavit sheet
2. Attach completed checklist given at end of this assignment. Check-mark the
boxes you have accommodated in your assignment. Do not do this blindly.
3. Published mfile in html format
4. Answers on plain white paper or engineering graph paper when asked for in
problems of Project Exercises section. Each answer needs to be on a fresh page.
5. Any typed pages when asked for in problems of Project Exercises section. Each
answer needs to be on a fresh page.
For the soft copy submission on CANVAS
Submit the mfile of the computer simulation under the CANVAS assignment.
Name it as lastname_firstinitial_conv_spring20_x.m, where x is one or two
depending on the mini-project number. For example, if your name is Abraham
Lincoln, the name of your file would be Lincoln_A_conv_spring20_one.m for
mini-project 1 and Lincoln_A_conv_spring20_two.m for mini-project 2.
Page 4 of 9
Project Exercises
Mini project 2 (100 points) Thursday April 16, at class start time
1. On plain white paper or engineering graph paper, handwrite the data of temperature
vs. time we collected in class and the following data.
Diameter of cylinder = 49 mm
Length of cylinder = 100 mm
Density of aluminum = 2700 kg/m3
Specific heat of aluminum = 902 J/(kg-oC)
Thermal conductivity of aluminum = 240 W/(m-oC)
Table 1. Coefficient of thermal expansion vs. temperature for aluminum
(http://www.llnl.gov/tid/lof/documents/pdf/322526.pdf)
2.
3.
4.
5.
Temperature Coefficient of thermal expansion
(oC)
(?m/m/oC)
-10
5.8
77
9.3
127
13.9
177
25.5
227
32.6
277
34.1
327
36.1
377
38.9
427
39.8
Assign all the required input data (experimental data and other data that is needed
for Mini project 2 to variables as MATLAB statements at the beginning of the mfile
as one section. Do not change the units of the inputs enter them as given. Any
changes in the input data should not require one to change any part of the rest of
the program, and that is what is called avoiding hardcoding. Of course, f
fprintf/sprintf/disp the input data using the variables.
Change the units of input variables, if needed, to the SI system in a new section.
There is no need to fprintf/sprintf/disp in this section.
In a MATLAB section, find the convective cooling coefficient h by a crude method
as follows. Use the value of the temperature of the aluminum cylinder at the 3rd
data point in your readings of temperature vs. time, and solve the nonlinear equation
(4a) (do not simplify by hand) to calculate the value of h. Hint: Use the solve
command.
Regress the temperature vs time data to the model
?????
??(??) = ???? + (??0 ? ???? )?? ? ????
to find the convective cooling coefficient h of the regression model.
Page 5 of 9
You are not allowed to transform the data. You should not do any part of this
problem by hand.
6. In a MATLAB section, regress the temperature vs. time data to the model
?????
??(??) = ???? + (??0 ? ???? )?? ? ???? .
to find the convective cooling coefficient h of the regression model by transforming
the data for this exercise.
Hint: Rewrite the regression model given above in the form of equation (4b), and
then take the natural log of both sides. You will end up using the linear regression
formulas of the ?? = ??1 ?? straight-line model.
The derivation of the model for the transformed data needs to be done manually
The derivation needs to be professional, typed on a separate sheet(s) of paper, and
should be complete including defining all the variables, using appropriate equation
editors of your word processor, writing appropriate sentences to explain steps, etc.
See any derivation given in Chapter 06.04 as an example of the expected format.
Use the final derived formula directly then in a MATLAB section of the program
to find the convective cooling coefficient h.
7. In 100 words or so, do the following. The work needs to be professional, typed on
a separate sheet(s) of paper, with all the variables defined, and with appropriate
equation editors of your word processor used.
a. Type the values of convective cooling coefficient h obtained from problems
#4, #5, and #6 with an appropriate description.
b. Type this question and type the answer: Before running the program, what
did you expect in the comparison of the three convection coefficient values
and why?
c. Type this question and type the answer: If these values turned out or did not
turn out as expected, what are the possible reasons?
8. Plot in one figure the temperature vs. time data that shows individual data points
and the temperature vs. time curves using the values of convective cooling
coefficient h from the problems #4, #5 and #6. Use axes labels with names, symbols
and units, figure title, and legends.
9. Find the 2nd order polynomial regression model of thermal expansion coefficient vs
temperature by setting up equations in matrix form and then solving the three
simultaneous linear equations. Show the answer as a polynomial of temperature.
Hint: Given ?? data pairs (??1 , ??1 ), (??2 , ??2 ), . . . . . . , (???? , ???? ), 2nd order polynomial
?? = ??0 + ??1 ?? + ??2 ?? 2 , ?? > 2, regression constants are given by solving these
equations.
?????=1 ????
(?????=1 ???? ) (?????=1 ????2 ) ??0
??
[ (?????=1 ???? ) (?????=1 ????2 ) (?????=1 ????3 )] [??1 ] = [ ???=1 ???? ???? ]
?????=1 ????2 ????
(?????=1 ????2 ) (?????=1 ????3 ) (?????=1 ????4 ) ??2
??
Page 6 of 9
10. Compare your answer from problem#9 with the MATLAB polyfit command by
showing the thermal expansion coefficient as a polynomial function of temperature.
Help
If you need assistance, some resources are listed below.
Instructor office hours
TA office hours
Make an appointment outside of office hours with the instructor or TA.
How do I do that in MATLAB:
http://mathforcollege.com/nm/blog_entries.html#How_do_do_that_in_MATLAB
(go to the end of the webpage).
How to approach solving problems on paper
This following is meant to help students approach engineering problems effectively and
efficiently. Without the proper approach, engineering problems can be very confusing. The
following guidelines are written with common correct and incorrect approaches in mind.
Remembering and implementing these approaches can not only help you find a solution
faster, but it can increase your understanding of the problem and its conceptual basis. Most
of these guidelines are not relegated to this class; you can use them in any engineering
class!
Start with what you know. If you do not know where to start, start with what you
know. It’s a little bit like connecting the dots. You cannot connect the dots until you
have put some down.
o
Look at the information you’re given.
o
Look at the applicable equations.
?
o
Be methodical in your approach.
?
What are the restrictions on these equations?
Often students will say, I dont know anything about this!
Typically, this is because they dont know what they know and what
they dont know. Start with what you know!
Use dimensional analysis as a hint.
o
If you can’t find a mistake in your work, check the unit consistency in the
problem.
o
If you don’t know how to solve a problem, determine the units of the
solution and then look to see what units you’re missing in the solution.
Don’t cut corners! This WILL hurt you sooner or later.
How to approach programming
Start with what you know.
o
If you’re having trouble programming a problem, start by working through
the problem on paper.
Page 7 of 9
o
Dont try to think up the whole program in your head and then type it out!
When translating the problem solution into a program, display each part of the code.
Fix one piece at a time.
Avoid using ; at the end of statements while debugging the program. You can
add the ; later when the program is finalized.
Look at the How do I do that in MATLAB series.
Use the MATLAB help site (http://www.mathworks.com/help/matlab/) to look up
error codes, syntax, etc.
o
If you’re looking for syntax examples, click the “example” links on the right
side of MathWorks sections for a sample program.
Common mistakes in programming
Hard coding
Incorrect format
Misunderstanding the conceptual (paper) solution
Inefficient program debugging
The printer cuts off published file lines.
Unit errors/no units
Look at the checklist on the next page that needs to be attached to the hard copy of
your submission.
Page 8 of 9
Checklist for submission
? I followed the general format as given in the sample project.
? I uploaded the mfile.
? I attached any handwritten or typed pages if asked for.
? I followed the section format as given in the sample project.
? I published the mfile in published format – HTML format.
? I wrote proper and reasonable comments.
? I put the comments on their own lines as seen in the sample project mfile (not
at the end of a code line).
? I CLEARLY identified my methods for each problem.
? I suppressed all statements.
? I showed input and output variables using fprintf and disp statements for all
exercises unless specified otherwise.
? I checked for cut off errors in the hard copy of the published file.
? I avoided all hard-coding (i.e., the program should still work if ANY of the
input data is changed).
Page 9 of 9
Time (s)
O 5
10
15 20 25
30 60
Temperature
22 18.3 15.2 13.4 12 10.9 10.3 8.6
(°C)
Temperature of iced water = 2.8 °C
Purchase answer to see full
attachment
Why Choose Us
Top quality papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional academic writers
We have hired a team of professional writers experienced in academic and business writing. Most of them are native speakers and PhD holders able to take care of any assignment you need help with.
Free revisions
If you feel that we missed something, send the order for a free revision. You will have 10 days to send the order for revision after you receive the final paper. You can either do it on your own after signing in to your personal account or by contacting our support.
On-time delivery
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & confidential
We use several checkers to make sure that all papers you receive are plagiarism-free. Our editors carefully go through all in-text citations. We also promise full confidentiality in all our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
You are welcome to choose your academic level and the type of your paper. Our academic experts will gladly help you with essays, case studies, research papers and other assignments.
Admissions
Admission help & business writing
You can be positive that we will be here 24/7 to help you get accepted to the Master’s program at the TOP-universities or help you get a well-paid position.
Reviews
Editing your paper
Our academic writers and editors will help you submit a well-structured and organized paper just on time. We will ensure that your final paper is of the highest quality and absolutely free of mistakes.
Reviews
Revising your paper
Our academic writers and editors will help you with unlimited number of revisions in case you need any customization of your academic papers