JinshuaiBai / LSWR_loss_function_PINN

A kind of loss function based on Least Squares Weighted Residual method for computational solid mechanics
40 stars 9 forks source link

About the loss function and boundary conditions #6

Open RondoWong opened 6 days ago

RondoWong commented 6 days ago

Hello Dr.Bai: I'm a user of Torch instead of Tensorflow. I have some difficulties when I‘m trying to redo the pure bending beam case of your research work using Torch. It's my pleasure if you can answer the following questions for me.

1.There are 2 displacement boundary conditions in your paper. The one for displacement in x direction is satisfied naturally through 'U = temp * x' in Dif_u. However I didn't see the imposition of V(0.5,0)=0. And as shown in the figure, I suppose V(0,0)=0 is correct but not V(0.5,0)=0.

2.Is it because of symmetry, the sheer stress is 0 and the normal stress is unknown at the left boundary?So the loss function is defined as l2.

3.I have noticed that you predict the displacement in y direction as 't = net2(xy_r)' corresponding to pinn(x)[10] in Loss_grad. But it seems that this item didn't make any contribution to the loss function. I wanna why you do that.

JinshuaiBai commented 5 days ago

For your questions:

  1. I do not explicitly impose V(0.5,0)=0 in the training. I regard this as a rigid displacement and is achieved in the Vis function. As you mentioned, in fact V(0,0)=0 is used but V(0.5,0)=0. This is my mistake. Thanks for pointing it out!
  2. Yes, you are right. This is the pre-knowledge gained by mechanics analysis.
  3. Indeed, we do not include 't = net2(xy_r)' in the final loss function. This was originally prepared for energy-based loss.

I have seen a lot of work regarding PINNs using PyTorch, it seems a trend. It is good to have your own torch code. Besides, writing code by yourself will help you have a better understanding of the methodology.

RondoWong commented 5 days ago

Thank you for your guidance! I will pay attention to your research work continually, which deeply enlightens me. And it seems that my exploration doesn't go so smoothly. Anyway I will try it. Moreover I want to redo the 3D case in your paper. Would you please send me the code? My email's address is wangyt0312@163.com. Thanks a lot!

JinshuaiBai commented 5 days ago

Thank you for your guidance! I will pay attention to your research work continually, which deeply enlightens me. And it seems that my exploration doesn't go so smoothly. Anyway I will try it. Moreover I want to redo the 3D case in your paper. Would you please send me the code? My email's address is wangyt0312@163.com. Thanks a lot!

Sure, happy to know that my work helped. I will send you the code via email.