-
Notifications
You must be signed in to change notification settings - Fork 332
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
Extrapolating 1D PDE with discovered PDE and constraint of known timepoints #168
Comments
Hi Imraj, From what I gather, you want to simulate the PDE model that is identified, but to do so in such a way that enforces the periodicity in time. This is not generally possible -- what you need to do is only put terms in your candidate function library that obey this symmetry so that the symmetry is there by construction. There is a second issue -- model.simulate is intended for use evolving systems of ODEs (it interfaces with odeint and solve_ivp). Simulating PDEs in time in general requires more sophisticated methods, so I recommend doing this with your own code. Otherwise model.simulate will be very confused by the spatial derivative terms in your model. Happy to discuss this more. Best, |
Hi Alan, Thank you for your quick response! How would you suggest you create a candidate function that obeys that symmetry? Can you include time in the candidate functions? Also, what is "periodic=True" specifying in ps.PDELibrary, is that the periodicity of the spatial derivative? That makes sense. I guess it depends on the identified PDE, but are you aware of libraries that are able to simulate PDEs? Kind regards, |
You are correct, periodic=True only enforces the periodicity of the spatial derivative. If the data you sampled is periodic, the candidate functions (presumably built from nonlinear functions of the data) are already periodic (up to numerical noise, finite sampling rate, etc.). It might work to explicitly and exactly enforce the time periodicity in the sampled data, and then build library functions from this. But frankly I am not sure. Another thing you can try is to simply "trick" the PDELibrary by passing it a temporal grid with "periodic=True", which will generate library terms that are periodic in the temporal grid. The downside is that then you are fitting equations that look like dx/dt = f(x, x_dot, x_ddot, ...) which is an implicit equation that may be very difficult to reduce or integrate. If you still want the spatial derivatives, you can pretend this is a spatially 2D PDE but put in the mesh in (x, t) so that time-periodic functions are used. |
* Move processed configs into different directory * Add try-except around moving configs * Fix typo Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com> * fix merge conflict Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com>
I am having some trouble getting my model to work and would appreciate being pointed in the right direction.
I have data from a scalar spatiotemporal field with 100 spatial grid points and 50 temporal grid points, i.e. in the form (Nx, Nt, 1).
This scalar spatiotemporal field "u" is over the "x" and "t" spatial and temporal domains. It is known that the PDE is periodic in time with the iterate from the 50th timepoint arriving back at timepoint 1 smoothly. Additionally, there is uniform spatial sampling and temporal sampling in the training data.
With that in mind I set up the problem with:
I am attempting to get
model.simulate
working on for example the first timepoint, with constraints of all other time points, and a finer temporal discretisation. Is this possible? In essence, is there a way of extrapolating to new timepoints with the discovered PDE as well as known timepoints as contraints?Thanks,
Imraj
The text was updated successfully, but these errors were encountered: