#################################################### # File: ring_resonator_LC_setup.lsf # # Description: This file sets up orientation distribution # of LCs covering the ring resonator # # Copyright 2013 Lumerical Solutions #################################################### r = 3.3e-6; #radius of the ring wLC = 4.8e-6*2; #width of LC region hLC = 0.18e-6; #height of LC region alignment = 0; #0 => LC aligned to waveguide, 1 => LC aligned vertically # delete existing attribute select('LC attribute_center'); delete; # define x/y/z x = linspace(wLC/2,-wLC/2,100); y = linspace(-r,r,150); z = 0; X = meshgrid3dx(x,y,z); Y = meshgrid3dy(x,y,z); Z = meshgrid3dz(x,y,z); n = matrix(length(x),length(y),length(z),3); # define the orientation function if(alignment == 0) { n(1:length(x),1:length(y),1:length(z),1) = Y/sqrt(X^2+Y^2); n(1:length(x),1:length(y),1:length(z),2) = -X/sqrt(X^2+Y^2); n(1:length(x),1:length(y),1:length(z),3) = 0; } if(alignment == 1) { n(1:length(x),1:length(y),1:length(z),1) = 0; n(1:length(x),1:length(y),1:length(z),2) = 0; n(1:length(x),1:length(y),1:length(z),3) = 1; } # add LC import grid attriute addgridattribute("lc orientation",n,x,y,z); # center at z=0 set("name","LC attribute_center"); setnamed("LC attribute_center","nx",35); # set resolution setnamed("LC attribute_center","ny",21); # set resolution ### LC top (+y) arm ### # delete existing attribute select('LC attribute_top'); delete; # define x/y/z x = linspace(-wLC/2,wLC/2,100); y = linspace(r,7e-6,100); z = 0; X = meshgrid3dx(x,y,z); Y = meshgrid3dy(x,y,z); Z = meshgrid3dz(x,y,z); n = matrix(length(x),length(y),length(z),3); # define the orientation function if(alignment == 0) { n(1:length(x),1:length(y),1:length(z),1) = 1; n(1:length(x),1:length(y),1:length(z),2) = 0; n(1:length(x),1:length(y),1:length(z),3) = 0; } if(alignment == 1) { n(1:length(x),1:length(y),1:length(z),1) = 0; n(1:length(x),1:length(y),1:length(z),2) = 0; n(1:length(x),1:length(y),1:length(z),3) = 1; } # add LC import grid attriute addgridattribute("lc orientation",n,x,y,z); # center at z=0 set("name","LC attribute_top"); setnamed("LC attribute_top","nx",15); # set resolution setnamed("LC attribute_top","ny",10); # set resolution ### LC bottom (-y) arm### # delete existing attribute select('LC attribute_bottom'); delete; # define x/y/z x = linspace(-wLC/2,wLC/2,100); y = linspace(-r,-7e-6,100); z=0; X = meshgrid3dx(x,y,z); Y = meshgrid3dy(x,y,z); Z = meshgrid3dz(x,y,z); n = matrix(length(x),length(y),length(z),3); # define the orientation function if(alignment == 0) { n(1:length(x),1:length(y),1:length(z),1) = 1; n(1:length(x),1:length(y),1:length(z),2) = 0; n(1:length(x),1:length(y),1:length(z),3) = 0; } if(alignment == 1) { n(1:length(x),1:length(y),1:length(z),1) = 0; n(1:length(x),1:length(y),1:length(z),2) = 0; n(1:length(x),1:length(y),1:length(z),3) = 1; } # add LC import grid attriute addgridattribute("lc orientation",n,x,y,z); # center at z=0 set("name","LC attribute_bottom"); setnamed("LC attribute_bottom","nx",15); # set resolution setnamed("LC attribute_bottom","ny",10); # set resolution