question on combining observational information and physics in an ode #940
Unanswered
bollegijscoding
asked this question in
Q&A
Replies: 1 comment
-
Only PDE loss. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Short question:
When considering both observational data and applying information from an ODE with
dde.data.PDE
, doesnum_domain
relate to points which add to the loss by considering also thesolution
at these points? Or by considering only the loss related to the ODE?Question elaborated with example:
I have an ODE which I would like to solve with deepxde considering observations occurring in part of the domain. As a toy problem, I am trying to solve the damped harmonic oscillator case as described nicely by Ben Moseley (e.g. https://benmoseley.blog/blog/ and https://github.com/benmoseley/harmonic-oscillator-pinn).
Hence, I am considering
This problem has a closed form solution which is given by (see https://benmoseley.blog/blog/ and references therein):
I model the ODE and boundary conditions as follows:
I want to consider observational points within the region of the domain between 0 and 0.35. Hence, I introduce an numpy array to mark these points
The neural net is just a FNN and we define the dde.data as follows:
I have played around a lot with of the values of the parameters
num_test, loss_weights_0, loss_weights_1, loss_weights_2, num_domain, lr
; yet the best I have achieved uptil now considersI only get reasonable results, when I consider a reasonable large number of
num_domain
(as above 500).Setting
num_domain
to a small value (e.g. 10) leads to less appropriate results, see figure below. I am confused however, on the role of num_domain with respect to the loss function. In this setting, does num_domain add to the loss by considering also thesolution
at these points? Or by considering only the loss related to the ODE?Many thanks in advance!
Bollegijs
Beta Was this translation helpful? Give feedback.
All reactions