This code solves the diffusion equation over a two dimensional square domain which is at a certain temperature, and a circular disc at its center which is at a higher temperature. The diffusion equation is solved using the finite-difference method. The thermal diffusivity and initial conditions of the system can be changed by the user. The code produces four plots at various timepoints of the simulation. The diffusion process can be clearly observed in these plots.
pip install -i https://test.pypi.org/simple/ enoghadd-diffusion2d
You can run the package from command line as follows:
from diffusion2d..diffusion2d import solve
solve(dx=0.1, dy=0.1, D=4.0)Information are from: