gusucode.com > PPML_v1.2 > examples/MetasurfaceReconfiguration_AOM2016_fig3.m
close all; clear all; clc % Calculates and plots the handedness-preserving reflectance spectra % at x = 0 of Fig. 3f in "Metasurface reconfiguration through lithium ion % intercalation in a transition metal oxide", % Advanced Optical Materials XXX, 2016 % % Simone Zanotto, Firenze, nov. 2016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is free software distributed under the BSD licence (see the % containing folder). % However, shall the results obtained through this code be included % in an academic publication, we kindly ask you to cite the source % website and, if applicable, the following paper: % % Simone Zanotto et al., "Metasurface reconfiguration through lithium ion % intercalation in a transition metal oxide", % Advanced Optical Materials", to be published % (2016) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% addpath('PPML_root') % to be replaced by the proper path numlambda = 51; % Number of lambda points lambda = linspace(1200,1700,numlambda); % lambda in nm theta = 15; % polar angle in degrees (never set 0) phi = 0; % azimuthal angle in degrees %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Some structure parameters a = 820; % lattice spacing halfnpw = 10; % plane wave truncation. % WARNING! this is a computation-dependent parameter. % inaccurate simulation may result from wrong settings % material properties epsOxide = 5; % approximate non-dispersive values epsPt = -25 + 1i*70; % epsAl = -180 + 1i*35; % epssup = 1; epssub = epsPt; % super- and sub-strate permeabilities L = 2; % number of internal layers (patterned Al, switching oxide) % main cycle over wavelength for i = 1:numlambda i % air | antennas | sw oxide | Pt f1 = [ 0.76 1 ]; % fraction of B in A f2 = [ 0.60 1 ]; % fraction of B in A f3 = [ 0.30 1 ]; % fraction of B in A d = [1500 150 480 200 ]; % nm epsA = [ 1 1 ]; % material A epsB = [ epsAl epsOxide ]; % material B k0 = 2*pi/lambda(i); % wavevector in nm ^-1 kparx = k0*sin(theta*pi/180)*cos(phi*pi/180); kpary = k0*sin(theta*pi/180)*sin(phi*pi/180); % calling PPML function "rxx_2d_Lshape" [rrss,rrsp,rrps,rrpp] = rxx_2d_Lshape(a,L,... epssup,epssub,epsA,epsB,f1,f2,f3,d,... halfnpw,k0,kparx,kpary); rss(i) = rrss; rpp(i) = rrpp; rsp(i) = rrsp; rps(i) = rrps; end %% rRR = (rpp-rss-1i*(rps+rsp))/2; rLL = (rpp-rss+1i*(rps+rsp))/2; rLR = (rpp+rss-1i*(rps-rsp))/2; rRL = (rpp+rss+1i*(rps-rsp))/2; total = (abs(rRR).^2 + abs(rLL).^2 + abs(rLR).^2 + abs(rRL).^2)/2; hand_pres = (abs(rRR).^2 + abs(rLL).^2)./(2*total); plot(lambda,hand_pres,'k') hold on