Unformatted Attachment Preview
Task 2: Consider the steady-state temperature, u(I), of a copper bar of length L = 5 m where the
left end of the bar is fixed at u= -5°C and the right end has a heat flux, q = ku'(L), of
-20 W/m² (i.e. outward) where[] k = 400 W/mK is the thermal conductivity of copper.
There is an energy density of f = (L - 1)(L – 2x) kW/m2 along the length of the bar.
(i) Give the differential equation and boundary conditions for this problem. Make sure
to indicate the values of 1 for which each of them hold.
(ii) Use a uniform grid spacing of h = L/N for N = 1,2,3..., and derive a second order
accurate finite difference method for this heat conduction problem. Fully specify the
system of equations in the case N = 9.
(iii) Submit a matlab file that allows the user to select N = 1,2,3,4,... and then solves the
problem, plots a labelled graph of the temperature along the bar and prints the tem-
perature at the right hand end to the screen. (You may use the code Heat1D_extras.m,
as developed in lectures, as a starting point.)
Task 3: Obtain the file fem2D-50Lines.zip from Blackboard Learn, save it to an area on your H
drive (or somewhere equally safe) and unzip it to obtain a folder called fem2D. Inside this
folder is the set of codes that we used in the lecture for the 2D finite element approximation
of heat conduction in the L, X Ly metre rectangle shown on the left in the figure.
Existing Problem:
Assignment Problem:
u given
du
= B
ön
om given
-V?u=f
on given
u= a
-V?u=f
dm = B
with f given
with f = y(ar + By) given
u given
u= a
(i) Run this heat transfer problem for a 20 x 20 mesh and give the global node number
that corresponds to the midpoint (Lx/2, Ly/2) of the computational domain. Explain
your working. Then give the computed value of the temperature at the midpoint
(Lc/2, L,/2). (The supplied values Le = 3 and Ly = 2 should not be altered.)
(ii) Take your student ID, add together the digits, call the result a and then set B =
a + 2 where y is the largest single digit in your ID as used above (without the
slash)]. Alter your code to solve the problem on the right of the figure above, with
f(x, y) = y(ar + By), and again give the computed temperature at (Lx/2, Ly/2) for
a 20 x 20 mesh. Include also in your report a surface plot of the temperature field
and full details of how you arrived at a, ß and .
END
1 See e.g. http://www.engineeringtoolbox.com/thermal-conductivity-d_429.html
2 From https://www.math.hu-berlin.de/-cc/cc_homepage/software/software.shtml
3For example, for the ID 1702518/2 you would use 1702518 and get a=1+7+2+5+1+8=24, n = 8 and
B=a+y=24 +8= 32.