JuliaPhysics / ThinFilmsTools.jl

Tools for the design and characterisation of thin-films written in Julia.
MIT License
29 stars 5 forks source link

Graded layers #29

Closed feanor12 closed 3 years ago

feanor12 commented 3 years ago

Is it possible to model layers containing a linear gradient in mole fraction? For example for AlGaAs DBRs.

lnacquaroli commented 3 years ago

Could you elaborate a bit more on the design you want to make so I may provide you with a solution.

lnacquaroli commented 3 years ago

Each layer will contain one index of refraction, so you have to build a number of layers to make the linear gradient. Maybe an example of what you are looking for would be nice.

feanor12 commented 3 years ago

I was thinking about approximating the gradient with multiple layers of constant index of refraction, but was also wondering if the TMM framework provides a solution for layers with a linear change in index of refraction. In my case I am looking at DBR structures made of AlGaAs which look a bit like this:

Unit is repeated n times:

The reason for the grading is to reduce the electrical resistance.

UPDATE: I found this paper, but did not have time to go through it. https://doi.org/10.1109/JQE.2006.890394

lnacquaroli commented 3 years ago

The TM method I understand works by stacking as many layers as you need with only one index of refraction. That is the way it is constructed here.

So for your case, if I got it right, you need to repeat those bullets above n times. For those linear graded layers, you have to construct each of them by stacking several layers (up to the desired resolution in your spectrum) to build up the index profile.

I am unaware of any other methods that allow passing a continuous index of refraction function to simulate. Even in cases like rugate filters that need several layers, it is done stacking many layers.

It shouldn't be hard to implement want you are looking for. Let me know if you need any further help to get it done.

feanor12 commented 3 years ago

I had time to go over the paper mentioned above and they have a solution which can cover graded layers. They also show a comparison between the stair case approximation mentioned by you.

I'll try to use the staircase approximation for now, thank you.

lnacquaroli commented 3 years ago

Cool! Will have a look at the paper when I have some time.

lnacquaroli commented 3 years ago

I had a quick look a the article. They seem to make a custom solution for each of the graded layers, which is nice, but then involves different types of matrices inside the structure.

They also use an exponential grading for the index profile (to arrive at the Bessel equation), so I wonder what would if you create an exponential profile of indices instead of the linear distribution. Instead of creating a linear profile of indexes for the graded layers, you create an exponential profile for them instead. It seems like an artifact for the index matching between layers the differences they see. However, it would be nice to compare to experimental results as well.

Anyway, a quick example that tries to mimic fig. 5 for L = 20 nm (I hope I got right the unit cells parameters):

using ThinFilmsTools
using Plots, LaTeXStrings
pyplot(); # To see the labels of the plots from ThinFilmsTools recipes

function spectrum_linear_graded(steps, L; N=22)

    λ = 750:950 # wavelength range [nm]
    θ = [0.0] # angle of incidence [degrees]
    beam = PlaneWave(λ, θ)

    l_inc = LayerTMMO(RIdb.dummy(beam.λ, 3.6, 0.0)) # incident layer
    l_subs = LayerTMMO(RIdb.air(beam.λ)) # substrate layer

    # Unit cell
    l0 = LayerTMMO(RIdb.dummy(beam.λ, 3.6, 0.0); d=40.0) # first layer of unit cell

    # graded layer, 2nd and 4th layers
    t = L/steps .* ones(steps)
    n = range(3.0, stop=3.6, length=steps)
    l1 = [LayerTMMO(RIdb.dummy(beam.λ, n[1], 0.0); d=t[1])]
    for i in 2:steps
        push!(l1, LayerTMMO(RIdb.dummy(beam.λ, n[i], 0.0); d=t[i]))
    end
    l2 = LayerTMMO(RIdb.dummy(beam.λ, 3.0, 0.0); d=50.0) # 3rd layer
    unit_cell = [l0; reverse(l1); l2; l1];

    dbr = [l_inc; repeat(unit_cell, N, 1); l_subs]; # complete structure

    solution = tmm_optics(beam, dbr; λ0=λ0)
    return solution
end

# L = 20 nm, with 20 steps
sol_L20 = spectrum_linear_graded(20, 20);

plot(RIprofile(), sol_L20, size=(600,300), xlims=(0, 130)) # see the unit cell

let 
    plot(
        plot(Spectrum1D(),
            sol_L20.Beam.λ, sol_L20.Spectra.Rp, 
            label="",
            title="Reflectance p-wave",
            ylims=(0.0,1.0),
        ),
        size=(300,300),
    )
end

Hope that helps.

You can close the issue if you are OK with it. Thanks for sharing the article.