FEniCS Tutorial: Poisson Equation

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

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

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

    Thank you very much for Poisson eq video , Can you pls make a video on SHEAR STRESS ( Deformation) on a Cube

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

      Hi, thanks so much for the feedback :).
      The next video will be on structural mechanics.

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

    assuming additional boundary condition at the center of the square = 0 (no force applying), how would this be implemented in the code?
    also in case of two simulations running paralel, can the state of one be passed as the boundary condition to the other ?

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

      Hi,
      Thanks for these great questions. I'm afraid, this is beyond my experience with FEniCs. I can only refer you to the docs and the official FEniCs forum.
      For your first question, I'm unsure if there is an option in the high level interface but you can manipulate the system matrix before it is solved (albeit being a bit hacky).

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

      @@MachineLearningSimulation thanks for the answer, and for the amazing content.
      ill try the scenario above and come back to you.

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

    Hi thank you so much.
    Can you make video possion equation in discontinuous parameter/coffecient in one dimension

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

      Hi,
      sorry for the late reply. What do you mean by discontinuous parameter or coefficient?
      For now, I do not want to continue the FEniCS series as it still showcases the old legacy FEniCS. I might be rebooting the series with FEniCSx (the FEniCS project's recent re-development of the FE software) in the next year. :)

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

      @@MachineLearningSimulation yeah now every move to fenics X

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

    you have a lecture about 3d

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

      Maybe this is what you're looking for: ruclips.net/video/ibgALqJOX-I/видео.html
      It's not pure Poisson, but the problems in linear elasticity solid mechanics are Poisson problems. The video also features how to visualize your data in 3D with Paraview.

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

      from fenics import *
      # Create mesh and define function space
      mesh = UnitSquareMesh(18, 18)
      V = FunctionSpace(mesh, 'P', 1)
      # Define boundary condition
      u_L = Expression('1 + 2*x[1]*x[1]', degree=2)
      def boundary_L(x, on_boundary):
      tol = 1E-14
      return on_boundary and near(x[0], 0, tol)
      bc_L = DirichletBC(V, u_L, boundary_L)
      u_R = Expression('12 + 2*x[1]*x[1]', degree=2)
      def boundary_R(x, on_boundary):
      tol = 1E-14
      return on_boundary and near(x[0], 1, tol)
      bc_R = DirichletBC(V, u_R, boundary_R)
      bcs = [bc_L, bc_R]
      # Define variational problem
      u = TrialFunction(V)
      v = TestFunction(V)
      f = Constant(-6.0)
      a = dot(grad(u), grad(v))*dx
      L = f*v*dx
      # Compute solution
      u = Function(V)
      solve(a == L, u, bcs)
      # Plot solution
      u.rename('u', 'solution')
      plot(u)
      plot(mesh)

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

      I have 2d code for 2 boundaries no I want to change a 3d can you help me