MATLAB/ COMSOL scripts for studying point-gap topology / braiding in photonic crystals. I use COMSOL server and automate scripts using MATLAB. This repo was helpful: https://github.com/xiumingzhang/photonic-bandgap-comsol-matlab
- Open COMSOL server from local computer
- Run
comsol_init.m
script (used https://www.youtube.com/watch?v=7E7g0SHc8c8&t) - You can make your geometry etc. in COMSOL. Then go files 'Compact history' (otherwise code is very long!) and save as model file for MATLAB
- Copy and paste from the matlab file what you need. You can edit things such as
model.param.set('epsa', num2str(epsa));
in order to automate changing variables
The script script_band_diagram_and_braid.m
uses helper functions solve_band_diagram_and_braid.m
, plot_band_diagram_and_braid.m
, save_band_diagram_and_braid.m
, helper_sweepkx_upd.m
and helper_sweepky_upd.m
to plot the eigenvalue braids for some loop or path in the Brillouin zone for a 2D photonic crystal model which is in the models folder. It also plots the the complex band diagram (which is the braid projection from the (Im(w), Re(w)) plane)