Helpful Matlab hints for Challenge 2; 1. To set up the geometry matrix d1, used as input to initmesh, do this: d1 = [ 2 2 2 2 0 20 20 0 20 20 0 0 0 0 hght hght 0 hght hght 0 1 1 1 1 0 0 0 0 ]; where hght = 2 + thickness_of_heat_sink 2. The PDEToolbox has a very odd format for specifying boundary conditions and it is not well-documented. For this problem, to set up the boundary condition matrix bc (the 3rd argument to parabolic), define the variables h_heat_transf and room_temp and then: z = mat2str(0); tmp = h_heat_transf*room_temp; g = mat2str(tmp); q = mat2str(h_heat_transf); lz = length(z); lg = length(g); lq = length(q); z1q = z*ones(1,lq); z1g = z*ones(1,lg); bc = [1 1 1 1 0 0 0 0 lz lq lq lq lz lg lg lg z1q' (q*1)' (q*1)' (q*1)' z1g' (g*1)' (g*1)' (g*1)' ]; I learned this from reading solveBV.m by Hongxue Cai http://www.mathworks.it/matlabcentral/fileexchange/9824-solve-boundary-value-problem-by-command-lines 3. The initial conditions are specified at the points in the array p returned by refinemesh. 3. The last four arguments to Matlab's parabolic are c, a, f, and d. These specify the pde to be d u_t - grad . (c grad u) + a u = f. In this problem, d and a are scalars (1 and 0, respectively). The vectors c and f need to be the values of the functions at the centroids of the triangles. The centroid of triangle j is (p(:,t(1,j))+p(:,t(2,j))+p(:,t(3,j)) ) / 3, where p and t are returned by refinemesh. This is can be confusing, so be careful: intial conditions are specified at the points p, while pde coefficients are specified at centroids of the triangles in the mesh. 4. We really should restrict the mesh so that no triangle crosses the silicon and the copper. This would give a more accurate solution for a smaller number of triangles, but we won't do this in this homework.