PDEBench icon indicating copy to clipboard operation
PDEBench copied to clipboard

High PDE residual error for 2D reaction diffusion dataset

Open jeevster opened this issue 2 years ago • 3 comments

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

jeevster avatar Apr 28 '23 20:04 jeevster

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.

timothypraditia avatar May 01 '23 20:05 timothypraditia

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

kmario23 avatar May 22 '23 21:05 kmario23

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

jeevster avatar May 22 '23 21:05 jeevster