Fast Aquatic Swimmer Optimization with Differentiable Projective Dynamics and Neural Network Hydrodynamic Models

Extracted source text · arXiv 2204.12584

%%%%%%%% ICML 2022 EXAMPLE LATEX SUBMISSION FILE %%%%%%%%%%%%%%%%%

\documentclass[nohyperref]{article}

% Recommended, but optional, packages for figures and better typesetting:
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{booktabs} % for professional tables

% hyperref makes hyperlinks in the resulting PDF.
% If your build breaks (sometimes temporarily if a hyperlink spans a page)
% please comment out the following usepackage line and replace
% \usepackage{icml2022} with \usepackage[nohyperref]{icml2022} above.
\usepackage{hyperref}


% Attempt to make hyperref and algorithmic work together better:
\newcommand{\theHalgorithm}{\arabic{algorithm}}

% Use the following line for the initial blind version submitted for review:
\usepackage[accepted]{icml2022_arxiv}

% If accepted, instead use the following line for the camera-ready submission:
% \usepackage[accepted]{icml2022}

% For theorems and such
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{amsthm}

% if you use cleveref..
\usepackage[capitalize,noabbrev]{cleveref}

\input{math_commands.tex}

\usepackage{hyperref}
\usepackage{url}
\usepackage{mwe}
\usepackage{siunitx}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THEOREMS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{assumption}[theorem]{Assumption}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

% Todonotes is useful during development; simply uncomment the next line
%    and comment out the line below the next line to turn off comments
%\usepackage[disable,textsize=tiny]{todonotes}
\usepackage[textsize=tiny]{todonotes}


% The \icmltitle you define below is probably too long as a header.
% Therefore, a short form for the running title is supplied here:
\icmltitlerunning{Fast Aquatic Swimmer Optimization with Differentiable Projective Dynamics and Neural Network Hydrodynamic Models}

\begin{document}

\twocolumn[
\icmltitle{Fast Aquatic Swimmer Optimization with Differentiable Projective Dynamics and Neural Network Hydrodynamic Models}

% It is OKAY to include author information, even for blind
% submissions: the style file will automatically remove it for you
% unless you've provided the [accepted] option to the icml2022
% package.

% List of affiliations: The first argument should be a (short)
% identifier you will use later to specify author affiliations
% Academic affiliations should list Department, University, City, Region, Country
% Industry affiliations should list Company, City, Region, Country

% You can specify symbols, otherwise they are numbered in order.
% Ideally, you should not use this facility. Affiliations will be numbered
% in order of appearance and this is the preferred way.
\icmlsetsymbol{equal}{*}

\begin{icmlauthorlist}
\icmlauthor{Elvis Nava}{ethai,eth,eth-ni}
\icmlauthor{John Z. Zhang}{eth}
\icmlauthor{Mike Y. Michelis}{eth}
\icmlauthor{Tao Du}{mit}
\icmlauthor{Pingchuan Ma}{mit} 
\icmlauthor{Benjamin F. Grewe}{eth-ni}
\icmlauthor{Wojciech Matusik}{mit}
\icmlauthor{Robert K. Katzschmann}{eth}
\end{icmlauthorlist}

\icmlaffiliation{ethai}{ETH AI Center, ETH Zurich, Zurich, Switzerland}
\icmlaffiliation{eth}{Soft Robotics Lab, ETH Zurich, Zurich, Switzerland}
\icmlaffiliation{eth-ni}{Institute of Neuroinformatics, ETH Zurich, Zurich, Switzerland}
\icmlaffiliation{mit}{CSAIL, MIT, Cambridge, MA, USA}

\icmlcorrespondingauthor{Elvis Nava}{elvis.nava@ai.ethz.ch}
\icmlcorrespondingauthor{Robert K. Katzschmann}{rkk@ethz.ch}

% You may provide any keywords that you
% find helpful for describing your paper; these are used to populate
% the "keywords" metadata in the PDF but will not be shown in the document
\icmlkeywords{Machine Learning, Robotics, Soft Robotics, Optimization, Physics, Hydrodynamics, Robotic Fish}

\vskip 0.3in
]

