QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: jaco on June 29, 2013, 05:44

Title: calculate the average voltage drop along z axis
Post by: jaco on June 29, 2013, 05:44
dear professor:
      i want to know how to calculate the average voltage drop along z axis.  how the calculate the z axis length. and how the calculate the voltage drop for a .nc file which contain many device configuration.

      Best regards!


jaco
Title: Re: calculate the average voltage drop along z axis
Post by: Anders Blom on June 29, 2013, 10:46
http://quantumwise.com/publications/tutorials/mini-tutorials/98-i-v-curve-and-voltage-drop
Title: Re: calculate the average voltage drop along z axis
Post by: jaco on June 30, 2013, 03:48
 Thanks!
 Maybe there is a misunderstanding on my expression. I want to calculate the voltage drop along Z axis, especially, not only for average of XY plane, but for a part of XY plane(where the atoms stay). as when a big lattice constant in XY plane may disturb the calculation when the voltage is used on the electrodes. is that right?
Title: Re: calculate the average voltage drop along z axis
Post by: Anders Blom on July 1, 2013, 00:40
I would not think the lattice constant is a problem if you are using a ribbon or similar. When averaged over the XY plane, the plot of the voltage drop vs. Z shows a more smooth shape that tends to show quite well where the resistance is located in Z. But of course you can easily plot Vdrop(x0,y0,z) as function of z by calling evaluate(x0,y0,z) on the voltage drop object (obtained by subtracting the electrostatic potential at bias minus the zero-bias potential). Like so:

Code: python
# Read configurations from NC files
device0 = nlread("zerobias.nc", DeviceConfiguration)[-1]
device = nlread("finite_bias.nc", DeviceConfiguration)[-1]
# Evaluate the voltage drop as a grid object
v0 = ElectrostaticDifferencePotential(device0)
v = ElectrostaticDifferencePotential(device)
voltage_drop = v-v0
# Point in XY plane
x0 = 5*Angstrom
y0 = 5*Angstrom
# 100 points along the z axis; cell_z is the length of the central region
cell_z = device._cell()[2][2].inUnitsOf(Angstrom)
for z in numpy.linspace(0,cell_z,100):
    Vz = voltage_drop.evaluate(x0,y0,z*Angstrom)
    print z,Vz.inUnitsOf(eV)