Skip to content

Numerical solution of Maxwell equations for monochromatic light using 2D Yee-net algorithm

Notifications You must be signed in to change notification settings

Athalbraht/yee-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yee-algorithm


Numerical solution of Maxwell equations for monochromatic light using 2D Yee-net algorithm.

Usage

$: pip install -r requirements.txt
$: python3 fdtd.py #init params in fdtd.config

You can convert generated images from result/ folder to (%04d refers to the simulation len(str(simulation_time))):

$: ffmpeg -i img_%04d.png output.mp4 #MP4
$: ffmpeg -y -i output.mp4 -filter_complex "fps=5,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=32[p];[s1][p]paletteuse=dither=bayer" output.gif #GIF

Examples

Due to huge GIF size framerate reduced to 5-10fps. Original .mp4 files in examples folder.

A

C

E

B

D


MP4

A.mp4
B.mp4
C.mp4
E.mp4
D.mp4

About

Numerical solution of Maxwell equations for monochromatic light using 2D Yee-net algorithm

Resources

Stars

Watchers

Forks

Languages