FEniCS Tutorial: 3D Linear Elasticity on Cantilever Beam (+Paraview Visualization)

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

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

  • @fabi0bmx
    @fabi0bmx Год назад +5

    Hi, great tutorial!!! Thanks a lot again for putting this videos on youtube, they are helping a lot of people.
    I just want to point out that extra caution must be taken when using a traction different than 0. You have dot(tracion, v_test) which is correct. But the integral should not be taken in dx. It should be taken in ds. And ds has to be defined beforehand to specify which are the faces/surfaces that a traction is applied on.

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

      Hi,
      thanks for the kind feedback :)
      That's a great point. I will leave the comment pinned!

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

    I'm in love with your videos, because in them you can see how the ''machine works''... unfortunately when it comes to industry and production, software like this doesn't have space, but again, the learning that is gained in them it never gets lost, in fact, it makes you take steps that many of your colleagues don't even imagine exist. In fact, for more complex geometries, the situation is even more complicated in software such as FEniCS.

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

      Hey,
      thanks so much for this nice comment ❤️. I just love FEniCS for that you can solve those advanced PDEs with relative ease. It's extremely motivating (at least for me) to get something to work and then dig deeper. Certainly, there will be the point when FEniCS reaches its limitations and commercial (or more sophisticated open-source) software is necessary.
      Thanks again. It's so motivating to hear. :))

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

    Very clean and easy to follow. Helped me fast with the translation from the weak form to Fenics syntax.

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

    The problem I find with these videos is that it do not explicitly cover the various aspect of problems , for example applying traction or point load on this beam. Also if you seen the documentation of Fenics, they also explain this simple example without covering the other aspect. I think those should be included and explain in the videos. Apart from this, such videos are great source for learning FEM.

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

      Hi,
      thanks a lot for the comment and the kind words :). I can understand your concern. However, more generally, I would say that one always have to make compromises when teaching topics. During my undergrad, my continuum mechanics prof said that teaching students continuum mechanics right from the start would make any engineering mechanics courses in the first semesters obsolete. Though, he also noted that doing so would of course be overwhelming and students might be worse off in the end. FEM theory is deep, very deep. I think it's good to start simple (and ignore some details), then dig in deeper. I also tried to do that in the subsequent theory video: ruclips.net/video/Z-FnP2myvKw/видео.html (at least with deriving the variational form).

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

    Thank you for your videos, they are helping me a lot, however, i was wondering if can you explain how to set the boundary conditions when a mesh is imported, in my case i create the mesh in gmsh and then converted using "dolfin-convert" command then three files are generated one with the full mesh and two more having the physical elements and another one having the faces, those three are xml files, then we call them and followed by that we need to set the boundary conditions, in here is where the problem arises, because trying to set the Constant(0.0,0.0,0.0) the solver throws an error saying that a scalar is needed and an vector was provided, therefore if we change the function to Constant(0.0) another error appears "Transposed is only defined for rank 2 tensors."

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

      EDIT: I solved the problem, in my case was actually the fe.VectorFunctionSpace(mesh, 'P', 1) on which at the beginning i had fe.FunctionSpace(mesh, 'P', 1) because of that i was having problems with scalars and vector of course

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

      Hi, thanks for the comment and the kind words. :)
      Great, that you solved it. Have fun with your FEniCS simulation!

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

    Awesome tutorials, do you have more examples for homogenization? or other 2D examples using other formulations and techniques? Thank you!

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

      Thanks a lot 😊 So far, that's the only structural mechanics in fenics Tutorial. There is one more on a pure poisson problem if that helps? You find it in the fenics playlist :)
      I want to keep the topics more general, for now. However, I also keep a list of possible interesting applications to show in some future tutorials (then hopefully also using the new fencisX). Though, this is probably far into the future 😅

  • @rozagregorczyk9558
    @rozagregorczyk9558 Месяц назад

    Great video, you are a life saver! I did it with different mesh and density, the only thing I had to change in paraview was scale factor.I had to make it very small. If it was set to 1 the whole thing would get squished. Do you know why is that?

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

    Hi, can we convert this tutorial into cantilever beam with point load at the end?
    if you already have it please share link.

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

      Hi, I'm pretty sure this is possible, but I haven't done it myself yet. Since it is a standard problem, I think you should find them good examples online. I can recommend using the GitHub search for example code snippets.

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

    some simulations are too heavy, can you pls make a video, that how we use multiple cores of the system or use parallel processing?

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

      Hi,
      I think this particular simulation should be manageable on almost any modern machine. If your FEniCS installation together with PETSc is set up properly, I think it should already use thread-based parallelism. You could try OMP_NUM_THREADS=[YOUR CORE COUNT] right in front of the python call. Although, I think it might not give you any performance boost in this particular scenario.
      I will put a video with MPI parallelization in FEniCS on my ToDo list. As of now, I would like to postpone that a bit in order to continue on other Playlist, especially also because the more recent re-development of FEniCS (called FEniCSx) is more suited for MPI-based parallelism. I might have to pivot the tutorial to that version.

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

    What carrer or master should i have to be an meghanics of fluids investigator

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

      That's a great question but I am probably not the best person to answer this since I currently do a PhD in a rather theoretical topic. There might be good resources you can find elsewhere on the internet.
      My first thoughts are that you need a good understanding of both fluid mechanics and numerical methods (for which I also present the fundamentals on this channel). Beyond that, it is necessary that you understand at least one of the big CAE softwares (either Ansys fluent, siemens starccm+, or openfoam) since most companies don't use their own solver codes. For this, it is also important that you completed projects and gained experience how the entire simulation pipeline (preprocessing, solving, Postprocessing, and interpretation) works.
      And, unfortunately, there is also some luck involved since these positions are (afaik) in a position of more supply than demand. Hence, it helps to build a publically visible portfolio and a social media/online presence that could help you get noticed.
      Good luck 🤞

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

    if __name__ == "__main__":
    main()
    Can u pls tell me why we use this function in code?

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

      Hi,
      it's a protection and just some common Boilerplate. For the video here, it would not be too necessary, but I think it's a good practice :)
      Find more details here: stackoverflow.com/questions/419163/what-does-if-name-main-do

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

    Kindly add the links for some documents for learning computational solid mechanic with Fenics.

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

      I do not have particular documents for solid mechanics in FEniCS, but I liked the book by Zienkiewicz and Taylor: www.sciencedirect.com/book/9781856176330/the-finite-element-method-its-basis-and-fundamentals quite a lot. Together with the FEniCS book (by Langtangen) one can translate many concepts to FEniCS.

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

    Hi Felix, thank you for your videos. Keep up the good work! I have got a small question. Do you think one can simulate the structural response of floating structures using linear potential theory on FEniCS? Commercial software that do this are Ansys Aqwa and Orcaflex for example. The open source option would be Nemoh. Thank you for your reply in advance!

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

      Hi Nazhmiddin,
      thanks so much :).
      Unfortunately, I am not familiar with hydrodynamic analysis, but generally speaking you should be able to solve any (more common) PDE with FEniCS for small to medium-sized problems. You could maybe ask a question in the FEniCS forum to see if someone already has worked on using similar governing equations, or check for repos on GitHub. ☺️
      And as a hint, it's probably best to use the modern re-development of FEniCS called FEniCSx. I am still using the older version here (because I started the tutorial series with it). However, I think the concepts are the same. It only requires some slight changes in the code.
      Good luck with your application :)

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

      @@MachineLearningSimulation thank you Felix! Hope your channel flourish soon!

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

      @@njmddn Thanks a lot :). Feel free to share it with friends and colleagues ;)

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

    Pls also make a vidoe on temporal Discretization

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

      Yes, there will of course also be videos on structural dynamics with FEniCS sooner or later :). Until then, check out this video on the transient solution of the heat equation: ruclips.net/video/QpA7E4YHbyU/видео.html together with its more detailed analysis ruclips.net/video/A25_fAf4kxc/видео.html
      Or if you feel more comfortable with advanced topics, check out the transient Navier-Stokes solver in the Lid-Driven cavity scenario: ruclips.net/video/UPvmb8nVKqE/видео.html
      Generally speaking, in FEniCS one has to do the temporal discretization oneself and there a multipled approaches. I would also advise you to check out the FEniCS book: fenicsproject.org/pub/book/book/fenics-book-2011-06-14.pdf

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

    Hey, first of all thank you for this video since it helped me understand what goes behind the simulations. I had a question, if I had to compute a similar problem except that the maybe the geometry was a bit complex and I had to use traction vector, how do I define the traction vector to be that specific function but only over that surface? In my case the mesh was actually moved from gmesh to fenics so I have the index for the surface I want to define my traction vector upon, and the geometry is complex enough such that I can't define the surface using any easy math functions to grasp that geometrical surface.

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

      Hi,
      thanks for the comment and the kind words. :)
      Unfortunately, I cannot help you with your problem. That's beyond my current knowledge of FEniCS. I would advise checking the official FEniCS docs for a similar issue, or ask in the FEniCS forums.