Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Water, air and the rules they obey
Squeeze a garden hose and the water shoots out faster. The same amount of water has to get through a smaller opening each second, so it speeds up. That’s conservation of mass. Faster-moving fluid also has lower pressure, which is Bernoulli’s principle. Together they explain why a curveball curves, how a plane’s wing lifts, and how a pipe’s flow meter works.
The equations of fluids are written with divergence (does fluid pile up?), curl (does it spin?) and the Laplacian (does it diffuse?). Modern AI can even be trained by giving it these equations as rules to obey. Those are physics-informed models.
Spacecraft design runs on fluid equations: rocket nozzles, re-entry heating, Mars helicopter blades in thin air, cooling loops on the space station. Physics-informed ML is a fast-growing tool for these problems when full simulations are too slow or the data is too sparse.
- 1. A pipe narrows. The water…
- 2. Faster-moving air has ___ pressure (Bernoulli).
- 3. A spinning ball curves because of…
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.The basic equations
| Law | Equation | Meaning |
|---|---|---|
| mass (continuity) | mass doesn’t appear or vanish | |
| incompressible | volume in = volume out | |
| pipe continuity | the hose rule | |
| Bernoulli (steady, ideal) | along a streamline | energy budget |
| heat / diffusion | spreads toward the local average |
Example (the hose). Area to at gives . With , the pressure drops by Pa. A Venturi meter reverses this, inferring the flow from the measured pressure drop (Practice Code 2).
Pressure coefficient: in ideal flow. It’s 1 at a stagnation point () and negative where the flow speeds up.
- 1. A₁ = 0.5, v₁ = 2, A₂ = 0.25: v₂ = ?
- 2. Is (2x, −2y) incompressible?
- 3. Cp at a stagnation point?
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.From conservation to PDEs
Mass. For any fixed control volume , . The divergence theorem turns the right side into . Since is arbitrary, the integrands match, giving the continuity equation.
Momentum. In the same way, with pressure and viscous stresses as surface forces, you get the Navier–Stokes equations for incompressible flow:
When the viscosity , these become the Euler equations. The ratio of the inertia term to the viscous term is the Reynolds number .
Ideal (potential) flow
If the flow is also irrotational, then and incompressibility gives Laplace’s equation . In 2-D you can also use a stream function , with and . That makes the flow divergence-free automatically, and streamlines are its level curves. Because Laplace’s equation is linear, solutions add:
- uniform stream + doublet = flow past a cylinder;
- add a vortex of circulation = a spinning cylinder.
The surface speed is . Integrating Bernoulli’s pressure around the surface gives
- drag = 0 (d’Alembert’s paradox, 1752: real drag needs viscosity and the wake);
- lift = per unit span (the Kutta–Joukowski theorem).
- 1. Irrotational + incompressible ⇒ the potential satisfies…
- 2. Ideal flow past a cylinder has drag…
- 3. Lift per span of a spinning cylinder in ideal flow:
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Vorticity
The curl of velocity, , is the vorticity, twice the local rotation rate. For solid-body rotation at rate , . Taking the curl of the Euler equations eliminates pressure. In 2-D the result is : vorticity is carried by the flow and diffuses through viscosity. Kelvin’s circulation theorem says that in ideal flow the circulation around a curve moving with the fluid is constant. That’s why an airfoil starting from rest sheds a starting vortex: the bound circulation that produces lift must be balanced by an equal and opposite one left behind (Anderson, 2017).
Why boundary conditions decide everything
Laplace and heat equations need boundary data. Dirichlet conditions fix the value (temperature at a wall). Neumann conditions fix the normal derivative (insulated: ; no-penetration: ). By the maximum principle (A3.4-1), the solution of Laplace’s equation with given Dirichlet data is unique: the difference of two solutions is harmonic with zero boundary values, so it’s identically 0. For the heat equation, each Fourier mode decays like . Sharp features (large ) vanish fastest (Practice Code 4).
Stability is a vector-calculus question too
Explicit schemes need in 1-D ( in 2-D) for diffusion, and the CFL condition for advection (Courant, Friedrichs and Lewy, 1928). Physically, information must not travel more than one cell per step.
Exercise 3.1: Show that a stream function always gives a divergence-free velocity
by the symmetry of mixed partials. It’s the 2-D version of “the divergence of a curl is zero”.
- 1. The vorticity of solid-body rotation at rate Ω:
- 2. Kelvin's theorem: in ideal flow, circulation around a material loop is…
- 3. Laplace's equation with fixed boundary values has…
Level 4: Expert
★★★★★ Expert⏱ 50 minResearchers: original papers and open problems.Physics-informed models
A physics-informed neural network (PINN; Raissi, Perdikaris and Karniadakis, 2019) represents the solution by a network. It trains on
The derivatives inside (gradients, Laplacians, divergences) come from automatic differentiation: nested JVPs/VJPs, or hyper-dual numbers (Practice Code 5). Unknown physical constants, such as a viscosity, a diffusivity or a drag coefficient, can be added as trainable parameters. That’s the inverse problem, and arguably PINNs’ strongest use case (Karniadakis et al., 2021).
When is linear in its parameters (fixed random features, as in “extreme learning machine” PINNs; Dong and Li, 2021), a linear PDE’s loss is a least-squares problem solved in one shot. That’s what Exercise 2 does.
What works and what doesn’t (an honest map)
-
Strengths: inverse problems and data assimilation with sparse sensors; irregular geometry without meshing; fusing physics with measurements, for example flow fields reconstructed from flow-visualization videos (“hidden fluid mechanics”; Raissi et al., 2020).
-
Known failure modes:
- stiff or multi-scale problems;
- high-frequency solutions (spectral bias);
- loss-term imbalance, which needs adaptive weights (Wang, Teng and Perdikaris, 2021);
- convection-dominated flows (Krishnapriyan et al., 2021).
For well-posed forward problems, classical solvers are usually faster and more accurate.
-
Neural operators learn the whole solution map, from parameters or forcing to solution, so a new instance costs one forward pass. Examples are DeepONet (Lu et al., 2021) and Fourier neural operators (Li et al., 2021). They’re used for fast weather forecasting surrogates and design loops.
-
Structure by construction. Output a stream function and take its curl, and the velocity is exactly divergence-free. Use finite-volume or flux-form layers and conservation is exact (A3.4-3). Hamiltonian or Lagrangian networks conserve energy. Building physics into the architecture often beats adding it to the loss.
-
Robotics and aerospace:
- learned aerodynamic models for agile drone control (“Neural-Fly”; O’Connell et al., 2022);
- physics-informed surrogates for thermal and structural analysis of spacecraft components;
- differentiable fluid simulation for designing swimming and flying robots.
References
- M. Raissi, P. Perdikaris, G. E. Karniadakis (2019). “Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear PDEs.” Journal of Computational Physics, 378.
- G. E. Karniadakis, I. Kevrekidis, L. Lu, P. Perdikaris, S. Wang, L. Yang (2021). “Physics-informed machine learning.” Nature Reviews Physics, 3.
- S. Dong, Z. Li (2021). “Local extreme learning machines and domain decomposition for solving linear and nonlinear PDEs.” Computer Methods in Applied Mechanics and Engineering, 387.
- M. Raissi, A. Yazdani, G. E. Karniadakis (2020). “Hidden fluid mechanics: learning velocity and pressure fields from flow visualizations.” Science, 367.
- S. Wang, Y. Teng, P. Perdikaris (2021). “Understanding and mitigating gradient flow pathologies in physics-informed neural networks.” SIAM Journal on Scientific Computing, 43(5).
- A. Krishnapriyan, A. Gholami, S. Zhe, R. Kirby, M. Mahoney (2021). “Characterizing possible failure modes in physics-informed neural networks.” NeurIPS.
- L. Lu, P. Jin, G. Pang, Z. Zhang, G. E. Karniadakis (2021). “Learning nonlinear operators via DeepONet.” Nature Machine Intelligence, 3.
- Z. Li et al. (2021). “Fourier neural operator for parametric partial differential equations.” ICLR.
- M. O’Connell et al. (2022). “Neural-Fly enables rapid learning for agile flight in strong winds.” Science Robotics, 7(66).
- J. D. Anderson (2017). Fundamentals of Aerodynamics, 6th ed. McGraw-Hill.
- R. Courant, K. Friedrichs, H. Lewy (1928). “Über die partiellen Differenzengleichungen der mathematischen Physik.” Mathematische Annalen, 100.
- G. K. Batchelor (1967). An Introduction to Fluid Dynamics. Cambridge.