Skip to content

kimy-de/crank-nicolson-2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Crank-Nicolson method in 2D

This repository provides the Crank-Nicolson method to solve the heat equation in 2D. Basically, the numerical method is processed by CPUs, but it can be implemented on GPUs if the CUDA is installed.

1. Requirements

  • numpy, torch, tqdm, matplotlib

2. Default setting

  • Initial condition: a star shape

  • Boundary condition: zero Neumann

  • crank_nicolson.py: iteration

  • disc.py: discretization matrices

  • utils.py: initial condition, result plot

3. Execution

python crank_nicolson.py

4. Result

r1

Releases

No releases published

Packages

No packages published

Languages