You are on page 1of 4

Professor Mohamed Hafez

TA: Edward Tavernetti


Contact: etavernetti@ucdavis.edu
Cluster 3

1 Newton’s Law of (Convective) Cooling


The governing equation is: Tt = k(T − T∞ ) which can be discretized as and solved subject to:

Ti+1 − Ti
= k(Ti − T∞ ), T (0) = T0
dt

2 Stefan-Boltzmann’s Law of Radiation


The governing equation is: Tt = σ(T 4 − T∞
4 ) which can be discretized as and solved subject to:

Ti+1 − Ti
= σ(Ti4 − T∞
4
), T (0) = T0
dt

1
3 Fourier’s Law of Heat Conduction
The governing equation is: Tt = kTxx which can be discretized as and solved subject to (for x ∈ [0, 1]):

Ti,n+1 − Ti,n Ti+1,n − 2Ti,n + Ti−1,n


= , T (x, 0) = 1, T (0, t) = 1, T (1, t) = 10
dt dx2

4 Heat Equation in 2D
The governing equation is: Tt = k(Txx + Tyy ) which can be discretized as and solved subject to:
 
Ti,n+1 − Ti,n Ti+1,n − 2Ti,n + Ti−1,n Ti+1,n − 2Ti,n + Ti−1,n
=k +
dt dx2 dy 2

Here we can enforce boundary conditions on the edges. The example shown has T = 10 on the lower boundary
and T = 1 on the 3 remaining boundaries.

2
5 Right and Left Translation
The governing equation is: ut + cux = 0 which can be discretized as and solved subject to:
ui,n+1 − ui,n ui,n − ui−1,n
c=1→ +c = 0, u(x) = sin(πx)
dt dx
ui,n+1 − ui,n ui+1,n − ui,n
c = −1 → +c = 0, u(x) = sin(πx)
dt dx

Note: c = 1 gives the left translation and c = −1 gives the right translation.

6 Oscillations and Waves


The governing equation is: utt = c2 uxx = 0 which can be discretized as and solved subject to:
ui,n+1 − ui,n + ui−1,n ui+1,n − ui,n + ui−1,n
2
= c2 , u(x) = sin(πx)
dt dx2

3
7 2D Eigenvalue problem
We will study buckling of a square membrane under compression:

uxx + uyy + λu = 0

The exact solution is given by:


u(x) = sin(πx) sin(πy)
Where we see from this that:

ux = π cos(πx) sin(πy)
uxx = −π 2 sin(πx) sin(πy)
uyy = −π 2 sin(πx) sin(πy)

From which we find that the smallest eigenvalue is given by λ = 2π 2 ≈ 19.74. Now to find the solution numerically
use
0 − 2u + 0 0 − 2u + 0
+ +λ=0
∆x2 ∆y 2
1
Taking ∆x = ∆y = 2 and requiring u 6= 0 we find λ = 16.

Suppose that we refine the mesh so that h = 1/3, instead of 1 interior point we now have 4. Then the discretized
equation is given by:
ui+1,j − 2ui,j + ui−1,j ui,j+1 − 2ui,j + ui,j−1
2
+ + λui,j = 0
(1/3) (1/3)2
0 − ui,j + 0 0 − ui,j + 0
⇒ + + λui,j = 0
(1/3)2 (1/3)2

Then we get:
(−18 + λ)ui,j = 0 ⇒ λ = 18

You might also like