@@ -5,7 +5,7 @@ Heat (or diffusion) equation is
5
5
<!-- Equation
6
6
\frac{\partial u}{\partial t} = \alpha \nabla^2 u
7
7
-->
8
- ![ img] ( https://quicklatex.com/cache3/d2/ql_b3f6b8bdc3a8862c73c5a97862afb9d2_l3 .png)
8
+ ![ img] ( ../img/heat-equation .png)
9
9
10
10
where ** u(x, y, t)** is the temperature field that varies in space and time,
11
11
and α is thermal diffusivity constant. The two dimensional Laplacian can be
@@ -17,22 +17,22 @@ discretized with finite differences as
17
17
&+ \frac{u(i,j-1)-2u(i,j)+u(i,j+1)}{(\Delta y)^2}
18
18
\end{align*}
19
19
-->
20
- ![ img] ( https://quicklatex.com/cache3/2d/ql_59f49ed64dbbe76704e0679b8ad7c22d_l3 .png)
20
+ ![ img] ( ../img/nabla .png)
21
21
22
22
Given an initial condition (u(t=0) = u0) one can follow the time dependence of
23
23
the temperature field with explicit time evolution method:
24
24
25
25
<!-- Equation
26
26
u^{m+1}(i,j) = u^m(i,j) + \Delta t \alpha \nabla^2 u^m(i,j)
27
27
-->
28
- ![ img] ( https://quicklatex.com/cache3/9e/ql_9eb7ce5f3d5eccd6cfc1ff5638bf199e_l3 .png)
28
+ ![ img] ( ../img/heat-time-propagation .png)
29
29
30
30
Note: Algorithm is stable only when
31
31
32
32
<!-- Equation
33
33
\Delta t < \frac{1}{2 \alpha} \frac{(\Delta x \Delta y)^2}{(\Delta x)^2 (\Delta y)^2}
34
34
-->
35
- ![ img] ( https://quicklatex.com/cache3/d1/ql_0e7107049c9183d11dbb1e81174280d1_l3 .png)
35
+ ![ img] ( ../img/heat-stability .png)
36
36
37
37
Implement two dimensional heat equation with NumPy using the initial
38
38
temperature field in the file [ bottle.dat] ( bottle.dat ) (the file consists of a
0 commit comments