-
Notifications
You must be signed in to change notification settings - Fork 5
Example: Brewster's angle
Brewster's angle is the angle of incidence at which light, with a particular polarization, is perfectly transmitted through a transparent dielectric surface, with no reflection. When unpolarized light is incident at this angle, the light that is reflected from the surface is therefore perfectly polarized.
Here we calculate the reflectance spectra for both polarizations and compare how they behave for the different angles of incidence. Example took from here.
The complete code can be found here.
We will use the Plots
and main modules for calculation and plotting:
using Plots, LaTeXStrings
pyplot()
using ThinFilmsTools
λ = [1064.]
θi = 0.01
θf = 90
θ = LinRange(θi, θf, 901)
beam = PlaneWave(λ, θ)
Here, we notice that λ
is outside the range, but instead of specifying the nλ0
parameter in the second layer, we use the one by default, since there is only one wavelength. Also, we simulate the systems with three layers although we are actually interested in the interface of the first two, for which put different thicknesses in the last two.
layers = [ LayerTMMO(RIdb.dummy(beam.λ, 1., 0.)),
LayerTMMO(RIdb.dummy(beam.λ, 1.5, 0.); d=10.),
LayerTMMO(RIdb.dummy(beam.λ, 1.5, 0.)) ]
λ0 = 510.0
After defining the parameters we call the main function for it tmm_optics
and store the results in sol
:
sol = tmm_optics(beam, layers; λ0=λ0)
We plot the reflectance for both polarizations and the ratio:
plot(SpectrumAngle1D(),
sol.beam.θ, [sol.Spectra.Rp[1,:], sol.Spectra.Rs[1,:],
sol.Spectra.Rs[1,:]./sol.Spectra.Rp[1,:]./1000.],
label=["p-wave" "s-wave" "(Rs/Rp)/1000"],
line=([:solid :dash :dashdot]),
xlims=(sol.beam.θ[1], sol.Beam.θ[end]), yaxis=("Reflectance", (0.,0.2)))
gui()
And we plot the refractive index profile
plot(RIprofile(), sol)
gui()
Where we can see the last two layers having the same index of refraction, but different thicknesses, since the last one is the substrate, treated as a semi-infinite medium.