Question: Matlab . (Temperature conductivity) This problem illustrates a common situation in which you will need to solve very large linear systems.... 3. (Temperature conductivity) This
Matlab . (Temperature conductivity) This problem illustrates a common situation in which you will need to solve very large linear systems....

3. (Temperature conductivity) This problem illustrates a common situation in which you will need to solve very large linear systems. Imagine that we have a metal rod of length L (m) whose temperature at each end is held fixed at 20C and which is being heated by a flame held at the midpoint. We can approximate the steady state temperature at equally spaced points along the rod using the following model. We divide the rod into N intervals of equal length. This partitioning of the rod gives us N+1 equally spaced points j=0, 1.2, N The steady state temperature T, (K) at interior points rj in the rod can be modeled using a system of equations given by T,-1-2T, T+2f(x) j 1,2,, N -1 The flame f(x) is given by exp where S is the heating rate for the flame (W/m3) is the thermal diffusivity of the metal (m2/s) Cp is the heat capacity of the metal (J/(kgK")) is the density of the metal (kg/m3) is a scaling factor specifying the flame width (m) zo is the position of the flame (m) Set up a linear system to solve for the steady state temperature distribution in the rod of length L 1 Solve the system for a thermal conductivity of -10-3, heat rate S = 1 104, heat capacity of Cp-200. density of -10 and a scaling factor -5x 10-2. The flame is located at zo-L/2 For this problem, use linspace to create an array of r values and the spdiags command to construct the matrix that you need to solve for T Check your answer: Your solution for T, for j-5 should be T(5)31.0778365681593058 (a) Compute the result at equally spaced points 11-0.01, z2-0.02 ,N-1-0.99 on the rod. Plot the results and be sure to add labels and a legend to your graph. Write your solution T to the file temp.out (b) In steady state, the flux of heat in or out of the endpoints of the rod should be balanced exactly by the heat that the flame is adding to the rod. Mathematically, we have that
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