% this must go after the closing bracket ] following \twocolumn[ ...

% This command actually creates the footnote in the first column
% listing the affiliations and the copyright notice.
% The command takes one argument, which is text to display at the start of the footnote.
% The \icmlEqualContribution command is standard text for equal contribution.
% Remove it (just {}) if you do not need this facility.

\printAffiliationsAndNotice{}  % leave blank if no need to mention equal contribution
%\printAffiliationsAndNotice{\icmlEqualContribution} % otherwise use the standard text.
\begin{abstract}
% 
% 
Aquatic locomotion is a classic fluid-structure interaction (FSI) problem of interest to biologists and engineers. Solving the fully coupled FSI equations for incompressible Navier-Stokes and finite elasticity is computationally expensive. Optimizing robotic swimmer design within such a system generally involves cumbersome, gradient-free procedures on top of the already costly simulation.
To address this challenge we present a novel, fully differentiable hybrid approach to FSI that combines a 2D direct numerical simulation for the deformable solid structure of the swimmer and a physics-constrained neural network surrogate to capture hydrodynamic effects of the fluid.
For the deformable solid simulation of the swimmer's body, we use state-of-the-art techniques from the field of computer graphics to speed up the finite-element method (FEM). For the fluid simulation, we use a U-Net architecture trained with a physics-based loss function to predict the flow field at each time step. The pressure and velocity field outputs from the neural network are sampled around the boundary of our swimmer using an immersed boundary method (IBM) to compute its swimming motion accurately and efficiently.
We demonstrate the computational efficiency and differentiability of our hybrid simulator on a 2D carangiform swimmer. Due to differentiability, the simulator can be used for computational design of controls for soft bodies immersed in fluids via direct gradient-based optimization.
\end{abstract}

\begin{figure*}[ht]
\vskip 0.2in
\begin{center}
\centerline{
\begin{tabular}{c@{\hskip1mm}c@{\hskip1mm}c}
\includegraphics[trim=50 20 570 20,clip,width=56mm]{figures/fish0.png} &
\includegraphics[trim=50 20 570 20,clip,width=56mm]{figures/fish1.png} &
\includegraphics[trim=50 20 570 20,clip,width=56mm]{figures/fish2.png}
\end{tabular}
}
\caption{The forward swimming of a carangiform soft body fish immersed in fluid is simulated using our hybrid technique featuring FEM solid simulation and neural network based hydrodynamics. The figures illustrate at three separate time steps ($t$ = 73, 162, 275) both the fish and the full fluid pressure field. The red arrows at the interface from fluid to solid indicate the forces applied from the fluid to the fish. The forces are calculated with the immersed boundary method.}
\label{fig:general}
\end{center}
\vskip -0.2in
\end{figure*}

\section{Introduction}

Soft robotics is a rapidly advancing branch of robotics, showing promising results in non-standard settings in which compliant structures and bio-inspired designs are needed to solve tasks in natural environments~\cite{hawkes_hard_2021}. Aquatic locomotion is one such setting where soft robotic designs are uniquely able to take advantage of hydrodynamic properties, mimicking biological fish designs selected through evolutionary pressures for maximum fitness in nature~\cite{katzschmann_exploration_2018}.

Simulation is a non-trivial challenge in the design of soft robots, as opposed to the rigid domain, for which established techniques have been developed and built upon in the span of decades. As for aquatic locomotion, solving fluid-structure interaction (FSI) for incompressible Navier-Stokes is a hard problem, traditionally extremely computationally expensive and thus often impossible in practice. Leveraging these simulations for design and control optimization generally involves an additional computational burden, through slow evolutionary or otherwise gradient-free optimization procedures. In this work, we leverage recent advances in machine learning for physics to take a step towards solving this problem, proposing a FSI simulation that is both orders of magnitude faster than standard approaches and fully differentiable, thus allowing for simple gradient-based optimization of design and control objectives.

To address the FSI challenge, our hybrid approach uses a differentiable numerical simulation for the deformable solid structure and a neural network surrogate to capture hydrodynamic effects of the fluid. To perform fast and differentiable soft body simulation of a flapping 2D carangiform swimmer, we leverage the finite-element method (FEM) combined with the novel approach of Differentiable Projective Dynamics (DiffPD)~\cite{du_diffpd_2021}. For the fluid simulation, we train a physics-constrained neural network for hydrodynamics as proposed by Wandel et al.~\yrcite{wandel_learning_2021}, which approximates fluidic flow on a discretized marker and cell (MAC) grid~\cite{harlow_numerical_1965}. Their approach requires no training data but is instead trained using a physics-constrained loss based on the Navier-Stokes differential equation.

\subsection{Our Contribution}

Our contributions are the following:
\begin{itemize}
    \item We introduce a differentiable layer linking the solid and the fluid simulations, achieving FSI coupling while maintaining low computational cost and full automatic differentiability. This approach involves the specification of the fluid boundary condition as a \textit{soft mask} with techniques from differentiable rendering~\cite{liu_soft_2019}, and the computation of fluid-to-solid surface forces using a variation of the Immersed Boundary Method (IBM)~\cite{peskin_immersed_2002} with Gaussian distance.
    \item We demonstrate on a 2D carangiform swimmer that our hybrid approach leads to realistic swimming behavior with forward propulsion, while requiring considerably less computational resources than existing FSI simulations (\cref{fig:general}).
    \item We leverage the differentiability of the simulation to directly optimize the frequency parameter of a swimming controller with first order gradient optimization to achieve higher forward swimming speeds.
    \item We compare our hybrid simulation with the traditional COMSOL solver for FSI, demonstrating a monotonic relationship between the distance travelled by the fish with the same controller on either simulation.
\end{itemize}



\section{Related Work}

\subsection{Soft Robotics and Aquatic Locomotion}
To date there exist several examples of successful applications of soft robots in aquatic environments. Bio-inspired artificial fish robots \cite{katzschmann_hydraulic_2016,lin_modeling_2021} mimicking biological fish have been deployed for a range of practical tasks, from exploration of underwater environments and observation of aquatic life \cite{katzschmann_exploration_2018,li_self-powered_2021} to protection of marine habitats against invasive species \cite{polverino_ecology_2022}.

Interest in the topic of aquatic locomotion has not been limited to robotics: the problem of learning swimming controls in simulation has received considerable attention from a reinforcement learning perspective \cite{gazzola_learning_2016,colabrese_flow_2017,verma_efficient_2018}, albeit relying on simple swimmer models that avoid the issues presented by soft bodies and FSI. For this reason, translating learnt controllers from these simulated works back to real-world robotics platforms (sim2real) remains an open challenge. Other works on aquatic locomotion simulation \cite{liu_computer_2015} do not involve learning controls altogether, but are limited to investigations into properties of biological swimmers through simulation.

\subsection{Neural Networks for Hydrodynamics}

Seminal work on Physics-Informed Neural Networks (PINNs) \cite{raissi_physics-informed_2019} laid the foundations for the application of machine learning models as surrogate differential equations solvers. PINN training leverages the autodifferentiation properties of neural networks to learn the dynamics of differential equation systems without the need for costly training data, but using differential equation residuals directly as the model's loss function.

A trove of subsequent works build on top of the PINN approach, refining the technique specifically for hydrodynamics problems \cite{mao_physics-informed_2020, raissi_hidden_2020, sun_surrogate_2020}. Wandel et al. \yrcite{wandel_learning_2021} propose a neural network model for hydrodynamics based on a discretized MAC grid and trained with a Navier-Stokes residual loss. While technically not following the original PINN specification, as the derivative terms in the Navier-Stokes loss are computed with finite differences on the grid as opposed to using autodifferentiation of the model inputs, their model allows for dynamic interactive specification of boundary conditions. For this reason, we adopt their model as a core component of our hybrid simulator. Further work from the same authors generalizes the technique to 3D simulations \cite{wandel_teaching_2021} and to higher turbulence fluids \cite{wandel_spline-pinn_2021}.

\subsection{Differentiable Soft-Body Simulation}

Differentiable soft-body simulation extends standard soft-body simulators to compute gradients for a soft body's shape, control, or state parameters. Such gradients have been proven helpful in several downstream soft robotic applications, including system identification~\cite{hu_chainqueen_2019}, trajectory optimization~\cite{geilinger_add_2020}, motion control~\cite{qiao_differentiable_2021}, and shape optimization~\cite{ma_diffaqua_2021}.

Mainstream differentiable soft-body simulators fall into two categories: physics-based and learning-based. Physics-based differentiable soft-body simulators derive gradients based on governing equations characterizing system dynamics and require domain-specific knowledge~\cite{hu_chainqueen_2019, geilinger_add_2020, hu_difftaichi_2020, du_diffpd_2021, qiao_differentiable_2021}. On the other hand, learning-based approaches aim to learn a neural network model approximating soft-body dynamics~\cite{li_learning_2019,pfaff_learning_2021}. Such neural networks are naturally differentiable but, unlike their physics-based counterparts, typically lack guarantees on physics invariants, \emph{e.g.}, energy or momentum conservation. Additionally, their generalizability to new settings largely depends on the quality of the training data.

In this work, we use DiffPD \cite{du_diffpd_2021}, a recently developed physics-based differentiable soft-body simulator, to simulate our aquatic swimmers. While our algorithm is agnostic to the choice of differentiable simulators, we have found DiffPD beneficial because of its faster speed compared to other physics-based differentiable soft-body simulators and its extension to underwater robotics applications~\cite{ma_diffaqua_2021,du_underwater_2021}.
%Please Tao write about precursors to DiffPD, just a brief mention of DiffPD itself, as that should be described later in the "Differentiable Projective Dyanmics" subsection of the main method.
%Mention DiffAqua

\subsection{Fluid-Structure Interactions}
Fluid-structure interaction (FSI) studies the complex behavior of fluids coupled with solid objects in a multi-physics system. FSI has been an extensively studied research topic in mechanical engineering, computational physics, and other related fields for many years~\cite{dowell_modeling_2001}. Existing works on FSI typically focus on coupling fluids and rigid or soft objects under small deformations \cite{mucha_model_2004,zhang_two_2007,kalitzin_toward_2003,yang_embedded-boundary_2006}. Numerical techniques for coupling fluids and nonlinear soft objects with large deformation have also been developed in computational physics and computer graphics \cite{feng_simulations_2019,brandt_reduced_2019,robinson-mosher_two-way_2008,lu_two-way_2016,teng_eulerian_2016,fang_iq-mpm_2020}. Existing methods for FSI have been used to investigate the swimming behavior of fish \cite{curatolo_virtual_2015}. These techniques provide accurate yet expensive computational tools for applications such as underwater soft swimmers covered in this work.

None of the FSI methods described above take into account gradient computation. Because of the already complicated coupling between fluids and solids, works on \emph{differentiable} FSI are unsurprisingly sparse. Existing differentiable FSI approaches typically rely on non-physical simplifications of fluid, solid, or coupling models, \emph{e.g.}, assuming simple empirical fluid models~\cite{ma_diffaqua_2021,du_underwater_2021} or limiting interactions to be local~\cite{li_learning_2019,pfaff_learning_2021}. Compared with those previous works, our work is different because we attempt to incorporate the full physics in all possible aspects: Navier-Stokes equations for modeling fluids, continuum mechanics for modeling soft bodies, and immersed boundary methods \cite{peskin_immersed_2002} (IBM), a representative FSI method, for modeling solid-fluid coupling.



\section{Differentiable FSI Method}

\begin{figure}[ht]
    %\vskip 0.2in
    \begin{center}
    \centerline{\includegraphics[width=\columnwidth]{figures/hydronet.pdf}}
    \caption{Overview block diagram of our hybrid simulation method. $\vq$, $\dot{\vq}$ are positions and velocities of finite elements; $\vh$ are actuator signals; $\vp$, $\vv_x$ and $\vv_y$ are pressure and velocity fields of the fluid; $\vb$ is the soft boundary mask; $\mathbf{f}_{\mathrm{ext}}$ is the hydrodynamic force applied by the fluid to the solid.}
    \label{fig:overview}
    \end{center}
    \vskip -0.2in
\end{figure}

We hereby detail our hybrid method for fast and fully differentiable simulation of soft body and fluid interaction. As shown in Figure~\ref{fig:overview}, our approach consists of repeated, stacked interaction between the DiffPD solid simulator and the Hydrodynamics Neural Network (HydroNet) surrogate simulator. The output of the fluid simulation at time $t$ is used as input for the solid simulation at the same time $t$ through the introduction of an external fluidic force, while the output of the solid simulation at time $t$ is used as input for the fluid simulation at the next time step $t+1$ through the specification of a boundary condition. This interleaved interaction leads to the unfolding of a differentiable computation graph that can be backtraced by autodifferentiation frameworks to compute gradients through the entire simulation episode and optimize objectives (\cref{fig:sim-graph}). FEM element positions and velocities, actuations, fluid curls and pressures, boundary conditions, external forces and Young's moduli are all differentiable with respect to each other. In the following sections, we describe each component of the system in detail.

\subsection{Hydrodynamic Surrogate Simulation}

Our goal for fluid simulation is that of obtaining a fast and differentiable surrogate model of hydrodynamics, so that swimmer designs and controls can be optimized by differentiating directly against the simulation environment, as opposed to doing so through evolutionary strategies or reinforcement learning.

In particular, our surrogate simulator needs to solve the incompressible Navier-Stokes equations describing fluidic flow costrained by Dirichlet boundary conditions. Given fluid density $\rho$ and viscosity $\mu$, and defining $\mathbf{v}$ and $\mathbf{p}$ to be velocity and pressure fields over a fluid domain $\Omega$, the equations consist of the following three terms:
\begin{align}
    \nabla \cdot \mathbf{v} = 0 &\qquad \text{on }\Omega\text{,}\label{nv-term1}\\
    \rho \left(\frac{\partial \mathbf{v}}{\partial t} + (\mathbf{v} \cdot \nabla) \mathbf{v} \right) = - \nabla \mathbf{p} + \mu \nabla^2 \mathbf{v} &\qquad \text{on }\Omega\text{,}\label{nv-term2}\\
    \mathbf{v} = \mathbf{v}_d &\qquad \text{on }\partial\Omega\text{.}\label{nv-term3}
\end{align}
Equation (\ref{nv-term1}) is called the divergence term, and forces incompressibility of the fluid, disallowing any sources or sinks within $\Omega$. Equation (\ref{nv-term2}) is the main hydrodynamic term, stating that changes in fluidic particle momentum must correspond to forces exerted by the pressure gradient and viscous friction. Equation (\ref{nv-term3}) is the Dirichlet boundary condition, stating that velocities on the boundary $\partial\Omega$ of the fluidic domain must be equal to the supplied boundary velocities $\mathbf{v}_d$.

The equations can be simplified for the 2D case by observing that the Helmholtz theorem allows to decompose the velocities into a curl free part and a divergence-free part
\begin{equation}
\mathbf{v} = \nabla\mathbf{q} + \nabla \times \mathbf{a}\text{.}
\end{equation}
By expressing velocities as $\mathbf{v} = \nabla \times \mathbf{a}$, with the curl $\mathbf{a}$ being one-dimensional in the 2D case, we implicitly force zero-divergence in our fluid without the need for explicitly solving for Equation (\ref{nv-term1}).

To solve the equations, we train an unsupervised neural network model following the approach proposed by Wandel et al. \yrcite{wandel_learning_2021}. The model in focus is a U-net \cite{ronneberger_u-net_2015} with limited convolutional channels that operates on discretized fields on a marker and cell (MAC) \cite{harlow_numerical_1965} grid. The model takes as input the curl field $\mathbf{a}$, the pressure field $\mathbf{p}$, the boundary mask $\mathbf{b}$ identifying the domain $\Omega$, and the boundary velocities $\mathbf{v}_d$ from time step $t$. The model predicts as output the curl field $\mathbf{a}$ and the pressure field $\mathbf{p}$ for the next time step $t+1$, given a constant time step magnitude $h$.

The model is not trained on simulation data, but instead uses the Navier-Stokes residuals as its loss function:
\begin{align}
    L_p &= \left\|\rho \left(\frac{\partial \mathbf{v}}{\partial t} + (\mathbf{v} \cdot \nabla) \mathbf{v} \right) + \nabla \mathbf{p} - \mu \nabla^2 \mathbf{v} \right\|^2\quad \text{on }\Omega\text{,}\label{nvloss-net}\\
    L_b &= \left\|\mathbf{v} - \mathbf{v}_d \right\|^2 \quad \text{on }\partial\Omega\text{,}\label{boundloss-net}\\
    L &= \beta L_p + \gamma L_b \text{.}\label{totloss-net}
\end{align}
with parameters $\beta$ and $\gamma$ determining how much to prioritize the Navier-Stokes term or the boundary term.

Given this loss, the network is trained on synthetic episodes consisting of randomly generated boundary conditions, with the network's curl and pressure fields output being fed back as training data at each iteration. This way, the physics-constrained loss is applied to increasingly realistic scenarios.

%If the fluid parameters are set to water, $\rho=$ \SI{1000}{kg/m^3} and $\mu=$ \SI{1}{\milli \pascal \second}, the hydronet training does not converge. We believe this is due to the turbulence of the solution.

%For the hydronet, we are running \SI{0.25}{m} height and \SI{0.75}{m} length, which is $100 \times 300$ pixels.

%For the benchmark, \url{http://www.mathematik.tu-dortmund.de/~featflow/en/benchmarks/cfdbenchmarking/flow/dfg_benchmark2_re100.html}, the fluid parameters are $\rho=$ \SI{1}{kg/m^3} and $\mu=$ \SI{1}{\milli \pascal \second}, so that the Reynolds number is $\textrm{Re} < 100$.

\subsection{Differentiable Soft-Body Simulation}

%We use the recently introduced DiffPD~\cite{du_diffpd_2021}, a fast, robust, and physics-based differentiable soft-body simulator, to simulate our soft swimmers and compute the necessary gradients.
We model the soft-body dynamics by the following governing equations from continuum mechanics~\cite{sifakis_fem_2012}:
\begin{align}
    \rho_s \ddot{\vq} = \nabla \cdot \mathbf{P} + \mathbf{f}_{\textrm{ext}},
\end{align}
where $\rho_s$ stands for the soft material's density, $\vq = \vq(\mathbf{X}, t)$ tracks the position of a material point $\mathbf{X}$ from the material space (undeformed shape) at time $t$, $\mathbf{P}$ represents the first Piola-Kirchoff stress tensor, and $\mathbf{f}_{\text{ext}}$ captures all external forces applied to $\mathbf{X}$ at time $t$. We refer interested readers to Sifakis \& Barbic \yrcite{sifakis_fem_2012} for more background information regarding soft-body simulation. The stress $\mathbf{P}$ determines the behavior of soft material and is specified by choosing soft material models. In this work, we use the linear co-rotated material model as suggested by DiffPD because of its balance between speed~\cite{bouaziz_projective_2014} and physical accuracy~\cite{du_underwater_2021,zhang_learning_2021}.

Given the continuous equations above, DiffPD uses standard finite-element methods (FEM) and the implicit time-stepping scheme to discretize the dynamic system spatially and temporally, leading to the nonlinear system of equations below:
\begin{align}
\vq_{t + 1} &= \vq_t + h \dot{\vq}_{t + 1}, \\
\dot{\vq}_{t + 1} &= \dot{\vq}_t + h \rho_s^{-1}(\mathbf{f}_{\textrm{ext}} + \mathbf{f}_{\textrm{int}}(\mathbf{x}_{t + 1})),
\end{align}
where $\vq$ and $\dot{\vq}$ now represent nodal positions and velocities of finite elements at time steps specified by their subscripts. The notation $\mathbf{f}_{\text{int}}$ denotes the elastic force induced by the stress tensor $\mathbf{P}$. Once the forward simulation process is established, DiffPD derives its gradients using standard chain rules and adjoint methods. Interested readers can refer to DiffPD~\cite{du_diffpd_2021} for detailed derivations of these equations.


% \iffalse
% % Below is the old version from Elvis.
% For the solid soft body simulation, we leverage the recently introduced technique of Differentiable Projective Dynamics \cite{du_diffpd_2021} to inexpensively speed up backpropagation of Projective Dynamics \cite{bouaziz_projective_2014} by exploiting the prefactorized Cholesky decomposition in forward PD simulation.

% The simulated soft body is first discretized into a set of finite elements described by their positions $\vq$ and velocities $\dot{\vq}$, and is modeled using the equations of elasticity with a corotated material model \cite{sifakis_fem_2012}, as it is straightforwardly compatible with projective dynamics. The material properties are described by the the Lam\'e parameters $\mu$ and $\lambda$, which have the following relation to the Young's modulus and Poisson ratio
% \begin{equation}
%     E = \frac{\mu(3\lambda+2\mu)}{\lambda+\mu}, \quad \nu = \frac{\lambda}{2(\lambda+\mu)}.
% \end{equation}

% Given the material parameters, the corotated material is defined by its energy density function:
% \begin{equation}
%     \Psi = \mu \left\lVert\mathbf{U} - \mathbf{I}\right\rVert^2_F + \frac{\lambda}{2}\text{tr}^2(\mathbf{U}-\mathbf{I}),
% \end{equation}
% where $\mathbf{U}$ is the stretch tensor, $\mathbf{I}$ is the identity, and $\| \cdot \|_F$ denotes the Frobenius norm.
% \fi


\subsection{Differentiable Fluid-Structure Interaction}

FSI involves solving a two-way link between the DiffPD soft structure FEM simulation and our neural network hydrodynamic surrogate simulation. Hydrodynamic forces from the fluid simulation affect the soft body finite elements as an external force $\mathbf{f}_\textrm{ext}$, at the same time the soft body simulation determines the Dirichlet boundary conditions $\mathbf{b}$ and $\mathbf{v}_d$ for the hydrodynamics simulation.
An additional cause of complexity stems from the fact that these operations must mediate between a \textit{Lagrangian} and a \textit{discrete Eulerian} representation for physical quantities, with the former being used the the solid simulation, and the latter for the fluid simulation.

Lagrangian methods handle physics simulation by modeling individual particles constituting the simulated material. DiffPD operates in a Lagrangian fashion, as the finite elements identified by $\vq$ and $\dot{\vq}$ track specific points within the soft body and move along with the body within the domain. Opposed to this, discrete Eulerian methods simulate PDEs on a discretized grid such as the fixed MAC grid used by Wandel et al. \yrcite{wandel_learning_2021}'s hydrodynamics network. With this representation, $\mathbf{v}$ and $\mathbf{p}$ summarise fluid properties on fixed locations of the domain, without tracking individual fluid particles.

The challenge in this setting is that of providing a differentiable layer to compute these interaction quantities which mediate between representations. For the solid-to-fluid interaction, the Lagrangian elements described by $\vq$ and $\dot{\vq}$ must be used to compute a boundary mask $\mathbf{b}$ with a rasterization operation, which is however generally non-differentiable. Similarly, grid boundary velocities $\mathbf{v}_d$ are generally computed with a non-differentiable neighbourhood averaging operation. For the fluid-to-solid interaction, we turn to the fluid-to-solid stage of the Immersed Boundary Method (IBM) \cite{peskin_immersed_2002}, which samples Eulerian pressure values $\mathbf{p}$ on locations near the boundary in order to compute Lagrangian external forces $\mathbf{f}_\textrm{ext}$ affecting the solid finite elements.

\paragraph{Solid-to-Fluid Coupling}

Given the state of the DiffPD soft body simulation from a specific time step, the finite element positions $\vq$ and velocities $\dot{\vq}$ fully determine the boundary condition for the subsequent hydrodynamic simulation step. The positions $\vq$ determine the shape and location of the fish body, served as input to the Hydronet as a boundary mask $\mathbf{b}$. The velocities $\dot{\vq}$ are instead used to compute the boundary velocities $\mathbf{v}_d$ as a granular cell-wise velocity obtained by averaging the closest elements to each boundary cell.

There is however a non trivial obstacle that renders a naive application of the boundary mask from Wandel et al.~\yrcite{wandel_learning_2021} non applicable to our optimization setting. By definition, the rasterization operation computing a binary mask is non-differentiable, thereby breaking the chain of differentiability which we rely on for optimization.

Our solution to this issue takes from the field of differentiable rendering \citep{liu_soft_2019}, and in particular to the techniques associated with soft rasterization. Instead of producing a hard binary mask as a rasterization of the robot's finite element mesh, we use a signed distance field to produce a soft differentiable mask, with real-valued entries $\mathbf{b}_{ij} \in [0,1]$.

Define $\vx_{ij} \in \mathbb{R}^2$ as the spatial coordinates of the MAC grid cell in position $(i,j)$ and $\vq^k$ those of the $k$-th finite element. Then each cell $\vb_{ij}$ from the soft boundary mask is computed as
\begin{equation}
    \mathbf{b}_{ij} = \text{sigm.}\left( \delta_{ij} \frac{\sum_{l} \left( \text{softmin}_{k}\frac{\|\vx_{ij}- \vq^k\|^2}{\xi}\right)_l \|\vx_{ij}- \vq^l\|^2}{\sigma} \right)
\end{equation}
with $\sigma$ and $\xi$ being mask softness parameters,  $\|\cdot\|^2$ the Euclidean distance and $\delta_{ij} = +1$ if the cell location $\vx_{ij}$ is inside the fish body, while $\delta_{ij} = -1$ if outside.

We can similarly use a differentiable surrogate to obtain cell-wise fine-grained boundary velocities:
\begin{equation}
    {\vv_d}_{ij} = \left( \sum_{l}{ \left( \text{softmin}_{k} \frac{\|\vx_{ij}- \vq^k\|^2}{\tau}\right)_l {\dot{\vq}}^l} \right) \cdot \vb_{ij}
\end{equation}
with $\tau$ being a softness parameter.

Tuning the softness parameters $\sigma$, $\xi$ and $\tau$ allows us to tune the trade-off between boundary accuracy and smooth gradients.

\begin{figure}[ht]
\vskip 0.2in
\begin{center}
\centerline{\includegraphics[trim=10 40 25 40, clip,width=0.8\columnwidth]{figures/soft_mask.pdf}}
\caption{Soft boundary masks obtained with the softness parameters $\xi=$ 5e-7 and a) $\sigma =$ 5e-9, b) $\sigma =$ 5e-7, c) $\sigma =$ 5e-5.}
\label{fig:soft-boundary-mask}
\end{center}
\vskip -0.2in
\end{figure}

