Project 2 Instructions
Project 2 Instructions
In this project you will implement the Galerkin FEM method to solve the Laplace equation for the
temperature distribution in 2D. The project consists of 3 required part and several optional chal-
lenges. There is no autograder for this project. The required parts of this project should take you
only a few hours to complete. For each of the optional challenges that you complete successfully you
will gain a 1.5% bonus on your total grade for the class.
Background: One of the challenges for the design of next generation computing chips is managing
heat dissipation. To overcome this, there is currently a large research effort exploring the incorpora-
tion of aluminium nitride (AlN) layers between the electrically active device layers in stacked chip
architectures. AlN has a high thermal conductivity and, because it has a hexagonal crystal structure,
its thermal conductivity is also anisotropic with a larger conductivity in the 𝑎-𝑏 plane than along its
𝑐 axis. It is hoped that this can be exploited to efficiently spread the heat away from hotspots in in
electrically active layers of the chip. As part of this effort my research group is modeling the experi-
mental system below to determine if the lateral thermal conductivity really makes a significant con-
tribution to heat removal in a layered device. More specifically we want to determine if the AlN’s
thermal conductivity in the 𝑥 and 𝑦 directions can be deduced from the thermal resistance measured
experimentally from several different device geometries. Your task in this project is to model a sim-
plified form of this problem to determine the value of thermal conductivity that best replicates some
hypothetical “experimental data”.
You are provided with a MATLAB script called fem_2D_heatconduction_example.m that solves
the in the domain pictured above the isotropic steady state heat conduction equation:
∇! 𝑢(𝒑) = 0 for 𝒑 ∈ Ω
⎧
7(𝒑) ⋅ ∇𝑢(𝒑) = 0 for 𝒑 ∈ Γ! , Γ" , Γ#
𝒏
⎨ 𝑢(𝒑) = 𝑇$%&' for 𝒑 ∈ Γ(
⎩ 𝒏 7(𝒑) ⋅ ∇𝑢(𝒑) = 𝑔 for 𝒑 ∈ Γ)
Here 𝑢(𝒑) is the temperature at point 𝒑, and 𝒏 7 is the outward unit normal vector to the domain. In
the language of heat conduction: with have a fixed thermal flux at the boundary under the heater
(Γ) ), the bottom boundary (Γ( ) is isothermal (held at a fixed temperature) and boundaries 2, 3 and
5 are insulating (adiabatic) and don’t permit any heat flux. For boundaries 2 and 5 this is because
the mirror symmetry of the larger geometry that we are modeling demands that gradients are zero
at the left and right end, and for boundaries 3 we assume the air gap means there is negligible heat
loss. In weak form the boundary value problem becomes:
= 𝑤 𝑔 𝑑Γ − A ∇𝑤 ⋅ ∇𝑢 𝑑𝑥 = 0
+! ,
Which when reduced to matrix form with the Galerkin approximation is
𝐾! ⋅ 𝑢 = 𝐹-./ + 𝐹0./
The code reads the mesh structure from a file called 10x6um_slab_2um_heater_no_hole_nEl-
2041.json, that when loaded into MATLAB gives a data structure containing the node positions,
the location matrix and the information about the sub-boundaries. After solving for the temperature
distribution, 𝑢(𝒑), the code also computes the average temperature on each boundary and computes
the total rate of heat loss, 𝑄( , through the bottom boundary.
Task 0: Try running the example code and read through so that you can see what the code is doing.
I will go through the code in lecture along with the theory behind the boundary integral. Tinker
around with it the code.
Task 1 — Compute thermal resistance: Modify the example code to change the boundary condition
on boundary 4 to be isothermal with a fixed temperature 𝑇3%4 , and then add to the code so that it
computes the thermal resistance of the AlN layer. The thermal resistance, 𝑅, is defined as the tem-
perature difference between that hot and cold sides divided by the rate of heat transfer.
𝑇3%4 − 𝑇$%&'
𝑅=
−𝑄(
Where
5
𝑄( = = 𝜅 ∇𝑢 ⋅ 𝑛L 𝑑Γ = − A 𝜅∇𝑢(𝑥, 0) ⋅ 𝑦L 𝑑𝑥
+# 2
In the example code this calculation is performed by: integrate_heat_flux_through_boundary
which is defined in the SUB-FUNCTIONS section of the code.
Turn your modified script into a MATLAB function that meets the following specifications:
• The function is called fem_2D_1
• The function should take one input argument: the name of the json file containing the mesh
data.
• The function should return one output: the thermal resistance 𝑅.
• The function should be a standalone function and should not call on functions defined outside
of the fem_2D_1.m file.
Task 2.A — Add a hole: To change the thermal resistance by forcing the heat to travel a different
path I have introduced a hole into the middle of the AlN layer as shown below.
Γ4 Γ3
Γ5 Γ6 Γ2
Γ1
Your MATLAB function for this task must meets the following specifications:
• The function is called fem_2D_2
• The function should take one input argument: the name of the json file containing the mesh
data.
• The function should return one output: the thermal resistance 𝑅.
• The function should impose that 𝒏7 (𝒑) ⋅ ∇𝑢(𝒑) for 𝒑 ∈ Γ6 .
• The function should be a standalone function that does not call on functions defined outside
of its .m file.
Task 2.B — Resistance vs hole position: Write a MATLAB function that calls your fem_2D_2 code
for all of the holey AlN geometries in the Mesh-Files folder, and then plots the resistance 𝑅 vs the 𝑥
position of the hole center.
Your MATLAB function for this task must meets the following specifications:
• The function is called R_vs_hole_position
• The function should take no input.
• The function should return no output.
• But the function should plot 𝑅 vs the hole position (which is specified in the file name of
each structure).
• The function should save the plot as a png file called R_vs_x_isotropic.png.
• The function should be a standalone function that does not call on functions defined outside
of its .m file.
Task 3 — Anisotropic thermal conductivity: Modify your code from Task 2 to model anisotropic
thermal conductivity in the AlN. If the thermal conductivity is anisotropic the thermal conductivity
𝜅77 0
𝜅 is a matrix 𝜅 = M 0 𝜅 N and the heat flux is given by:
88
𝐽 = −𝜅 ⋅ ∇𝑢
div S𝜅 ⋅ ∇𝑢T = 0
This leads to a slightly different form of the 𝐾!9 element matrix which now also depends on 𝜅.
Where previously the elements of 𝐾!9 were given by the dot product of the shape function grads
𝐾!9 :; = ∇𝜙: ⋅ ∇𝜙;
Now they are given by
𝐾!9 :; = ∇𝜙: ⋅ 𝜅 ⋅ ∇𝜙; = 𝜅77 𝜙: ,7 𝜙; ,7 + 𝜅78 𝜙: ,7 𝜙; ,8 + 𝜅87 𝜙: ,8 𝜙; ,7 + 𝜅88 𝜙: ,8 𝜙; ,8
I have included a subfunction in the example script called Ke2aniso which computes this.
Modify your code so that 𝜅 is a 2 × 2 matrix and the element 𝐾!9 matrix for anisotropic conductivity
is used to build the global stiffness matrix. Run your script a few times on the same geometry
changing only 𝜅77 and satisfy yourself that the thermal resistance changes.
Your MATLAB function for this task must meets the following specifications:
• The function is called fem_2D_3
• The function should take 2 inputs: (1) the 2 × 2 matrix for 𝜅, and (2) the name of the json
file of the structure to be modeled.
• The function should return one output: The thermal resistance 𝑅.
• The function should be a standalone function that does not call on functions defined outside
of its .m file.
Submission instructions
Challenge 1 — Determine the 𝜿𝒙𝒙 and 𝜿𝒚𝒚 that best fit “experimental” data. Instructions coming
shortly….