Skip to content

The goal of this project is to develop a framework using a deep learning model to approximate solutions to Partial Differential Equations (PDEs) without requiring any input data.

License

Notifications You must be signed in to change notification settings

LeonDeligny/LearnPDEs

Repository files navigation

Physics-Informed Neural Networks (PINNs)

Codacy Badge codecov License

Project Goal

The goal of this project is to develop a framework using a deep learning model to approximate solutions to Partial Differential Equations (PDEs) without requiring any input data. The Physics-Informed Neural Network (PINN) is trained solely on:

  • Physics Loss: Derived from the governing equations (e.g., PDE = 0).
  • Boundary Conditions (BC) Loss: Ensuring the solution satisfies the boundary constraints.

Objectives

The project progresses through increasingly complex problems:

  1. Simple ODEs ✅:

    • PINN: $f_{\theta}: \mathbb{R} \rightarrow \mathbb{R}$
    • ODE to approximate: $f' = f, f(0) = 1$
    • Physics Loss: $\lVert f_{\theta}' - f_{\theta}\rVert$
    • Boundary Loss: $\lVert f_{\theta}(0) - 1 \rVert$
    • Analytical solution: $\exp: \mathbb{R} \rightarrow \mathbb{R}$ Training Process
  2. Higher-Order ODEs ✅:

    • PINN: $f_{\theta}: \mathbb{R} \rightarrow \mathbb{R}$
    • ODE to approximate: $f'' = f, f(0) = 1, f'(0) = 0$
    • Physics Loss: $\lVert f_{\theta}'' - f_{\theta} \rVert$
    • Boundary Loss: $\lVert f_{\theta}(0) - 1 \rVert, \lVert f'_{\theta}(0) \rVert$
    • Analytical solution: $\cos: \mathbb{R} \rightarrow \mathbb{R}$ Training Process
  3. Laplace Equation ✅:

    • PINN: $f_{\theta}: [0, 1]^2 \rightarrow \mathbb{R}$
    • PDE to approximate: $\Delta f = 0$
    • Dirichlet boundary conditions: $f(\cdot, 0) = 0, f(\cdot, 1) = \sin(\pi x), f(0, \cdot) = 0, f(1, \cdot) = 0$
    • Physics loss: $\lVert \Delta f_{\theta} \rVert$
    • Boundary loss: $\lVert f_{\theta}(\cdot, 0) \rVert, \lVert f_{\theta}(\cdot, 1) - \sin(\pi x) \rVert, \lVert f_{\theta}(0, \cdot) \rVert, \lVert f_{\theta}(1, \cdot) \rVert$
    • Analytical solution: $f(x, y) = \sin(\pi x) \sinh(\pi y)/\sinh(\pi)$ Training Process
  4. Euler Equations (potential, irrotational flow) ✅:

    • Wind tunnel scenario with no geometry
    • PINN: $\phi_{\theta}: [0, 4] \times [0, 1] \rightarrow \mathbb{R}$
    • PDE to approximate: None
    • Dirichlet boundary conditions: $(u, v)(\partial([0, 4] \times [0, 1])) = (1, 0)$ Training Process
  5. Navier-Stokes Equations ❌:

    • Solve fluid dynamics problems governed by the Navier-Stokes equations.

Installation

Ensure you have the following installed on your system:

  • ✔️ Python 3.12
  • ✔️ MPS support for macOS
  • ✔️ Additional Python dependencies
  1. Clone the Repository:

    Clone this repository to your local machine:

    git clone https://github.com/LeonDeligny/LearnPDEs.git
    cd LearnPDEs
    
  2. Install dependencies:

    Install the dependencies with:

    conda env create -f environment.yml

About

The goal of this project is to develop a framework using a deep learning model to approximate solutions to Partial Differential Equations (PDEs) without requiring any input data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages