Commit abe25178 authored by Lucas Laplanche's avatar Lucas Laplanche
Browse files

nettoyage code

parent 98052511
...@@ -5,8 +5,8 @@ import numpy as np ...@@ -5,8 +5,8 @@ import numpy as np
# physical constants # physical constants
C = 299792458.0 # speed of light [m/s] C = 299792458.0 # speed of light [m/s]
Q = 1.602176634e-19 # Electron Charge [C] 1C = 1A*1s Q = 1.602176634e-19 # electron Charge [C] 1C = 1A*1s
M0 = 9.1095e-31 # Electron rest mass [kg] M0 = 9.1095e-31 # electron rest mass [kg]
HREV = 6.582119569e-16 # Reduced Plank constant [eV.s] HREV = 6.582119569e-16 # Reduced Plank constant [eV.s]
HRJ = 1.054571817e-34 # Reduced Plank constant [J.s] HRJ = 1.054571817e-34 # Reduced Plank constant [J.s]
HEV = 4.135667696e-15 # Plank constant [eV.s] HEV = 4.135667696e-15 # Plank constant [eV.s]
......
...@@ -3,12 +3,16 @@ import numpy as np ...@@ -3,12 +3,16 @@ import numpy as np
from globals import C, HEV, NALOX, N0, REFRA_DATA_550, T from globals import C, HEV, NALOX, N0, REFRA_DATA_550, T
from sqw_lengyel_absorption import gaas_sqw_absorption_at_wavelength from sqw_lengyel_absorption import gaas_sqw_absorption_at_wavelength
from time import time as tm
def algaas_super_lattice_refractive_index(super_lattice, electric_field, wavelength, temperature=T, lengyel=True, only_real=False): def algaas_super_lattice_refractive_index(super_lattice, electric_field, wavelength, temperature=T, lengyel=True, only_real=False):
# wavelength in [m]
# temperature in [K]
# lengyel : activate the Lengyel model for the calculation of QW absorption
if only_real: if only_real:
lengyel = False lengyel = False
...@@ -47,7 +51,7 @@ def algaas_super_lattice_refractive_index(super_lattice, electric_field, wavelen ...@@ -47,7 +51,7 @@ def algaas_super_lattice_refractive_index(super_lattice, electric_field, wavelen
# qw thickness # qw thickness
thickness = super_lattice.at[i, 'thickness'] thickness = super_lattice.at[i, 'thickness']
if lengyel: if lengyel :
k = gaas_sqw_absorption_at_wavelength(al, thickness, electric_field, wavelength) k = gaas_sqw_absorption_at_wavelength(al, thickness, electric_field, wavelength)
else: else:
k = 0. k = 0.
...@@ -93,88 +97,6 @@ def algaas_super_lattice_refractive_index(super_lattice, electric_field, wavelen ...@@ -93,88 +97,6 @@ def algaas_super_lattice_refractive_index(super_lattice, electric_field, wavelen
return super_lattice return super_lattice
def algaas_refractive_index(al, electric_field, wavelength, quantum_well=False, quantum_well_thickness=0., confinement_barrier_al=0., na=0., nd=0.):
# layer is a quantum well -> Lengyel model
if quantum_well:
# refractive index value
n = afromovitz_varshni_real_algaas_refractive_index(0., wavelength)
k = gaas_sqw_absorption_at_wavelength(confinement_barrier_al, quantum_well_thickness, electric_field, wavelength)
k = -100*k*wavelength/(4*np.pi)
n += 1j*k
# layer is NOT a quantum well
else:
# refractive index value
n = afromovitz_varshni_real_algaas_refractive_index(al, wavelength)
if (na == 0.) & (na == nd):
pass
# N doped
elif nd > na:
n += -1j*5e-18*nd*1e-4*wavelength/(4*np.pi)
# P doped
elif na > nd:
n += -1j*11.5e-18*na*1e-4*wavelength/(4*np.pi)
return n
def afromovitz_real_algaas_refractive_index(al, wavelength):
# Refractive index of AlGaAs for all compositions
# as a function of temperature and for wavelengths
# below bandgap or slightly above bandgap (Afromovitz model)
# References:
# M.A.Afromovitz J.P.Kim et al, Optics Letters, V32 N5, p536(2007)
# al content [1]
# wavelength in [m]
# T [°C]
t = T -273.15 # [K] -> [°C]
wavelength = wavelength/1e-6
e0 = 3.65 +0.871*al +0.179*al**2 # [eV]
ed = 36.1 -2.45*al # [eV]
e_gamma = 1.424 +1.266*al +0.26*al**2 -((1 -al)*0.5405 +al*0.885)*1e-3 *(t -25) # [eV]
ef = np.sqrt(2*e0**2 -e_gamma**2) # [eV]
eta = np.pi*ed/(2*e0**3*(e0**2 -e_gamma**2))
ma = eta*(ef**4 -e_gamma**4)/(2*np.pi)
mb = eta*(ef**2 -e_gamma**2)/np.pi
e = 1.239852066/wavelength # [eV]
e_gamma_p = e_gamma -0.025
k = 0.35
if e>e_gamma:
n = np.sqrt(1 +ma +mb*e_gamma_p**2 +eta*e_gamma_p**4*np.log((ef**2 -e_gamma_p**2)/(e_gamma**2 -e_gamma_p**2))/np.pi) +k*(e -e_gamma_p)
else:
n = np.sqrt(1 +ma +mb*e**2 +eta*e**4*np.log((ef**2 -e**2)/(e_gamma**2 -e**2))/np.pi)
n = n*(1 +((1 -al)*0.5405 +al*0.885)*1e-3*(t -25)/(4*e_gamma))
return n
def afromovitz_simplified_real_algaas_refractive_index(al, wavelength):
#e_g = 1.424 +1.266*al +0.26*al**2
#e_0 = 2.6 +3*e_g/4
e_0 = 3.65 +0.871*al +0.179*al**2
e_d = 36.1 -2.45*al
e = HEV*C/wavelength
frac = e_0*e_d/(e_0**2 -e**2)
n = np.sqrt(1 +frac)
return n
def afromovitz_varshni_real_algaas_refractive_index(al, wavelength, temperature=T): def afromovitz_varshni_real_algaas_refractive_index(al, wavelength, temperature=T):
...@@ -240,16 +162,6 @@ def almuneau_complex_550C_algaas_refractive_index(al, wavelength, temperature=55 ...@@ -240,16 +162,6 @@ def almuneau_complex_550C_algaas_refractive_index(al, wavelength, temperature=55
return n + 1j * k return n + 1j * k
def ioffe_algaas_permittivity(al, high_frequency=True):
if high_frequency:
mu = 10.89 - 2.73 * al
else:
mu = 12.90 - 2.84 * al
return mu
def oxidation(super_lattice, eam_mesa=True, vcsel_mesa=False): def oxidation(super_lattice, eam_mesa=True, vcsel_mesa=False):
...@@ -286,29 +198,3 @@ def confinement_barrier_mean_al_content(super_lattice, i): ...@@ -286,29 +198,3 @@ def confinement_barrier_mean_al_content(super_lattice, i):
return al return al
def confinement_barrier_mean_al_content_array(name_array, al_array, thickness_array, i):
name = name_array[i +1]
al = 0.
total_thickness = 0.
while 'barrier' in name:
al += al_array[i +1] * thickness_array[i +1]
total_thickness += thickness_array[i +1]
i += 1
name = name_array[i +1]
al = al / total_thickness
return al
def find_nearest_index(value, array):
# array must be a numpy array
idx0 = (np.abs(array -value)).argmin()
return idx0
...@@ -3,5 +3,141 @@ import super_lattice_structure as sls ...@@ -3,5 +3,141 @@ import super_lattice_structure as sls
def structure_boolean_arg_dict(config):
# boolean setup
# overwrite default config
if 'vcsel_only' in config :
arg_dict = {
'vcsel_only': True,
'eam_only': False,
'air' : True,
'top_contact' : False,
'top_eam_dbr' : False,
'eam_alox' : False,
'eam_mqw' : False,
'bypass_dbr' : False,
'bot_eam_dbr' : False,
'middle_contact' : True,
'shared_dbr' : True,
'vcsel_alox' : True,
'vcsel_mqw' : True,
'bot_vcsel_dbr' : True,
'substrate' : True
}
elif 'eam_only' in config :
arg_dict = {
'vcsel_only': False,
'eam_only': True,
'air' : True,
'top_contact' : True,
'top_eam_dbr' : True,
'eam_alox': False,
'eam_mqw' : True,
'bypass_dbr': False,
'bot_eam_dbr' : True,
'middle_contact' : True,
'shared_dbr' : True,
'vcsel_alox' : False,
'vcsel_mqw' : False,
'bot_vcsel_dbr' : False,
'substrate' : True
}
elif 'eam_mqw_only' in config :
arg_dict = {
'vcsel_only' : False,
'eam_only' : True,
'air' : False,
'top_contact' : False,
'top_eam_dbr' : False,
'eam_alox' : False,
'eam_mqw' : True,
'bypass_dbr': False,
'bot_eam_dbr' : False,
'middle_contact' : False,
'shared_dbr' : False,
'vcsel_alox' : False,
'vcsel_mqw' : False,
'bot_vcsel_dbr' : False,
'substrate' : False
}
else:
arg_dict = {
'vcsel_only': False,
'eam_only': False,
'air' : True,
'top_contact' : True,
'top_eam_dbr' : True,
'eam_alox' : True,
'eam_mqw' : True,
'bypass_dbr' : False,
'bot_eam_dbr' : True,
'middle_contact' : True,
'shared_dbr' : True,
'vcsel_alox' : True,
'vcsel_mqw' : True,
'bot_vcsel_dbr' : True,
'substrate' : True
}
return arg_dict
def eam_classic():
arg_dict = structure_boolean_arg_dict('eam_only')
return sls.structure_eam_vcsel(**arg_dict)
def eam_bypass():
arg_dict = structure_boolean_arg_dict('eam_only')
arg_dict['bypass_dbr'] = True
return sls.structure_eam_vcsel(**arg_dict)
def eam_alox(): def eam_alox():
return sls.structure_eam_vcsel(eam_alox=True, bypass_dbr=True, eam_only=True) arg_dict = structure_boolean_arg_dict('eam_only')
\ No newline at end of file arg_dict['eam_alox'] = True
arg_dict['bypass_dbr'] = True
return sls.structure_eam_vcsel(**arg_dict)
def eam_vcsel_classic():
arg_dict = structure_boolean_arg_dict('eam_vcsel')
return sls.structure_eam_vcsel(**arg_dict)
def eam_vcsel_bypass():
arg_dict = structure_boolean_arg_dict('eam_vcsel')
arg_dict['bypass_dbr'] = True
return sls.structure_eam_vcsel(**arg_dict)
def eam_vcsel_alox():
arg_dict = structure_boolean_arg_dict('eam_vcsel')
arg_dict['eam_alox'] = True
arg_dict['bypass_dbr'] = True
return sls.structure_eam_vcsel(**arg_dict)
def vcsel():
arg_dict = structure_boolean_arg_dict('vcsel_only')
return sls.structure_eam_vcsel(**arg_dict)
\ No newline at end of file
...@@ -10,14 +10,13 @@ import optic as op ...@@ -10,14 +10,13 @@ import optic as op
def structure_eam_vcsel(vcsel_only = False, def structure_eam_vcsel(vcsel_only = False,
eam_only = False, eam_only = False,
eam_mqw_only = False,
air = True, air = True,
top_contact = True, top_contact = True,
top_eam_dbr = True, top_eam_dbr = True,
eam_alox = False, eam_alox = False,
eam_mqw = True, eam_mqw = True,
bypass_dbr = True, bypass_dbr = False,
bot_eam_dbr = True, bot_eam_dbr = True,
middle_contact = True, middle_contact = True,
shared_dbr = True, shared_dbr = True,
...@@ -56,47 +55,6 @@ def structure_eam_vcsel(vcsel_only = False, ...@@ -56,47 +55,6 @@ def structure_eam_vcsel(vcsel_only = False,
# speeds are in [nm/h] # speeds are in [nm/h]
# prioritary boolean setup
# overwrite default config
if vcsel_only:
air = True
top_contact = False
top_eam_dbr = False
eam_alox = False
eam_mqw = False
bypass_dbr = False
bot_eam_dbr = False
middle_contact = True
shared_dbr = True
vcsel_alox = True
vcsel_mqw = True
bot_vcsel_dbr = True
substrate = True
elif eam_only:
air = True
top_contact = True
top_eam_dbr = True
eam_mqw = True
bot_eam_dbr = True
middle_contact = True
shared_dbr = True
vcsel_alox = False
vcsel_mqw = False
bot_vcsel_dbr = False
substrate = True
elif eam_mqw_only:
air = False
top_contact = False
top_eam_dbr = False
eam_alox = False
eam_mqw = True
bot_eam_dbr = False
middle_contact = False
shared_dbr = False
vcsel_alox = False
vcsel_mqw = False
bot_vcsel_dbr = False
substrate = False
# super lattice # super lattice
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment