10 To 40 Ts 200 Ta= 10 x10 Figure 1: Figure for problem 1 Problem 2. points 30 -
ID: 2087193 • Letter: 1
Question
10 To 40 Ts 200 Ta= 10 x10 Figure 1: Figure for problem 1 Problem 2. points 30 -Use MATLAB The rate of cooling of a body can be expressed as dT di (T-T) nhere T temperature of the body (°C), T temperature of the surrounding mediun and k = a proportionality constant( per minute). Thus, this equation (called Newtons law of cooling) specifies that the rate of cooling is proportional to the difference in the temperatures of the body and of the surrounding medium. If a metal ball heated to 8 C is dropped into water that is held constant at T -20°C, the temperature of the ball chaages as in the following table: Table1Dataforproblemi 2 Time, min 0 5 10 15 20 25 T 80 44.5 30.0 24.1 21.7 20.7 1. Uialize numerical differentiation to determine dI'/dt at each value of time 2. Plot dI/dt versus T-T, and employ linear regression to evaluste 3. Plot in the same figure as in item 2 the fitted line you obtained after the linear segession (item 2). Discuss the results. Hint: For the numerical differentiation you may use MATLAB's command disf or the following formula for a forward finite-divided difference: dT dtExplanation / Answer
The matlab code is given below
Matlab code:
%Start of matlab code
close all
time = 0:5:25;
Ta = 20; % Atmosphere Temp
T = [80 44.5 30 24.1 21.7 20.7]; % Temperature
delT = diff(T)./diff(time); % Rate of change of temperature
plot(T(1:end-1)-Ta,delT);
k=-(T(1:end-1)'-Ta)delT'; % Evaluate value of k using linear regression
hold on;
plot(T(1:end-1)-Ta,-k.*(T(1:end-1)-Ta),'.r')
legend('Analytical solution', 'Linear Regression')
xlabel('Temperature difference')
ylabel('Rate of change of temperature')
% End of code
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.