Holooly Plus Logo

Question 10.10: Cooling of a hot plate. (Using a MATLAB's built-in function ......

Cooling of a hot plate. (Using a MATLAB’s built-in function to solve a first-order ODE.)

When a thin hot plate is suddenly taken out of an oven and is exposed to the surrounding air, it cools due to heat loss by convection and radiation. The rate at which the plate’s temperature, T, is changing with time is given by:

\frac{d T}{d t}=-\frac{A_{s}}{\rho V C_{\nu }}\left[\sigma_{S B} \varepsilon\left(T^{4}-T_{\infty}^{4}\right)+h\left(T-T_{\infty}\right)\right]    (10.172)

where A_{s} is the plate’s surface area, \rho=300 \mathrm{~kg} / \mathrm{m}^{3} is its mass density, V is its volume, C_{V}=900 \mathrm{J} / \mathrm{kg} / \mathrm{K} is its specific heat at constant volume, and \varepsilon=0.8 is its radiative emissivity. Also, \sigma_{S B}=5.67 \times 10^{-8} \mathrm{~W} / \mathrm{m}^{2} / \mathrm{K}^{4} is the Stefan-Boltzmann constant, h=30 \mathrm{~W} / \mathrm{m}^{2} / \mathrm{K} is the heat transfer coefficient, and T_{\infty} is the ambient air temperature.

Write a user-defined MATLAB function that calculates the temperature of the plate as a function of time for the first 180 \mathrm{~s} after the plate is taken out of the oven, and display the result in a figure. Name the function PlateTemp (T1,Vol, Area, Tamb) where T 1 is the initial temperature of the plate, Vol, and Area are the volume and surface area of the plate, respectively, and Tamb is the ambient temperature.

Use the function to make a plot that shows the variation of temperature with time for a plate with V=0.003 \mathrm{~m}^{3}, A_{s}=0.25 \mathrm{~m}^{2}, which has an initial temperature of 673 \mathrm{~K}, when the ambient temperature is 298 \mathrm{~K}.

The 'Blue Check Mark' means that either the MATLAB code/script/answer provided in the answer section has been tested by our team of experts; or the answer in general has be fact checked.

Learn more on how do we answer questions.

Script File

To solve the problem, two user-defined functions are written. One is the function PlateTemp(T1, Vol, Area, Tamb), and the other is a function named Temprate (t, T, Vol, As, Tamb) that calculates the value of \frac{d T}{d t} in Eq. (10.172). The ODE is solved inside PlateTemp by using MATLAB's built-in function ode45. (ode45 uses TempRate when solving the equation). The constants \rho, C_{V}, \varepsilon, and \sigma_{S B}, are defined inside TempRate. The input arguments of TempRate are t, T, V o l, As, and Tamb. The first two arguments, t and T, are the standard independent and dependent variables. The last three arguments, Vol, As, and Tamb, are additional arguments that provide the values of the volume, surface area of the plate, and the ambient temperature. The value of these arguments is entered in the function PlateTemp and is transferred to TempRate through the additional optional arguments in the function ode 45.

The listing of the user-defined function PlateTemp is:

function PlateTemp(Tl,Vol,Area,Tamb)

% The function PlateTemp calculates the temperature of a plate.

% Input variables:

% T1 The initial temperature in degrees K.

% Vol Volume of the plate in m cube.

% Area Area of the plate in m square.

% Tamb The ambient temperature in degrees K.

% Output:

% A plot of temperature versus time.

tspan = [ 0  180] ;

[Time Temp] = ode45 (@TempRate, tspan,T1, [ ] , Vol ,Area,Tamb);

plot(Time,Temp)

xlabel ('Time (s) ')

ylabel('Temperature (K) ')

The user-defined function Pla teTemp, that is used in the argument of the function ode4 5, calculates the value of dT/dt is:

function dTdt=TempRate(t, T, Vol, As, Tamb)

Rho= 300; Cv = 900; h = 30; Epsi = 0. 8; Sigma= 5. 67e-8;

ARVC =As/ (Rho*Vol *Cv) ;

SigEps =Epsi*Sigma;

dTdt = -ARVC* (SigEps* (T^4 - Tamb^4) + h* (T - Tamb));

The problem is solved by entering the following in the Command Window:

>> PlateTemp(673,0.001,0.25,298)

When the function PlateTemp is executed, the following figure is displayed:

10.10

Related Answered Questions