Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
between. The temperature variation, T(x, t), at a given position x and time t in a one-dimensional
cross-section through the wall can be modelled using a specific partial differential equation.
This equation will be investigated using the provided Octave functions and script.
The thermal conductivities of the different materials, which vary, are accounted for using a
spatially dependent coefficient for the temperature gradient, ?x/?T.
Your task is to analyse this model and interpret the results in the context of the physical system.
function Temp0 = icfun(x)
% Icfun – Initial conditions
Temp0 = 273; % unit: K
end
function [c, f, s] = pdfun(x, t, T, dTdx)
% pdfun – Define partial differential equation
c = 1;
f = (2 – 0.8*(heaviside(x-2) – heaviside(x - 3))) * dTdx;
s = 0;
end
function [pl, ql, pr, qr] = bcfun(xl, Tl, xr, Tr, t)
% bcfun – Boundary conditions
pl = 3 ;
ql = 1 ;
pr = 0.1*(Tr -273) ;
qr = 1 ;
end
% Solve the partial differential equation using pde1dm
x = linspace(0, 5, 101);
t = 0:0.1:8;
sol = pde1dm(0, @pdfun, @icfun, @bcfun, x, t);
Temp = sol(:,:,1);
%Plot temperature profiles at different times
plot(x, Temp(1,:), x, Temp(21,:), x, Temp(41,:), x,
Temp(61,:))
xlabel('Length, x');
ylabel('Temperature, T');
(a) Identify the ranges of values of x that correspond to the brick and the insulation layers.
[2 marks]
(b) What is the partial differential equation (PDE) that is being solved in this context?
[3 marks]
(c) What is the boundary condition at x=0? Please simplify your answer as much as
possible.
[2 marks]
(d) What is the boundary condition at x=5? Please simplify your answer as much as
possible.
[3 marks]
(e) At what specific times t are the temperature profiles plotted by the script?
[2 marks]