Stable Fluids using the FFT in Julia | Fluid Simulation in Julia

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024

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

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

    Thank you for sharing this!

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

    More Julia stuff please! Love it.

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

      Thanks a lot ❤️
      Julia is amazing. I have some really nice content planned there. Probably the next video will be on performing spectral DNS simulations of turbulence in Julia, releasing maybe in March.
      But I also want to cover the Autodiff ecosystem in Julia. :D
      Let me know if you have any more cool ideas.

  • @cziffras9114
    @cziffras9114 2 месяца назад +1

    Your videos are all so well explained, I would to do the same amazing work one day, thank you!

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

      Thank you 😊
      I can only encourage you to get started, start with sth small and upload it even if you think it's not perfect yet, improvement will come over time 👍

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

    you write in julia! giga chad

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

    Errata (two small errors):
    There is a small error when setting up the spatial discretization at roughly 06:55. The way it was done here would include points on both ends of the boundary. That would make the domain slightly larger and introduce unnecessary noise (due to the application of the FFT). I haven't fixed that yet, because it would make subsequent steps (like the semi-lagrangian advection) more complicated. Maybe you have a good fix? :)
    Here is the GitHub issue: github.com/Ceyron/machine-learning-and-simulation/issues/7
    Small correction at 19:39 : I used the "clamp!" command in the video which would not respect the periodicity of the flow, i.e., fluid that would exit at the top boundary would not re-enter in the bottom. Rather, it would be clamped back to the top domain. This is not a big issue if you just run it for as low times as we did in the vide. Still, a better version is to "periodically clamp" it using the modulo operator.
    I adapted this in a new version, you can find on GitHub: github.com/Ceyron/machine-learning-and-simulation/blob/main/english/simulation_scripts/stable_fluids_fft.jl
    As a bonus: You can then also safely run it for longer times and might even catch some turbulence
    😉

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

    What's your take on solving differential equations in python and julia? Is any one easier to start with?

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

      Great question.
      I think the Julia DifferentialEquations.jl ecosystem (diffeq.sciml.ai/stable/ ) is unmatched in any other programming language. If you want to solve (advanced) Ordinary Differential Equations (and variations thereof like Stochastic ODEs etc.) it is highly recommendable, especially due to their many tutorials available. However, you have to get to know the Julia Programming language a bit. Though, this will happen as you go. On top, Julia is definitely a language worth learning.
      If you just want to solve some simple ODEs and already know Python, SciPy's ODE capabilities should be sufficient.
      If it comes to PDEs, I think the best package available is Fenics (which is based on the Finite Element Method) and only has a Python interface.
      Let me know which kind of problems you want to solve, then maybe I can give you a recommendation. :)

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

      @@MachineLearningSimulation It looks like I need to go with Fenics as I'm interested in electro-thermal simulations where I want to see the effect of geometry, i.e. current flow being constrained at corners leading to more Joule heating.
      Great channel, very happy to see your content and approach. Truly appreciate it!

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

      @@sniperdogruffo Sounds like an interesting application. 😋
      I am sure, Fenics can be a first start. It might have a steep learning curve in the beginning, since you have to know what a weak form of a PDE is. But after that it is super nice to use and takes away a lot of the pain when writing FEM solvers.
      I also have a first introductory video to Fenics: ruclips.net/video/QpA7E4YHbyU/видео.html
      I plan to do more in the coming months, also one for the Navier-Stokes equations ;)

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

    Can you make a video about blasius equation solution,🤓

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

      Hi,
      that's a cool suggestion. You are probably referring to the Blasius solution to the Boundary Layer equations. I have a series planned on more theoretical fluid mechanics concepts, I will add your suggestion to the list of video ideas. :)
      However, for now I want to focus on continuing on the playlists that are already on the channel, but, in the long term, I will definitely have a video on it.

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

    can i do this in excel vba? please help me😥🙏

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

      Uhh, good question 😁 It's a joke, right?
      But it would be an interesting challenge.

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

      @@MachineLearningSimulation no, i need to know to the exact procedure to implement this sir. 😥

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

      @@MachineLearningSimulation I've already done another physics simulation but unfortunately I only know excel vba, so I need to understand another programming language well so I can convert it. can you guide me?🙏

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

      Hey, okay, sorry for the reply. I mean of course you could implement it in VBA, but as you already noted, it is probably better to do it in a different programming language.
      From my point of view, you have two options there: either Python or Julia. If you want to dive deeper into scientific computing and require high performance and parallel capabilities, go for Julia. If you also want to use the learned programming language for sth different like easy scripting, web development etc, then opt for Python.
      Regarding resources: that probably depends on the knowledge you already have. I would recommend googling for tutorials in the language you chose, then find a couple a go for this that suits your learning style the best.
      Best of luck :)

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

    Can you do MATLAB version?

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

      Hi, unfortunately I am not too familiar with MATLAB. Additionally, I want to support open source software.