1. Engineering
  2. Mechanical Engineering
  3. ever wanted to fry an egg on hot pavement the...

Question: ever wanted to fry an egg on hot pavement the...

Question details

Ever wanted to fry an egg on hot pavement? The ImaginationTM Station in Toledo says youve got to get the egg above 70°C to coagulate the proteins. Lets create and solve a physics-based model to see if the surface of a road can really get that hot. Heres a realistic model of the heats (Q, in Watts) entering and leaving the surface of a road at (unknown) temperature T (in Celsius). Youll learn more about this in Heat Transfer later: QSUN 650 is solar heat directly hitting the pavement at noon on a very sunny day QAIR (15) (T-32) is the heat convected away from the pavement by slow moving air at 32°C Tsn® 27°C TAIR 32oC aSun SKY AIR .as (5.103 x 108 (T+273)-(27+273) is the heat radiating off the pavement to the upper sky at 27oC. The +273 in the equation is converting °C to Kelvin. Pavement at unknown The temperature T (in Celsius) of the pavement is obtained when all the incoming heat balances the outgoing heat, i.e. when QSN QAIR QSkY temperature T (in °C) Following the instructions below, youll sole for T two ways: 1. Writing your own BISECTION routine, which calls your own function pavement (T), 2. Using MATLABs built-in fzero function and then compare how they did (and whats easier to do!) [A] Create the fx) function First, look at the model above, and think about the function fT) needed so that the solution to the root of fIT) 0 gives you the desired pavement temperature T Hint: Since T is the solution to Qsu,-QAR + QSKY, then a great idea is to make/(η QsuN-QAR-QsY where each Q has the formula above. [B] Turn f(T) into a MATLAB function Create a function called pavement·m that starts with this exact line: function f = pavement (T) Complete the function so that it outputs the value of the function f(T) from part [A] for an input T in °C. [C] Create a plot of f(T over T 0 to 100°C to help you visualize the problem. From the plot, what do you think would be a good first bracket [a, b] for the bisection method? (You do not submit this plot to me-its just for you to see the problem before you get started.) [D] Start with my code fragment (provided online) for the script HW37.m. Complete the code by writing your own bisection method to converge on the solution for T Use the given initial bracket of [a, b] [0, 100] Celsius. Do not change those values please! Develop appropriate convergence tolerances (tolx, tol) based on the initial bracket just like we discussed in class Use a while loop to keep iterating until both convergence criteria are met (i.e. keep looping if either or both criteria are not met). Remember: you dont know the real solution for temperature T yet when comparing to tol, so use the proxy error T-T1 . Be sure to store the value of each iteration T in a vector called Thistory so you can plot the methods convergence history later
For the purposes of keeping track of the iterations in the history vector, define T a and 7, = b as the first two iterations, and then define T, to be the first midpoint of a and b. [E] After the routine converges, add even more code to your HW3_7.m script to do the following Run fzero with iterations displaved, using the same initial bracket [O, 100]. Assume this result from fzero is the true answer for temperature T, and use it to back- calculate a vector of all the true errors e-T-T for all the iterations in your Bisection routine you stored in the T_history vector Make & label a convergence history plot of your bisection method: plot logofeas a function of iteration k, up until convergence. Save this plot as a pdf called PLOT3_7.pdf. . Thats it! Admire how well your code did converging compared to the built-in MATLAB routine. What kind of shape do you see in your convergence history plot? What did you think was easier (writing your own code [D] or using fzero [E])? Did you ever actually fry the egg (was the pavement above 70°c)?
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution