
FluidNet – Accelerating Eulerian Fluid Simulation with Convolutional Networks - chang2301
https://github.com/google/FluidNet
======
n00b101
In case anyone is wondering, the end-to-end fluid dynamics simulation is _not_
achieved by a neural network alone here (though the authors claim that is
possible).

If I understand the paper [1] correctly, they used Convolution Neural Network
(ConvNet) to speed up a Navier-Stokes Partial Differential Equation (PDE)
solver. Specifically, they are solving "incompressible flow" Navier-Stokes
equations.

In each time step, the solver performs an "advection" update followed by a
"pressure projection" step. This "pressure projection" step involves solving a
"Poisson equation," which is computationally intensive and usually requires an
iterative solver. Instead of directly solving the Poisson equation, they train
a ConvNet regression model to infer these "pressure projections."

They have to deal with lots of fiddly details, like choice of neural network
training penalty function, dealing with PDE boundary conditions issues, and
dealing with errors accumulating during simulation.

Training the ConvNet involves running an off-line solver to obtain statistical
fluid dynamics data. The training step takes 48 hours, using GPU ConvNet
training. As far as I can tell, the network is trained on a specific geometry
and must be re-trained if the geometry changes. [2]

The final run-time improvement of their model is "competitive with state-of-
the-art GPU implementations of Jacobi and Gauss Seidel solvers for pressure."
They believe that run-time could be further improved.

[1]
[https://arxiv.org/pdf/1607.03597v3.pdf](https://arxiv.org/pdf/1607.03597v3.pdf)

[2] "When simulating smoke, we do not explicitly satisfy the Dirichlet
boundary conditions in our offline simulation (for smoke we surround our
simulation domain by an empty air region). Typically “ghost cells” are used to
incorporate these boundary conditions into the linear system solution. In our
system, we do not include ghost cells (or even mark voxels as boundary cells)
and instead let the ConvNet learn to apply these boundary conditions by
learning edge effects in the functional mapping of the input tensor to
pressure output. This means that we must learn a new model if the external
boundary changes. This is certainly a limitation of our approach, however it
is one that we feel is not severe since most applications use a constant
domain boundary."

~~~
santaclaus
> In each time step, the solver performs an "advection" update followed by a
> "pressure projection" step. This "pressure projection" step involves solving
> a "Poisson equation," which is computationally intensive and usually
> requires an iterative solver. Instead of directly solving the Poisson
> equation, they train a ConvNet regression model to infer these "pressure
> projections."

Yea, I mean, for applications like solving a Poisson equation, it seems like
it would be cheaper to just solve the damn linear system. The system is going
to be fairly sparse with a nice, well understood distribution of non-zeros and
one should be able to make the linear solve fly. I'm curious where the tipping
point is, however, between just solving the linear system and pushing
everything through a CNN.

~~~
gnipgnip
Moreover Poisson equation, being a Linear PDE, is essentially solved using
convolutions.

The crux of the problem seems to be in the handling of boundaries - once FEM-
ized the nice grid like structure gets replaced by an irregular graph (with
similar topological dimension). Can someone please shed some light on this ?

------
folli
Seems to go in the same direction as "Data-driven Fluid Simulations using
Regression Forests":
[https://www.inf.ethz.ch/personal/ladickyl/fluid_sigasia15.pd...](https://www.inf.ethz.ch/personal/ladickyl/fluid_sigasia15.pdf)

------
londons_explore
Fast fluid simulations can be used to rapidly optimize the design of many
things. These simulations look to be about 1000x faster.

We could see aircraft wings, pumps, etc. getting many percent more efficient
as a result of this paper and further research based on it.

~~~
semi-extrinsic
TBH, I doubt it. There's lots of nifty tricks that can speed up CFD for
visualization (like this) by many orders of magnitude. Yet no engineers are
willing to touch any of those tricks, because we are making physical machines
that can kill people if something like the pressure spikes are off by 10%.

~~~
londons_explore
One can use these tricks to design the thing, then do a final pass with real
models to validate it.

------
londons_explore
Can anyone upload pretrained models for this stuff? I want to mess with it,
but don't want to waste a week of GPU time if someone else is already on the
case...

------
snickmy
Wonder why they used Torch7 and not Tensorflow ...

------
drcode
Does this have any bearing on efficient protein folding analysis for whole
cell simulation?

------
MichailP
Can someone recommend a good and accesible book on fluid simulation?

~~~
kunstmord
"Computational Fluid Dynamics" by Ferziger and Peric. I'm in an area related
to hydrodynamics, and while I don't do CFD myself, this book was easy to read
and covers a lot of the basics, I think. And it's extremely well written.
(Ferziger also wrote a great book on kinetic theory of rarefied gases)

------
blt
Cool to see Ken Perlin's name on the paper. This seems like the kind of thing
he might be into these days.

