% Solves the 1D heat equation with θ method finite difference scheme
L = 10 % length of domain in x direction
tmax = 120 % end time
nx = 5 % number of nodes in x direction
nt =1 % number of time steps
dx = L/(nx-1);
dt = tmax/(nt-1);
r = alpha*dt/dx^2; r2 = 1 - 2*r;
% 1 Loop over time steps
t = 0
u = Tnew(1) = T(1);
h=35 Thermal diffusivity of blade [w/m2.K ]
Tnew(nx) = T(nx); % initial condition
for m=1:nt
uold = u; % prepare for next step
t = t + dt;
for i=2:nx-1
+++++++++++++++++++++++++++++++++++++
Question No.1
To cool a hot surface at 120 ° C, we use an aluminum
) k = 237W / m.K, =97.1*106^m2 / s (
needle blade as shown below. The diameter of the blade is 1 cm and the length is 10 cm. The ambient temperature is 15 ° C and the transfer coefficient of heat transfer on the surface of the blade is 35 watts per square meter-Kelvin. At the first moment, the temperature of the entire blade is 30 degrees. Assuming a one-dimensional and transient propagation along the blade
1) the governing equation for the heat transfer problem with the correct boundary conditions is extracted and by the method of method discretization
2) Develop a numeric code to solve the above problem (The value of the parameter can be adjusted as code input)
3) Using Euler's explicit method, report the time interval of 25% second and the number of 10 computing nodes of the temperature distribution in the blade for a period of about 10 minutes in 30 seconds intervals. How long does it take to get a stable temperature distribution? Increasing the time step by keeping the number of computational nodes constant and showing how long the numerical solution will be unstable.
(4) Using the Crank-Nicholson method, keep the number of nodes double and quadruple by constant stroke and compare the constant temperature distribution obtained with this number of nodes. How is the effect of the number of nodes on the answer given?