################################################################# # MODE_simulation_endfire.lsf # # Run with GPW.lms simulation file. # Calculates the power coupling between the bulk waveguide and # a highly focused beam, for different values of numerical # apertures of the beam. # Plots the coupling efficiency versus NA and outputs the data # to an .ldf data file. # # Copyright 2016 Lumerical Solutions Inc. ################################################################# # Calculate nominal GPW waveguide mode switchtolayout; structures; select("GPW"); set("height",100e-9); set("gap",30e-9); set("antenna_width",5000e-9); findmodes; m="mode1"; neff=getdata(m,"neff"); x=getdata(m,"x"); y=getdata(m,"y"); E2=getelectric(m); ?"Effective index is"+num2str(neff); image(x*1e9,y*1e9,E2,"x (nm)","y (nm)","|E|^2, neff="+num2str(neff)); vecx=find(x,-200e-9):find(x,200e-9); vecy=find(y,-100e-9):find(y,200e-9); x=x(vecx); y=y(vecy); E2=E2(vecx,vecy); image(x*1e9,y*1e9,E2,"x (nm)","y (nm)","|E|^2, neff="+num2str(neff)); # End fire coupling with focused beam NA=linspace(0.5,0.9,5); coupling_strength=matrix(length(NA)); for (i=1:length(NA)) { cleardcard; setanalysis("NA",NA(i)); beam_name = createbeam; tmp=overlap("mode1",beam_name) ; coupling_strength(i)=tmp(2); } plot(NA,coupling_strength*100,"Input beam NA","Power coupling (%)"); MODE_NA = NA; MODE_trans_vs_NA = coupling_strength; savedata("MODE_transmission_vs_NA",MODE_NA,MODE_trans_vs_NA);