A small aluminum sphere, initially at temperature T_0, is suddenly immersed in a cool large bath whose temperature is essentially constant at T_infinity. For a small good heat conductor body, we may take the temperature of the body to be uniform. This method of analysis is called the lumped parameter method. The governing equation for the temperature, T, of the sphere is mc dT/dt = hA_t(T_infinty -T) T(0) = T_0. where h is the convective heat transfer coefficient of the fluid A_t is the surface area of the sphere m is the mass of the sphere c is the specific heat of the sphere Equation 7.18 is a statement that the rate of increase in the internal energy of the body is equal to the rate that heat is carried to the body by convection. If the right-hand side of Equation 7.18 is negative, then the internal energy of the body will be decreasing and thus the temperature of the body will also be decreasing. Take h = 890 W/m^2- degree C, c = 896 J/kg- degree C, sphere density, rho_AL = 2707 kg/m^3, T_0 = 150 degree C, T_infinity = 20 degree C, t = (0, 3 s) in steps of 0.01s, and sphere radius. R = 0.2 m. Also note that the sphere volume, V_t = 4/3 pi R^3, and the spher surface area, A_t=4 pi R^2 The time constant, tau, for the system is tau = mc squar squareroot hA_t. Create a MATLAB program that solves the temperature of the sphere by both the Euler and modified Euler methods and compare the results with the exact solution. I he exact solution isT(t) = (T_0 -T_infinity)e^-t/tau + T_infinity
h=890;
c=896;
rho=2707;
R=0.2;
dt=0.01;
t_tot=3;
steps=t_tol/dt;
Tini=150;
Tinfi=20;
Pi=3.14159;
As=4*Pi*R^2;
Vol=4*Pi*R^3/3;
M=Vol*rho;
Tau=M*c/(h*As);
I=0;
Told=Tini;
t[i]=0;
T[i]=Told;
For i=1:steps
Tnew=Told+dt*1/tau*(Tinfi-Told); %Euler Method
t[i]=i*dt;
T[i]=Tnew;
Told=Tnew;
end