-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PINNs energy method #1714
Comments
Could you show the code? |
I’ll upload it immediately |
import deepxde as dde def ddy(x, y): def pde(x, y): def boundary_l(x, on_boundary): def boundary_r(x, on_boundary): geom = dde.geometry.Interval(0, 1) bc1 = dde.icbc.DirichletBC(geom, lambda x: 0, boundary_l) data = dde.data.PDE( model = dde.Model(data, net) dde.saveplot(losshistory, train_state, issave=True, isplot=True) It’s very easy, the energy is the integral of dy_xx**2-q*y and q=1. I want to minimize it, but I always get 0 |
It seems that |
Thank you, so what can I use? |
I don't think deepxde is suitable for equations with integral. But I could be wrong |
Ok, thank you. |
hey I assume this is Euler-bernoulli beam. You can simply use the 4th order PDE instead of using the weak form. |
Hi prakaharma, thank you, I have already solved it using the 4-th order ODE and it works correctly, I was thinking about using the energy approach because it is more suitable for more complex cases, so I have decided to start from Euler-Bernoulli that is trivial to see if it works. |
Yes you can look at variational PINNs. This is probably not implemented in DeepXDE. You need to use your own code. |
Ok, thank you very much |
I’m trying to use deepxde for pinns in the variational formulation. I started with a veruly trivial case: the potential energy of a beam under a distributed load that is just the integral between 0 and 1 of w_xx2 minus the integral of qw, where w is the unknown displacement and q the distributed load. I have computed the integral with tf.reduce_sum(w_xx2-qw,axis=1) and I have use this in the pde definition, instead of the strong form. The problem is that I always obtain zero displacement. How can I avoid this?
The text was updated successfully, but these errors were encountered: