You are correct, Li. Of course the periodic boundaries introduce additional
modes, no idea how I forgot that. And the number of modes matches nicely
with the analytical results of the free electron model too.

I plotted the square of the absolute value of the wave function in the last
script. For plane waves, this is of course a constant value and what that
plot showed was numerical artefacts. Plotting, for example, the real part
of the wave function gives nice results. (so *np.real(wf(0)[0]) *instead of
*np.abs(wf(0)[0])**2*)

Thanks for the help!

Kristjan


On Wed, Mar 8, 2017 at 7:09 PM, Li Mingkai <mingka...@gmail.com> wrote:

> I think your code is correct now. It's reasonable that the propagating
> mode changes from 1 to 3 because of the finite periodic width W in stead of
> W=0. Please check free electron model in one dimentional case. With
> incresing energy, the number of bands at k=0 increases from 1 at energy=0
> to 3 at above a certain energy.
>
> And the wavefuction is reasonable in this case. For nanowire case, the
> transverse wavefunction should be 0 at the edge. Instead of that, your
> wavefunction shows the symmetric at the both edge. The high energy
> wavefunction is combined by several modes. That makes more complex.
>
> The transmission per unit width can intergrate transmission by ky from -pi
> to pi in
>
> kwant.smatrix(sys, energies[j], [kys[i]])
>
> and then divide by width W. It equals to a intergration of Brillouin zone
> from -pi/W to pi/W as mentioned in https://www.mail-archive.
> com/kwant-discuss@kwant-project.org/msg00873.html. But in kwant, ky must
> be set in range (-pi,pi).
>
> Mingkai Li
>
> On Tue, Mar 7, 2017 at 3:02 PM, Kristjan Eimre <kristjanei...@gmail.com>
> wrote:
>
>> Hello Anton and Li,
>>
>> Thanks for the replies, they have helped me a lot.
>>
>> Li, I agree with you that my initial code was incorrect: the scattering
>> regions were periodic in y direction but the leads were not.
>>
>> I tried to recreate your idea here: http://pastebin.com/DYUvx0YS
>>
>> When potential in scattering region is set to 0, then indeed the
>> transmission starts directly from 0.0, so there is no transversal
>> quantization (for the first mode). But I have one problem with this
>> approach: the number of propagating modes changes with increasing energy
>> (at roughly energy 4.1 eV, the num_prop jumps from 1 to 3). In ideal case,
>> we should have a single mode at all energies.
>>
>> Additionally, I tried to plot the wave function squared for the system,
>> but the results seem wrong. For lower energies and ky=0, the plot shows
>> nice plane waves, but for energy 3+ eV, it turns into something else.
>> Perhaps WF plotting doesn't work for periodic systems?
>>
>> Would it be possible for a expert to take a quick look at the code and
>> point out any obvious mistakes? Currently it creates the scattering region
>> with y direction periodicity and uses wraparound on it. Then creates lead
>> with x and y periodicity and uses wraparound on it, keeping the x
>> periodicity. And finally the leads are attached to the system. Is this the
>> correct way?
>>
>> Best,
>> Kristjan
>>
>>
>>
>>
>> On Sat, Mar 4, 2017 at 11:56 PM, Li Mingkai <mingka...@gmail.com> wrote:
>>
>>> Hi Kristjan,
>>>
>>> I'm working on 3D periodic boundary problem recently. Your code really
>>> helps me a lot. I tested your code. It seems working with nanowire leads
>>> instead of a periodic repeat in y direction. I changed the leads setting a
>>> little as following. A translational symmetry along y direction was added
>>> on lead. Then wraparound it with keep=0
>>>
>>> lead = kwant.Builder(kwant.TranslationalSymmetry((-a, 0),lat.vec((0,
>>> W))))
>>> lead[(lat(0,j) for j in range(W))] = 4*t
>>> lead[lat.neighbors(1)] = -t
>>> sys.attach_lead(wraparound(lead,keep=0))
>>> sys.attach_lead(wraparound(lead,keep=0).reversed())
>>>
>>> It seems working as a periodic boundary condiction. I judge it by
>>> settiing all potential to 0 in the scatting region. Then the tramsmittion
>>> with energy above 0 should be 1. Without above changes, the transmission at
>>> a little positive energy is 0 and the it will jump to 1 at a little higher
>>> energy. It implies the transversal energy quantization.
>>>
>>> I tested the ky under the above flat potential condition. The period of
>>> ky is 2Pi instead of 2Pi/L. I don't know why. Maybe some expert can explain
>>> it.
>>>
>>> Anyway, I'm just a newbie with kwant and trying to solve some bulk
>>> problem with it. I'm not sure about the above opinion. Let's discuss and
>>> figure out how it works in peroidic boundary condiction.
>>>
>>> --
>>> Mingkai Li
>>>
>>
>>
>
>
> --
> Mingkai Li
>

Reply via email to