The Ising Model in Python: Statistical Mechanics and Permanent Magnets

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 57

  • @muhammadhidayat1337
    @muhammadhidayat1337 3 роки тому +9

    I'm currently in undergraduate trying to understand what ising model is, and suddenly found this video. Thank you so much!

  • @charltonwake6813
    @charltonwake6813 3 роки тому +7

    "Did this in undergrad without numba"'; gave me flashbacks when I had to do Ising Models in undergrad, taking my side panels off and setting up 2 desk fans to blow into my pc in fear of it over heating. God bless numba!

  • @MrPSolver
    @MrPSolver  2 роки тому +14

    Correction: In the function I used to originally get the energy of the lattice, I should have divided the return value by 2 to avoid double counting of pairs. This doesn't effect the dynamics of the system (since this only depends on change in energy), but it slightly changes the energy plot.

    • @laika4048
      @laika4048 2 роки тому

      why did you calculate the total energy of all the lattice? I think you should only calculate energy for one site i,j and then because ergodic theorem it would be equal to the energy of all the lattice. Or i am missing something?

    • @godwinosabutey2876
      @godwinosabutey2876 2 роки тому +1

      Thank you! Very nice work and good explanation there. The Numba and the codes work incredibly well and fast. I was wondering how higher order interactions, such as those involving three bodies as opposed to two, might be implemented in a similar manner. Any advice you can give me?

  • @adwaitnaravane5285
    @adwaitnaravane5285 3 роки тому +27

    Stat mech is the most beautiful thing in Physics.

  • @ganstabreakincity
    @ganstabreakincity 3 роки тому +20

    Here before this channel has million subscribers, give it some time. Pure knowledge, I wish I can learn and collaborate with you given the time. Appreciate your work.

  • @AlessandroAmbler
    @AlessandroAmbler 3 роки тому +5

    Really cool vids man! Stumbled across one of your reddit posts and thought I reconised your face haha, subbed!

    • @MrPSolver
      @MrPSolver  3 роки тому +2

      Hahaha cheers dude 😂

  • @randomstuff9960
    @randomstuff9960 Рік тому

    Why doesn't this have more views and likes? That was simply amazing!

  • @corneldevilliers461
    @corneldevilliers461 3 роки тому +1

    Clear and straightforward, excellent resource for the topic

  • @estebanrodriguez3922
    @estebanrodriguez3922 3 роки тому +9

    This is outstanding great quality content. I've always wanted to make similar videos on youtube but PhD and academia are just too frantic! Keep it up!

  • @peabrane8067
    @peabrane8067 2 роки тому +2

    Wow that convolve operation to get the energy is so smart. I never thought of that
    Would probably gave me a 10x speedup for my PhD....

  • @CarlosRoberto-vb9gi
    @CarlosRoberto-vb9gi 3 роки тому +1

    Finally I understand the meaning of the Ising model. Thanks for this great video.

  • @deltascience7252
    @deltascience7252 3 роки тому +3

    dude I saw this on reddit and you're so underrated, i'll ask my friends to subscribe to you

  • @JonathonRiddell
    @JonathonRiddell 3 роки тому +3

    Great video! Numba seems super powerful, my code in undergrad for this similarly took forever to complete :).

  • @adityadhardwivedi634
    @adityadhardwivedi634 Рік тому

    Glad I got internship in the very first summer at my Institute under condensed matter professor just because of curiosity of phase transition that occurs in matter. I'll get to learn many things, thanks for this video, man!

  • @markushaysnielsen4885
    @markushaysnielsen4885 3 роки тому +3

    There’s that njit :-) Amazing video!

  • @AJ-et3vf
    @AJ-et3vf 3 роки тому

    Awesome! Love your videos! This channel is seriously underrated and needs more views :) very quality and enjoyable videos.

  • @ayabongandlungwana4407
    @ayabongandlungwana4407 3 роки тому +1

    Wow this video has helped me to complete my assignment, although I'm using C to simulate the results. It gave me an idea about the how results should look like and better understand for the whole Ising model.. Thank you bro

  • @westmoreland5889
    @westmoreland5889 3 роки тому +4

    waiting for your sympy video...

  • @NGBigfield
    @NGBigfield 2 роки тому

    You are an absolute genius!

  • @ahxmeds
    @ahxmeds 3 роки тому

    Great content. You are too good, Luke.

  • @chisomdim2031
    @chisomdim2031 3 роки тому

    Whao,
    You just saved a life! Thanks man!
    This is so on point👌

  • @TheAbdel
    @TheAbdel 2 роки тому

    Amazing work. Bravo !

  • @quornnugget7799
    @quornnugget7799 10 місяців тому

    Does the energy calculation allow for periodic boundary conditions on our lattice?

  • @anuranbhunia
    @anuranbhunia Рік тому

    How do I view the final spin array bitmap after the Metropolis algorithm has worked upon it?

  • @henryouang
    @henryouang 2 роки тому

    This was really great. Thanks!

  • @godwinosabutey2876
    @godwinosabutey2876 2 роки тому +1

    Thank you! Very nice work and good explanation there. The Numba and the codes work incredibly well and fast. I was wondering how higher order interactions, such as those involving three bodies as opposed to two, might be implemented in a similar manner. Any advice you can give me? @Mr. P Solver

  • @md.tohidulislam7041
    @md.tohidulislam7041 2 роки тому

    Thank you so very much. It saved a lot of time. I do appreciate your knowledge.

  • @lasinar9090
    @lasinar9090 Рік тому

    Nice work…❤

  • @J-rb9dx
    @J-rb9dx Рік тому

    Hello! Is there any way to display the new ising model with the updated spins?

  • @joyzhong7279
    @joyzhong7279 3 роки тому

    Thank you so much for the content!

  • @benburdick9834
    @benburdick9834 3 роки тому +2

    These are some great videos! I would love to see your process of putting the notebooks together.

  • @homa_ghaiedi2626
    @homa_ghaiedi2626 Рік тому

    How would you introduce the presence of an external magnetic field to this code?

  • @cscsquad1902
    @cscsquad1902 2 роки тому

    okay how do you apply it to a real system? for example, we want to study magnetic behavior of some ferromagnetic metal (ie cobalt) which has a hcp structure. In that case, you would need the exact positions of the spins. Do you have any idea?

  • @GabrielleduVent
    @GabrielleduVent 2 роки тому

    Thanks for uploading this video! I'm a python newbie who needs to run Ising models and this clarified quite a few things. Few questions:
    1. For the total initial energy, if I am using a very specific energy equation, do I need to change it from convolution to something else? My set up is that it starts with all down or up spins.
    2. Since my setup is starting with 100% down or upspin, how would that affect the probability equation (2nd line after #3/4. change state...)?
    3. How would I change the probability function to incorporate my energy equation?
    Thanks in advance!

  • @physicsguy9774
    @physicsguy9774 2 роки тому

    amazing work mate! are you a physicist?

  • @aaronthomas6434
    @aaronthomas6434 2 роки тому

    Great Video! Helping me so much for my assignment! One question, for the full Hamiltonian where you would include the external energy contribution i.e the external field multiplied by the sum over all spins, would you simply add this into the get energy function or amend it somehow within the metropolis algorithm? Kepp up the brilliant work!

  • @drissboutat6430
    @drissboutat6430 2 роки тому

    You're amazing 👏 a lot of thanks for this video

  • @sadaf6295
    @sadaf6295 3 роки тому

    Hey .. How to make code in python for.. Spin correlation function for Heisenberg spin Hamiltonian.. ??
    I am new to python.. Please give me some your suggestion

  • @حيدرالعبيدي-ج4د
    @حيدرالعبيدي-ج4د 3 роки тому +1

    Hello..I am a PhD student in physics from Iraq..I hope you can help me find codes in the Python program to study the Fe(phen) molecule to investigation of the spin crossover phenomenon by monte carlo (ising model 2D)..with many thanks to you

  • @muditgaur9736
    @muditgaur9736 11 місяців тому

    Can u do the same for Classical XY model

  • @thomsday
    @thomsday 2 роки тому

    that cuttings :D

  • @sadaf6295
    @sadaf6295 3 роки тому

    Hey.. Can you make video on Heisenberg spin hamiltonian in python like yo find eigen value and eigen vectors and what happens when N change..
    M a total Biggener in python.. But i have write a program..
    Please help me..

  • @kasraburiaey7862
    @kasraburiaey7862 2 роки тому

    Is the code complete?

  • @sagarpatel3043
    @sagarpatel3043 3 роки тому

    I do not understand. Why positive spin sample and negative spin sample are separated in the starting? If +1 means spin-up and -1 means spin-down one sample is enough. Forgive my lack of intelligence.

  • @mB-mp6io
    @mB-mp6io 3 роки тому

    where the code disappear

  • @clf400
    @clf400 3 роки тому

    Your mic is clipping. I recommend lowering the gain during recording because it sounds bad

  • @raa9558
    @raa9558 Рік тому

    Ab
    So
    Lu
    Te
    Ly
    Brilliant

  • @prikarsartam
    @prikarsartam 2 роки тому

    I get trouble with the "plt.style.use(['science','notebook', 'grid'])" part, would you kindly provide solution?

  • @Eta_Carinae__
    @Eta_Carinae__ Рік тому

    Hi! I tried more or less the same thing, except the way I noised the lattice is by randomly flipping every cell per timestep according to a bernoulli trial with the chance of success standing in for the chance to flip (I use numpy.random.binomial, and just set the no. trials to 1). Is there a reason why you flip one cell per timestep instead of a random number? Cheers!

  • @banditadas3420
    @banditadas3420 2 роки тому

    plt.style.use(['science', 'notebook','grid']) isnt working for me , its showing lot of error with OSError: 'science' not found in the style library and input is not a valid URL or path; see `style.available` for list of available styles