Laplace's Equation with Arbitrary Boundary Conditions in PYTHON

Поделиться
HTML-код
  • Опубликовано: 6 апр 2021
  • LINK TO TUTORIAL SERIES: • Playlist
    In this video we use the python package NUMBA to solve for the electric potential under any boundary conditions. While this includes conditions at the edges, it also include places of fixed potential within the boundaries: this is impossible to tackle analytically. By the end of the video. I show how one can create their own image of a potential configuration (for example, a complicated geometrical plate capacitor, such as the accordion geometry seen in ATLAS), and how one can the compute the potential, and electric field everywhere.
    Code located in the link below. Go to "Python Metaphysics tutorials" and then "Vid 8"
    github.com/lukepolson/youtube...

Комментарии • 52

  • @danielgitlin2711
    @danielgitlin2711 3 года назад +10

    i can't believe the quanity and quality of your content, truly awesome

  • @danwhalen3182
    @danwhalen3182 3 года назад +17

    You've posted like 8 awesome videos in a week. I love them, keep it up!

  • @znswanderer
    @znswanderer 3 года назад +13

    Wow! This is quite impressive. Even more impressive is the sheer number of high quality videos in the last couple of days you have posted. Keep up the good work!

  • @csjfd1764
    @csjfd1764 9 месяцев назад +1

    I remembered the MIT physics course, with Prof. Walter Lewis! Your lessons using Python and the anaconda package are excellent!
    I´m from Brasil, Aracaju-SE.

  • @munozariasjm
    @munozariasjm 2 года назад +2

    Again, these videos are the most interesting ones I have seen on computational methods. Thanks!

  • @moskova100
    @moskova100 3 года назад +5

    What a brilliant tutorial, well presented and methodical - the diss track in its own right is a work of art! XD
    This has really helped me with a project I'm working on investigating eddy current levitation - thanks man!

  • @kekskekskeks112
    @kekskekskeks112 3 года назад +1

    Sick rhymes and even sicker video! Really love the image -> BCs approach!

  • @tomasprejda4165
    @tomasprejda4165 Год назад

    Hi, Mr. P Solver, I just want to say - your Python video are the best on RUclips in terms of quality, though a bit focused. At least for people, who already know a bit about what they are doing.

  • @gcslksd
    @gcslksd 3 года назад +2

    Dude you've taught me so much it's insane, i'm flying through my numerical methods class

  • @AJ-et3vf
    @AJ-et3vf 2 года назад +1

    Commenting again, man I really have to thank you so much for your solving of an elliptic PDE here. It's a surprisingly very simple but effective method of solving this PDE. It turns out that your method of solving the PDE here, an iterative finite difference method, is actually the Gauss Seidel method for elliptic PDEs, which is guaranteed to converge because it's diagonally dominant.
    I thought that this may be useful to solve 2nd order boundary value problems, linear and nonlinear, and it works! After all, BVP ODEs can be thought of as elliptic PDEs too with only one independent variable.
    Again, thanks man! Now, I feel ready for getting into solving PDEs because of the added intuition and overwhelming effectiveness of this iterative finite difference method, which you demonstrated in this video.

  • @AJ-et3vf
    @AJ-et3vf 2 года назад

    This is awesome! I only now got to watch these and am surprised you actually dealt with and solved PDEs, one of the few numerical methods topics that I haven't dived in yet.
    And also nice for using Numba here. I tried to learn Numba weeks ago, but there aren't much tutorials and examples to learn Numba so I gave up on it.
    Again, thanks very much.

  • @morbi_ipynb
    @morbi_ipynb Год назад

    Thanks for all this inspiration, your channel is one of my favorites! :)

  • @niescho6093
    @niescho6093 Год назад

    Thank you!I really love your style.

  • @diegocarrera7520
    @diegocarrera7520 3 года назад +1

    Awesome video, Learning a lot :) Thanks

  • @obliquesealray2188
    @obliquesealray2188 2 года назад

    thank you for all the wonderful videos.

  • @iridium1118
    @iridium1118 3 года назад +1

    Cool stuff. I recommend simulating a swing up of a cart pendulum system.

  • @arturaras617
    @arturaras617 7 дней назад

    I have to say, your vids are amazing. And i see that if you vizualize the Equations, the whole physics problems becomes so much easier.
    Question:
    Can you show how to solve D-Fields and P-fields if you have a dielectric material which is not isotropic. Actually im Thinking about it how to do it on a computer. These are also Examples that one never sees in any books, the theory stopse there and thats it.

  • @dPhi_dTau
    @dPhi_dTau 3 года назад

    Wow!! Great video!

  • @zadejoh
    @zadejoh 3 года назад +1

    Really cool video! I haven't watched the whole thing yet so this may be answered/fixed later on in the video, but does it matter that you are modifying the potential array in-place during the triple for loop?

  • @tanmaysinha8138
    @tanmaysinha8138 3 года назад +4

    Really great work! Could you do one on the Helmholtz equation i.e finding the eigenvalues and eigenvectors of the Laplacian?

  • @valeriusevanligasetiawan6967
    @valeriusevanligasetiawan6967 Год назад

    Hi Luke! Thanks for the great video! I am really into this to reference my scientific computing problems. I want to know if you are going to solve the maxwell equation or maybe the landau lifshitz gilbert equation in the video or maybe solve it using the finite element method, rather than finite difference. It's going to be awesome.

  • @Piipolinoo
    @Piipolinoo 3 года назад

    Amazing!

  • @Louis-ml1zr
    @Louis-ml1zr 2 года назад

    amazing really thank you

  • @Puddelpai
    @Puddelpai 3 года назад

    Awesome!

  • @markchadwick77
    @markchadwick77 Год назад +1

    Pardon me for a "Boomer moment." This was EXACTLY the assignment for my electrodynamics course 40 years ago! 😮 We programmed it in FORTRAN (the Python of the day) on a VAX mainframe with ASCII output for the plots. Of course, it took me about 25 hours of effort instead of 25 minutes.

  • @tripp8833
    @tripp8833 3 года назад

    Awesome thanks

  • @aliexpress.official
    @aliexpress.official 3 года назад +3

    ok but why is the rap such a bop tho
    also can you upload the code to your git? There's only 1-7 there currently

  • @bingodeagle
    @bingodeagle 3 года назад

    Laplace's is such a beautiful equation

  • @ShinjiCarlos
    @ShinjiCarlos Год назад

    Watching this tuto I just realized: there is only one Mr P Solver. Period.

  • @guillermobarrio55
    @guillermobarrio55 Год назад

    One doubt I have: could you have used a 2D convolution as you did in the 3D Laplace vid?
    Outstanding job, as always.

  • @thh1010
    @thh1010 6 месяцев назад

    Hi, how to implement no-slip condition for the square? for fluids

  • @user-dv8id8vd7g
    @user-dv8id8vd7g Год назад

    In the image section, what size of png file shall be produced for the coding to execute? What are the two colors shall be used to produce the image? Thanks a million

  • @Omgtired
    @Omgtired 2 года назад

    Dude you have zero right to diss analytical solutions that bad 😭 Great vid!

  • @GauravGupta-by1ml
    @GauravGupta-by1ml 9 месяцев назад

    I was wondering, is there any way I can put streamlines over the potential plot ?

  • @GK-lf1ll
    @GK-lf1ll Год назад

    Excellent, can we do this for surface temperature gradients of non-homogenous surfaces?

  • @chrisnassar
    @chrisnassar 2 года назад

    How do you set Efield=0 boundary condition?

  • @TheJinyee
    @TheJinyee 2 года назад

    Hello, Mr. Solver. Thank you for your tutoring vid. I followed it step by step using Visual Studio Code. However, I can't create the Accordion shape image. Please could you give me more explanations about that?

  • @sthohstholokuhle9755
    @sthohstholokuhle9755 2 года назад

    damn thats was nice introduction song

  • @nicolocantaluppi5572
    @nicolocantaluppi5572 2 года назад

    I tried checking the tutorial playlist but the link doesn't work..

  • @googlegoogle1610
    @googlegoogle1610 2 года назад

    please, can you solve Nernst-Planck equation in python when it is coupled with Poisson equation? :)

  • @NTC
    @NTC 2 года назад

    hey man, the link is dead, could you please double check?

  • @kkkanishkkk
    @kkkanishkkk 3 года назад +3

    LOVE THE RAP!!!!!!!!!!!!

    • @MrPSolver
      @MrPSolver  3 года назад +5

      Thank you! (Just don't show Griffiths)

  • @niko-yarey
    @niko-yarey 2 года назад

    Great videos!, but It’s been hard to understand why you set those boundaries conditions (at least for me), can anyone explain what’s going on there? I would appreciate it

  • @anweshbhattacharyya7763
    @anweshbhattacharyya7763 2 года назад

    Brother I couldn't find you in linkedin

  • @mrmaple
    @mrmaple 2 года назад

    In step 12, you're modifying in-place as you go. Some of the numbers you're using as the previous state have been modified and are in their final state. I think you need to have two 2D arrays, potential and potential_prime (your next state.)

    • @bskull3232
      @bskull3232 Год назад +1

      Both will work. The method shown here converges faster (called Gauss-Sidel method), while using 100% old data converges slower (called Jacobi method).

  • @ameerbaloch9894
    @ameerbaloch9894 3 года назад

    please upload the next tutorial video

  • @matthewkinahan3945
    @matthewkinahan3945 3 года назад +1

    Diss track legend

  • @azgamer2429
    @azgamer2429 Год назад

    i have some doubts can someone help?

  • @angelchurros747
    @angelchurros747 2 года назад

    how about doing it in 3D???

  • @naztar4323
    @naztar4323 7 месяцев назад

    Ama be real with i solved Poisson's Equation with out even having an ideal about this sort of math , i think that algorithms are more natural way of solving