CMPT 260 final project by Anshul Singhvi.

asinghvi17 33e80f0703 work 1 week ago
example 6d4fc46412 added gif 1 week ago
src 33e80f0703 work 1 week ago
test 764b38ff46 removed stupid stuff, implemented fancy in explicit. Will move over to implicit as soon as able. 2 weeks ago
.gitignore 78f2fac70b work ocmmit 2 weeks ago
LICENSE 483a4f0107 removed errant 7 from LICENSE 2 weeks ago
README.md 6d4fc46412 added gif 1 week ago

README.md

Diffusion

CMPT 260 Final Project

Anshul Singhvi

Language - Julia

Broad goals

Explore heat diffusion

Examine them for stability (or not)

Implement a diffusion animator

Formulae

∂Ψ/∂t = D⋅∇²Ψ

Ψ = cos(ax)⋅eᵇᵗ

∂Ψ/∂t = D⋅∂²Ψ/∂x² + ℽ (where ℽ is the noise term)

Method

We solve the one-dimensional case numerically, using a backward-time centered-space ‘implicit’ method of solving a system. Currently, both Dirichlet and Neumann methods have been implemented.

An example of the Dirichlet is shown in the following animation, where a system in which the ends have been set to 10 K and the rest of the points are at 0 K is evolved over a timespan of a few seconds. Due to the high differential in temperature, as well as the constant influx of heat, this happens relatively fast.

Dirichlet BC with all other temperatures at 0 K

Another example of Dirichlet boundary conditions is this, a system in which the boundary temperatures are lower than the interior temperatures, so the system goes into a pseudostable state.

Dirichlet BC with all other temperatures at 10 K

Below is an example of the Neumann boundary condition, with a flux of 0.1 temperature per timestep out of the system.

Below is an example of a mixed boundary condition - the flux on the left is constant, and the temperature on the right is fixed.

Neumann-DIrichlet

The two-dimensional case, using an alternating-direction implicit solver scheme, is planned for the ω release, but since we are currently on version 0.1, it is being neglected. The method, however, is simple - it is an extension, in fact, of the one-dimensional case - as is the three-dimensional case, although this has vast memory requirements.

As for plotting, it is planned to store the plots in the .hdf5 format to allow for easy replotting.

Terminology

A Dirichlet boundary condition is a boundary condition that forces the temperature on the edges of a system to be a certain value.

A Neumann boundary condition is a boundary condition that forces the flux on the edges of a system to be a certain value, i.e., that there is a constant flow of heat outwards.

Julia installation instructions

See Julia homepage