Guaranteed Conservation of Momentum for Learning Particle-based Fluid Dynamics

Lukas Prantl, Benjamin Ummenhofer, Vladlen Koltun, Nils Thuerey

The Challenge of Learned Physics

In the world of learned physics, simulation is typically treated as a regression problem: a neural network is fed a sequence of data and asked to predict the next state. While these models can produce visually impressive results, they often ignore fundamental laws of physics, such as Newton’s third law (every action has an equal and opposite reaction).

Because standard neural networks—like Multi-Layer Perceptrons (MLPs) or generic Graph Neural Networks (GNNs)—treat physical laws merely as "soft constraints" within a loss function, they frequently take unphysical shortcuts. Over long simulation rollouts, these small errors accumulate. The result is fluids that mysteriously gain or lose momentum, drift unnaturally, or become completely unstable. The core challenge is forcing a neural network to strictly obey the laws of physics without sacrificing its ability to learn complex, non-linear dynamics.

Researchers have recently developed a novel neural network architecture for fluid dynamics that guarantees the conservation of linear momentum by design. By using "antisymmetric" convolutional layers as a hard constraint, the model achieves significantly better stability and generalization than previous methods, successfully scaling to simulations with over one million particles.

Core Methodology: Antisymmetric Continuous Convolution

The authors introduce Antisymmetric Continuous Convolution (ASCC), baking the conservation of momentum directly into the network's architecture rather than relying on loss penalties.

1. Antisymmetric Kernels In a particle system, momentum is conserved if the internal forces between any two particles $x$ and $y$ are equal and opposite ($F_{xy} = -F_{yx}$). The authors realize this by enforcing an antisymmetry constraint on the learnable convolution kernels ($g(x) = -g(-x)$).

Antisymmetric kernel design where trainable weights are reflected to enforce momentum conservation.

2. The ASCC Layer They modify the standard continuous convolution formula so that the interaction between particles always sums to zero across the system. This acts as a hard constraint—the network physically cannot violate momentum conservation, regardless of how it is trained.

3. Hierarchical Architecture To handle large-scale fluids efficiently, the researchers employ a multi-scale approach inspired by HRNet.

The multi-scale network architecture featuring parallel branches and the final ASCC layer.

The network processes features at different spatial resolutions in parallel. This allows for a large "receptive field"—meaning particles can "feel" the influence of distant neighbors—without incurring massive computational costs.

4. Efficient Voxelization Instead of expensive sampling methods, the architecture uses an $O(N)$ voxel-based resampling scheme to build its particle hierarchy, making pre-processing significantly faster.

Datasets and Evaluation

The authors evaluated their method on three distinct datasets:

  • WBC-SPH (New): A 2D dataset generated using a high-fidelity Smoothed Particle Hydrodynamics solver, featuring complex, randomly generated obstacles and varying gravity.
  • WaterRamps: A standard 2D benchmark from previous literature involving fluid flowing over ramps.
  • Liquid3d: A 3D dataset used to test the model's performance in higher dimensions and its ability to handle larger time steps.

Key Insights

  • Inductive Bias as a Generalizer: By restricting the network's "action space" to only physically valid movements, the model actually generalizes better to unseen scenarios. For example, a model trained with gravity can still simulate zero-gravity environments accurately because it learned the underlying interaction physics rather than just "fitting" a downward drift.
  • Convolution vs. Graphs: While GNNs are popular for particle simulations, the authors argue that continuous convolutions are more efficient at processing positional information and are less tied to specific particle densities.
  • Stability through Rollouts: Training the model on "rollouts" (predicting multiple steps in a row) teaches the network to correct its own small errors, preventing the simulation from exploding over time.

Results and Performance

  • Superior Accuracy: In terms of Earth Mover’s Distance (EMD)—a metric for how well the fluid distribution matches the ground truth—the ASCC model outperformed the state-of-the-art GNS model by a factor of 7.22x on challenging test cases.
  • Efficiency: The ASCC network is significantly leaner than its competitors. It uses only 29% of the weights of the GNS model and runs inference 2.79x faster.
  • Massive Scaling: The model successfully simulated a scene with one million particles for 800 time steps, maintaining physical plausibility throughout.
  • Speedup: Compared to traditional high-fidelity SPH solvers, the neural network achieved a 162x speedup, reducing simulation time from seconds per frame to mere milliseconds.

Limitations and Future Work

While the paper guarantees linear momentum, it does not explicitly guarantee the conservation of angular momentum (rotation). The authors note that while their model handles rotation well in practice, it isn't mathematically "locked in" the same way linear momentum is.

Additionally, the antisymmetric constraint is a deliberate restriction on the network's flexibility. While this aids generalization, it makes the initial learning phase more complex because the network has fewer "degrees of freedom" to fit the training data. Future work may involve exploring more general forms of $E(n)$ equivariance to capture even more physical symmetries.

Summary updated

BibTeX
@inproceedings{prantl2022guaranteed,
  author = {Lukas Prantl and Benjamin Ummenhofer and Vladlen Koltun and Nils Thuerey},
  title = {{Guaranteed Conservation of Momentum for Learning Particle-based Fluid Dynamics}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=122GMr-CvM},
}
Figure