\paragraph{Fluid-to-solid coupling}

The overall purpose of our hybrid simulation approach is to optimize fish designs and/or control policies with respect to a more realistic model of hydrodynamics. Therefore, the mechanism by which the hydrodynamics simulation affects the soft body simulation is of utmost importance.

The way for hydrodynamic forces to affect DiffPD is through an external force $\mathbf{f}_\textrm{ext}$ applied to the simulation's finite elements. Common drag/thrust optimizations such as that of Chen~et~al.~\yrcite{chen_numerical_2021} often average the force over the entire solid surface. This force is shaped by two contributions, one due to the pressure field,
\begin{equation}
    \mathbf{f}_\textrm{pressure} = - \int_{\partial \Omega} \mathbf{p} \cdot \mathbf{n} \,dl,
\end{equation}
and the other is due to the velocity field,
\begin{equation}
    \mathbf{f}_\textrm{viscous} = - \int_{\partial \Omega} \mu \mathbf{n} \times \mathbf{a} \,dl \text{,} \quad \mathbf{a} = \nabla \times \mathbf{v},
\end{equation}
with $\partial \Omega$ being the solid body boundary and $\mathbf{n}$ its outward pointing normal vector. Total hydrodynamic force is obtained by summing $\mathbf{f}_\textrm{ext} = \mathbf{f}_\textrm{pressure} + \mathbf{f}_\textrm{viscous}$. However, for common water-like fluids with low viscosity $\mu$, the contribution of the viscous term $\mathbf{f}_\textrm{viscous}$ can be considered negligible and its computation can be omitted.

\begin{figure}[ht]
\vskip 0.2in
\begin{center}
\centerline{\includegraphics[trim= 157 336 221 0, clip, width=0.8\columnwidth]{figures/ibm.png}}
\caption{Our immersed boundary method for fluid-to-solid interaction. Each soft body surface element (red) is subjected to an external force ${\mathbf{f}_{\mathrm{ext}}}_k$ in the opposite direction of its normal $\mathbf{n}_k$. To compute the scalar force magnitude, nearby Eulerian cells from the pressure field are averaged with a Gaussian function centered around the element.}
\label{fig:ibm}
\end{center}
\vskip -0.2in
\end{figure}

Given that our approach for solid simulation is based on finite elements, with each surface element $k$ being associated with its surface normal $\vn_k$, we can compute individual elements' surface forces ${\mathbf{f}_\textrm{ext}}_k$. To bridge the Eulerian to Lagrangian gap, we adopt the IBM fluid-to-solid step on forces
\begin{align}
    {\mathbf{f}_\textrm{ext}}_k = - l_k \vn_k \sum_{i,j}{ \vp_{ij} \delta\left( \mathbf{x}_{ij} - \vq^k \right) \vb_{ij}}
\end{align}
where $\delta$ is the Dirac delta and $l_k = (\|\vq^{k-1} - \vq^{k}\|+\|\vq^k - \vq^{k+1} \|)/2$ is the surface length corresponding to finite element $k$. With the IBM, we are able to appropriately identify the force applied to Lagrangian element $k$, despite only having access to pressures on a fixed Eulerian grid.

In practice, due to the finite discretization, it is not feasible to adopt $\delta$ directly, but a surrogate $\tilde{\delta}(\vx) = \phi(x_1)\phi(x_2)$ must be chosen such that it satisfies several properties as detailed in the original IBM paper \cite{peskin_immersed_2002}:
\begin{align}
    \phi(r) \text{ is continuous for all real }r\text{,}\\
    \sum_{j < r} \phi(r-j) = \sum_{j > r} \phi(r-j) = \frac{1}{2} \text{ for all real }r\text{,}\\
    \sum_{j} (r-j) \phi(r-j) = 0 \text{ for all real }r\text{,}\\
    \sum_{j} (\phi(r-j))^2 = C \text{ for all real }r\text{,}
\end{align}
where the constant $C$ is independent of $r$. The original formulation from Peskin \yrcite{peskin_immersed_2002} included the additional property of $\phi(r) = 0$ for $|r|>2$, however this is not strictly required and is only introduced for computational cost reasons, which are moot if the operation is performed with GPU parallelism.

