stackrt - Script command
Calculates the reflection and transmission of a plane wave through a multi-layer stack using the analytic transfer matrix method. This function returns the fraction of transmitted and reflected power (Ts, Tp, Rs, Rp), and the complex reflection and transmission coefficients (ts, tp, rs, rp), for both S and P polarizations. All results are returned in a single dataset as a function of frequency and incidence angle (optional).
To calculate the fields within the stack, please see stackfield.
Syntax |
Description |
---|---|
RT = stackrt(n,d,f); |
Arguments for a stack with Nlayers: n: Refractive index of each layer. Size is either Nlayers, or Nlayers x length(f) if dispersive materials are involved. d: Thickness of each layer. Size is Nlayers. f: Frequency vector. |
RT = stackrt(n,d,f,theta); |
theta: Angle vector, in degrees. Optional. |
Example
# Use stackrt and stackfield to calculate the reflection, transmission and field distribution from a 5 layer stack.
f = linspace(c/400e-9, c/1000e-9,100); # frequency vector
theta = 0:1:45; # angle vector
d = [0; 200e-9; 300e-9; 400e-9; 0]; # 5 layers (including air on top, bottom
n1 = [1; 1.5; 2.5; 1.5; 1]; # refractive index of each layer (non-dispersive)
# get RT using non-dispersive index data, and theta=0
RT1 = stackrt(n1,d,f);
field1 = stackfield(n1,d,f);
# alternate refractive index vector, for dispersive materials
nf = length(f);
nd = length(d);
n2 = matrix(nd,nf);
n2(1,1:nf) = 1; # air
n2(2,1:nf) = getfdtdindex("SiO2 (Glass) - Palik",f,min(f),max(f));
n2(3,1:nf) = getfdtdindex("Si (Silicon) - Palik",f,min(f),max(f));
n2(4,1:nf) = getfdtdindex("SiO2 (Glass) - Palik",f,min(f),max(f));
n2(5,1:nf) = 1; # air
# get RT using dispersive data (n2), and theta from 0 to 45 deg
RT2 = stackrt(n2,d,f,theta);
field2 = stackfield(n2,d,f,theta);
# open data visualizer
visualize(RT1);
visualize(RT2);
visualize(field1);
visualize(field2);
# make simple plots
plot(RT1.lambda*1e6,RT1.Rp,RT1.Rs,RT1.Tp,RT1.Ts,"wavelength (um)","Power","non-disperisive, theta=0");
legend("Rp","Rs","Tp","Ts");
image(RT2.lambda*1e6,RT2.theta,RT2.Rp,"wavelength (um)","theta (deg)","Rp, dispersive example");
See Also
Functions, stackfield, multilayer stack calculations, getfdtdindex, visualize