-
Notifications
You must be signed in to change notification settings - Fork 5
Example: Effective medium approximations 1
Here we will show some of the functionalities of the effective medium approximations (EMA) supported by ThinFilmsTools.jl.
The complete code of this example can be found here.
First, we load the modules:
using Plots, LaTeXStrings
pyplot()
using ThinFilmsTools
Then, we define a single wavelength for a two-phases system to run the examples. We choose a silicon matrix as host material filled with air pores:
λ = [632.8]
n = [RIdb.air(λ) RIdb.silicon(λ)]
p = LinRange(0,1,100)
We call the functions to obtain the effective indices of refraction for the Looyenga, Bruggeman, Maxwell-Garnett and Monecke EMA, using spheres inclusions. The comprehension lists allows to build the neff
arrays for each porosity:
neff_looyenga = [RI.looyenga([p[i] 1.0-p[i]], n)[1] for i in eachindex(p)]
neff_bruggeman = [RI.bruggeman(p[i], n)[1] for i in eachindex(p)]
neff_maxwell = [RI.maxwell([p[i] 1.0-p[i]], n)[1] for i in eachindex(p)]
neff_monecke = [RI.monecke(p[i], n)[1] for i in eachindex(p)]
Finally, we plot the results:
plot(p, real.(neff_looyenga), label="Looyenga", line=(:solid))
plot!(p, real.(neff_bruggeman), label="Bruggeman", line=(:dash))
plot!(p, real.(neff_maxwell), label="Maxwell", line=(:dashdot))
plot!(p, real.(neff_monecke), label="Monecke", line=(3.0, :solid))
xaxis!("Porosity, %")
yaxis!("Effective dielectric permittivity")
gui()
By default we let the depolarisation factors be equal to 1/3 for spheres. For more information on how to change this option, check out the help of each function.
Another mixing rule mostly used for liquids mixtures is the Lorentz-Lorenz EMA. We try to reproduce Figure 1 from Thin Solid Films 519 (2011) 2994-2997.
lss = [:solid :dash :dashdot :dot :solid]
lww = [ones(1,4) 3.0]
plt = plot();
f = [0.0,0.25,0.5,0.75,1.0]
ϵg = complex.(1.0:0.005:1.8)
ϵₘ = 2.1*ones(length(ϵg))
n = sqrt.([ϵg ϵₘ])
for i in eachindex(f)
neff = RI.lorentz_lorenz(f[i], n)
plot!(plt, real.(ϵg), real.(neff.^2), label="f = $(f[i])", line=(lww[i], lss[i]))
end
xaxis!("Guest dielectric constant, ϵg")
yaxis!("Lorentz-Lorenz effective permittivity")
gui()