Solving PDEs with the FFT [Python]

Поделиться
HTML-код
  • Опубликовано: 17 апр 2020
  • This video describes how to solve PDEs with the Fast Fourier Transform (FFT) in Python.
    Book Website: databookuw.com
    Book PDF: databookuw.com/databook.pdf
    These lectures follow Chapter 2 from:
    "Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control" by Brunton and Kutz
    Amazon: www.amazon.com/Data-Driven-Sc...
    Brunton Website: eigensteve.com
    This video was produced at the University of Washington
  • НаукаНаука

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

  • @fzigunov
    @fzigunov 4 года назад +52

    Dr. Brunton, I just would like to thank you. I'm towards the end of my PhD in fluid mechanics and your lectures have been an integral part of it. You're an awesome presenter and teacher!!

    • @Eigensteve
      @Eigensteve  4 года назад +8

      Awesome, glad these helped!

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

      @@Eigensteve could you tell me what advantage does fft offer over contemporary methods (e.g. finite difference etc. etc.) While solving pdes? Thanks!

  • @pradiptahafid
    @pradiptahafid 2 года назад +12

    0:29. Is he writing with the mirror effect? I thought he writes normally and during the editing, he mirrors the video. Anyway, Trully blessed the modern era because of you. For someone who does not come from a math background, this video is a gem. I have been spending 2 weeks on your books and videos. They are amazing.

  • @mohammadumair7778
    @mohammadumair7778 4 года назад +27

    Dr. Brunton, you have played a cruel trick, a cruel trick indeed! 😅

  • @nezv71
    @nezv71 4 года назад +18

    I've always wanted to make a video series like these. So many students feel like there is a big mystical gap between these concepts and the hands-on of coding and using them. Your videos do a great job of demystifying, keep up the good work!

  • @flaguser4196
    @flaguser4196 2 года назад +5

    I had always thought that the videos are mirrored in post production. But after seeing Steve write a mirrored "FFT" by mistake at the start, I'm not sure anymore. So he actually trained to write mirrored after all. I'm really thankful!

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

      Same. Can't imagine how he managed to write mirrored.

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

      And I'm not sure if he writes with his left hand...

    • @AkamiChannel
      @AkamiChannel 8 месяцев назад +7

      Haha I think that was a little tongue-in-cheek trolling

  • @mathieug6136
    @mathieug6136 4 года назад +10

    That was a good lecture! I didn't look at those math in like 10 years.

  • @pierrestemmettmusic
    @pierrestemmettmusic 4 года назад +5

    My new favourite youtube channel of all time! Thank you Steve Brunton you're a hero. The sole reason I am passing my degree.

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

    Nice lecture, those plots were awesome!

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

    Thanks Dr. Brunton, your teaching style is incredibly great! The video helped me alot.

  • @HassanKhan-cs8ho
    @HassanKhan-cs8ho 4 года назад +4

    This video lecture series by you have been a life changing experience for me. you have truly demystified on how to go from complex mathematical concept to coding it and then applying it. the elegance with which you implement the algorithm in code is really motivating for me to apply it myself and test under different applications. Thank you sir and i hope you keep us mesmerized further with your future lectures.

  • @alialavib
    @alialavib 4 года назад +2

    Great job posting videos amid all this

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

    It is a great pleasure to watch this lection. Thanks!

  • @qiguosun129
    @qiguosun129 10 месяцев назад

    Dr.Brunton's lecture just like art.

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

    That trick was very clever... I bet people were thinking hard about that one !

  • @apostoloskountouris5144
    @apostoloskountouris5144 4 года назад +4

    Hi ambidextrous mirror magician Steve!
    Your videos are outstanding and you are a real teacher!
    However I must say that you are a very sneaky individual for doing this inverse writing FFT (3 letters) in the beginning making this surprised look and then starting all over!
    Very sneaky indeed!
    cheers!

  • @dypoet
    @dypoet 4 года назад +28

    I have been thinking Steve must been writing the text left to right and flipped the video so that we won't see the text opposite. But at the beginning he wrote the text from right to left accidentally. Does this means he has been writing/drawing in the opposite way all the time?

    • @dericknganyut.3795
      @dericknganyut.3795 3 года назад +1

      exactly my thoughts. If he has been writing/drawing in the opposite way all this while, then that is even more mind-blowing :)

    • @psylonmusic5264
      @psylonmusic5264 3 года назад +11

      isn't it just a little joke to fool us ?

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

      @@psylonmusic5264 I think so, yes.
      Director's cut :)

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

      In older videos you can watch some of his university lectures. He is left handed, so this video is clearly mirrored.

  • @ismaelpour
    @ismaelpour 4 года назад +1

    Thank you, Thank you, Thank you. Truly life-changing ✌

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

    Amazing content! Great work!

  • @ing.erickosorio2887
    @ing.erickosorio2887 4 года назад +2

    Awesome video

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

    Awesome video! Thank you!

  • @LucasDimoveo
    @LucasDimoveo 4 года назад +4

    I'm a stay-at-home parent on the journey of self-learning mathematics until I can go to university. Knowing that I'll be able to approach interesting and difficult applied problems with Python and PDEs is a huge motivator. Thank you for making your material public!
    Other than a background in Scientific Computing, Calculus and ODEs, and (introductory) Linear Algebra, what else would you recommend as preparation for your book?

    • @Eigensteve
      @Eigensteve  4 года назад +9

      Thanks so much for your comment! Really glad you like the material and that you are finding it useful! I think the background you mentioned would be a great start. Most of the book relies on linear algebra and ODEs. Taylor series are also good. A good course in statistics and another in optimization will never hurt anything.

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

    ha. First time I've ever seen someone write "backwards" on a lightboard. It's such cool tech. Probably makes teaching a lot more engaging for the presenter since they can look at the class the entire time.

  • @williamcoggins8336
    @williamcoggins8336 10 месяцев назад +1

    Amazing content! Do you think this approach can be use to solve the time - independent Schrodinger eqn?

  • @prasanthkumar1770
    @prasanthkumar1770 4 года назад

    Hello Steve, awesome lectures. Great work.
    Can you please let me know how were you able to display the computer screen and preconstructed graphs on the glass board.
    This would be really helpful to me please guide me. Thank you in advance. 😊

  • @onlinepradeep
    @onlinepradeep 4 года назад +2

    Great lecture Sir. Please upload a video for solving of non linear partial differential equations like Navier stock equations.

    • @Eigensteve
      @Eigensteve  4 года назад +1

      Thanks for the suggestion -- it is on my list, but might take a while.

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

    So could anybody tell me what advantage does this algorithm offer over contemporary methods (e.g. finite difference etc. etc.)? Thanks!

  • @CHAMPION-1-Winner
    @CHAMPION-1-Winner Месяц назад

    The 🐐 PERIOD!

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

    Amazing video! Why is a 2*pi multiplying de fft in the kappa calculation?

  • @TURALOWEN
    @TURALOWEN 4 года назад

    Dr. Brunton, I have learned a lot from you in the last couple of years by watching your videos. Thank you so much! I have a question on the Python code for solving PDEs using FFT. In the notebook of solving heat equation with FFT, it says that 'odeint' does not play well with complex numbers, and that is why you extended uhat that vector into real and imaginary parts. But in the 'Burgers' code, you actually use np.fft.fft() and np.fft.ifft() within the RHS function, and odeint still works. Why would odeint work in one scenario but not in another when both have complex numbers in them? I tried to add few other terms such as dispersion (u_xxx), and I get results that do not make sense (I should have energy preserved but code gives me 0's after one-time step). In particular, whenever I try (1j) * (kappa**3)*uhat for the Fourier transform of u_xxx, it seems that odeint fails. Could you please help me understand what is going on? Thank you. Tural Sadigov

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

    very interesting course. Could we have a PDF version?

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

    taking a class on this rn with THE Leslie Greengard

  • @Rudolf-ul1zh
    @Rudolf-ul1zh Год назад

    What is the advantage of integrating in the frequency domain if we could also just integrate the heat equation in the space domain?

  • @cunningham.s_law
    @cunningham.s_law 4 года назад

    any uses for the z transform?

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

    Anyone have any idea what integrator odeint uses? Documentation says it uses the LSODA algo from FORTRAN, but I couldn't an overview anywhere. I programmed a 4th-order Runge-Kutta integrator to solve this system, and needed a time-step of 1 millisecond in order for the solution to be stable. Obviously here the time step of 0.1 seconds is sufficient for odeint, and it's boggling my mind.

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

    I am a bit confused. to solve a PDE consisting of second order derivative in space, should have two boundary conditions specified. What are the boundary conditions assumed here? any help? thanks in advance.

  • @ashutoshsingh-et7vm
    @ashutoshsingh-et7vm 2 года назад

    Hello Dr. Burton thank you for all theses content. Cant we solve navierstokes equation from this approach and this may be better than discretization of diff eq and way faster than it. But still ITS more famous and used mostly by every commercial package

  • @hemanthHK45
    @hemanthHK45 4 года назад +1

    The presentation was excellent.... Good Explanation.... What about PDE solving in OpenFOAM Simulation?

    • @Eigensteve
      @Eigensteve  4 года назад

      Thanks! There are absolutely lots of other good environments to solve complex PDEs with non-trivial boundary conditions. OpenFOAM is a really cool open platform for fluids simulations.

  • @hubstrangers3450
    @hubstrangers3450 4 года назад +1

    Thank you for the content, just a simple query, is there a git repos, or just have use the book?

    • @Eigensteve
      @Eigensteve  4 года назад

      Everything is at: github.com/dynamicslab/databook_python

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

    Professor Brunton, thank you for the awesome lecture! Besides initial conditions, is there anyway to impose boundary conditions in this problem? For example, if there was a heat source in x = -L/2, how to describe it in the algorithm? Thank you a lot again.

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

      There is a boundary condition. I cite his book: When solving this PDE using the FFT, we are implicitly assuming that the solution domain is periodic, so that the right and left boundaries are identified and the domain forms a ring. However, if the domain is large enough, then the effect of the boundaries is small.

  • @devargyachakraborty9068
    @devargyachakraborty9068 4 года назад

    Can any body tell me the line after the odient command is used. I am not getting it

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

    Is the Jupyter script available online?

  • @ouni127
    @ouni127 9 месяцев назад

    Does anyone know what magic this blackboard has? Can it automatically mirror the words written by the teacher, or does the teacher need to judge the writing method of the mirror when writing, which may be a bit too difficult.

  • @human-b3b
    @human-b3b 4 года назад

    Thank you for the series. By your mistake at 0:26 I acknowledged that you write from right to left to counter the mirror effect! Wouldn't it be easier for you to write normally and then just flip the video vertically? Or you just enjoy the mental exercise ;)

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

      Magic is created through misdirection.....

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

    Joke's on you, I was watching from the back of my screen when you started 😊

  • @biswarajpalit
    @biswarajpalit 2 года назад +1

    where can I find the python codes ?

    • @kunvin
      @kunvin 2 месяца назад

      On the screen!

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

    How to do this on 2D surface.

  • @robbiewilliamson9783
    @robbiewilliamson9783 3 месяца назад

    I love you

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

    ok wow thats interesting

  • @bgaskin
    @bgaskin 4 года назад +1

    Oh, partial differential equations. I see :)

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

    Steve "EigenSteve" Brunton

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

    0:25 what

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

    Nice presentation.
    But all real scientists know that n starts at 0 and goes to N-1. When we meet our Maker, those who use Matlab/FORTRAN array indexing will be severely frowned at.

  • @AkamiChannel
    @AkamiChannel 8 месяцев назад

    No link to a git repo 😭😭😭
    Are we just monkeys that have to type everything out? And then make a typo and spend an hour troubleshooting? Then realize the problem is that we are using a newer version of python? Is that what you wish of us?

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

    ODE convert to PDE
    is posibal.

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

    Did you just fake that you can write in reverse?!? 😂😂😂 I’m curious how many people noticed that.