A fully vectorial finite difference waveguide mode solver. Based on the algorithm of Zhu and Brown
Modes for the Masses (Massless?)
Fed up with relying on expensive proprietary software for your electromagnetic waveguide research? philsol might just be the package for you. This is a fully vectorial finite difference waveguide mode solver. In a world where high performance hardware is cheaper than specialist software (including certain commercial packages which may or may not rhyme with my code), philsol throws elegence and sophistication out of the window and replaces it with brute force.
This is a direct Python implimentaion of the algorithm found in the paper: 'Full-vectorial finite-difference analysis of microstructured optical fibres', by Zhu and Brown.
Warning: I haven't thoroughly tested so be wary and check the results are sensible...
New Warning: Original paper by Zhu and Brown is in gaussian not S. I. units. This means that the constructed H fields must be corrected by a factor of $\mu_0 c$ for calculations in S.I units.
- Clone or download, and install with
python3 setup.py install(you may need to install python-setuptools)
- If you are new to python, the important bit is the function in core.py which can be run by itself.
- Commented example projects can be found in the examples directory.
- To run the examples, first install philsol to your Python environment (see above)
- Solves vector Maxwell(Helmholtz) equations in 2D for arbitary refractive index profile.
- Return x and y componants of electric field.
- philsol can handle anisotropic refractive indices with diagonal tensor.
- Currently hard coded with conductive boundary.
- Now includes choice of eigensolver: the default scipy.sparse solver based on ARPACK and Petsc (but you will need a working install of slepc4py and petsc4py)
- Extra field componants Ez, Hx, Hy, Hz can be calculated from construct module
- Periodic boundary conditions
- The quickest way of importing geometry is with a bitmap image
- See examples/example_image.py for an example in loading .bpm images
- See examples/example_build.py for an example in building geometry using PIL/Pillow
- More intelligent geometry aproximation (e.g pixel interpolation on curved boundaries)
- More boundry condition options Bloch, PML...
- GPU eigensolving
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size philsol-0.22-py3-none-any.whl (6.8 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size philsol-0.22.tar.gz (6.0 kB)||File type Source||Python version None||Upload date||Hashes View|