2D Schrodinger Equation Numerical Solution in PYTHON

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024

ความคิดเห็น • 65

  • @sarcasticsteve7622
    @sarcasticsteve7622 3 ปีที่แล้ว +39

    You're a hero. I never got how the heck animations in matplotlib really worked, but now I'm goona include a sick rotating gif into my thesis presentation!

    • @jcmschott1895
      @jcmschott1895 2 ปีที่แล้ว

      Hell yeah, mate! Same by me!

  • @Maniclout
    @Maniclout 3 ปีที่แล้ว +9

    This channel is super underrated

  • @lukather1236
    @lukather1236 3 ปีที่แล้ว +6

    Man I love you, this series is the best content I've seen for years

  • @fredesch3158
    @fredesch3158 3 ปีที่แล้ว +4

    How did I understand that. It looks so complicated, but you made it sound so easy, man you really have some skill, congrats.

  • @aaronflores1106
    @aaronflores1106 ปีที่แล้ว +2

    I'm currently conducting research for 2 Physicists in my department, one of them being the chair. While taking Intro to Quantum...This video is SO valuable, I have to do the Schod Eqn in Cylindrical taking into consideration Rho and Z...this video will be SO helpful! Thank you!

  • @matthewkinahan3945
    @matthewkinahan3945 3 ปีที่แล้ว +6

    Your editing has me dying 😂

  • @brianc5526
    @brianc5526 3 ปีที่แล้ว +6

    Spicy scipy

  • @josephjones2211
    @josephjones2211 3 ปีที่แล้ว +3

    Another good video! Very easy to follow

  • @munozariasjm
    @munozariasjm 2 ปีที่แล้ว

    Damn, by far one of the best live physics coding I have ever seen!

  • @silverback6929
    @silverback6929 ปีที่แล้ว +2

    Hello, it's a nice video. But there is some small mistakes the Psy vector dimension is (N-2)² and the matrice ((N-2)²* (N-2)²) and in the final equation Delta_x² should be replaced by Delta_x²*Delta_y² (given your last definition of the matrice D)

  • @generalrockstar6779
    @generalrockstar6779 5 หลายเดือนก่อน

    This was an excellent instruction. Thanks a lot! :)

  • @bobingstern4448
    @bobingstern4448 2 ปีที่แล้ว +2

    How can I set the initial starting condition for psi0? I want to experiment with travelling waves and such

  • @CliveWolfe
    @CliveWolfe 3 ปีที่แล้ว

    The fact that you have an asd.txt file means that I have to sub :D also a great video

  • @bobingstern4448
    @bobingstern4448 2 ปีที่แล้ว +1

    I might have phrased my last question wrong but how can I do it so that I can choose an energy level using 2 parameters like nx and my rather than just n?

  • @frankkoslowski6917
    @frankkoslowski6917 2 ปีที่แล้ว

    Don't know what version Python you use,
    but to get the animation working at all,
    def init() had to be removed,
    and an adequate projection declaration provided as such:
    fig, ax = plt.subplots(subplot_kw={'projection': '3d'})

  • @oneman7039
    @oneman7039 ปีที่แล้ว

    hey can I ask (sorry if you mentioned it in vid), how come you didnt include the 1/dx or 1/dy in your definition of D in the code?

  • @Painting_Nicely_With_Me
    @Painting_Nicely_With_Me 2 ปีที่แล้ว +1

    Thanks Mr. P Solver for this video. Can you please tell me why your results is not in agreement with analytical results? In analytical method for the same problem we have psi = 2/L * sin(nx*pi*x/L)*sin(ny*pi*y/L). If we plot this psi for versus nx and ny, we cannot see any agreement between analytical and numerical methods. Thanks

    • @MrPSolver
      @MrPSolver  2 ปีที่แล้ว +3

      It has to do with the degeneracy of eigenstates. In 2D, some (different) eigenstates correspond to the same energy, so any linear combination of these eigenstates is also an eigenstates. What you're seeing in the video is a linear combination of these states (e.g nx=1, ny=2 AND nx=2, ny=1)

    • @Painting_Nicely_With_Me
      @Painting_Nicely_With_Me 2 ปีที่แล้ว +2

      @@MrPSolver Thanks a lot for your reply. I understood it. Is there a way to get exact eigenstates in accordance with analytical method for degenerated states?

  • @Th3RandommMan
    @Th3RandommMan 2 ปีที่แล้ว +1

    So I get the time evolution in 1D, but with this setup, how would you go about with time evolution?

  • @aaronflores1106
    @aaronflores1106 ปีที่แล้ว

    I have one question, we are supposed to solve the Schrod Eqn cylindrically our Schrod Eqn becomes discretized in 3 places instead of 2 like you have here. 2 of 3 of those can be resolved using your Kronecker Sum Method, can we also do a second Kronecker sum to incorporate a third component? Thank you!

  • @kaouthartlili3409
    @kaouthartlili3409 ปีที่แล้ว

    Hi, thanks for the video, are you familiar with variational method for the resolution of excitons' 2D Schrodinger equation ?

  • @diegoespinoza3492
    @diegoespinoza3492 2 ปีที่แล้ว

    Hi, nice video, do you have any written reference you can recommend me? I don't understand spoken English, but written English I do 👉👈(specifically about the matrix approximation method , I checked the references you left, but I didn't find reports about those works).

  • @keitakeita7890
    @keitakeita7890 3 ปีที่แล้ว +2

    great content !
    So ,i thinks you will do machine learning applied in physics

  • @simonedicataldo633
    @simonedicataldo633 2 ปีที่แล้ว

    This is a really great video! Does anyone know of a similar treatment for the problem in spherical coordinates? The shape of the Laplacian changes, so should also the operator, but there's a lot of interesting problems that you can think of in spherical coordinates (such as the quantum rotator).

  • @danielgitlin2711
    @danielgitlin2711 3 ปีที่แล้ว +2

    Is this computational method commonly used in research?

    • @Ryan_Perrin
      @Ryan_Perrin 2 ปีที่แล้ว +2

      A bit late, but yes and no. Clearly the 2D infinite well is not studied, necessarily, in a research setting. But the fundamentals here are used in many tight-binding or exact diagonalization code (plus some others I am sure). So, this particular examples is not exactly used in research, but can easily be extended to it.

  • @shaneebe
    @shaneebe 2 ปีที่แล้ว

    hi, man
    I kind of stuck with the holland single vortex (1980) wind modeling in python for cyclones... can u do a video on this equation and numerical presentation ??? plz :)

  • @abhishekdodda5641
    @abhishekdodda5641 ปีที่แล้ว

    Very nice videos

  • @hanswurst2630
    @hanswurst2630 3 ปีที่แล้ว +1

    Why is only Dx used in the Kronecker sum and in the calculations?

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว +2

      I should've really called it "D". It just represents the derivative in one dimension. However, in two dimensions, D+I (Kronecker sum) becomes the derivative in x, and I+D becomes the derivative in y.

    • @hanswurst2630
      @hanswurst2630 3 ปีที่แล้ว +1

      ​@@MrPSolverOh I get it know, I should have checked the Kronecker product definition before asking. Thanks a lot for doing these videos, I already learned a lot.

  • @mkurahman
    @mkurahman 3 ปีที่แล้ว

    what about dx in the matrix why is it not here

  • @ericsanchezllorente5326
    @ericsanchezllorente5326 3 ปีที่แล้ว

    It really helped! Thanks!

  • @padraicheberlein4101
    @padraicheberlein4101 3 ปีที่แล้ว

    Quantum physics, programming AND the Grateful Dead?!?!? I feel like we might be long lost brothers...

  • @justofanelli7155
    @justofanelli7155 3 ปีที่แล้ว

    Great video, keep it up

  • @ZCTandZSC
    @ZCTandZSC 3 ปีที่แล้ว

    I have one question, why did you use Dx + Dx (kronsum) instead of Dx + Dy (kronsum)? Did i miss anything? TQVM

    • @flynnxd8229
      @flynnxd8229 3 ปีที่แล้ว

      Dx = D kronprod I
      and
      Dy = I kronprod D, giving Dx + Dy == D kronsum D

    • @ZCTandZSC
      @ZCTandZSC 3 ปีที่แล้ว

      @@flynnxd8229 Thank you very much for your kind reply. I thought it is " Dx kronsum Dy = Dx kronprod Identity + Identity kronprod Dy". Is there any direct relationship between the Dx and Dy so that Dx == D and Dy == D.

  • @jiayichen6490
    @jiayichen6490 2 ปีที่แล้ว

    Thanks for your video. But I tried to use potential ((0.5 * x ** 2) * (0.5 * y ** 2)), the 2D square potential, as an extension from your previous 1D video, the energy doesn't seem to be correct. Could you please tell me why? Did I use the wrong potential? Thanks

    • @MrPSolver
      @MrPSolver  2 ปีที่แล้ว

      It seems you have a "*" in between the two terms but I think you need a "+" in other words 0.5x^2 + 0.5y^2

    • @jiayichen6490
      @jiayichen6490 2 ปีที่แล้ว

      @@MrPSolver Thanks for your reply. But sadly it doesn't work neither :(. The energy doesn't return (1, 2, 2, 3, 4, 4, 5 ......). I am really curious why

    • @MrPSolver
      @MrPSolver  2 ปีที่แล้ว

      @@jiayichen6490 likely because you don't have a true harmonic potential (you are still inside an infinite square well).

    • @jiayichen6490
      @jiayichen6490 2 ปีที่แล้ว

      @@MrPSolver ​ @Mr. P Solver In case I already changed the get_potential function to harmonic, just like you did to the gaussion potential. How do I still have anything to do with infinite well (which has potential 0)?

    • @MrPSolver
      @MrPSolver  2 ปีที่แล้ว

      @@jiayichen6490 Because you're enforcing that the wave function goes to zero at the boundaries, which essentially means that V= +infinity at these points

  • @mahdijafari8960
    @mahdijafari8960 6 หลายเดือนก่อน

    ❤❤

  • @catandlanguages7254
    @catandlanguages7254 2 ปีที่แล้ว

    Hi, great video, however your matrix appears to be missing exp(ikL) element in the top-right and bottom-left corners of the matrix (by Bloch's theorem). At least this is how it was taught to me, applying PBC. Do you use some other kind of boundary condition?

    • @paulryan94
      @paulryan94 2 ปีที่แล้ว +4

      Bloch's theorem is applicable to periodic potentials. Here he is not solving for a periodic potential.

  • @ricardocesardasilvagomes9549
    @ricardocesardasilvagomes9549 2 ปีที่แล้ว

    Espetacular!

  • @stefanofornetti9696
    @stefanofornetti9696 3 ปีที่แล้ว

    I tried to use the central potential -1/(x**2 + y**2) to obtain the hydrogen atom eigenstates but I receive a convergence error from the function eigsh. Any idea how to solve this?

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว +7

      You're probably running into a divergence issue at the origin (x=y=0) you may want to use the potential -1/(x^2 + y^2 + eps) where eps is some small number (say 1e-5) to prevent problems from occuring.

    • @stefanofornetti9696
      @stefanofornetti9696 3 ปีที่แล้ว

      It worked perfectly! Thank you and keep up the amazing work

  • @rexplanalp5872
    @rexplanalp5872 3 ปีที่แล้ว

    Hi, I’m currently in a physics major and I am trying to learn computational physics, and I would like to understand this technique better. Can you recommend a book or paper which explains this technique?

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว +1

      Unfortunately most of this stuff I found on random places online; I have not yet discovered a book that consolidates it all in one place. For starting with 1 dimensional problems, I'd check out these notes here:
      people.inf.ethz.ch/arbenz/ewp/Lnotes/lsevp.pdf

    • @rexplanalp5872
      @rexplanalp5872 3 ปีที่แล้ว

      @@MrPSolver I apologize I should have been more specific. I was wondering if you had some resource covering the specific 2D method you performed in this video, particularly where you take your NxN array of xy points and collapse it into a N^2 x 1 column etc.

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว +1

      Oh I stole that from some guy on Reddit 😂. There's likely a source for it somewhere but it's probably buried deep within some text book. Here's a Wikipedia page on the topic:
      en.m.wikipedia.org/wiki/Kronecker_sum_of_discrete_Laplacians

    • @rexplanalp5872
      @rexplanalp5872 3 ปีที่แล้ว

      @@MrPSolverCool I'll check it out, thanks for the replies. Keep up the awesome work!

    • @nothingisreal6345
      @nothingisreal6345 ปีที่แล้ว +1

      @@MrPSolver then write it :-) might not make you rich though.

  • @vitiknot_imvitiknot_im
    @vitiknot_imvitiknot_im ปีที่แล้ว +1

    the code in this video is the same as one in Wai Kui Wong "Solving 2D Time Independent Schrodinger Equation Using Numerical Method"

    • @MRev-iu2ml
      @MRev-iu2ml 7 หลายเดือนก่อน

      This video's upload date predates that article's