common = struct;
opt = struct;
mqw = struct;
twlm = struct;
opt.centre_frequency=c/1550e-9; #ignore temperature dependence of lasing frequency in mode simulation (refractive index will not change much).
opt.frequency_step=0.001e12; #
opt.propagation_direction = [0;1;0]; # the propagation direction in eigenmode simulation
opt.gain_domain_ID = 3; #the domain id of the region comprising the gain medium for FEEM
opt.gain_domain_x1 = -50e-6; #the domain x min of the region comprising the gain medium for MODE
opt.gain_domain_x2 = 50e-6; #the domain x max of the region comprising the gain medium for MODE
opt.gain_domain_z1 = 0.1e-6; #the domain y min of the region comprising the gain medium for MODE
opt.gain_domain_z2 = 0.2e-6; #the domain y max of the region comprising the gain medium for MODE
mqw.uncoupled_wells = true; #assume multiple QWs are uncoupled (e.g. thick enough barriers).
#Since QWs are geometrically equal (unless external potential is added), solve only for one well to speed up calculation.
mqw.x_well = 0.24; # the x composition of the quantum well for In(1-x)Ga(x)As(y)P(1-y)
mqw.y_well = 0.79; # the y composition of the quantum well for In(1-x)Ga(x)As(y)P(1-y)
mqw.well_strain = -0.01; # the strain in the quantum well material
mqw.well_Eg_shift = 0; # [eV]
mqw.x_barrier = 0.29; # the x composition of the barrier for In(1-x)Ga(x)As(y)P(1-y)
mqw.y_barrier = 0.55; # the y composition of the barrier for In(1-x)Ga(x)As(y)P(1-y)
mqw.barrier_strain = 0.0004; # the strain the barrier barrier material
mqw.edge1_barrier_thickness = 10e-9;# [m] #the thickness of the edge of the bottom barrier.
# This can be thinner than the physical footprint in common.edge1/2_barrier_thickness options
# if the wavefunction can decay sufficiently at the edges for the boundary conditions to work properly.
mqw.edge2_barrier_thickness= 10e-9; # [m] #the thickness of the edge of the top barrier
mqw.barrier_Eg_shift = 0; # [ev]
mqw.intraband_relaxation_tau = 1e-13; #[s] # the intraband relaxation time constant
mqw.pmlactive = true; # see mqwgain docs
mqw.pmlcutoff = [1e-3,1e-3]; # see mqwgain docs
mqw.dz = 2e-10; # see mqwgain docs
mqw.lambdamin = 1.25e-6; # [m] the lower frequency limit for the generation of gain and spontaneous emission curves
mqw.lambdamax = 1.77e-6; # [m] the upper frequency limit for the generation of gain and sponatneous emission curevs [m]
# should be large enough to include the range where spontaneous emission is nonzero for different temperatures
mqw.numfreq = 21; # should be large enough to produce smooth curves which can then be interpolated
mqw.charge_density = [0.1e24, 0.5e24, 0.8e24, 0.9e24,
1.1e24, 1.3e24, 1.7e24, 2.1e24, 2.5e24,
2.9e24, 3.3e24]; #m^{-3};
mqw.temperature = [293;333]; #[K]
twlm.li_current = [0.090 ; 0.100 ; 0.110 ; 0.120 ; 0.125 ; 0.130; 0.135; 0.145; 0.200 ]; #[A] 293K the set of drive currents to sweep over
#twlm.li_current = [0.090 ; 0.210 ; 0.220 ; 0.230 ; 0.240 ; 0.250; 0.260; 0.270; 0.300 ]; #[A} 333K the set of drive currents to sweep over
twlm.current_injection_efficiency = [0.912;0.896]; #for each temperature in mqw, definition: 1 - Ileakage/Itotal at threshold
twlm.sample_rate = 1e13; # Hz the simulation bandwidth in INTERCONNECT
twlm.time_window = 25e-9; #s the simulation time window in INTERCONNECT
twlm.centre_frequency = [c/1530e-9;c/1555e-9;c/1580e-9]; # [Hz]for each temperature in mqw
twlm.tausrhn = 20e-9; #[s] Shockely-Read-Hall lifetime for electrons
twlm.tausrhp = 20e-9; #[s] Shockely-Read-Hall lifetime for electrons
twlm.Ei = 0.0; # [eV] the mid-gap energy
twlm.C0augn = 0.0; # [ m^6/s} Auger constant for electrons
twlm.Eaaugn = 0.0; #activation energy for temperature dependent Auger coefficient for electrons
twlm.C0augp = 1.722491012524473e-039; # [ m^6/s} Auger constant for holes
twlm.Eaaugp = -60e-3; #activation energy for temperature dependent Auger coefficient for holes
twlm.mun = 8500*1e-4; #[m^2/(Vs)] the mobilty of the electrons
twlm.mup = 470*1e-4; # [m^2/(Vs)] the mobilty of the holes
twlm.mode_loss = [1700;2200]; #1/m, for each temperature in mqw.temperature
twlm.facet_reflectivity_left = 0.28; #the left facet reflectivity of the FP laser
twlm.facet_reflectivity_right = 0.28; # the right facet reflectivity of the FP
twlm.temperature = 293; # the laser temperature for the simulation, must be one of the temperatures in mqw.temperature
twlm.qw_density_correction = [1.2 ,1.1]; #fitting parameter when converting from average input density to quantum well density.
#more than 1 means that density in the barriers is nonzero, so that QW density is smaller for the same average density
# Our simulation only operates with average density, which will not give accurate Auger
# recombination if used directly.
twlm.num_fit_coefficients = 7; # number of fitting coeeficients for gain and spontaneous emission cureve fits
twlm.fit_tolerance = 0.001; # tolerance for gain and spontaneous emission curve fits
twlm.num_fit_iterations = 2000; #maximum number of iterations for gain and spontaneous emission cureve fits
twlm.fit_rolloff = 0.05; #rollof fration of simulation spectrum for gain and spontaneous emission cureve fits
common.name = "Piprek2000OQE"; # the name of the project, serves as the stem for all file names generated
common.active_region_length = 269e-6; # mqw active region length
common.active_region_width = 57e-6; #mqw active region width (~= ridge width)
common.n_wells = 6; # the number of quantum wells
common.well_thickness = 6.4e-9;# [m] the thickness of each of the quantum wells
common.barrier_thickness = 5.5e-9; # [m] # the thickness of each of the barriers between the quantum wells
common.edge1_barrier_thickness = 17e-9;# [m] #the thickness of the edge of the bottom barrier
common.edge2_barrier_thickness= 17e-9; # [m] #the thickness of the edge of the top barrier
common.frequpsample = 20; # upsample factor to interpolate gain and spontaneous emission from mqw on a denser grid for twlm
common.frequpsampletype = 1; # 0 = linear interpolation, 1 = cubic spline (seems best), 2 = polynomial interpolation (Chebyshev)
fname = common.name; # name of project
jsonsave(common.name,common,opt,mqw,twlm);