We thus choose to use a normalized Gaussian distance for our IBM, namely in the form
\begin{align}
    \tilde{\delta}(\vx - \vy) = \exp\left(-\frac{\|\vx - \vy\|^2}{2\sigma'} \right) \text{,}
\end{align}
with $\sigma'$ being a smoothness parameter and the equation satisfying all relevant properties.

This choice then leads to our IBM formula for calculating individual elements' ${\mathbf{f}_\textrm{ext}}_k$:
\begin{align}
    {\mathbf{f}_\textrm{ext}}_k = - l_k\vn_k \sum_{i,j}{ \vp_{ij} \frac{1}{Z}\exp\left(-\frac{\|\mathbf{x}_{ij} - \vq^k\|^2}{2\sigma'} \right) \vb_{ij}} \text{,}
\end{align}
with $Z=\sum_{i,j} \exp\left(-\frac{\|\mathbf{x}_{ij} - \vq^k\|^2}{2\sigma'} \right) \vb_{ij}$ being a normalization constant.

The reason we choose a Gaussian delta function is not only because of the increased stability due to larger function support (as is discussed by Peskin~\yrcite{peskin_immersed_2002}). Using a Gaussian as opposed to the original Dirac delta gives us the property of differentiability of the forces with respect to the entire pressure field. Once again, there is a trade-off between gradient smoothness and IBM precision, as lower $\sigma'$ allows for more precise IBM interpolation, but causes the gradients with respect to the pressure field to vanish for most locations.

The obtained $\mathbf{f}_{\mathrm{ext}}$ is at the granularity of individual finite elements. It can either be applied as a DiffPD input as-is, allowing for precise but potentially unstable simulation of surface interaction, or it can be used to compute the overall thrust/drag
\begin{align}
    \mathbf{f}_\textrm{ext} = \sum_k {\mathbf{f}_\textrm{ext}}_k \label{averaged-f}
\end{align}
which, divided by the total finite element number, can be applied as an average force to all the solid finite elements, to only model directional thrust.

\subsection{Limitations}

Our FSI simulator is fast and differentiable, and its hydrodynamics component is trainable on several different fluid parameter settings, also supporting both still and moving flow scenarios for swimmers (through setting of the inflow velocity as a boundary condition). However, this does not mean that the method is without limitations. For instance, the method does not generalize to flow velocities well outside those imposed by inflow boundary conditions during HydroNet training. The simulation can also present instabilities if the forces involved are too strong or applied suddenly between frames: for this reason we explictly set a \textit{burn-in} number $N_{\text{burn-in}}$ of iterations during which surface forces $\mathbf{f}_\textrm{ext}$ are linearly smoothed by a factor of $t/N_{\text{burn-in}}$.

\section{Experimental Setup and Results}

\subsection{Soft Carangiform Swimmer}\label{experimental-carangiform}

Our main experimental setting is controller optimization for a soft body carangiform swimmer immersed in Navier-Stokes fluid with parameters resulting in various degrees of turbulence.

The swimmer's profile is generated using a parametric polynomial $c(X)$ adapted from Curatolo \& Teresi \yrcite{curatolo_virtual_2015} and the actuation envelope is obtained with a parametric curve adapted from Videler \& Hess \yrcite{videler_fast_1984} as shown in Figure \ref{fig:carangiform}. This parametric shape is discretized as a mesh, which is used to define the finite elements for DiffPD. We set the fish body's Youngs' modulus as $E = \SI{6e5}{\pascal}$, its Poisson ratio as $\nu = 0.45$ and its density as $\rho_{s} = \SI{100}{\kilogram\per\metre^3}$. We refer to Appendix \ref{appendix:fish} for further details.

\begin{figure}[ht]
\vskip 0.2in
\begin{center}
\centerline{\includegraphics[width=0.7\columnwidth]{figures/carangiform.pdf}}
\caption{Coordinate system of the fish in the material frame, where $c(X)$ is the parametric shape of the carangiform fish and $h(X,t)$ is the actuation envelope (defined in Appendix \ref{appendix:fish}).}
\label{fig:carangiform}
\end{center}
\vskip -0.2in
\end{figure}

\subsection{HydroNet Training}

We model our fluid medium as a quadrilateral 2D box of size $\SI{0.25}{\metre} \times \SI{0.75}{\metre}$, discretized as a $100 \times 300$ MAC grid with resolution of $\SI{2.5}{\milli\metre}$, and computed with time step $h = \SI{0.01}{\second}$.

To immerse the solid simulation in a suitable water-like environment at this scale, we retrain the hydrodynamics network from Wandel et al.~\yrcite{wandel_learning_2021}, performing a hyperparameter search on model hyperparameters and loss scalings to train for density $\rho \in [ \SI{10}{\kilogram\per\metre^3},  \SI{50}{\kilogram\per\metre^3}]$ and viscosity $\mu \in [ \SI{0.125}{\milli\pascal\cdot\second}, \SI{1}{\milli\pascal\cdot\second} ]$. The resulting hydrodynamic networks model a variety of fluid environments, from conditions close to laminar flow to turbulent, light-water scenarios.

The main tuning challenge for training the network on the desired fluid parameters is that of re-scaling the terms appearing in the losses (Equations (\ref{nvloss-net}) and (\ref{boundloss-net})), which in Wandel et al.~\yrcite{wandel_learning_2021} operate on time and space resolutions of whole seconds and metres. Given that we require a much finer resolution, re-scaling the equation terms by a factor of $1/0.0025 = 400$ allowed the training to converge.

\subsection{FEM Validation with COMSOL}\label{experiment:comsol}

Our hybrid simulator has the properties of being fast and differentiable. However, the HydroNet component of our simulator makes it fundamentally a surrogate model with no strict numerical guarantees. It is therefore apparent that while using such a hybrid simulator model for design and control optimization will result in much faster convergence towards a solution, it will not evaluate such solution with respect to the underlying physical ground truth.

\begin{figure}[ht]
%\vskip 0.2in
\begin{center}
\centerline{\includegraphics[width=0.95\columnwidth]{figures/comsol_comp.pdf}}
\caption{Comparison of travelled distance on the x-axis between COMSOL Multiphysics and our HydroNet simulator.}
\label{fig:comsol-comp}
\end{center}
\vskip -0.1in
\end{figure}

We therefore propose to benchmark our simulator against \emph{COMSOL Multiphysics} for the forward swimming carangiform task, using FEM numerical simulation to model both hydrodynamics, soft body physics, and FSI (see Appendix~\ref{appendix:comsol} for further details). Our comparison of a surrogate model against a slow, non-differentiable, but physically-validated simulation is akin to performing sim2real validation (more appropriately, sim2sim). For a further baseline, we attempted a comparison with a heuristic hydrodynamic formula from the work of Min et al.~\yrcite{min_softcon_2019} commonly used in applications, however, this produced overly non-physical results, resulting in wholly incomparable motion.

Due to inherent chaotic behavior of the hydrodynamic system, it is impossible to perform direct step-by-step comparisons between simulation quantities, as any small difference can cause explicit residuals between the simulations to diverge. We therefore instead compare overall fish traveled distance between the simulations for different frequency parameter values of the controller: if the simulations maintain monotonicity of performance as a function of the parameter, then optimizing the parameter on the surrogate simulation will achieve high performance on the costly, realistic simulation. This is in contrast to Min et al.~\yrcite{min_softcon_2019}'s baseline, which results in off-scale, incomparable motion and thus would offer no guarantees on physical optimality.

\begin{table}[ht]
\vskip -0.1in
\caption{Runtime comparison between our \emph{hybrid simulator} and \emph{COMSOL Multiphysics} for a 300 frame episode. Note that COMSOL Multiphysics does not produce gradients and a fair comparison is therefore only to be made between COMSOL Multiphysics's total runtime and our simulator's forward pass. Also note that due to gradient checkpointing, the backward pass for our approach is slower than theoretically achievable.}
\label{tab:runtime-comsol}
\begin{center}
\begin{small}
\begin{sc}
\begin{tabular}{lr}
\toprule
Hybrid sim (ours) & Time \\
\midrule
HydroNet Warmup    & $\SI{44}{\second} \pm \SI{0.2}{\second}$\\
Total Forward pass  &   $\SI{3}{\minute}$ $\SI{33}{\second} \pm \SI{16.8}{\second}$\\
\hspace{2mm} Forward pass: DiffPD & $\SI{2}{\minute}$ $\SI{50}{\second} \pm \SI{16.5}{\second}$\\
\hspace{2mm} Forward pass: Hydronet & $\SI{43}{\second} \pm \SI{0.3}{\second}$\\
Backward pass   &   $\SI{3}{\minute}$ $\SI{57}{\second}\pm \SI{17.9}{\second}$\\
\toprule
COMSOL Multiphysics  &   Time \\
\midrule
Total runtime    &   $\SI{5}{\hour}$ $\SI{16}{\minute}$ $\SI{39}{\second}$\\
\bottomrule
\end{tabular}
\end{sc}
\end{small}
\end{center}
\vskip -0.05in
\end{table}

We compare our carangiform swimmer simulation against COMSOL Multiphysics, modeling the swimmer as described in Section~\ref{experimental-carangiform} immersed in fluid with $\rho = \SI{50}{\kilogram\per\metre^3}$ and $\mu = \SI{0.125}{\milli\pascal\cdot\second}$. Figure~\ref{fig:comsol-comp} illustrates the comparison in terms of x-axis location of the swimmer's head at the end of an episode of 120 frames ($\SI{1.2}{\second}$) for controllers with frequency between 3 and $\SI{7}{\hertz}$. As apparent, despite the presence of a systematic mismatch of on average 6 grid-units (equal to $6 \cdot \SI{2.5}{\milli\metre}$ = $\SI{15}{\milli\metre}$), both simulations behave monotonically with respect to optimality of the frequency parameter, achieving the same maximum of travelled distance at $\SI{5}{\hertz}$. In Table~\ref{tab:runtime-comsol}, we compare runtimes for our simulator and COMSOL, observing a speedup in the order of 100x.

\begin{figure}[ht]
%\vskip 0.2in
\begin{center}
\centerline{\includegraphics[width=\columnwidth]{figures/best_loss_history.pdf}}
\caption{History plot of the controller frequency optimization, comparing gradient descent with the gradient-free CMA-ES method.}
\label{fig:optimization}
\end{center}
\vskip -0.2in
\end{figure}

\subsection{Controller Frequency Optimization}

To demonstrate the typical use case for our fully differentiable hybrid simulator, we set up a forward swimming task for the carangiform swimmer with the controller as defined in Section~\ref{experimental-carangiform}, optimizing the total forward thrust $L_{\text{opt}} = - \sum_{t \in [1,T]} \mathbf{f}_{\mathrm{ext}}(t)_x$ for a simulation episode of length $T=500$ and time step $h=\SI{0.01}{\second}$. Moreover, we fix the fish's movement to be centered along the x axis, to favor modeling of forward speed only. The objective is to optimize the controller's angular frequency $\omega$. We apply pressure thrust forces to the fish as an averaged vector $\mathbf{f}_{\mathrm{ext}}$ to limit drift and focus the optimization on swimming performance. To backpropagate over the long episode within memory limits, we resort to gradient checkpointing in between simulation steps.

The optimization experiment of the controller frequency was done in fluid medium with $\rho = \SI{50}{\kilogram\per\metre^3}$ and $\mu = \SI{0.125}{\milli\pascal\cdot\second}$. The experiment was initialized with a frequency of $\SI{2}{\hertz}$ and used Adam optimizer. As seen in Figure \ref{fig:optimization}, the optimization converged after 21 iterations to a frequency of $\SI{6.3}{\hertz}$. As benchmark comparison, the evolutionary strategy CMA-ES \cite{hansen_cma_2016}, initialized with an uninformative standard deviation of $\sigma=1$, never leaves its initialization neighbourhood within the optimization budget, obtaining its best value at the frequency of $\SI{2.63}{\hertz}$. The found optimum is different from that of Section \ref{experiment:comsol} due to our fixing of the x axis, ignoring any sideways motion.

\section{Conclusion}

In this work, we introduced a fast, differentiable and accurate FSI simulation for immersed soft bodies. We demonstrated the suitability of our FSI simulation for simulating forward swimming motion of a carangiform swimmer, and we tested its use for the optimization of the frequency of a swimming controller. We believe our method paves the way for more complex but fast multi-physics simulations that couple fluid mechanics with continuum mechanics in a unified framework. An extension of our method has the potential to in the future enable ambitious works on physically accurate co-optimization of shape and control for many applications including vehicle design and soft robot optimization.

% Acknowledgements should only appear in the accepted version.
\section*{Acknowledgements}
We are grateful for funding received by the ETH AI Center and the Defense Advanced Research Projects Agency.


% In the unusual situation where you want a paper to appear in the
% references without citing it in the main text, use \nocite
%\nocite{langley00}

\bibliography{zotero_references}
\bibliographystyle{icml2022}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% APPENDIX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\appendix
\onecolumn
\section{Detailed Computation Graph}
\begin{figure}[ht]
    %\vskip 0.2in
    \begin{center}
    \centerline{\includegraphics[width=1.3\columnwidth]{figures/sim_graph_derivative.pdf}}
    \caption{Detailed computation graph for our simulator. Red arrows represent forward pass computation, while blue arrows represent backward pass computation of gradients of the block's variable with respect to forward pass quantitites.}
    \label{fig:sim-graph}
    \end{center}
    \vskip -0.2in
\end{figure}

\section{Fish Parametric Actuation}\label{appendix:fish}

\begin{figure}[ht]
\vskip 0.2in
\begin{center}
\centerline{\includegraphics[trim=0 0 0 0, clip,width=0.5\columnwidth]{figures/muscle_plot.pdf}}
\caption{Discretized elements and actuated elements in the top half (red), and the bottom half (light blue) for the soft fish.}
\label{fig:mesh-carangiform}
\end{center}
\vskip -0.2in
\end{figure}

As shown in Figure~\ref{fig:mesh-carangiform}, we specify spaced elements on the fish surface to be actuated by contraction, with each actuated element in longitudinal position $X$ receiving an actuation signal $h(X,t)$ at time $t$. The carangiform style of swimming can be described by the following $h(X,t)$ with a backward-traveling wave and envelope:
\begin{equation}
    h(X,t) = C v(X) \sin(\gamma X + \omega t) (1-e^{-\frac{t}{t_a}}),
\end{equation}
where $C$ is a constant, $v(X)$ is the envelope of maximum lateral displacement, $\gamma$ the wave number of body undulations, $\omega$ the angular frequency, $c_0=\omega/\gamma$ the wave speed, and $t_a$ is the activation time. The envelope function $v(X)$ is given by
\begin{equation}
    v(X) = \frac{4}{25L}X^2 - \frac{6}{25}X + \frac{1}{10}L,
\end{equation}
where $L$ is the length of the fish, which for our case is $L = \SI{0.2}{\metre}$.

\section{The COMSOL Material Model}\label{appendix:comsol}
The fish is modeled as an isotropic and linear elastic solid in COMSOL Multiphysics. The Piola-Kirchoff stress (or engineering stress) is
\begin{equation}
    \mathbf{S}^e = 2 \mu_s \mathbf{E}^e + \lambda_s \textrm{tr} (\mathbf{E}^e) \mathbf{I},
\end{equation}
where $\mu_s$, $\lambda_s$ are the Lamé moduli and $\mathbf{E}^e$ is the Green-Lagrange strain. We can use an additive decomposition of the strain as
\begin{equation}
    \mathbf{E} = \mathbf{E}^e + \mathbf{E}^m, \label{eq:E_decomp}
\end{equation}
where $\mathbf{E}^m=\mathbf{E}^m(X,Y,t)$ is a time-evolving distortion strain that models the actuation of muscles. The Green-Lagrange strain can be written in terms of the deformation gradient as
\begin{equation}
    \mathbf{E} = \frac{1}{2}(\mathbf{F}^\top \mathbf{F} - \mathbf{I}).
\end{equation}
The deformation gradient permits the multiplicative decomposition
\begin{equation}
    \mathbf{F} = \mathbf{F}^e\mathbf{F}^m.
\end{equation}
\textbf{Note:} by defining the elastic deformation as (\ref{eq:E_decomp}), the elastic deformation is
\begin{equation}
    \mathbf{E}^m = \frac{1}{2}{\mathbf{F}^{m}}^\top ({\mathbf{F}^e}^\top\mathbf{F}^e - \mathbf{I})\mathbf{F}^m.
\end{equation}


To generate a flexural motion, we relate the distortion $\mathbf{E}^m$ to the curvature and the lateral displacement
\begin{equation}
    E^m_{xx}(X,Y,t) = -Y\frac{\partial^2 h(X,t)}{\partial X^2},
\end{equation}
where $Y=h(X,t)$, with $h(X,t)$ being the actuation scheme described in Section \ref{experimental-carangiform}, and the other components of $\mathbf{E}^m$ are identically zero.

\section{COMSOL Comparison plots}

The following plots qualitatively illustrate our comparison between our approach and the COMSOL simulation.

\begin{figure*}[ht]
\centering
\begin{minipage}[b]{0.49\textwidth}
    \raisebox{-0.75\height}{\includegraphics[width=\textwidth]{figures/diffpd_sim.pdf}}
    \caption{Ours: DiffPD + HydroNet swimmer simulation.}
\end{minipage}
\begin{minipage}[b]{0.49\textwidth}
    \raisebox{-0.75\height}{\includegraphics[width=\textwidth]{figures/comsol_sim.pdf}}
    \caption{COMSOL swimmer simulation.}
\end{minipage}
\caption{Normalized pressure fields for a frame of the two simulations.}
\label{fig:diffpd_sim}
\end{figure*}

\begin{figure*}[ht]
\centering
\includegraphics[width=\textwidth]{figures/diff_sim.pdf}
\caption{Overlay of the normalized pressure fields of our DiffPD + HydroNet simulation and the COMSOL simulation.}
\label{fig:diff_sim}
\end{figure*}


\end{document}


% This document was modified from the file originally made available by
% Pat Langley and Andrea Danyluk for ICML-2K. This version was created
% by Iain Murray in 2018, and modified by Alexandre Bouchard in
% 2019 and 2021 and by Csaba Szepesvari, Gang Niu and Sivan Sabato in 2022. 
% Previous contributors include Dan Roy, Lise Getoor and Tobias
% Scheffer, which was slightly modified from the 2010 version by
% Thorsten Joachims & Johannes Fuernkranz, slightly modified from the
% 2009 version by Kiri Wagstaff and Sam Roweis's 2008 version, which is
% slightly modified from Prasad Tadepalli's 2007 version which is a
% lightly changed version of the previous year's version by Andrew
% Moore, which was in turn edited from those of Kristian Kersting and
% Codrina Lauth. Alex Smola contributed to the algorithmic style files.
%%%%% NEW MATH DEFINITIONS %%%%%

\usepackage{amsmath,amsfonts,bm}

% Mark sections of captions for referring to divisions of figures
\newcommand{\figleft}{{\em (Left)}}
\newcommand{\figcenter}{{\em (Center)}}
\newcommand{\figright}{{\em (Right)}}
\newcommand{\figtop}{{\em (Top)}}
\newcommand{\figbottom}{{\em (Bottom)}}
\newcommand{\captiona}{{\em (a)}}
\newcommand{\captionb}{{\em (b)}}
\newcommand{\captionc}{{\em (c)}}
\newcommand{\captiond}{{\em (d)}}

% Highlight a newly defined term
\newcommand{\newterm}[1]{{\bf #1}}


% Figure reference, lower-case.
\def\figref#1{figure~\ref{#1}}
% Figure reference, capital. For start of sentence
\def\Figref#1{Figure~\ref{#1}}
\def\twofigref#1#2{figures \ref{#1} and \ref{#2}}
\def\quadfigref#1#2#3#4{figures \ref{#1}, \ref{#2}, \ref{#3} and \ref{#4}}
% Section reference, lower-case.
\def\secref#1{section~\ref{#1}}
% Section reference, capital.
\def\Secref#1{Section~\ref{#1}}
% Reference to two sections.
\def\twosecrefs#1#2{sections \ref{#1} and \ref{#2}}
% Reference to three sections.
\def\secrefs#1#2#3{sections \ref{#1}, \ref{#2} and \ref{#3}}
% Reference to an equation, lower-case.
\def\eqref#1{equation~\ref{#1}}
% Reference to an equation, upper case
\def\Eqref#1{Equation~\ref{#1}}
% A raw reference to an equation---avoid using if possible
\def\plaineqref#1{\ref{#1}}
% Reference to a chapter, lower-case.
\def\chapref#1{chapter~\ref{#1}}
% Reference to an equation, upper case.
\def\Chapref#1{Chapter~\ref{#1}}
% Reference to a range of chapters
\def\rangechapref#1#2{chapters\ref{#1}--\ref{#2}}
% Reference to an algorithm, lower-case.
\def\algref#1{algorithm~\ref{#1}}
% Reference to an algorithm, upper case.
\def\Algref#1{Algorithm~\ref{#1}}
\def\twoalgref#1#2{algorithms \ref{#1} and \ref{#2}}
\def\Twoalgref#1#2{Algorithms \ref{#1} and \ref{#2}}
% Reference to a part, lower case
\def\partref#1{part~\ref{#1}}
% Reference to a part, upper case
\def\Partref#1{Part~\ref{#1}}
\def\twopartref#1#2{parts \ref{#1} and \ref{#2}}

\def\ceil#1{\lceil #1 \rceil}
\def\floor#1{\lfloor #1 \rfloor}
\def\1{\bm{1}}
\newcommand{\train}{\mathcal{D}}
\newcommand{\valid}{\mathcal{D_{\mathrm{valid}}}}
\newcommand{\test}{\mathcal{D_{\mathrm{test}}}}

\def\eps{{\epsilon}}


% Random variables
\def\reta{{\textnormal{$\eta$}}}
\def\ra{{\textnormal{a}}}
\def\rb{{\textnormal{b}}}
\def\rc{{\textnormal{c}}}
\def\rd{{\textnormal{d}}}
\def\re{{\textnormal{e}}}
\def\rf{{\textnormal{f}}}
\def\rg{{\textnormal{g}}}
\def\rh{{\textnormal{h}}}
\def\ri{{\textnormal{i}}}
\def\rj{{\textnormal{j}}}
\def\rk{{\textnormal{k}}}
\def\rl{{\textnormal{l}}}
% rm is already a command, just don't name any random variables m
\def\rn{{\textnormal{n}}}
\def\ro{{\textnormal{o}}}
\def\rp{{\textnormal{p}}}
\def\rq{{\textnormal{q}}}
\def\rr{{\textnormal{r}}}
\def\rs{{\textnormal{s}}}
\def\rt{{\textnormal{t}}}
\def\ru{{\textnormal{u}}}
\def\rv{{\textnormal{v}}}
\def\rw{{\textnormal{w}}}
\def\rx{{\textnormal{x}}}
\def\ry{{\textnormal{y}}}
\def\rz{{\textnormal{z}}}

% Random vectors
\def\rvepsilon{{\mathbf{\epsilon}}}
\def\rvtheta{{\mathbf{\theta}}}
\def\rva{{\mathbf{a}}}
\def\rvb{{\mathbf{b}}}
\def\rvc{{\mathbf{c}}}
\def\rvd{{\mathbf{d}}}
\def\rve{{\mathbf{e}}}
\def\rvf{{\mathbf{f}}}
\def\rvg{{\mathbf{g}}}
\def\rvh{{\mathbf{h}}}
\def\rvu{{\mathbf{i}}}
\def\rvj{{\mathbf{j}}}
\def\rvk{{\mathbf{k}}}
\def\rvl{{\mathbf{l}}}
\def\rvm{{\mathbf{m}}}
\def\rvn{{\mathbf{n}}}
\def\rvo{{\mathbf{o}}}
\def\rvp{{\mathbf{p}}}
\def\rvq{{\mathbf{q}}}
\def\rvr{{\mathbf{r}}}
\def\rvs{{\mathbf{s}}}
\def\rvt{{\mathbf{t}}}
\def\rvu{{\mathbf{u}}}
\def\rvv{{\mathbf{v}}}
\def\rvw{{\mathbf{w}}}
\def\rvx{{\mathbf{x}}}
\def\rvy{{\mathbf{y}}}
\def\rvz{{\mathbf{z}}}

% Elements of random vectors
\def\erva{{\textnormal{a}}}
\def\ervb{{\textnormal{b}}}
\def\ervc{{\textnormal{c}}}
\def\ervd{{\textnormal{d}}}
\def\erve{{\textnormal{e}}}
\def\ervf{{\textnormal{f}}}
\def\ervg{{\textnormal{g}}}
\def\ervh{{\textnormal{h}}}
\def\ervi{{\textnormal{i}}}
\def\ervj{{\textnormal{j}}}
\def\ervk{{\textnormal{k}}}
\def\ervl{{\textnormal{l}}}
\def\ervm{{\textnormal{m}}}
\def\ervn{{\textnormal{n}}}
\def\ervo{{\textnormal{o}}}
\def\ervp{{\textnormal{p}}}
\def\ervq{{\textnormal{q}}}
\def\ervr{{\textnormal{r}}}
\def\ervs{{\textnormal{s}}}
\def\ervt{{\textnormal{t}}}
\def\ervu{{\textnormal{u}}}
\def\ervv{{\textnormal{v}}}
\def\ervw{{\textnormal{w}}}
\def\ervx{{\textnormal{x}}}
\def\ervy{{\textnormal{y}}}
\def\ervz{{\textnormal{z}}}

% Random matrices
\def\rmA{{\mathbf{A}}}
\def\rmB{{\mathbf{B}}}
\def\rmC{{\mathbf{C}}}
\def\rmD{{\mathbf{D}}}
\def\rmE{{\mathbf{E}}}
\def\rmF{{\mathbf{F}}}
\def\rmG{{\mathbf{G}}}
\def\rmH{{\mathbf{H}}}
\def\rmI{{\mathbf{I}}}
\def\rmJ{{\mathbf{J}}}
\def\rmK{{\mathbf{K}}}
\def\rmL{{\mathbf{L}}}
\def\rmM{{\mathbf{M}}}
\def\rmN{{\mathbf{N}}}
\def\rmO{{\mathbf{O}}}
\def\rmP{{\mathbf{P}}}
\def\rmQ{{\mathbf{Q}}}
\def\rmR{{\mathbf{R}}}
\def\rmS{{\mathbf{S}}}
\def\rmT{{\mathbf{T}}}
\def\rmU{{\mathbf{U}}}
\def\rmV{{\mathbf{V}}}
\def\rmW{{\mathbf{W}}}
\def\rmX{{\mathbf{X}}}
\def\rmY{{\mathbf{Y}}}
\def\rmZ{{\mathbf{Z}}}

% Elements of random matrices
\def\ermA{{\textnormal{A}}}
\def\ermB{{\textnormal{B}}}
\def\ermC{{\textnormal{C}}}
\def\ermD{{\textnormal{D}}}
\def\ermE{{\textnormal{E}}}
\def\ermF{{\textnormal{F}}}
\def\ermG{{\textnormal{G}}}
\def\ermH{{\textnormal{H}}}
\def\ermI{{\textnormal{I}}}
\def\ermJ{{\textnormal{J}}}
\def\ermK{{\textnormal{K}}}
\def\ermL{{\textnormal{L}}}
\def\ermM{{\textnormal{M}}}
\def\ermN{{\textnormal{N}}}
\def\ermO{{\textnormal{O}}}
\def\ermP{{\textnormal{P}}}
\def\ermQ{{\textnormal{Q}}}
\def\ermR{{\textnormal{R}}}
\def\ermS{{\textnormal{S}}}
\def\ermT{{\textnormal{T}}}
\def\ermU{{\textnormal{U}}}
\def\ermV{{\textnormal{V}}}
\def\ermW{{\textnormal{W}}}
\def\ermX{{\textnormal{X}}}
\def\ermY{{\textnormal{Y}}}
\def\ermZ{{\textnormal{Z}}}

% Vectors
\def\vzero{{\bm{0}}}
\def\vone{{\bm{1}}}
\def\vmu{{\bm{\mu}}}
\def\vtheta{{\bm{\theta}}}
\def\va{{\bm{a}}}
\def\vb{{\bm{b}}}
\def\vc{{\bm{c}}}
\def\vd{{\bm{d}}}
\def\ve{{\bm{e}}}
\def\vf{{\bm{f}}}
\def\vg{{\bm{g}}}
\def\vh{{\bm{h}}}
\def\vi{{\bm{i}}}
\def\vj{{\bm{j}}}
\def\vk{{\bm{k}}}
\def\vl{{\bm{l}}}
\def\vm{{\bm{m}}}
\def\vn{{\bm{n}}}
\def\vo{{\bm{o}}}
\def\vp{{\bm{p}}}
\def\vq{{\bm{q}}}
\def\vr{{\bm{r}}}
\def\vs{{\bm{s}}}
\def\vt{{\bm{t}}}
\def\vu{{\bm{u}}}
\def\vv{{\bm{v}}}
\def\vw{{\bm{w}}}
\def\vx{{\bm{x}}}
\def\vy{{\bm{y}}}
\def\vz{{\bm{z}}}

% Elements of vectors
\def\evalpha{{\alpha}}
\def\evbeta{{\beta}}
\def\evepsilon{{\epsilon}}
\def\evlambda{{\lambda}}
\def\evomega{{\omega}}
\def\evmu{{\mu}}
\def\evpsi{{\psi}}
\def\evsigma{{\sigma}}
\def\evtheta{{\theta}}
\def\eva{{a}}
\def\evb{{b}}
\def\evc{{c}}
\def\evd{{d}}
\def\eve{{e}}
\def\evf{{f}}
\def\evg{{g}}
\def\evh{{h}}
\def\evi{{i}}
\def\evj{{j}}
\def\evk{{k}}
\def\evl{{l}}
\def\evm{{m}}
\def\evn{{n}}
\def\evo{{o}}
\def\evp{{p}}
\def\evq{{q}}
\def\evr{{r}}
\def\evs{{s}}
\def\evt{{t}}
\def\evu{{u}}
\def\evv{{v}}
\def\evw{{w}}
\def\evx{{x}}
\def\evy{{y}}
\def\evz{{z}}

% Matrix
\def\mA{{\bm{A}}}
\def\mB{{\bm{B}}}
\def\mC{{\bm{C}}}
\def\mD{{\bm{D}}}
\def\mE{{\bm{E}}}
\def\mF{{\bm{F}}}
\def\mG{{\bm{G}}}
\def\mH{{\bm{H}}}
\def\mI{{\bm{I}}}
\def\mJ{{\bm{J}}}
\def\mK{{\bm{K}}}
\def\mL{{\bm{L}}}
\def\mM{{\bm{M}}}
\def\mN{{\bm{N}}}
\def\mO{{\bm{O}}}
\def\mP{{\bm{P}}}
\def\mQ{{\bm{Q}}}
\def\mR{{\bm{R}}}
\def\mS{{\bm{S}}}
\def\mT{{\bm{T}}}
\def\mU{{\bm{U}}}
\def\mV{{\bm{V}}}
\def\mW{{\bm{W}}}
\def\mX{{\bm{X}}}
\def\mY{{\bm{Y}}}
\def\mZ{{\bm{Z}}}
\def\mBeta{{\bm{\beta}}}
\def\mPhi{{\bm{\Phi}}}
\def\mLambda{{\bm{\Lambda}}}
\def\mSigma{{\bm{\Sigma}}}

% Tensor
\DeclareMathAlphabet{\mathsfit}{\encodingdefault}{\sfdefault}{m}{sl}
\SetMathAlphabet{\mathsfit}{bold}{\encodingdefault}{\sfdefault}{bx}{n}
\newcommand{\tens}[1]{\bm{\mathsfit{#1}}}
\def\tA{{\tens{A}}}
\def\tB{{\tens{B}}}
\def\tC{{\tens{C}}}
\def\tD{{\tens{D}}}
\def\tE{{\tens{E}}}
\def\tF{{\tens{F}}}
\def\tG{{\tens{G}}}
\def\tH{{\tens{H}}}
\def\tI{{\tens{I}}}
\def\tJ{{\tens{J}}}
\def\tK{{\tens{K}}}
\def\tL{{\tens{L}}}
\def\tM{{\tens{M}}}
\def\tN{{\tens{N}}}
\def\tO{{\tens{O}}}
\def\tP{{\tens{P}}}
\def\tQ{{\tens{Q}}}
\def\tR{{\tens{R}}}
\def\tS{{\tens{S}}}
\def\tT{{\tens{T}}}
\def\tU{{\tens{U}}}
\def\tV{{\tens{V}}}
\def\tW{{\tens{W}}}
\def\tX{{\tens{X}}}
\def\tY{{\tens{Y}}}
\def\tZ{{\tens{Z}}}


% Graph
\def\gA{{\mathcal{A}}}
\def\gB{{\mathcal{B}}}
\def\gC{{\mathcal{C}}}
\def\gD{{\mathcal{D}}}
\def\gE{{\mathcal{E}}}
\def\gF{{\mathcal{F}}}
\def\gG{{\mathcal{G}}}
\def\gH{{\mathcal{H}}}
\def\gI{{\mathcal{I}}}
\def\gJ{{\mathcal{J}}}
\def\gK{{\mathcal{K}}}
\def\gL{{\mathcal{L}}}
\def\gM{{\mathcal{M}}}
\def\gN{{\mathcal{N}}}
\def\gO{{\mathcal{O}}}
\def\gP{{\mathcal{P}}}
\def\gQ{{\mathcal{Q}}}
\def\gR{{\mathcal{R}}}
\def\gS{{\mathcal{S}}}
\def\gT{{\mathcal{T}}}
\def\gU{{\mathcal{U}}}
\def\gV{{\mathcal{V}}}
\def\gW{{\mathcal{W}}}
\def\gX{{\mathcal{X}}}
\def\gY{{\mathcal{Y}}}
\def\gZ{{\mathcal{Z}}}

% Sets
\def\sA{{\mathbb{A}}}
\def\sB{{\mathbb{B}}}
\def\sC{{\mathbb{C}}}
\def\sD{{\mathbb{D}}}
% Don't use a set called E, because this would be the same as our symbol
% for expectation.
\def\sF{{\mathbb{F}}}
\def\sG{{\mathbb{G}}}
\def\sH{{\mathbb{H}}}
\def\sI{{\mathbb{I}}}
\def\sJ{{\mathbb{J}}}
\def\sK{{\mathbb{K}}}
\def\sL{{\mathbb{L}}}
\def\sM{{\mathbb{M}}}
\def\sN{{\mathbb{N}}}
\def\sO{{\mathbb{O}}}
\def\sP{{\mathbb{P}}}
\def\sQ{{\mathbb{Q}}}
\def\sR{{\mathbb{R}}}
\def\sS{{\mathbb{S}}}
\def\sT{{\mathbb{T}}}
\def\sU{{\mathbb{U}}}
\def\sV{{\mathbb{V}}}
\def\sW{{\mathbb{W}}}
\def\sX{{\mathbb{X}}}
\def\sY{{\mathbb{Y}}}
\def\sZ{{\mathbb{Z}}}

% Entries of a matrix
\def\emLambda{{\Lambda}}
\def\emA{{A}}
\def\emB{{B}}
\def\emC{{C}}
\def\emD{{D}}
\def\emE{{E}}
\def\emF{{F}}
\def\emG{{G}}
\def\emH{{H}}
\def\emI{{I}}
\def\emJ{{J}}
\def\emK{{K}}
\def\emL{{L}}
\def\emM{{M}}
\def\emN{{N}}
\def\emO{{O}}
\def\emP{{P}}
\def\emQ{{Q}}
\def\emR{{R}}
\def\emS{{S}}
\def\emT{{T}}
\def\emU{{U}}
\def\emV{{V}}
\def\emW{{W}}
\def\emX{{X}}
\def\emY{{Y}}
\def\emZ{{Z}}
\def\emSigma{{\Sigma}}

% entries of a tensor
% Same font as tensor, without \bm wrapper
\newcommand{\etens}[1]{\mathsfit{#1}}
\def\etLambda{{\etens{\Lambda}}}
\def\etA{{\etens{A}}}
\def\etB{{\etens{B}}}
\def\etC{{\etens{C}}}
\def\etD{{\etens{D}}}
\def\etE{{\etens{E}}}
\def\etF{{\etens{F}}}
\def\etG{{\etens{G}}}
\def\etH{{\etens{H}}}
\def\etI{{\etens{I}}}
\def\etJ{{\etens{J}}}
\def\etK{{\etens{K}}}
\def\etL{{\etens{L}}}
\def\etM{{\etens{M}}}
\def\etN{{\etens{N}}}
\def\etO{{\etens{O}}}
\def\etP{{\etens{P}}}
\def\etQ{{\etens{Q}}}
\def\etR{{\etens{R}}}
\def\etS{{\etens{S}}}
\def\etT{{\etens{T}}}
\def\etU{{\etens{U}}}
\def\etV{{\etens{V}}}
\def\etW{{\etens{W}}}
\def\etX{{\etens{X}}}
\def\etY{{\etens{Y}}}
\def\etZ{{\etens{Z}}}

% The true underlying data generating distribution
\newcommand{\pdata}{p_{\rm{data}}}
% The empirical distribution defined by the training set
\newcommand{\ptrain}{\hat{p}_{\rm{data}}}
\newcommand{\Ptrain}{\hat{P}_{\rm{data}}}
% The model distribution
\newcommand{\pmodel}{p_{\rm{model}}}
\newcommand{\Pmodel}{P_{\rm{model}}}
\newcommand{\ptildemodel}{\tilde{p}_{\rm{model}}}
% Stochastic autoencoder distributions
\newcommand{\pencode}{p_{\rm{encoder}}}
\newcommand{\pdecode}{p_{\rm{decoder}}}
\newcommand{\precons}{p_{\rm{reconstruct}}}

\newcommand{\laplace}{\mathrm{Laplace}} % Laplace distribution

\newcommand{\E}{\mathbb{E}}
\newcommand{\Ls}{\mathcal{L}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\emp}{\tilde{p}}
\newcommand{\lr}{\alpha}
\newcommand{\reg}{\lambda}
\newcommand{\rect}{\mathrm{rectifier}}
\newcommand{\softmax}{\mathrm{softmax}}
\newcommand{\sigmoid}{\sigma}
\newcommand{\softplus}{\zeta}
\newcommand{\KL}{D_{\mathrm{KL}}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\standarderror}{\mathrm{SE}}
\newcommand{\Cov}{\mathrm{Cov}}
% Wolfram Mathworld says $L^2$ is for function spaces and $\ell^2$ is for vectors
% But then they seem to use $L^2$ for vectors throughout the site, and so does
% wikipedia.
\newcommand{\normlzero}{L^0}
\newcommand{\normlone}{L^1}
\newcommand{\normltwo}{L^2}
\newcommand{\normlp}{L^p}
\newcommand{\normmax}{L^\infty}

\newcommand{\parents}{Pa} % See usage in notation.tex. Chosen to match Daphne's book.

\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}

\DeclareMathOperator{\sign}{sign}
\DeclareMathOperator{\Tr}{Tr}
\let\ab\allowbreak

\begin{thebibliography}{49}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{doi: #1}\else
  \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi

\bibitem[Bouaziz et~al.(2014)Bouaziz, Martin, Liu, Kavan, and
  Pauly]{bouaziz_projective_2014}
Bouaziz, S., Martin, S., Liu, T., Kavan, L., and Pauly, M.
\newblock Projective dynamics: fusing constraint projections for fast
  simulation.
\newblock \emph{ACM Transactions on Graphics}, 33\penalty0 (4):\penalty0
  154:1--154:11, July 2014.
\newblock ISSN 0730-0301.
\newblock \doi{10.1145/2601097.2601116}.
\newblock URL \url{https://doi.org/10.1145/2601097.2601116}.

\bibitem[Brandt et~al.(2019)Brandt, Scandolo, Eisemann, and
  Hildebrandt]{brandt_reduced_2019}
Brandt, C., Scandolo, L., Eisemann, E., and Hildebrandt, K.
\newblock The reduced immersed method for real-time fluid-elastic solid
  interaction and contact simulation.
\newblock \emph{ACM Transactions on Graphics}, 38\penalty0 (6):\penalty0
  191:1--191:16, November 2019.
\newblock ISSN 0730-0301.
\newblock \doi{10.1145/3355089.3356496}.
\newblock URL \url{https://doi.org/10.1145/3355089.3356496}.

\bibitem[Chen et~al.(2021)Chen, Cakal, Hu, and Thuerey]{chen_numerical_2021}
Chen, L.-W., Cakal, B.~A., Hu, X., and Thuerey, N.
\newblock Numerical investigation of minimum drag profiles in laminar flow
  using deep learning surrogates.
\newblock \emph{Journal of Fluid Mechanics}, 919:\penalty0 A34, July 2021.
\newblock ISSN 0022-1120, 1469-7645.
\newblock \doi{10.1017/jfm.2021.398}.
\newblock URL \url{http://arxiv.org/abs/2009.14339}.
\newblock arXiv: 2009.14339.

\bibitem[Colabrese et~al.(2017)Colabrese, Gustavsson, Celani, and
  Biferale]{colabrese_flow_2017}
Colabrese, S., Gustavsson, K., Celani, A., and Biferale, L.
\newblock Flow {Navigation} by {Smart} {Microswimmers} via {Reinforcement}
  {Learning}.
\newblock \emph{Physical Review Letters}, 118\penalty0 (15):\penalty0 158004,
  April 2017.
\newblock ISSN 0031-9007, 1079-7114.
\newblock \doi{10.1103/PhysRevLett.118.158004}.
\newblock URL \url{http://arxiv.org/abs/1701.08848}.
\newblock arXiv: 1701.08848.

\bibitem[Curatolo \& Teresi(2015)Curatolo and Teresi]{curatolo_virtual_2015}
Curatolo, M. and Teresi, L.
\newblock The virtual aquarium: simulations of fish swimming.
\newblock In \emph{Proc. {European} {COMSOL} {Conference}}, 2015.

\bibitem[Dowell \& Hall(2001)Dowell and Hall]{dowell_modeling_2001}
Dowell, E.~H. and Hall, K.~C.
\newblock Modeling of {Fluid}-{Structure} {Interaction}.
\newblock \emph{Annual Review of Fluid Mechanics}, 33\penalty0 (1):\penalty0
  445--490, 2001.
\newblock \doi{10.1146/annurev.fluid.33.1.445}.
\newblock URL \url{https://doi.org/10.1146/annurev.fluid.33.1.445}.
\newblock \_eprint: https://doi.org/10.1146/annurev.fluid.33.1.445.

\bibitem[Du et~al.(2021{\natexlab{a}})Du, Hughes, Wah, Matusik, and
  Rus]{du_underwater_2021}
Du, T., Hughes, J., Wah, S., Matusik, W., and Rus, D.
\newblock Underwater {Soft} {Robot} {Modeling} and {Control} {With}
  {Differentiable} {Simulation}.
\newblock \emph{IEEE Robotics and Automation Letters}, 6\penalty0 (3):\penalty0
  4994--5001, July 2021{\natexlab{a}}.
\newblock ISSN 2377-3766.
\newblock \doi{10.1109/LRA.2021.3070305}.
\newblock Conference Name: IEEE Robotics and Automation Letters.

\bibitem[Du et~al.(2021{\natexlab{b}})Du, Wu, Ma, Wah, Spielberg, Rus, and
  Matusik]{du_diffpd_2021}
Du, T., Wu, K., Ma, P., Wah, S., Spielberg, A., Rus, D., and Matusik, W.
\newblock {DiffPD}: {Differentiable} {Projective} {Dynamics}.
\newblock \emph{ACM Transactions on Graphics}, 41\penalty0 (2):\penalty0
  13:1--13:21, November 2021{\natexlab{b}}.
\newblock ISSN 0730-0301.
\newblock \doi{10.1145/3490168}.
\newblock URL \url{https://doi.org/10.1145/3490168}.

\bibitem[Fang et~al.(2020)Fang, Qu, Li, Zhang, Zhu, Aanjaneya, and
  Jiang]{fang_iq-mpm_2020}
Fang, Y., Qu, Z., Li, M., Zhang, X., Zhu, Y., Aanjaneya, M., and Jiang, C.
\newblock {IQ}-{MPM}: an interface quadrature material point method for
  non-sticky strongly two-way coupled nonlinear solids and fluids.
\newblock \emph{ACM Transactions on Graphics}, 39\penalty0 (4):\penalty0
  51:51:1--51:51:16, July 2020.
\newblock ISSN 0730-0301.
\newblock \doi{10.1145/3386569.3392438}.
\newblock URL \url{https://doi.org/10.1145/3386569.3392438}.

\bibitem[Feng et~al.(2019)Feng, Wang, Todd, and Lee]{feng_simulations_2019}
Feng, H., Wang, Z., Todd, P., and Lee, H.
\newblock Simulations of self-propelled anguilliform swimming using the
  immersed boundary method in {OpenFOAM}.
\newblock \emph{Engineering Applications of Computational Fluid Mechanics},
  13:\penalty0 438--452, January 2019.
\newblock \doi{10.1080/19942060.2019.1609582}.

\bibitem[Gazzola et~al.(2016)Gazzola, Tchieu, Alexeev, de~Brauer, and
  Koumoutsakos]{gazzola_learning_2016}
Gazzola, M., Tchieu, A.~A., Alexeev, D., de~Brauer, A., and Koumoutsakos, P.
\newblock Learning to school in the presence of hydrodynamic interactions.
\newblock \emph{Journal of Fluid Mechanics}, 789:\penalty0 726--749, February
  2016.
\newblock ISSN 0022-1120, 1469-7645.
\newblock \doi{10.1017/jfm.2015.686}.
\newblock URL \url{http://arxiv.org/abs/1509.04605}.
\newblock arXiv: 1509.04605.

\bibitem[Geilinger et~al.(2020)Geilinger, Hahn, Zehnder, Bächer, Thomaszewski,
  and Coros]{geilinger_add_2020}
Geilinger, M., Hahn, D., Zehnder, J., Bächer, M., Thomaszewski, B., and Coros,
  S.
\newblock {ADD}: analytically differentiable dynamics for multi-body systems
  with frictional contact.
\newblock \emph{ACM Transactions on Graphics}, 39\penalty0 (6):\penalty0
  190:1--190:15, November 2020.
\newblock ISSN 0730-0301.
\newblock \doi{10.1145/3414685.3417766}.
\newblock URL \url{https://doi.org/10.1145/3414685.3417766}.

\bibitem[Hansen(2016)]{hansen_cma_2016}
Hansen, N.
\newblock The {CMA} {Evolution} {Strategy}: {A} {Tutorial}.
\newblock \emph{arXiv:1604.00772 [cs, stat]}, April 2016.
\newblock URL \url{http://arxiv.org/abs/1604.00772}.
\newblock arXiv: 1604.00772.

\bibitem[Harlow \& Welch(1965)Harlow and Welch]{harlow_numerical_1965}
Harlow, F.~H. and Welch, J.~E.
\newblock Numerical {Calculation} of {Time}‐{Dependent} {Viscous}
  {Incompressible} {Flow} of {Fluid} with {Free} {Surface}.
\newblock \emph{The Physics of Fluids}, 8\penalty0 (12):\penalty0 2182--2189,
  December 1965.
\newblock ISSN 0031-9171.
\newblock \doi{10.1063/1.1761178}.
\newblock URL \url{https://aip.scitation.org/doi/10.1063/1.1761178}.
\newblock Publisher: American Institute of Physics.

\bibitem[Hawkes et~al.(2021)Hawkes, Majidi, and Tolley]{hawkes_hard_2021}
Hawkes, E.~W., Majidi, C., and Tolley, M.~T.
\newblock Hard questions for soft robotics.
\newblock \emph{Science Robotics}, April 2021.
\newblock \doi{10.1126/scirobotics.abg6049}.
\newblock URL
  \url{https://www.science.org/doi/abs/10.1126/scirobotics.abg6049}.
\newblock Publisher: American Association for the Advancement of Science.

\bibitem[Hu et~al.(2019)Hu, Liu, Spielberg, Tenenbaum, Freeman, Wu, Rus, and
  Matusik]{hu_chainqueen_2019}
Hu, Y., Liu, J., Spielberg, A., Tenenbaum, J., Freeman, W., Wu, J., Rus, D.,
  and Matusik, W.
\newblock {ChainQueen}: {A} {Real}-{Time} {Differentiable} {Physical}
  {Simulator} for {Soft} {Robotics}.
\newblock \emph{2019 International Conference on Robotics and Automation
  (ICRA)}, 2019.
\newblock \doi{10.1109/ICRA.2019.8794333}.

\bibitem[Hu et~al.(2020)Hu, Anderson, Li, Sun, Carr, Ragan-Kelley, and
  Durand]{hu_difftaichi_2020}
Hu, Y., Anderson, L., Li, T.-M., Sun, Q., Carr, N., Ragan-Kelley, J., and
  Durand, F.
\newblock {DiffTaichi}: {Differentiable} {Programming} for {Physical}
  {Simulation}.
\newblock \emph{International Conference on Learning Representations}, February
  2020.
\newblock URL \url{http://arxiv.org/abs/1910.00935}.
\newblock arXiv: 1910.00935.

\bibitem[Kalitzin \& Iaccarino(2003)Kalitzin and
  Iaccarino]{kalitzin_toward_2003}
Kalitzin, G. and Iaccarino, G.
\newblock Toward {Immersed} {Boundary} {Simulation} of {High} {Reynolds}
  {Number} {Flows}.
\newblock NTRS Author Affiliations: Stanford Univ. NTRS Document ID:
  20040031709 NTRS Research Center: Headquarters (HQ), January 2003.
\newblock URL \url{https://ntrs.nasa.gov/citations/20040031709}.

\bibitem[Katzschmann et~al.(2016)Katzschmann, Marchese, and
  Rus]{katzschmann_hydraulic_2016}
Katzschmann, R.~K., Marchese, A.~D., and Rus, D.
\newblock Hydraulic {Autonomous} {Soft} {Robotic} {Fish} for {3D} {Swimming}.
\newblock In Hsieh, M.~A., Khatib, O., and Kumar, V. (eds.), \emph{Experimental
  {Robotics}: {The} 14th {International} {Symposium} on {Experimental}
  {Robotics}}, Springer {Tracts} in {Advanced} {Robotics}, pp.\  405--420.
  Springer International Publishing, Cham, 2016.
\newblock ISBN 978-3-319-23778-7.
\newblock \doi{10.1007/978-3-319-23778-7_27}.
\newblock URL \url{https://doi.org/10.1007/978-3-319-23778-7_27}.

\bibitem[Katzschmann et~al.(2018)Katzschmann, DelPreto, MacCurdy, and
  Rus]{katzschmann_exploration_2018}
Katzschmann, R.~K., DelPreto, J., MacCurdy, R., and Rus, D.
\newblock Exploration of underwater life with an acoustically controlled soft
  robotic fish.
\newblock \emph{Science Robotics}, March 2018.
\newblock \doi{10.1126/scirobotics.aar3449}.
\newblock URL
  \url{https://www.science.org/doi/abs/10.1126/scirobotics.aar3449}.
\newblock Publisher: American Association for the Advancement of Science.

\bibitem[Li et~al.(2021)Li, Chen, Zhou, Liang, Xiao, Cao, Zhang, Zhang, Wu,
  Yin, Xu, Fan, Chen, Song, Yang, Pan, Hou, Zou, He, Yang, Mao, Jia, Zhou, Li,
  Qu, Xu, Huang, Luo, Xie, Gu, Zhu, and Yang]{li_self-powered_2021}
Li, G., Chen, X., Zhou, F., Liang, Y., Xiao, Y., Cao, X., Zhang, Z., Zhang, M.,
  Wu, B., Yin, S., Xu, Y., Fan, H., Chen, Z., Song, W., Yang, W., Pan, B., Hou,
  J., Zou, W., He, S., Yang, X., Mao, G., Jia, Z., Zhou, H., Li, T., Qu, S.,
  Xu, Z., Huang, Z., Luo, Y., Xie, T., Gu, J., Zhu, S., and Yang, W.
\newblock Self-powered soft robot in the {Mariana} {Trench}.
\newblock \emph{Nature}, 591\penalty0 (7848):\penalty0 66--71, March 2021.
\newblock ISSN 1476-4687.
\newblock \doi{10.1038/s41586-020-03153-z}.
\newblock URL \url{https://www.nature.com/articles/s41586-020-03153-z}.
\newblock Bandiera\_abtest: a Cg\_type: Nature Research Journals Number: 7848
  Primary\_atype: Research Publisher: Nature Publishing Group Subject\_term:
  Mechanical engineering;Mechanical properties;Polymers Subject\_term\_id:
  mechanical-engineering;mechanical-properties;polymers.

\bibitem[Li et~al.(2019)Li, Wu, Tedrake, Tenenbaum, and
  Torralba]{li_learning_2019}
Li, Y., Wu, J., Tedrake, R., Tenenbaum, J.~B., and Torralba, A.
\newblock Learning {Particle} {Dynamics} for {Manipulating} {Rigid} {Bodies},
  {Deformable} {Objects}, and {Fluids}.
\newblock \emph{arXiv:1810.01566 [physics, stat]}, April 2019.
\newblock URL \url{http://arxiv.org/abs/1810.01566}.
\newblock arXiv: 1810.01566.

\bibitem[Lin et~al.(2021)Lin, Siddall, Schwab, Fukushima, Banerjee, Baek, Vogt,
  Park, and Jusufi]{lin_modeling_2021}
Lin, Y.-H., Siddall, R., Schwab, F., Fukushima, T., Banerjee, H., Baek, Y.,
  Vogt, D., Park, Y.-L., and Jusufi, A.
\newblock Modeling and {Control} of a {Soft} {Robotic} {Fish} with {Integrated}
  {Soft} {Sensing}.
\newblock \emph{Advanced Intelligent Systems}, March 2021.
\newblock \doi{10.1002/aisy.202000244}.

\bibitem[Liu et~al.(2015)Liu, Smith, Gu, Tan, Liu, and Turk]{liu_computer_2015}
Liu, S., Smith, A.~S., Gu, Y., Tan, J., Liu, C.~K., and Turk, G.
\newblock Computer {Simulations} {Imply} {Forelimb}-{Dominated} {Underwater}
  {Flight} in {Plesiosaurs}.
\newblock \emph{PLOS Computational Biology}, 11\penalty0 (12):\penalty0
  e1004605, December 2015.
\newblock ISSN 1553-7358.
\newblock \doi{10.1371/journal.pcbi.1004605}.
\newblock URL
  \url{https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004605}.
\newblock Publisher: Public Library of Science.

\bibitem[Liu et~al.(2019)Liu, Li, Chen, and Li]{liu_soft_2019}
Liu, S., Li, T., Chen, W., and Li, H.
\newblock Soft {Rasterizer}: {A} {Differentiable} {Renderer} for {Image}-based
  {3D} {Reasoning}.
\newblock \emph{arXiv:1904.01786 [cs]}, April 2019.
\newblock URL \url{http://arxiv.org/abs/1904.01786}.
\newblock arXiv: 1904.01786.

\bibitem[Lu et~al.(2016)Lu, Jin, and Fedkiw]{lu_two-way_2016}
Lu, W., Jin, N., and Fedkiw, R.
\newblock Two-way coupling of fluids to reduced deformable bodies.
\newblock In \emph{Proceedings of the {ACM} {SIGGRAPH}/{Eurographics}
  {Symposium} on {Computer} {Animation}}, {SCA} '16, pp.\  67--76, Goslar, DEU,
  July 2016. Eurographics Association.
\newblock ISBN 978-3-905674-61-3.

\bibitem[Ma et~al.(2021)Ma, Du, Zhang, Wu, Spielberg, Katzschmann, and
  Matusik]{ma_diffaqua_2021}
Ma, P., Du, T., Zhang, J.~Z., Wu, K., Spielberg, A., Katzschmann, R.~K., and
  Matusik, W.
\newblock {DiffAqua}: {A} {Differentiable} {Computational} {Design} {Pipeline}
  for {Soft} {Underwater} {Swimmers} with {Shape} {Interpolation}.
\newblock \emph{ACM Transactions on Graphics}, 40\penalty0 (4):\penalty0 1--14,
  August 2021.
\newblock ISSN 0730-0301, 1557-7368.
\newblock \doi{10.1145/3450626.3459832}.
\newblock URL \url{http://arxiv.org/abs/2104.00837}.
\newblock arXiv: 2104.00837.

\bibitem[Mao et~al.(2020)Mao, Jagtap, and
  Karniadakis]{mao_physics-informed_2020}
Mao, Z., Jagtap, A.~D., and Karniadakis, G.~E.
\newblock Physics-informed neural networks for high-speed flows.
\newblock \emph{Computer Methods in Applied Mechanics and Engineering},
  360:\penalty0 112789, March 2020.
\newblock ISSN 0045-7825.
\newblock \doi{10.1016/j.cma.2019.112789}.
\newblock URL
  \url{https://www.sciencedirect.com/science/article/pii/S0045782519306814}.

\bibitem[Min et~al.(2019)Min, Won, Lee, Park, and Lee]{min_softcon_2019}
Min, S., Won, J., Lee, S., Park, J., and Lee, J.
\newblock {SoftCon}: simulation and control of soft-bodied animals with
  biomimetic actuators.
\newblock \emph{ACM Transactions on Graphics}, 38\penalty0 (6):\penalty0
  208:1--208:12, November 2019.
\newblock ISSN 0730-0301.
\newblock \doi{10.1145/3355089.3356497}.
\newblock URL \url{https://doi.org/10.1145/3355089.3356497}.

\bibitem[Mucha et~al.(2004)Mucha, Tee, Weitz, Shraiman, and
  Brenner]{mucha_model_2004}
Mucha, P., Tee, S., Weitz, D., Shraiman, B., and Brenner, M.
\newblock A model for velocity fluctuations in sedimentation.
\newblock \emph{Journal of Fluid Mechanics}, 2004.
\newblock \doi{10.1017/S0022112003006967}.

\bibitem[Peskin(2002)]{peskin_immersed_2002}
Peskin, C.~S.
\newblock The immersed boundary method.
\newblock \emph{Acta Numerica}, 11:\penalty0 479--517, January 2002.
\newblock ISSN 1474-0508, 0962-4929.
\newblock \doi{10.1017/S0962492902000077}.
\newblock URL
  \url{https://www.cambridge.org/core/journals/acta-numerica/article/immersed-boundary-method/95ECDAC5D1824285563270D6DD70DA9A}.
\newblock Publisher: Cambridge University Press.

\bibitem[Pfaff et~al.(2021)Pfaff, Fortunato, Sanchez-Gonzalez, and
  Battaglia]{pfaff_learning_2021}
Pfaff, T., Fortunato, M., Sanchez-Gonzalez, A., and Battaglia, P.~W.
\newblock Learning {Mesh}-{Based} {Simulation} with {Graph} {Networks}.
\newblock \emph{arXiv:2010.03409 [cs]}, June 2021.
\newblock URL \url{http://arxiv.org/abs/2010.03409}.
\newblock arXiv: 2010.03409.

\bibitem[Polverino et~al.(2022)Polverino, Soman, Karakaya, Gasparini, Evans,
  and Porfiri]{polverino_ecology_2022}
Polverino, G., Soman, V.~R., Karakaya, M., Gasparini, C., Evans, J.~P., and
  Porfiri, M.
\newblock Ecology of fear in highly invasive fish revealed by robots.
\newblock \emph{iScience}, 25\penalty0 (1), January 2022.
\newblock ISSN 2589-0042.
\newblock \doi{10.1016/j.isci.2021.103529}.
\newblock URL
  \url{https://www.cell.com/iscience/abstract/S2589-0042(21)01500-5}.
\newblock Publisher: Elsevier.

\bibitem[Qiao et~al.(2021)Qiao, Liang, Koltun, and
  Lin]{qiao_differentiable_2021}
Qiao, Y.-L., Liang, J., Koltun, V., and Lin, M.~C.
\newblock Differentiable {Simulation} of {Soft} {Multi}-body {Systems}.
\newblock In \emph{Conference on {Neural} {Information} {Processing} {Systems}
  ({NeurIPS})}, 2021.

\bibitem[Raissi et~al.(2019)Raissi, Perdikaris, and
  Karniadakis]{raissi_physics-informed_2019}
Raissi, M., Perdikaris, P., and Karniadakis, G.
\newblock Physics-informed neural networks: {A} deep learning framework for
  solving forward and inverse problems involving nonlinear partial differential
  equations.
\newblock \emph{Journal of Computational Physics}, 378:\penalty0 686--707,
  February 2019.
\newblock ISSN 00219991.
\newblock \doi{10.1016/j.jcp.2018.10.045}.
\newblock URL
  \url{https://linkinghub.elsevier.com/retrieve/pii/S0021999118307125}.

\bibitem[Raissi et~al.(2020)Raissi, Yazdani, and
  Karniadakis]{raissi_hidden_2020}
Raissi, M., Yazdani, A., and Karniadakis, G.~E.
\newblock Hidden fluid mechanics: {Learning} velocity and pressure fields from
  flow visualizations.
\newblock \emph{Science}, 367\penalty0 (6481):\penalty0 1026--1030, February
  2020.
\newblock \doi{10.1126/science.aaw4741}.
\newblock URL \url{https://www.science.org/doi/10.1126/science.aaw4741}.
\newblock Publisher: American Association for the Advancement of Science.

\bibitem[Robinson-Mosher et~al.(2008)Robinson-Mosher, Shinar, Gretarsson, Su,
  and Fedkiw]{robinson-mosher_two-way_2008}
Robinson-Mosher, A., Shinar, T., Gretarsson, J., Su, J., and Fedkiw, R.
\newblock Two-way coupling of fluids to rigid and deformable solids and shells.
\newblock \emph{ACM Transactions on Graphics}, 27\penalty0 (3):\penalty0 1--9,
  August 2008.
\newblock ISSN 0730-0301.
\newblock \doi{10.1145/1360612.1360645}.
\newblock URL \url{https://doi.org/10.1145/1360612.1360645}.

\bibitem[Ronneberger et~al.(2015)Ronneberger, Fischer, and
  Brox]{ronneberger_u-net_2015}
Ronneberger, O., Fischer, P., and Brox, T.
\newblock U-{Net}: {Convolutional} {Networks} for {Biomedical} {Image}
  {Segmentation}.
\newblock In Navab, N., Hornegger, J., Wells, W.~M., and Frangi, A.~F. (eds.),
  \emph{Medical {Image} {Computing} and {Computer}-{Assisted} {Intervention}
  – {MICCAI} 2015}, Lecture {Notes} in {Computer} {Science}, pp.\  234--241,
  Cham, 2015. Springer International Publishing.
\newblock ISBN 978-3-319-24574-4.
\newblock \doi{10.1007/978-3-319-24574-4_28}.

\bibitem[Sifakis \& Barbic(2012)Sifakis and Barbic]{sifakis_fem_2012}
Sifakis, E. and Barbic, J.
\newblock {FEM} simulation of {3D} deformable solids: a practitioner's guide to
  theory, discretization and model reduction.
\newblock In \emph{{ACM} {SIGGRAPH} 2012 {Courses}}, {SIGGRAPH} '12, pp.\
  1--50, New York, NY, USA, August 2012. Association for Computing Machinery.
\newblock ISBN 978-1-4503-1678-1.
\newblock \doi{10.1145/2343483.2343501}.
\newblock URL \url{https://doi.org/10.1145/2343483.2343501}.

\bibitem[Sun et~al.(2020)Sun, Gao, Pan, and Wang]{sun_surrogate_2020}
Sun, L., Gao, H., Pan, S., and Wang, J.-X.
\newblock Surrogate modeling for fluid flows based on physics-constrained deep
  learning without simulation data.
\newblock \emph{Computer Methods in Applied Mechanics and Engineering},
  361:\penalty0 112732, April 2020.
\newblock ISSN 0045-7825.
\newblock \doi{10.1016/j.cma.2019.112732}.
\newblock URL
  \url{https://www.sciencedirect.com/science/article/pii/S004578251930622X}.

\bibitem[Teng et~al.(2016)Teng, Levin, and Kim]{teng_eulerian_2016}
Teng, Y., Levin, D. I.~W., and Kim, T.
\newblock Eulerian solid-fluid coupling.
\newblock \emph{ACM Transactions on Graphics}, 35\penalty0 (6):\penalty0
  200:1--200:8, November 2016.
\newblock ISSN 0730-0301.
\newblock \doi{10.1145/2980179.2980229}.
\newblock URL \url{https://doi.org/10.1145/2980179.2980229}.

\bibitem[Verma et~al.(2018)Verma, Novati, and
  Koumoutsakos]{verma_efficient_2018}
Verma, S., Novati, G., and Koumoutsakos, P.
\newblock Efficient collective swimming by harnessing vortices through deep
  reinforcement learning.
\newblock \emph{Proceedings of the National Academy of Sciences}, 115\penalty0
  (23):\penalty0 5849--5854, June 2018.
\newblock ISSN 0027-8424, 1091-6490.
\newblock \doi{10.1073/pnas.1800923115}.
\newblock URL \url{https://www.pnas.org/content/115/23/5849}.
\newblock Publisher: National Academy of Sciences Section: Physical Sciences.

\bibitem[Videler \& Hess(1984)Videler and Hess]{videler_fast_1984}
Videler, J.~J. and Hess, F.
\newblock Fast {Continuous} {Swimming} of {Two} {Pelagic} {Predators}, {Saithe}
  ({Pollachius} {Virens}) and {Mackerel} ({Scomber} {Scombrus}): a {Kinematic}
  {Analysis}.
\newblock \emph{Journal of Experimental Biology}, 109\penalty0 (1):\penalty0
  209--228, March 1984.
\newblock ISSN 0022-0949.
\newblock \doi{10.1242/jeb.109.1.209}.
\newblock URL \url{https://doi.org/10.1242/jeb.109.1.209}.

\bibitem[Wandel et~al.(2021{\natexlab{a}})Wandel, Weinmann, and
  Klein]{wandel_learning_2021}
Wandel, N., Weinmann, M., and Klein, R.
\newblock Learning {Incompressible} {Fluid} {Dynamics} from {Scratch} --
  {Towards} {Fast}, {Differentiable} {Fluid} {Models} that {Generalize}.
\newblock \emph{arXiv:2006.08762 [cs, stat]}, March 2021{\natexlab{a}}.
\newblock URL \url{http://arxiv.org/abs/2006.08762}.
\newblock arXiv: 2006.08762.

\bibitem[Wandel et~al.(2021{\natexlab{b}})Wandel, Weinmann, and
  Klein]{wandel_teaching_2021}
Wandel, N., Weinmann, M., and Klein, R.
\newblock Teaching the {Incompressible} {Navier}-{Stokes} {Equations} to {Fast}
  {Neural} {Surrogate} {Models} in {3D}.
\newblock \emph{Physics of Fluids}, 33\penalty0 (4):\penalty0 047117, April
  2021{\natexlab{b}}.
\newblock ISSN 1070-6631, 1089-7666.
\newblock \doi{10.1063/5.0047428}.
\newblock URL \url{http://arxiv.org/abs/2012.11893}.
\newblock arXiv: 2012.11893.

\bibitem[Wandel et~al.(2021{\natexlab{c}})Wandel, Weinmann, Neidlin, and
  Klein]{wandel_spline-pinn_2021}
Wandel, N., Weinmann, M., Neidlin, M., and Klein, R.
\newblock Spline-{PINN}: {Approaching} {PDEs} without {Data} using {Fast},
  {Physics}-{Informed} {Hermite}-{Spline} {CNNs}.
\newblock \emph{arXiv:2109.07143 [physics]}, September 2021{\natexlab{c}}.
\newblock URL \url{http://arxiv.org/abs/2109.07143}.
\newblock arXiv: 2109.07143.

\bibitem[Yang \& Balaras(2006)Yang and Balaras]{yang_embedded-boundary_2006}
Yang, J. and Balaras, E.
\newblock An embedded-boundary formulation for large-eddy simulation of
  turbulent flows interacting with moving boundaries.
\newblock \emph{Journal of Computational Physics}, 215\penalty0 (1):\penalty0
  12--40, June 2006.
\newblock ISSN 0021-9991.
\newblock \doi{10.1016/j.jcp.2005.10.035}.
\newblock URL
  \url{https://www.sciencedirect.com/science/article/pii/S0021999105004778}.

\bibitem[Zhang et~al.(2021)Zhang, Zhang, Ma, Nava, Du, Arm, Matusik, and
  Katzschmann]{zhang_learning_2021}
Zhang, J.~Z., Zhang, Y., Ma, P., Nava, E., Du, T., Arm, P., Matusik, W., and
  Katzschmann, R.~K.
\newblock Learning {Material} {Parameters} and {Hydrodynamics} of {Soft}
  {Robotic} {Fish} via {Differentiable} {Simulation}.
\newblock Technical Report arXiv:2109.14855, arXiv, September 2021.
\newblock URL \url{http://arxiv.org/abs/2109.14855}.
\newblock arXiv:2109.14855 [cs] type: article.

\bibitem[Zhang et~al.(2007)Zhang, Jiang, and Ye]{zhang_two_2007}
Zhang, W., Jiang, Y., and Ye, Z.
\newblock Two {Better} {Loosely} {Coupled} {Solution} {Algorithms} of {CFD}
  {Based} {Aeroelastic} {Simulation}.
\newblock \emph{Engineering Applications of Computational Fluid Mechanics},
  1\penalty0 (4):\penalty0 253--262, January 2007.
\newblock ISSN 1994-2060.
\newblock \doi{10.1080/19942060.2007.11015197}.
\newblock URL \url{https://doi.org/10.1080/19942060.2007.11015197}.
\newblock Publisher: Taylor \& Francis \_eprint:
  https://doi.org/10.1080/19942060.2007.11015197.

\end{thebibliography}