31

**General Questions and Answers / Re: Why can not calculate the ElectronDensity of Bulkconfiguration using ATK-SE?**

« **on:**November 13, 2012, 21:16 »

Let's see if these numbers make sense:

Output:

These are some pretty small volumes .. so this number of electrons is the number per a small volume element .. does it make sense if i now multiply this by device width and length to get total?

Code

` diffDensity1 = nlread(fName, ElectronDifferenceDensity, object_id="diffDensity[vg-0.25000][vds0.50000]")[0]`

diffDensity2 = nlread(fName, ElectronDifferenceDensity, object_id="diffDensity[vg-0.20000][vds0.50000]")[0]

diffDensity3 = nlread(fName, ElectronDifferenceDensity, object_id="diffDensity[vg0.00000][vds0.50000]")[0]

s1 = diffDensity1[:, :, :].sum()

s2 = diffDensity2[:, :, :].sum()

s3 = diffDensity3[:, :, :].sum()

print s1, s2, s3, s2-s1, s3-s2

# Find the volume elements.

dX1, dY1, dZ1 = diffDensity1.volumeElement()

dX2, dY2, dZ2 = diffDensity2.volumeElement()

dX3, dY3, dZ3 = diffDensity3.volumeElement()

length_unit1 = dX1.unit()

length_unit2 = dX2.unit()

length_unit3 = dX3.unit()

# Calculate the volume of the volume element.

dV1 = numpy.dot(dX1, numpy.cross(dY1,dZ1)) * length_unit1**3

dV2 = numpy.dot(dX2, numpy.cross(dY2,dZ2)) * length_unit2**3

dV3 = numpy.dot(dX3, numpy.cross(dY3,dZ3)) * length_unit3**3

print "volumes", dV1, dV2, dV3

numE1 = s1*dV1

numE2 = s2*dV2

numE3 = s3*dV3

print "Total # electrons: ", numE1, numE2, numE3

Output:

Code

`2.49328980937 1/Bohr**3 2.62952644165 1/Bohr**3 3.18669569532 1/Bohr**3 0.136236632277 1/Bohr**3 0.557169253673 1/Bohr**3`

volumes 0.341388054851 Bohr**3 0.341388054851 Bohr**3 0.341388054851 Bohr**3

Total # electrons: 0.851179358199 0.897688917092 1.08789984483

These are some pretty small volumes .. so this number of electrons is the number per a small volume element .. does it make sense if i now multiply this by device width and length to get total?