] # open Package manager
activate .
instantiate
This repo was created during this co-working session.
To motivate the usefulness of this repo, we will start answering two questions:
- (1) What are NODEs?
- (2) What are C-NODEs?
- (2) Why do we want C-NODEs?
Let's consider a generic differential equation (DE):
where we look for the time-dependent solution
We have a Neural ODE (NODE) when the structure of the problem becomes:
Coupled Neural ODEs (C-NODEs) are defined as:
Let's check with an example of the Gray-Scott model how such C-NODEs could be used. In the following, we are going to:
- Example 02.00: Introduce and solve the model using a explicit solver.
- Example 02.01: Introduce a Neural operator, train it using a priori fitting and solve the Gray-Scott model using it.
- Examples 02.02: Train another Neural operator using a posteriori fitting and solve the Gray-Scott model using it.
Two main explanations:
- We are working with coupled systems (like Gray-Scott).
- Multi-scale approach to PDEs.
In a more realistic situation, the incognita is usually a vector field, so we will try to solve for
If the problem is simple, like the case of linear ODEs,
However most of the times, the analytical solution is not available. A common solution is the method of lines, that consists in discretizing the spacial dimension and study a vectorial representation of the function
Once we have a discretized space, we also discretize the force
Then the crucial question that we need to address is
or in words: does the discretized solution evolve like the original?
- Example 02.03: DNS, LES and exact solutions.
The answer is that it depends on the harshness of the discretization, i.e. the value of
-
DNS (direct numerical simulation): if
$N$ is large then eq.(2.2.2) is true, or we can say that the system is effectively closed because the discretized solution evolves following the behavior of the original system.
However, especially if the system is chaotic, it is likely that the small scale behavior influences the large scale behavior. In this case we talk about:
-
LES (large eddy simulations):
$N$ is too small to capture the small scale effects, thus the eq.(2.2.1) is not closed. This means that$\frac{d\bar{u}}{dt} = f_h(\bar{u})$ has a different dynamics than the exact solution$u(t)$ , so we would need instead to solve$$\frac{d\bar{u}}{dt} = \Phi f(u).$$ However this DE depends on$u$ , so the system is not closed and can not be efficiently solved.
One of the main goal of this repository will be to use CNODEs like eq.(2.1.0) in order to correct the LES simulation and get a solution as good as the DNS.
- Example 02.04: Train a closure model that, together with LES, can approximate DNS.
... TO BE CONTINUED ...
- 03.01 learn the closure of a LES
- 03.02 Add an extra equation of a projection of the solution, with no physical force and only NN to evolve it
- 04.01 DNS Burgers ...
- 05.01 Solve NS as single equation in spectral space, by adaptingthis implementation. The training of this has to be tested
- 05.02 Compare performance with Syver's repo that can do the same thing as 05.01. Our SciML approach has to be in the same ballpark at least (but notice that Syver is not doing spectral)
- 05.03 Generalize the approach such that you can import the F defined somewhere else