def Update_ElectronConcentration_Plot(self): intrinsic_defect_hole_concentration, intrinsic_defect_electron_concentration, total_hole_concentration, total_electron_concentration, intrinsic_equilibrium_fermi_energy_temperature, total_equilibrium_fermi_energy_temperature = Calculate_CarrierConcentration( EVBM = self.EVBM, \ ECBM = self.ECBM, \ energies_ValenceBand = self.energies_ValenceBand, \ gE_ValenceBand = self.gE_ValenceBand, \ energies_ConductionBand = self.energies_ConductionBand, \ gE_ConductionBand = self.gE_ConductionBand, \ defects_data = self.defects_data, \ main_compound_total_energy = self.main_compound_total_energy, \ mu_elements = self.mu_elements, \ temperature_array = self.temperature_array, \ fermi_energy_array = self.fermi_energy_array, \ volume = self.vol, \ number_species = self.number_species, \ extrinsic_defect = self.extrinsic_defect, \ extrinsic_defect_mu0 = self.extrinsic_defect_mu0, \ extrinsic_defect_deltamu = self.extrinsic_defect_deltamu, \ hole_concentrations_dict = self.hole_concentrations_dict, \ electron_concentrations_dict = self.electron_concentrations_dict, \ check_outside_bandgap = self.check_outside_bandgap, synthesis_temperature = self.synthesis_temperature ) # Update equilibrium Fermi energy self.intrinsic_equilibrium_fermi_energy = intrinsic_equilibrium_fermi_energy_temperature self.total_equilibrium_fermi_energy = total_equilibrium_fermi_energy_temperature self.carrier_concentration_intrinsic_defect_electron_plot.set_ydata( intrinsic_defect_electron_concentration) if self.extrinsic_defect != "None": self.carrier_concentration_total_electron_plot.set_ydata( total_electron_concentration) self.carrier_concentration_plot_canvas.draw()
def Initialize_ElectronConcentration_Plot(self): intrinsic_defect_hole_concentration, intrinsic_defect_electron_concentration, total_hole_concentration, total_electron_concentration, intrinsic_equilibrium_fermi_energy_temperature, total_equilibrium_fermi_energy_temperature = Calculate_CarrierConcentration( EVBM = self.EVBM, \ ECBM = self.ECBM, \ energies_ValenceBand = self.energies_ValenceBand, \ gE_ValenceBand = self.gE_ValenceBand, \ energies_ConductionBand = self.energies_ConductionBand, \ gE_ConductionBand = self.gE_ConductionBand, \ defects_data = self.defects_data, \ main_compound_total_energy = self.main_compound_total_energy, \ mu_elements = self.mu_elements, \ temperature_array = self.temperature_array, \ fermi_energy_array = self.fermi_energy_array, \ volume = self.vol, \ number_species = self.number_species, \ extrinsic_defect = self.extrinsic_defect, \ extrinsic_defect_mu0 = self.extrinsic_defect_mu0, \ extrinsic_defect_deltamu = self.extrinsic_defect_deltamu, \ hole_concentrations_dict = self.hole_concentrations_dict, \ electron_concentrations_dict = self.electron_concentrations_dict, \ check_outside_bandgap = self.check_outside_bandgap, \ synthesis_temperature = self.synthesis_temperature ) # Update equilibrium Fermi energy self.intrinsic_equilibrium_fermi_energy = intrinsic_equilibrium_fermi_energy_temperature self.total_equilibrium_fermi_energy = total_equilibrium_fermi_energy_temperature try: self.carrier_concentration_intrinsic_defect_electron_plot.remove() self.carrier_concentration_total_electron_plot.remove() except: pass self.carrier_concentration_intrinsic_defect_electron_plot, = self.carrier_concentration_plot_drawing.semilogy( self.temperature_array, intrinsic_defect_electron_concentration, 'o-', color='green', label='Electron') if self.extrinsic_defect != "None": self.carrier_concentration_total_electron_plot, = self.carrier_concentration_plot_drawing.semilogy( self.temperature_array, total_electron_concentration, 'o-', markerfacecolor='none', markeredgecolor='green', color='green', ls='--', label='Electron (With Dopant)') self.carrier_concentration_plot_drawing.legend(loc=1) self.carrier_concentration_plot_canvas.draw()