def __getattr__(self, attrname): # only used for unknown attributes. if attrname == "n": try: return self.n except: return self.n_interpolated if attrname == "k": try: return self.k except: return self.k_interpolated if attrname == "electron_affinity": try: return ParameterSystem().get_parameter(self.material_string, attrname) except: # from http://en.wikipedia.org/wiki/Anderson's_rule and GaAs values return (0.17 + 4.59) * q - self.valence_band_offset - self.band_gap if attrname == "electron_mobility": try: return ParameterSystem().get_parameter(self.material_string, attrname) except: return calculate_mobility(self.material_string, False, self.Nd, self.main_fraction) if attrname == "hole_mobility": try: return ParameterSystem().get_parameter(self.material_string, attrname) except: return calculate_mobility(self.material_string, True, self.Na, self.main_fraction) if attrname == "Nc": return 2 * (2 * pi * self.eff_mass_electron_Gamma * m0 * kb * self.T / h**2)**1.5 if attrname == "Nv": # Strictly speaking, this is valid only for III-V, zinc-blend semiconductors mhh = self.eff_mass_hh_z mlh = self.eff_mass_lh_z Nvhh = 2 * (2 * pi * mhh * m0 * kb * self.T / h**2)**1.5 Nvlh = 2 * (2 * pi * mlh * m0 * kb * self.T / h**2)**1.5 return Nvhh + Nvlh if attrname == "ni": return np.sqrt(self.Nc * self.Nv * np.exp(-self.band_gap / (kb * self.T))) if attrname == "radiative_recombination": inter = lambda E: self.n(E)**2 * self.alphaE(E) * np.exp(-E / ( kb * self.T)) * E**2 upper = self.band_gap + 10 * kb * self.T return 1.0 / self.ni**2 * 2 * pi / (h**3 * c**2) * quad( inter, 0, upper)[0] kwargs = { element: getattr(self, element) for element in self.composition } kwargs["T"] = self.T return ParameterSystem().get_parameter(self.material_string, attrname, **kwargs)
def __getattr__(self, attrname): # only used for unknown attributes if attrname == "n": try: return self.n except: return self.n_interpolated if attrname == "k": try: return self.k except: return self.k_interpolated if attrname == "electron_affinity": try: return ParameterSystem().get_parameter(self.material_string, attrname) except: # from http://en.wikipedia.org/wiki/Anderson's_rule and GaAs values return (0.17 + 4.59) * q - self.valence_band_offset - self.band_gap if attrname == "electron_mobility": try: return ParameterSystem().get_parameter(self.material_string, attrname) except: return calculate_mobility(self.material_string, False, self.Nd, self.main_fraction) if attrname == "hole_mobility": try: return ParameterSystem().get_parameter(self.material_string, attrname) except: return calculate_mobility(self.material_string, True, self.Na, self.main_fraction) kwargs = { element: getattr(self, element) for element in self.composition } kwargs["T"] = self.T return ParameterSystem().get_parameter(self.material_string, attrname, **kwargs)
pi = constants.pi h = constants.h kb = constants.kb m0 = constants.electron_mass vacuum_permittivity = constants.vacuum_permittivity # The default material is a set of minimum properties that are used for the layers unless otherwise stated DefaultMaterial = material("GaAs")(T=293) DefaultProperties = { 'band_gap': DefaultMaterial.band_gap, # J 'electron_affinity': DefaultMaterial.electron_affinity, # J 'eff_mass_electron_Gamma': DefaultMaterial.eff_mass_electron_Gamma, # relative to m0 'eff_mass_hh_z': DefaultMaterial.eff_mass_hh_z, # relative to m0 'eff_mass_lh_z': DefaultMaterial.eff_mass_lh_z, # relative to m0 'electron_mobility': calculate_mobility("GaAs", 0, 1), # m2 V-1 s-1 'hole_mobility': calculate_mobility("GaAs", 1, 1), # m2 V-1 s-1 'electron_minority_lifetime': 3e-6, # s 'hole_minority_lifetime': 2.5e-7, # s 'permittivity': 12.9, # relative to epsilon0 'electron_auger_recombination': 1e-42, # m6 s-1, 'hole_auger_recombination': 1e-42, # m6 s-1 'radiative_recombination': 7.2e-16, # m3 s-1 'Nd': 1, # m-3 'Na': 1, # m3 'sn': 1e6, # m s-1 'sp': 1e6 } # m s-1 def CreateDeviceStructure(name,