deepxde
deepxde copied to clipboard
Simulation of boundary conditions and initial condition discontinuities
Dear Dr.Lu:
Recently, I'm having a problem with PINNs simulation and would like to ask for your advice. The problem is described as follows:
PDE:u_xx+u_x=u_t
BC1:u(0,t)=0
BC2:u(10,t)=m (where m is a constant)
IC: u(x,0)=np.piecewise(x, [x != 0, x == 0], [0, m]) (This means that the initial condition will be discontinuous at the point (10,0))
I simulated using PINNs and compared it with the analytical solution, and the results showed that all the loss terms were in the order of 1e-6 accuracy, and the final results are shown in the figure below. It is obvious that the error around the point (10, 0) is significantly higher than the other calculation areas, and the other points can be fitted better. Do you have any method to improve the accuracy of the calculation?
If IC and BC are not consistent at the corner, then it is difficult, as NN is always a continuous function. You can modify IC and BC to be consistent.
Here I solved a steady-state problem with 4 discontinuous corners with my own code (not DeepXDE). DeepXDE gains loss around the edges for some reason.
You can't solve these problems with baseline PINN. A quick fix would be to not train those points. On top of that use importance sampling to increase the points cloud near the area.
Use other PINNs with skip connections that introduce artificial diffusion very similar to Petrov-Galerkin.
Here I solved a steady-state problem with 4 discontinuous corners with my own code (not DeepXDE). DeepXDE gains loss around the edges for some reason.
You can't solve these problems with baseline PINN. A quick fix would be to not train those points. On top of that use importance sampling to increase the points cloud near the area.
Use other PINNs with skip connections that introduce artificial diffusion very similar to Petrov-Galerkin.
Thank you very much for your answer. For this, I tried RAR and adding calculation points in areas with large errors, and these results did not improve my calculation results. For the importance sampling you mentioned, do you mean adding training points in areas with large errors? Do you have similar learning documents, or can you show me the code with your correct results, I am curious how you handle it?
Sorry, I can't share the code (we are writing a paper). You can learn more about importance sampling here.
Their code is public but not open source, so we wrote our own version from scratch. Importance sampling is more than just adding training points in areas with large errors.
We are solving a similar 3D problem with discontinuities over the edges of a cuboid instead of just on the corners in 2D. Sorry, I wasn't helpful.
Thank you very much for your help and I look forward to your paper and available codes.
Sorry, I can't share the code (we are writing a paper). You can learn more about importance sampling here.
Their code is public but not open source, so we wrote our own version from scratch. Importance sampling is more than just adding training points in areas with large errors.
We are solving a similar 3D problem with discontinuities over the edges of a cuboid instead of just on the corners in 2D. Sorry, I wasn't helpful.
Hi, Is there an article on PINNs with skip connections?
Wang's Learning rate annealing comprises a two transformer layer residual connection.
Thank you for your answer