Skip to content

365Bit/diffusion2D

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 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".

Project description

This code simulates the 2D diffusion equation on a square domain, with the entire domain set to an initial temperature and a circular disc at the center maintained at a higher temperature. Using the Finite Difference Method, the code solves the diffusion equation, allowing the user to adjust the thermal diffusivity and initial conditions of the system. The simulation outputs four plots at different time points, vividly illustrating the progression of the diffusion process.

Installing the package

Using pip3 to install from PyPI

pip install --user --index-url https://test.pypi.org/simple/ tischlre_diffusion2d

Required dependencies

pip install numpy matplotlib

Running this package

from tischlre_diffusion2d.diffusion2d import solve

solve(dx = 0.1, dy = 0.1, D = 4)

Citing

This was forked from https://github.com/Simulation-Software-Engineering/diffusion2D.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%