https://github.com/asem000/high-performance-adi-solver-using-numba
2D diffusion equation numba accelerated solver using ADI method
https://github.com/asem000/high-performance-adi-solver-using-numba
Last synced: 6 months ago
JSON representation
2D diffusion equation numba accelerated solver using ADI method
- Host: GitHub
- URL: https://github.com/asem000/high-performance-adi-solver-using-numba
- Owner: ASEM000
- License: mit
- Created: 2020-09-16T05:44:21.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-07T20:22:37.000Z (over 5 years ago)
- Last Synced: 2025-01-29T15:13:18.701Z (over 1 year ago)
- Language: HTML
- Homepage:
- Size: 23.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://zenodo.org/badge/latestdoi/295934862)
# High performance ADI solver using numba
2D diffusion equation solver using ADI method and accelerated by numba
#### Comparison between the execution time between numpy and numba implementation

### How to use
** Example : Solve a grid of 10x10 (boundaries inclusive) with**
* boundary conditions of ( 100c Top, 50c right , 0c bottom , 75c left )
* initial condition of 0c
* Lambda = Kdt/(dx^2)=0.0835
* time steps = 1000
### 1.Generate grid
generate grid 10x10
` grid = utils.generate_grid(n = 8 , bc=(100,50,0,75) , ic=0) `
` utils.showHeatMap(grid,annotate=True,figsize=(15,15)) `

### 2.Solve
` steps = True => means keep the intermediate solution steps `
` solution = ADI_SOLVER.solve(grid,Lambda=0.0835,iters=1000,steps = True) `
##### The solution output array is in form of (time_step,row,col ) , where time_step = 0 is the initial grid
**Show result**
` time_step = 50 `
` utils.showHeatMap(solution[time_step,:,:], annotate=True,figsize=(15,15)) `
