FEniCS Tutorial: Navier-Stokes Equation for Lid-Driven Cavity

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

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

  • @alperozt
    @alperozt 7 месяцев назад +1

    Thank you. This is super helpful as an intro to fenics for fluid.

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

    Very Nice, can I know the software that you use in this video,please? I am using Jupyter notebook.

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

      Thanks for the kind comment 😊
      This is VS code with the python extension and a dark theme. For this video, I didn't use a notebook, just a plain python file.

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

    Would be great if you did a variable density fluid, ie. Euler equation + viscosity coupled with advection of density. Everywhere density is constant, viscosity is constant, and fluid incompressible all the time. Doing something out of the mold would be very special.

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

      That's a cool suggestion. I will note that down. :)
      I do not have much experience with compressible flows yet. From my engineering background, I would say that they mostly only relevant for high-speed aerodynamics (like fighter jets etc.). Almost all other engineering CFD is incompressible (or at least in the incompressible limit). Though, I can understand that it can become boring :D. Although, the saddle point structure of the incompressible NS is also very challenging, mathematically speaking.

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

      @@MachineLearningSimulation yes I know. I'm a physics student an fluids are very difficult. But with the power of the computer, you can do that crazy stuff.

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

    Wonderful

  • @varunkumarr8606
    @varunkumarr8606 2 года назад +6

    Please make more FEniCS videos

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

    Thank you for the nice explanation. I still have problems understanding the solution strategy and derivation of the weak forms. Is it able for you to make a video like the ones for the heat equation and linear elasticity to explain in detail the solution strategy and weak form-derivation?
    I would also appreciate any suggestions from the literature to clarify the issue.

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

      Thanks a lot for the kind words. :)
      This explanation for the NS equations together with Chorin's projection will be released tomorrow ;)

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

    Hey! Thank you so much for the video. Is there any way to validate that the solver indeed gives the velocities expected?

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

      You're very welcome 🤗 I'm glad you enjoyed it.
      Generally speaking, validating numerical solvers is challenging. A first thing to check is if the two time steps in a trajectory (or the steady-state in a stationary simulation) fulfill the discretized PDE in that you plug the velocities into your discrete equations and computer a norm metric. If it is below a desired tolerance, it is a correct solution to the discrete problem. For the specific algorithm presented here that might not be too easily possible because we do not iterate Back and forth between momentum and continuity equation which would be necessary to ensure both are solved to the desired degree.
      Another approach would be to use test problems (like the lid-driven cavity) for which reference values are available (for the lid-driven cavity, one often uses the values due to Ghia et al.).
      I would recommend you to check out chapter 20&21 of book "automated solution of differential equations by the finite element method" by logg et al.

  • @chrisli6831
    @chrisli6831 8 месяцев назад +1

    Hi,
    It seems fenics has undergone a large update, and I'm using the latest dolfinx to rewrite the code. However, there is seems a large gap. Do you have any example by using dolfinx?
    Thanks.

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

      Yes, they made a bigger upgrade, also renewing some of the API. I haven't used it yet, unfortunately. The update of the FEniCs tutorial videos is on my to-do list but not of the highest priority atm.
      This tutorial is the first thing that popped up, maybe you find it helpful: jsdokken.com/dolfinx-tutorial/

  • @habib-ur-rehmaan2532
    @habib-ur-rehmaan2532 2 года назад +1

    is there any way we that get the variational form by using fenics ?

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

      Hi, thanks for the comment 😊
      Are you referring to the weak form? If so, then to my best knowledge FEniCS does not accept the strong form of the PDE. You always have to present your problem in weak form. Hence, FEniCS does not have a routine to translate the problem for you.

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

    Any comment on how to implement periodic boundary conditions on for example at the left and right wall? I'm having problems with PBCs in fenics

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

      Unfortunately, I do not have much experience with periodic BCs in FEniCS, maybe you find this pointer to the FEniCS tutorials helpful:
      fenicsproject.org/olddocs/dolfin/1.4.0/python/demo/documented/periodic/python/documentation.html

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

    Hallo, was ist denn bitte der Editor? LG

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

      Hi,
      das ist Visual Studio Code mit der Python Extension. Für das Video habe ich mit OBS aber nur einen Teilbereich des Bildschirms aufgenommen.

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

      Visual Studio Code

  • @habib-ur-rehmaan2532
    @habib-ur-rehmaan2532 2 года назад +1

    when you post new video , kindly must use fenics word with it

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

      Hi, thanks for the comment. 😊
      What do you mean by this? There is FEniCS in the title of the video? Or do you mean a post on social media

    • @habib-ur-rehmaan2532
      @habib-ur-rehmaan2532 2 года назад +1

      @@MachineLearningSimulation start with fenics tutorial , just like this video

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

      I think it should be since all videos are in one Playlist: ruclips.net/p/PLISXH-iEM4Jl0-G1CpvG-mhrV0233tG_D
      But I will set a flag in the RUclips settings such that those videos are best watched in order 😊

    • @habib-ur-rehmaan2532
      @habib-ur-rehmaan2532 2 года назад +1

      @@MachineLearningSimulation Thank you

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

      You're welcome 😊