/* * METRIC-Application: * metal-dielectric interface, complex permittivity, * surface plasmon polariton, mode analysis */ #include #include #include #include"metric.h" Complex Ped(1.0, 0.0); // cover: air Complex Pem(-14.5, -1.2); // metal, permittivity double Wavel = 0.633; // vacuum wavelength /* waveguide definition */ cWaveguide wgdef() { // no intermediate layer cWaveguide g(0); // positions of the dielectric interfaces g.hx(0) = 0.0; // refractive index values g.n(1) = cepston(Ped); g.n(0) = cepston(Pem); // the vacuum wavelength g.lambda = Wavel; return g; } /* calculate the bound modes, write profile data */ int main() { cModeArray ma; // define the waveguide cWaveguide wg = wgdef(); // display window Interval disp(wg.hx(0)-2.0, wg.hx(wg.nx)+2.0); // inspect the refractive index profile wg.plot(disp, '0', '0'); // find the TM modes confined to the interface modeanalysis(wg, TM, ma); // mode data & profile plots, principal field component for(int i=0; i<=ma.num-1; ++i) { fprintf(stderr, "[%d] %s: neff = ", i, ma(i).ids); ma(i).neff.nice(stderr); fprintf(stderr, ", Lp = %g\n", ma(i).Lp()); ma(i).plot(HY, REP, disp, 500, dig10(i), dig1(i), 'L'); ma(i).plot(HY, IMP, disp, 500, dig10(i), dig1(i), 'V'); ma(i).plot(HY, MOD, disp, 500, dig10(i), dig1(i), 'L'); } fprintf(stderr, "Ok.\n"); return 0; }