Skip to content

Example: Multilayer stack 2 (DBR), angle and wavelength

Leandro Acquaroli edited this page Nov 27, 2019 · 3 revisions

Now let's see another example of a DBR (same as Example 5 in fact) when the properties change with the wavelength and the angle of incidence.

The complete code can be found here.

Load modules

using Plots, LaTeXStrings
pyplot(reuse=false, grid=false)
using ThinFilmsTools

Define beam

λi = 200 # intial wavelength [nm]
λf = 5000 # final wavelength [nm]
λ = LinRange(λi, λf, λf-λi) # wavelength range [nm]
θi = 0
θf = 90
θ = LinRange(0, 90, θf-θi)
beam = PlaneWave(λ, θ)

Build up the system

l0 = LayerTMMO(RIdb.air(beam.λ))
l1 = LayerTMMO(RIdb.dummy(beam.λ, 1.45, 0.0); type=:OT, d=1.0/4.0)
l2 = LayerTMMO(RIdb.dummy(beam.λ, 3.45, 0.0); type=:OT, d=1.0/4.0)
layers = [l0, l1, l2, l1, l2, l1, l2, l1, l2, l0]

Reference wavelenth

λ0 = 700.0

Solve

sol = tmm_optics(beam, layers; λ0=λ0, emfflag=true, h=10, pbgflag=true)

Optional examples to plot results

We first plot the reflectance for p-TM and s-TE waves:

plot(Spectrum2D(),
        sol.beam.λ, sol.beam.θ, sol.Spectra.Rp,
        title="Reflectance, p-TM", clims=(0.0, 1.0),
)
gui()
plot(Spectrum2D(),
        sol.beam.λ, sol.beam.θ, sol.Spectra.Rs,
        title="Reflectance, s-TE", clims=(0.0, 1.0),
)
gui()

Example 6: DBR 2

Example 6: DBR 2

Now the EMF for both types of polarisation, for normal incidence and for 15°:

plot(EMF2D(),
     sol.beam.λ, sol.Misc.ℓ, log10.(sol.Field.emfp[:,1,:]),
     title="Log EMF intesnsity, p-TM")
gui()

plot(EMF2D(),
     sol.beam.λ, sol.Misc.ℓ, log10.(sol.Field.emfs[:,1,:]), 
     title="Log EMF intesnsity, s-TE")
gui()

aux1 = Utils.findClosest(sol.Beam.θ, 15.0)
plot(TMMOplotEMF2D(), 
     sol.beam.λ, sol.Misc.ℓ, log10.(sol.Field.emfp[:,aux1,:]), 
     title="Log EMF intesnsity, p-TM, θ = 15 [°]")
gui()

plot(TMMOplotEMF2D(), 
     sol.beam.λ, sol.Misc.ℓ, log10.(sol.Field.emfs[:,aux1,:]), 
     title="Log EMF intesnsity, s-TE, θ = 15 [°]")
gui()

Example 6: DBR 2

Example 6: DBR 2

Example 6: DBR 2

Example 6: DBR 2

Plot the refractive index profile

plot(RIprofile(), sol; plotemf=true)
gui()

Example 6: DBR 2

Example 6: DBR 2

And at last the photonic dispersion:

plot(PBGDispersion2D(), sol.Bloch; wave=:p)
gui()

plot(PBGDispersion2D(), sol.Bloch; wave=:s)
gui()

plot(PBGDispersion2Dalt(), sol.Bloch)
gui()

Example 6: DBR 2

Example 6: DBR 2

Example 6: DBR 2

Clone this wiki locally