Dear all,
I want to calculate current-voltage curve for graphene. For this purpose, I
wrote the following code, but I need to ensure that it works properly or not.
Another question is that can I use tkwant to do these computations.
Thank you in advance for your help
#current-voltage####
def fermi_dirac(energy, mu, T):
return 1 / (np.exp((energy - mu) / (k_B * T)) + 1)
for voltage in voltages:
mu_left = voltage / 2
mu_right = -voltage / 2
# Compute the current using the Landauer-Büttiker formula
I = 0
# Loop over energy intervals and compute contributions
for e1, e2, g1, g2 in zip(energies[:-1], energies[1:],
conductance[:-1], conductance[1:]):
# Compute Fermi-Dirac distributions at e1 and e2 for left and right
reservoirs
f_left_e1 = fermi_dirac(e1, mu_left, temperature)
f_right_e1 = fermi_dirac(e1, mu_right, temperature)
f_left_e2 = fermi_dirac(e2, mu_left, temperature)
f_right_e2 = fermi_dirac(e2, mu_right, temperature)
# Current calculation using trapezoidal integration
delta_E = e2 - e1
I += ((g1 + g2) / 2) * ((f_left_e1 - f_right_e1) + (f_left_e2 -
f_right_e2)) / 2 * delta_E
# Convert from eV to Amperes
current.append(I * e/h * 1e6) # Multiply by e to convert the current to
Amperes
return current
Masoumeh Alihosseini