Skip to content

MarcelGraf0710/diffusion2d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diffusion2d

Instructions for students

Please follow the instructions in pypi_exercise.md.

The code used in this exercise is based on Chapter 7 of the book "Learning Scientific Programming with Python".

Description

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.

Installing the package

To install the package, run

pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
grafml_diffusion2d

Running this package

To use this package in your Python code, use

from grafml_diffusion2d.diffusion2d import solve

and then access

solve()

with the parameters of our choice. Alternatively, you can run this code directly in your terminal by entering

grafml-diffusion2d-solve

Citing

If you use this package, please cite the authors.

About

Repository of the Python packaging exercise of the SSE course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%