/* * METRIC-Application: * A three layer TFLN slab waveguide, anisotropic core, mode analysis */ #include #include #include #include"metric.h" #define Wavel 1.55 // vacuum wavelength #define Wgpnc 1.0 // cladding: air #define Wgpno 2.1837 // LN core, ordinary refractive index #define Wgpne 2.1220 // LN core, extraordinary refractive index #define Wgpns 1.4483 // SiO2 substrate (buffer), refractive index #define Wgpd 0.450 // core thickness /mum #define Theta 0.0 // propagation angle /deg, 0.0: along crystal Y-axis // #define Wgpd 1.03 // ... an alternative hybrid configuration // #define Theta 45.0 // TflnCut Cut = Xcut; // TFLN configuration: Xcut, Zcut /* calculate guided modes, write profile data */ int main() { // define the three-layer TFLN slab waveguide TflnWaveguide wg(Cut, Wgpd, Wgpns, Wgpno, Wgpne, Wgpnc, Wavel); // adjust propagation angle wg.turnto(Theta); // container for the set of guided modes TflnModeArray ma; // modal analysis of the configuration, 1: suppress log output modeanalysis(wg, ma, 0); // profile plots, display interval Interval disp(wg.hx(0)-2.0, wg.hx(1)+2.0); // for all found modes ... for(int i=0; i<=ma.num-1; ++i) { // log effective index, propagation constant, and polarization ratio fprintf(stderr, "[%d] neff = %g, beta = %g/mum, ", i, ma(i).neff, ma(i).beta); if(ma(i).polratio < 0.25) fprintf(stderr, " TM (%.2g)\n", ma(i).polratio); else if(ma(i).polratio > 0.75) fprintf(stderr, " TE (%.2g)\n", ma(i).polratio); else fprintf(stderr, " XX (%.2g)\n", ma(i).polratio); // modes are power normalized fprintf(stderr, " P = %g\n", ma(i).power()); // a vector plot of all electric and magnetic components ma(i).plot(disp, 500, '_', '_', dig10(i), dig1(i)); // plots of individual components // ma(i).plot(EY, REP, disp, 500, dig10(i), dig1(i), 'L'); // ma(i).plot(HX, REP, disp, 500, dig10(i), dig1(i), 'L'); // ma(i).plot(EZ, IMP, disp, 500, dig10(i), dig1(i), 'L'); // access local profile components // Complex f = ma(i).field(EY, Wgpd/2.0); } fprintf(stderr, "\n"); return 0; }