Skip to content
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

High PDE residual error for 2D reaction diffusion dataset #33

Open
jeevster opened this issue Apr 28, 2023 · 3 comments
Open

High PDE residual error for 2D reaction diffusion dataset #33

jeevster opened this issue Apr 28, 2023 · 3 comments

Comments

@jeevster
Copy link

When running the provided data generation code for 128x128 2D reaction diffusion, I am observing very high PDE residual at the beginning of the trajectory. The lowest that the residual gets is around 1e-2, which as far as I understand isn't that great for a PDE solver. Below is a plot of the mean absolute residual value (i.e value of the PDE) over the 128x128 spatial grid as a function of time for a few generated sample trajectories of length 100. The code was run out-of-the-box with no changes to the PDE parameters/other settings. Ideally, the residual should be nonzero only for the initial condition, otherwise numerical errors in the dataset will be propagated to the trained neural networks. Any suggestions/pointers as to why I could be seeing this behavior?
provided_data_residuals

@timothypraditia
Copy link
Collaborator

Hi there, thank you for pointing this out.
Did you calculate the residual using the solution and the provided delta x and delta t?
My guess is that the high residual is because we use explicit time discretization, although with adaptive time stepping to minimize the numerical error. This, in combination with the fact that there are two coupled variables in this problem could lead to higher error, because the error in one variable could be propagated to the other variable. In the future, it might be worth it to try using an implicit method instead.

@kmario23
Copy link
Member

Hi @jeevster,
To help you resolve the issue, could you please provide an update with the questions raised by @timothypraditia?

@kmario23 kmario23 self-assigned this May 22, 2023
@jeevster
Copy link
Author

Yes, the residual was calculated using the solution trajectories produced by the given data generation code, using the provided delta x and delta t.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants