Table of Contents
Fetching ...

Data-driven Viscosity Solver for Fluid Simulation

Wonjung Park, Hyunsoo Kim, Jinah Park

TL;DR

The paper tackles viscosity in incompressible fluid simulation by replacing the traditional viscosity solve with a data-driven model that predicts velocity changes using a U-shaped CNN. Key innovations include a symmetric MAC grid to preserve axis symmetry, velocity-derivative–based inputs, and a physics-informed variational loss to generalize across a range of viscosities. The approach demonstrates 2D and 3D capabilities, real-time performance improvements in rigid-fluid interaction, and the ability to handle multiple viscosity regimes, though extrapolation beyond trained ranges remains challenging. Overall, the method offers a scalable, generalizable, and efficient pathway for data-driven viscosity in hybrid Eulerian-Lagrangian simulations with practical impact for graphics and engineering applications.

Abstract

We propose a data-driven viscosity solver based on U-shaped convolutional neural network to predict velocity changes due to viscosity. Our solver takes velocity derivatives, fluid volume, and solid indicator quantities as input. The traditional marker-and-cell (MAC) grid stores velocities at the edges of the grid, causing the dimensions of the velocity field vary from axis to axis. In our work, we suggest a symmetric MAC grid that maintains consistent dimensions across axes without interpolation or symmetry breaking. The proposed grid effectively transfers spatial fluid quantities such as partial derivatives of velocity, enabling networks to generate accurate predictions. Additionally, we introduce a physics-based loss inspired by the variational formulation of viscosity to enhance the network's generalization for a wide range of viscosity coefficients. We demonstrate various fluid simulation results, including 2D and 3D fluid-rigid body scenes and a scene exhibiting the buckling effect. Our code is available at \url{https://github.com/SSTDV-Project/python-fluid-simulation.}

Data-driven Viscosity Solver for Fluid Simulation

TL;DR

The paper tackles viscosity in incompressible fluid simulation by replacing the traditional viscosity solve with a data-driven model that predicts velocity changes using a U-shaped CNN. Key innovations include a symmetric MAC grid to preserve axis symmetry, velocity-derivative–based inputs, and a physics-informed variational loss to generalize across a range of viscosities. The approach demonstrates 2D and 3D capabilities, real-time performance improvements in rigid-fluid interaction, and the ability to handle multiple viscosity regimes, though extrapolation beyond trained ranges remains challenging. Overall, the method offers a scalable, generalizable, and efficient pathway for data-driven viscosity in hybrid Eulerian-Lagrangian simulations with practical impact for graphics and engineering applications.

Abstract

We propose a data-driven viscosity solver based on U-shaped convolutional neural network to predict velocity changes due to viscosity. Our solver takes velocity derivatives, fluid volume, and solid indicator quantities as input. The traditional marker-and-cell (MAC) grid stores velocities at the edges of the grid, causing the dimensions of the velocity field vary from axis to axis. In our work, we suggest a symmetric MAC grid that maintains consistent dimensions across axes without interpolation or symmetry breaking. The proposed grid effectively transfers spatial fluid quantities such as partial derivatives of velocity, enabling networks to generate accurate predictions. Additionally, we introduce a physics-based loss inspired by the variational formulation of viscosity to enhance the network's generalization for a wide range of viscosity coefficients. We demonstrate various fluid simulation results, including 2D and 3D fluid-rigid body scenes and a scene exhibiting the buckling effect. Our code is available at \url{https://github.com/SSTDV-Project/python-fluid-simulation.}
Paper Structure (17 sections, 6 equations, 12 figures)

This paper contains 17 sections, 6 equations, 12 figures.

Figures (12)

  • Figure 1: Fluid simulation with data-driven viscosity solver. Using the traditional affine particle-in-cell APIC simulator as a baseline, our data-driven solver replaces the viscosity solver to output velocity changes due to viscosity. Training ground truth is generated with the traditional viscosity solver Batty.
  • Figure 2: U-shaped convolutional neural network for our data-driven viscosity solver.
  • Figure 3: Extension of the MAC grid for CNN-based viscosity solver To adjust input channel dimensions without losing information or breaking symmetry, we propose the symmetric MAC grid. This grid ensures symmetry in all input channels.
  • Figure 4: Comparison of input architecture. (Left) Ground truth, (Middle) Result from the input with simple padding, and (Right) input with our symmetric MAC grid.
  • Figure 5: (a) From the initial resting state, the frame with (b) average pooling and ReLU (c) max pooling and tangent hyperbolic (Tanh) (d) average pooling and Tanh (ours).
  • ...and 7 more figures