Complete implementations of deep learning methods for solving Partial Differential Equations (PDEs), including tutorials, training code, and real-world applications.
Neural networks that encode physical laws directly into the loss function
Core Idea: Construct physics-constrained loss using automatic differentiation:
- Advantages: Low data requirements, handles complex boundaries, suitable for inverse problems
- Location:
PINNs/ - Tutorials: 8 Jupyter notebooks (English & Chinese), from basics to advanced
- Applications: Poisson, Heat, Navier-Stokes, Vlasov-Poisson systems
Neural networks learning mappings between infinite-dimensional function spaces
Core Idea: Branch-Trunk architecture for learning operators
- Advantages: Train once, fast inference (milliseconds), efficient for multi-query
- Location:
DeepONet/ - Tutorials: Pure PyTorch implementation tutorial
- Applications: Heat equation, Burgers, Darcy flow, VP systems
Neural operators solving PDEs in frequency domain
Core Idea: Convolution in Fourier space for global information propagation:
- Advantages: Resolution-invariant, excellent for periodic problems, high-resolution solving
- Location:
FNO/ - Applications: Navier-Stokes, turbulence modeling, Darcy flow
Neural operators combining FNO architecture with physics constraints
Core Idea: Learn solution operators with both data fitting and PDE residuals:
- Advantages: Less data than FNO, better generalization than PINNs, fast inference, physics-consistent
- Location:
PINO/ - Tutorials: Complete overview notebook, 3 example implementations (Burgers, Darcy, Heat)
- Applications: Burgers equation, Darcy flow, heat conduction, parametric PDEs
Neural networks using tensor decomposition for high-dimensional PDEs
Core Idea: Decompose high-dimensional functions into products of low-dimensional functions:
- Advantages: Linear parameter growth (vs exponential), suitable for high-dimensional problems
- Location:
TNN/ - Tutorials: Complete Jupyter tutorial and 5D examples
- Applications: 5D Poisson equation, high-dimensional PDE solving
Neural networks with learnable activation functions inspired by Kolmogorov-Arnold representation theorem
Core Idea: Replace fixed activation functions with learnable univariate functions (B-splines):
- Advantages: Higher accuracy with fewer parameters, interpretable, excellent for smooth PDEs
- Location:
KAN/ - Tutorials: Complete PDE solving tutorial with B-spline implementation
- Applications: Poisson, Heat, Burgers equations, smooth PDE problems
Neural networks learning time integration operators for dynamical systems and PDEs
Core Idea: Learn the flow map
- Advantages: Efficient long-term prediction, natural residual structure, flexible time stepping
- Location:
FLowMap/ - Tutorials: Complete Flow Map tutorial with ODE and PDE examples
- Applications: Lorenz chaotic system, heat equation, dynamical systems
Sequence models using attention mechanisms for PDE solving
Core Idea: Capture long-range dependencies in spatial/temporal domains via self-attention:
- Advantages: Long-range dependency capture, flexible architecture design
- Location:
Transformer/ - Applications: Time-series prediction, multi-physics coupling
AI4CFD/
βββ PINNs/ # Physics-Informed Neural Networks
β βββ tutorial/ # 8 tutorials (English & Chinese)
β βββ vp_system/ # Vlasov-Poisson system implementation
β βββ README.md
βββ DeepONet/ # Deep Operator Networks
β βββ tutorial/ # PyTorch implementation tutorial
β βββ vp_system/ # VP operator learning
β βββ README.md
βββ FNO/ # Fourier Neural Operators
β βββ README.md
βββ PINO/ # Physics-Informed Neural Operators
β βββ tutorial/ # Overview notebook
β βββ examples/ # Burgers, Darcy, Heat examples
β βββ README.md
βββ KAN/ # Kolmogorov-Arnold Networks
β βββ tutorial/ # Complete PDE solving tutorial
β βββ examples/ # Poisson, Heat, Burgers examples
β βββ models.py # KAN & B-spline implementation
β βββ utils.py # Utility functions
βββ FLowMap/ # Flow Map Learning
β βββ tutorial/ # Flow Map tutorial notebook
β βββ examples/ # Lorenz, heat equation examples
β βββ models.py # FlowMapMLP, FlowMapCNN, etc.
β βββ utils.py # Data generation & visualization
βββ TNN/ # Tensor Neural Networks
β βββ tutorial/ # Complete tutorial
β βββ train/dim5/ # 5D PDE solving example
β βββ README.md
βββ Transformer/ # Transformer-based methods
β βββ README.md
βββ VP_system/ # Vlasov-Poisson applications
β βββ TwoStreamInstability/ # Two-stream instability
βββ utils/ # Shared utility functions
git clone https://github.com/Michael-Jackson666/AI4CFD.git
cd AI4CFD
pip install -r requirements.txtPINNs Tutorial (Recommended for Beginners):
cd PINNs/tutorial
jupyter notebook tutorial_eng.ipynb # English tutorial
# or
jupyter notebook tutorial_chinese.ipynb # Chinese tutorialTNN 5D Example:
cd TNN/train/dim5
python ex_5_1_dim5.pyPINO Tutorial (Physics-Informed Operators):
cd PINO/tutorial
jupyter notebook pino_overview.ipynbDeepONet Tutorial:
cd DeepONet/tutorial
jupyter notebook operator_learning_torch.ipynbKAN Tutorial (Kolmogorov-Arnold Networks):
cd KAN/tutorial
jupyter notebook kan_pde_tutorial.ipynbKAN Examples:
cd KAN/examples
python poisson_1d.py # 1D Poisson equation
python heat_1d.py # 1D heat equation
python burgers_1d.py # 1D Burgers equationFlow Map Tutorial (Flow Map Learning):
cd FLowMap/tutorial
jupyter notebook flowmap_tutorial.ipynbFlow Map Examples:
cd FLowMap/examples
python lorenz_system.py # Lorenz chaotic system
python heat_equation_flowmap.py # 1D heat equation| Method | Training Data | Single Solve Speed | Parameter Query | Best For |
|---|---|---|---|---|
| PINNs | Low (physics-informed) | Seconds | Re-train needed | Complex boundaries, inverse problems, data scarcity |
| DeepONet | High (needs solutions) | Milliseconds | One forward pass | Multi-query, real-time prediction |
| FNO | High (needs solutions) | Milliseconds | One forward pass | Periodic problems, turbulence, high-resolution |
| PINO | Medium (data + physics) | Milliseconds | One forward pass | Parametric PDEs, less data scenarios, physics-consistent operators |
| Flow Map | Medium (trajectory data) | Milliseconds | Autoregressive | Long-term prediction, dynamical systems, time evolution |
| TNN | Medium | Seconds | Re-train needed | High-dimensional problems (5D+) |
| Transformer | High (needs solutions) | Milliseconds | One forward pass | Time-series, long-range dependencies |
- Fluid Dynamics: Navier-Stokes equations, turbulence modeling, shape optimization
- Heat Transfer: Heat equation, convection-diffusion, multi-physics coupling
- Plasma Physics: Vlasov-Poisson systems, two-stream instability
- General PDEs: Poisson equation, Burgers equation, Darcy flow
- Python >= 3.8
- PyTorch >= 1.10
- NumPy, SciPy, Matplotlib
- Jupyter (optional, for tutorials)
Each method has detailed README documentation:
PINNs/README.md: Complete PINNs guide and tutorial indexDeepONet/README.md: Operator learning detailed explanationFNO/README.md: Fourier Neural Operator implementationPINO/README.md: Physics-Informed Neural Operators guideFLowMap/README.md: Flow Map Learning theory and implementationTNN/README.md: Tensor neural network theory and implementationTNN/train/dim5/README.md: 5D PDE solving example guide
This project is licensed under the MIT License - see the LICENSE file for details.
β Star this repository if you find it helpful! β