Solve the heat equation for each of the following two sets of conditions:
(a)
T(x,0)
=
0
(1)
T(0,t)
4;T(l,t) = 2
Note that the boundary conditions are inhomogeneous.
Write a program in MATLAB to numerically solve for the temperature distribution in a rod of lengthl= 1 with insulated sides and with the boundary and initial conditions given in problem 1.a. Plot the temperature distribution in the rod att= 0:015 and at the steady-state value. Be sure to indicate your method used, time step, spatial grid size and Courant number and how you decided which values to use. (This will likely involve plots, tables or other means of justi cation.) You may letk= 1. Compare your results with the analytical solution by plotting the analytical result on the same graph.
Solve the heat equation for each of the following two sets of conditions: (a) T(x,0)=0(1)T(0,t)=4; T(l,t) = 2Note that the boundary conditions are inhomogeneous. Write a program in MATLAB to numerically solve for the temperature distribution in a rod of length l= 1 with insulated sides and with the boundary and initial conditions given in problem 1.a. Plot the temperature distribution in the rod at t = 0:015 and at the steady-state value. Be sure to indicate your method used, time step, spatial grid size and Courant number and how you decided which values to use. (This will likely involve plots, tables or other means of justi cation.) You may let k = 1. Compare your results with the analytical solution by plotting the analytical result on the same graph.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here