################################################################## # (n, k) Material setup for graded index fiber (FEEM): # This script sets up the (n,k) material for simulation of the graded index fiber # Copyright 2018 Lumerical Solutions, Inc. ################################################################## x_max = 10e-6; x_min = -10e-6; N_x = 160; y_max = 10e-6; y_min = -10e-6; N_y = 160; z_max = 0.3e-6; z_min = -0.3e-6; N_z = 2; x = linspace(x_min, x_max, N_x); y = linspace(y_min, y_max, N_y); z = linspace(z_min, z_max, N_z); X_um = meshgrid3dx(x,y,z)/1e-6; Y_um = meshgrid3dy(x,y,z)/1e-6; Z = meshgrid3dz(x,y,z); INDEX_R = sqrt(4.0*(1.0-(X_um^2+Y_um^2)/40.0^2)); INDEX_I = INDEX_R*0.0; #no imaginary part index_profile = rectilineardataset("index_profile",x,y,z); index_profile.addattribute("n", INDEX_R + 1i*INDEX_I); visualize(index_profile); select("FEEM::nk import"); importdataset(index_profile); set("selected attribute","n"); set("data assignment behaviour","override");