Dear Adel,
Thank you for your quick reply and also for providing some example code!
You created a 3D system, then a 2D system with same in plane hoppings (2d plane cut trough the wire)
and the projected the in plane current density onto these hoppings via kwant.plotter.current.
What I want is not displaying the in plane current, but the current density penetrating the 2D cut.
Following the Kwant logic I would have to project onto the out of plane hoppings. Therefore I
need to create a system with out of plane hoppings, which automatically is 3D. But in this case
kwant.plotter.current does not work any more.
My idea in my first method was, to specify "where" in kwant.operator.Current with where= cut
and cut return site0.pos[0]==x_cut and site1.pos[0]==x_cut+1 (so specifying the out of plane x hoppings).
I created a 2D system with just onsite terms and no hoppings, so that the current density in x direction is
maped on the onsites (I cannot map on the x hoppings because yz 2D system has no x hoppings)
Then using kwant.plotter.map to display this.
But I suspect something is wrong with this.
In my method 2 I plotted the J_z component instead of the J_x component. I updated the minimal example accordingly
https://github.com/Quaki96/KwantQuestion_2D-current-density-profile-through-3D-nanowire-cut/blob/e6d772b05af68db65130e10f14a4dfd62fccd374/current_density_minimal_example.ipynb
My Question in particular is, whether my second method of doing things is correct, because in the case of no magnetic
field, the current density does not vanish, which makes me somewhat sceptical.
PS. If a reader of this thread is interested in an small extension of Adels example with norbs=2 the following thread would be
useful: https://mail.python.org/archives/list/kwant-discuss@python.org/thread/LJFBAXU4ZIJ7LNZRLCUG6HVHR4UITAUY/
Best,
Felix