A 3rd year project at KCL..
numpy, matplotlib, json
See tutorial.py
for full example.
Change boundaries of simulation to reflective walls (default walls absorb).
Note that calling the function without arguments will set all walls to reflective.
solver.set_reflect_boundaries(up=True, down=True, left=False, right=False)
The upper left and lower right parameters specify an iterable which contains the coordinates of the upper left corner and the lower right corner of the rectangle.
After adding all pulses, user can create material matrix (the matrix containing permittivity and permeability values):
material = solver.create_material()
This object has methods that allows adding different shaped materials. For example:
material.set_material_rect(upper_left=(x1, y1), lower_right=(x2, y2))
material.set_material_convex(centre=(1.5, 1.5), radius=2, thickness=1, epsilon_rel=5)
A plot of the materials can be shown using the following method:
material.plot_time()
- Fix waveguide