Skip to content

Commit

Permalink
More equations as figures
Browse files Browse the repository at this point in the history
  • Loading branch information
jussienko committed Mar 22, 2022
1 parent 62a0bb9 commit 006c9a7
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion numpy/broadcast-rotation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ R =
\end{pmatrix}
--->

![img](http://quicklatex.com/cache3/9c/ql_ee4015bef241c06a5119104118f9a19c_l3.png)
![img](../img/rotation-matrix.png)

where θ is the angle of rotation (in radians). Start from the x-y coordinates
in the file points_circle.dat and rotate them by 90°. Utilize broadcasting for
Expand Down
8 changes: 4 additions & 4 deletions numpy/heat-equation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Heat (or diffusion) equation is
<!-- Equation
\frac{\partial u}{\partial t} = \alpha \nabla^2 u
-->
![img](https://quicklatex.com/cache3/d2/ql_b3f6b8bdc3a8862c73c5a97862afb9d2_l3.png)
![img](../img/heat-equation.png)

where **u(x, y, t)** is the temperature field that varies in space and time,
and α is thermal diffusivity constant. The two dimensional Laplacian can be
Expand All @@ -17,22 +17,22 @@ discretized with finite differences as
&+ \frac{u(i,j-1)-2u(i,j)+u(i,j+1)}{(\Delta y)^2}
\end{align*}
-->
![img](https://quicklatex.com/cache3/2d/ql_59f49ed64dbbe76704e0679b8ad7c22d_l3.png)
![img](../img/nabla.png)

Given an initial condition (u(t=0) = u0) one can follow the time dependence of
the temperature field with explicit time evolution method:

<!-- Equation
u^{m+1}(i,j) = u^m(i,j) + \Delta t \alpha \nabla^2 u^m(i,j)
-->
![img](https://quicklatex.com/cache3/9e/ql_9eb7ce5f3d5eccd6cfc1ff5638bf199e_l3.png)
![img](../img/heat-time-propagation.png)

Note: Algorithm is stable only when

<!-- Equation
\Delta t < \frac{1}{2 \alpha} \frac{(\Delta x \Delta y)^2}{(\Delta x)^2 (\Delta y)^2}
-->
![img](https://quicklatex.com/cache3/d1/ql_0e7107049c9183d11dbb1e81174280d1_l3.png)
![img](../img/heat-stability.png)

Implement two dimensional heat equation with NumPy using the initial
temperature field in the file [bottle.dat](bottle.dat) (the file consists of a
Expand Down
Binary file added numpy/img/heat-equation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added numpy/img/heat-stability.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added numpy/img/heat-time-propagation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added numpy/img/nabla.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added numpy/img/rotation-matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 006c9a7

Please sign in to comment.