Title: DRiFT: Differentiable Grid-Based Rigid-Fluid Coupling for Training and Control
Primary area: applications to physical sciences (physics, chemistry, biology, etc.)
Keywords: Differentiable Physics, Solid-Fluid Coupling

Abstract: Intelligent agents, interacting with physical environments, require an accurate
understanding of the consequences of their action for efficient learning. Such
agents are often trained inside simulated environments to alleviate over dependence
on data, and gradients from such a simulation can help in training the agent. To this
end, we present an end-to-end differentiable grid-based fluid simulation including
strong two-way coupling with rigid bodies. In the forward pass, the solid-fluid
boundary conditions are converted to a monolithic linear pressure solve using a
variational method. For the backpropagation, we introduce a novel method of
calculating and propagating gradients for the combined fluid-solid state using the
adjoint method, which runs faster than the forward solve. This implementation,
which is customized for coupling rigid bodies with inviscid fluids, is more suitable
over general purpose methods like automatic differentiation, for use cases where
performance is key for analyzing overall flow patterns and learning fluid properties.
We demonstrate the utility of our simulator in training a neural network to learn
optimal control for general target states. Additionally, we show the effectiveness
of our differentiable simulator in isolation, by using the generated gradients for
simple derivative based optimization tasks. Finally, we showcase the accuracy,
robustness and efficiency of our gradient computation method.