Lid-Driven Cavity (LDC) PINN#
The Lid-Driven Cavity PINN is the canonical introductory example for
physics-informed training in PhysicsNeMo v2.0. It solves the steady,
incompressible 2D Navier–Stokes equations on a unit-square cavity with
a moving top wall, using physicsnemo.sym.eq.phy_informer.PhysicsInformer
to enforce the PDE residuals as soft constraints inside an explicit
PyTorch training loop.
The complete, runnable example — including the model definition, the
NavierStokes PDE class, the PhysicsInformer setup, the boundary
condition treatment, the Hydra configuration, and a step-by-step
walkthrough of the training loop — lives in the PhysicsNeMo repository
and is the source of truth for this tutorial:
examples/cfd/ldc_pinns/ on GitHub.
Run it with:
git clone https://github.com/NVIDIA/physicsnemo.git
cd physicsnemo/examples/cfd/ldc_pinns
pip install "nvidia-physicsnemo[sym]"
python train.py
For an inverse-problem counterpart that recovers unknown PDE
coefficients from data (with the same PhysicsInformer machinery),
see examples/cfd/inverse_pinns/.
If you are migrating an existing physicsnemo-sym LDC script, see
the PhysicsNeMo Sym → physicsnemo.sym section of the
PhysicsNeMo v2.0 Migration Guide.