Spectral Derivative in 3d using NumPy and the RFFT

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • The Fast Fourier Transform works in arbitrary dimensions. Hence, we can also use it to derive n-dimensional fields spectrally. In this video, we clarify the details of this procedure, including how to adapt the np.meshgrid indexing style. Here is the code: github.com/Ceyron/machine-lea...
    👉 This educational series is supported by the world-leaders in integrating machine learning and artificial intelligence with simulation and scientific computing, Pasteur Labs and Institute for Simulation Intelligence. Check out simulation.science/ for more on their pursuit of 'Nobel-Turing' technologies (arxiv.org/abs/2112.03235 ), and for partnership or career opportunities.
    -------
    📝 : Check out the GitHub Repository of the channel, where I upload all the handwritten notes and source-code files (contributions are very welcome): github.com/Ceyron/machine-lea...
    📢 : Follow me on LinkedIn or Twitter for updates on the channel and other cool Machine Learning & Simulation stuff: / felix-koehler and / felix_m_koehler
    💸 : If you want to support my work on the channel, you can become a Patreon here: / mlsim
    🪙: Or you can make a one-time donation via PayPal: www.paypal.com/paypalme/Felix...
    -------
    ⚙️ My Gear:
    (Below are affiliate links to Amazon. If you decide to purchase the product or something else on Amazon through this link, I earn a small commission.)
    - 🎙️ Microphone: Blue Yeti: amzn.to/3NU7OAs
    - ⌨️ Logitech TKL Mechanical Keyboard: amzn.to/3JhEtwp
    - 🎨 Gaomon Drawing Tablet (similar to a WACOM Tablet, but cheaper, works flawlessly under Linux): amzn.to/37katmf
    - 🔌 Laptop Charger: amzn.to/3ja0imP
    - 💻 My Laptop (generally I like the Dell XPS series): amzn.to/38xrABL
    - 📱 My Phone: Fairphone 4 (I love the sustainability and repairability aspect of it): amzn.to/3Jr4ZmV
    If I had to purchase these items again, I would probably change the following:
    - 🎙️ Rode NT: amzn.to/3NUIGtw
    - 💻 Framework Laptop (I do not get a commission here, but I love the vision of Framework. It will definitely be my next Ultrabook): frame.work
    As an Amazon Associate I earn from qualifying purchases.
    -------
    Timestamps:
    00:00 Intro
    00:53 Defining domain and grid creation
    03:40 Define function and analytical derivatives
    06:29 Visualization and Discussion
    11:10 Wavenumber grid creation
    14:10 Taking the spectral derivative
    16:57 Qualitative comparison of analytical and spectral derivative
    17:28 Quantitative comparison
    18:21 Outro

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

  • @EveryThing-up4tm
    @EveryThing-up4tm 4 месяца назад +1

    Yet another outstanding video. Would you be working on a solver for the compressible Navier-Stokes equations? Would really love to see the compressible and incompressible flow comparision.

    • @MachineLearningSimulation
      @MachineLearningSimulation  4 месяца назад +1

      Thanks a lot 😊
      That would indeed be a nice comparison. Currently, I have a video on a pseudo-spectral incompressible NS solver in the pipeline. Unfortunately, I do not have much experience with compressible NS. Probably, a pseudo-spectral treatment might no longer be possible due to potential discontinuities. Do you have a good resource on simple compressible solvers?

    • @EveryThing-up4tm
      @EveryThing-up4tm 4 месяца назад

      @@MachineLearningSimulation I don't know any particular literature. But maybe you can consider Sod's shock tube problem which is in book by E. F. Toro and C. Laney.

  • @alonsorodriguez5613
    @alonsorodriguez5613 4 месяца назад +1

    That was a remarkable video. Please do more videos with 3D surfaces in Plotly.

    • @MachineLearningSimulation
      @MachineLearningSimulation  4 месяца назад

      Thanks a lot :). I love these vizs with plotly too. In 3d, matplotlib is very limited. The problem with 3d, as I also noticed in the video, is that it's additionally hard to read and interpret. It's still helpful, though, I will definitely also have it in future videos ;).

    • @alonsorodriguez5613
      @alonsorodriguez5613 4 месяца назад

      @@MachineLearningSimulation Thank you very much!!!!!!

  • @dukeofdoom2
    @dukeofdoom2 4 месяца назад

    Great videos.Please do some pygame VFX videos. Something like the bomb explosion or liquid lava they have in Spelunky 2.

  • @lennarddegraaf9232
    @lennarddegraaf9232 4 месяца назад

    Do you have to multiple by N ^ (number of dimensions) when your domain is not non-dimensional?

    • @lennarddegraaf9232
      @lennarddegraaf9232 4 месяца назад

      I mean when doing the spectral differentiation

    • @MachineLearningSimulation
      @MachineLearningSimulation  4 месяца назад

      Hi, thanks for the comment. :)
      At which point in the process of taking the spectral derivatives do you think we have to multiply by N^d? Can you give a time stamp. What do you mean by non non-dimensional (having an extent per dimension different than one?)