Easy PINNS with DeepXDE: HEAT Simulation with Deep Neural Networks

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ย. 2024

ความคิดเห็น •

  • @DaisysAdvantures
    @DaisysAdvantures หลายเดือนก่อน +1

    Hi dear professor!
    Would you please make a video about solving a cfd problem (fluent) which is combined by PINN?!
    Thanks a lot

    • @Dr.Mohammad_Samara
      @Dr.Mohammad_Samara  หลายเดือนก่อน

      Thank you for your suggestion,
      Regarding solving CFD problems with PINNs, inverse-pinns, and deep neural operator all is included in the paid courses however I hope in the future we will make some material related with CFD .

  • @tienbuimanh5912
    @tienbuimanh5912 9 หลายเดือนก่อน +2

    Dear Professor:
    I tried simulating heat transfer in 2 dimensions but my program encountered an error while training the model and I don't know how to fix it.
    Can you give a simple example of heat transfer taking place in 2D space?
    Thank you for your reply and have a nice day!

    • @Dr.Mohammad_Samara
      @Dr.Mohammad_Samara  9 หลายเดือนก่อน

      Thank you for your question the issue of 2 dimensional exercises are there in my course of PINNs and inverse PINNs in which we solve the heat eq. Navire stocks equations And more.

    • @tienbuimanh5912
      @tienbuimanh5912 9 หลายเดือนก่อน

      @@Dr.Mohammad_Samara I'm just starting to get into deep learning, so I have a question about neural network architecture, which is what determines the number of layers, the number of neurons in each layer and the activation function?

  • @enthusiasticaly
    @enthusiasticaly ปีที่แล้ว +2

    hello Dear Dr. is it possible to simulate a moving heat source with PINN?

    • @Dr.Mohammad_Samara
      @Dr.Mohammad_Samara  ปีที่แล้ว +1

      Hello, yes it is possible ,you define down the B.C points values in relation with time and space.
      Please see the inverse PINNs theory video it shows an example that includes a moving values of B.C but to solve an inverse problem but such setting is similar I guess what you are trying to solve.

    • @enthusiasticaly
      @enthusiasticaly 11 หลายเดือนก่อน

      thank you sir
      sure i will check that ,
      is it possible to email you if i needed some help?@@Dr.Mohammad_Samara

  • @parkpeter
    @parkpeter ปีที่แล้ว +1

    Dear Professor:
    I don't understand the content in4:57 of vedio, which said
    ic = dde.icbc.IC(
    geotime,
    lambda x: np.sin(n * np.pi * x[:, 0:1] / L),
    lambda _, on_initial: on_initial,
    )
    why do we need to add the code: lambda _, on_initial: on_initial? I am so confused to this question.
    I'll be appreciate for your answer.

    • @Dr.Mohammad_Samara
      @Dr.Mohammad_Samara  ปีที่แล้ว

      Hi @parkpeter, I am a Dr. not a professor, anyway
      regarding your issue, please find the following I hope it will be helpful for you:
      1- The DeepXDE library have its laws to define the b.C and the I.C along with others so we have to follow it to get a correct answer. in general if we want to have more control I think using pytorch is better than DeepXDE.
      2- lambda x: np.sin(n * np.pi * x[:, 0:1] / L),
      lambda _
      are needed to make our code work as the are the processing function that will have the input from the DeepXDE library to get an output that matches our B.C or I.C case.
      3- lambda _ is a function that returns the same value that it enters as a B.C or I.C for this it comes in the sample code of the DeepXDE but I tried to removing it and I got error, so simply I kept it there if you want to see what kind of input/ output that got into it please make a function with print statements to see how things flow.
      4- To see what kind of input and output this function do, you can the following I made a sample code to see what is happenings in the B.C please see it below:
      def double_first_column(input_array):
      print("input_array", input_array)
      print("input_array.shape", input_array.shape)
      print("input_array[:, 0:1]", input_array[:, 0:1])
      print("input_array[:, 0:1].shape", input_array[:, 0:1].shape)
      print("output_array", 2* input_array[:, 0:1])
      print("input_array[:, 0]", input_array[:, 0])
      print("input_array[:, 0].shape", input_array[:, 0].shape)
      return 2 * input_array[:, 0:1]
      bc = dde.icbc.DirichletBC(
      geomtime,
      lambda input_array: double_first_column(input_array),
      lambda _,
      on_boundary: on_boundary)
      5- The on_initial: on_initial is a statement to tell the DeepXDE that we want to define the initial condition points.
      for the example I shown the input for the B.C case array will be
      input :
      is a size of (80,2) representing the B.C points samples; that have the B.C value and the time step value
      input_array [[0. 0.59375 ]
      [1. 0.484375 ]
      [0. 0.3125 ]
      [0. 0.328125 ]
      [0. 0.796875 ]
      .......
      output_array [[0.]
      [2.]
      [0.]
      [0.]
      [0.]
      [0.]
      .......
      6- In general both lambda _, on_initial: on_initial, are values that control the location in which we are insert the initial or boundary points.
      Hope this is helpful...

    • @Dr.Mohammad_Samara
      @Dr.Mohammad_Samara  ปีที่แล้ว

      you can also write this format (did not test it just another Idea to make the code more specific)
      ic = dde.icbc.IC(
      geotime,
      lambda x: np.sin(n * np.pi * x[:, 0:1] / L),
      boundary
      )
      def boundary(X, on_boundary):
      return on_boundary and np.isclose(X[1], 0,rtol=1e-05, atol=1e-08)
      This way you can specify the initial condition or even use it for boundary conditions.

    • @parkpeter
      @parkpeter ปีที่แล้ว +1

      @@Dr.Mohammad_Samara Dear Dr.:
      Thanks for your answer, combing reading the source code and your answer, I found that the method labda_, on_initial: on_initial in object
      ic = dde.icbc.IC(
      geotime,
      lambda x: np.sin(n * np.pi * x[:, 0:1] / L),
      lambda _, on_initial: on_initial,
      )
      would be called by dde.data.TimePDE and dde.icbc.IC. I would try to dig out it and give your answer.

    • @Dr.Mohammad_Samara
      @Dr.Mohammad_Samara  ปีที่แล้ว

      ​@@parkpeter Thank you for checking this, PINNs is very new tech. and there are many issues that need investigating both programming and numerical.

  • @Dr.Mohammad_Samara
    @Dr.Mohammad_Samara  2 หลายเดือนก่อน

    Hope you can enjoy our courses in our Podia platform:
    Apply "A320" Coupon to get a 25% discount, the first 100 students will get such discount.
    www.courses.machinedecision.com/