NeuralFluid: Neural Fluidic System Design and Control with Differentiable Simulation

Abstract

We present NeuralFluid, a novel framework to explore neural control and design of complex fluidic systems with dynamic solid boundaries. Our system features a fast differentiable Navier-Stokes solver with solid-fluid interface handling, a low-dimensional differentiable parametric geometry representation, a control-shape co-design algorithm, and gym-like simulation environments to facilitate various fluidic control design applications. Additionally, we present a benchmark of design, control, and learning tasks on high-fidelity, high-resolution dynamic fluid environments that pose challenges for existing differentiable fluid simulators. These tasks include designing the control of artificial hearts, identifying robotic end-effector shapes, and controlling a fluid gate. By seamlessly incorporating our differentiable fluid simulator into a learning framework, we demonstrate successful design, control, and learning results that surpass gradient-free solutions in these benchmark tasks.


Pipeline

Pipeline Overview. (1) Our pipeline starts with an initial parametric geometry and a neural network parameterized controller. (2) The fluid dynamics is then simulated using a dynamic Navier-Stokes solver. (3) The performance of the design and control is evaluated using a loss function, the gradients of which are then back-propagated through our end-to-end differentiable framework. (4) The gradient-based optimization iteratively improves the geometry and control to achieve the task goal. This pipeline allows for efficient geometry and control co-optimization.


Demos


Case Study: Neural Control of An Artificial Heart

Goal: Train a controller to match the outlet velocity to predefined target flow profiles.

Setup:Heart geometry includes two inlets, one outlet, and a chamber.

Controller: A two-layer MLP using time step and outflow norm as inputs.

Target profiles: Cosine wave (smooth periodic flow). ECG-like waveform. Optimization: Minimized the difference between the actual and target flow velocities. Results: The controller generated flow matching the targets, validating the scalability and effectiveness of our method.


Ablation Studies

(a) Effects of Initialization on Optimization We tested our gradient-based approach for controlling a 3D heart model with networks initialized from five different random seeds. Despite initial variations, all runs converged within a few tens of iterations, demonstrating the method’s robustness to initialization and scalability to high-dimensional settings.

(b) Gradient-Based vs Gradient-Free Optimization We compared our gradient-based method against PPO and CMA-ES on the Neural Heart task. Our approach converged rapidly, while gradient-free methods struggled. Although gradient-based optimization requires a differentiable objective, it excels in speed and efficiency when such gradients are available. In more complex, non-differentiable scenarios, gradient-free methods remain viable alternatives.


Poster

Citation

@misc{li2024neuralfluidicdesigncontrol,
  title={Neural Fluidic System Design and Control with Differentiable Simulation}, 
  author={Yifei Li and Yuchen Sun and Pingchuan Ma and Eftychios Sifakis and Tao Du and Bo Zhu and Wojciech Matusik},
  year={2024},
  eprint={2405.14903},
  archivePrefix={arXiv},
  primaryClass={physics.flu-dyn},
  url={https://arxiv.org/abs/2405.14903}, 

}


Keywords

fluid simulation, fluid control, navier-stokes, differentiable simulation, physical simulation, neural fluid, neural control, graphics

Related