← Back to glossary

Differentiable Physics

Method Also:Differentiable Simulation / DiffPhys Updated 2026-10-12
Definition

Making an entire simulation pipeline — including the solver iterations — differentiable with respect to its inputs, so gradients can drive inversion, control and end-to-end training. JAX-CFD is a representative differentiable CFD framework.

What it is

Classical solvers are black boxes from the outside: their iteration (pressure Poisson solve, time marching) can only be differentiated by finite differences, which collapses as dimensionality grows. Differentiable physics rewrites the solver in a differentiable programming language (JAX, PyTorch) so that gradients of simulation output with respect to design parameters are obtained exactly by AD.

Key points

  • Gradient accuracy: AD gradients are exact and dimension-independent, which is decisive for high-dimensional design variables (shape parameters, control sequences).
  • Two routes: (a) differentiate through the whole solver; (b) use the implicit function theorem and differentiate only at the converged state (no unrolled graph, much less memory).
  • Cost: the unrolled AD graph grows linearly with steps, so long rollouts need checkpointing or adjoint methods.
  • Typical uses: shape optimization, training flow-control policies, material parameter inversion, hybrid neural + physics modeling.

Common pitfalls / boundaries

  • Differentiable is not stable: gradients unrolled over hundreds of iterations tend to explode or vanish, requiring implicit differentiation or truncation.
  • Long-time gradients of chaotic/turbulent systems are inherently ill-conditioned; short windows with receding-horizon replanning are more practical.

Related terms

Related resources