Implementation of finite-difference time-domain method to model electromagnetic field propagation in Python, with CUDA support. This is my final project for the computational lab PHYC20013 at the University of Melbourne in 2020.
emsystem.py
: Classes and functions for CPU use.emsystem_gpu.py
: Classes and functions for CUDA use.- Note: Only support GPUs with CUDA capability.
Examples.ipynb
: Example applications
The project depends on the following Python packages:
- numpy
- matplotlib
- (for CUDA) numba
The following software is required for quality animation generation:
- ImageMagick
- Download: https://imagemagick.org/script/download.php
- Remember to check the option 'Install legacy utilities (e.g. convert)' during the stage 'Select Additional Tasks' when installing
Below are some animations made in Examples.ipynb
. The electric and magnetic fields are represented with red and blue quivers respectively.