Physics-informed neural networks for a cylinder wake seen through dye and for an epidemic model
From a film of dye alone, a physics-informed neural network recovers the pressure around a cylinder with an overall error of 4.9%, where optical flow errs by 53% and a flow solver adjusted to the film by 62%. On an epidemic model that a numerical solver computes directly, the network is no more accurate than least squares and costs about 200 times more.
Wind or water flowing past a chimney or a pipe on the seabed sheds swirls, called vortices, that push it from side to side and can make it vibrate. The force comes from the velocity and the pressure of the fluid, which are hard to measure, whereas dye in water or smoke in air makes the flow visible to a single camera. A film, however, shows only where the dye is. Raissi, Yazdani and Karniadakis1 recovered the velocity and the pressure from such a film with a physics-informed neural network, a neural network fitted to the film while being penalised wherever it breaks the equations of fluid motion. Their test case is “the prototypical problem of a two dimensional flow past a circular cylinder”, in their words2, and because it is a simulation, the true velocity, pressure and forces are known and every method can be checked against them. All errors below are root-mean-square errors over the whole film, relative to the true fields.
Motion the film cannot show
Fluid that slides along a band of even colour, or moves where the dye is evenly spread, leaves the film unchanged. Optical flow, the classical method for reading motion from a sequence of images, fills these gaps by assuming that the velocity varies smoothly. The pressure computed from its velocity errs by 53%.
A flow solver adjusted to the film
A flow solver advances the velocity and the pressure in time by the equations of fluid motion, but it needs the flow on the edges of the filmed region, which the film does not show. Variational data assimilation adjusts those edge values until the dye computed by the solver matches the film, and the pressure of the adjusted solver still errs by 62%.
The network constrained by the equations of the fluid
The network needs no edge values; it is fitted to the film and penalised for breaking the equations at points inside the fluid. Its velocity errs by 1.2% along the stream and 5.7% across it and its pressure by 4.9%, and the amplitude of the lift, the side force on the cylinder, comes out 3% below its true value. The price is about ten hours of training on two GPUs.
The transmission rate of an epidemic model
Muñoz-Fernández, Seoane and Seoane-Sepúlveda3 describe the first COVID-19 wave in Italy with an SIR model whose transmission rate decays towards a floor. A numerical solver computes that model for any trial rate in milliseconds, so nothing is left for the network to supply. Least squares, which adjusts the rate until the solver’s curves match the counts, is about as accurate as the network and about 200 times faster, and neither determines the floor. The network is worth its cost where the equations supply what the data leave undetermined, as in the wake, and not where a solver already imposes them.
Limitations
The wake is a two-dimensional simulation without noise, while a real film shows a three-dimensional flow and carries noise. The network was trained twice, too few runs to say how often a training fails. Optical flow and the adjusted solver were each tried in one form, with settings tuned in their favour against the true fields.
References
- Raissi, M., Yazdani, A. & Karniadakis, G. E. Hidden fluid mechanics: learning velocity and pressure fields from flow visualizations. Science 367, 1026–1030 (2020). doi:10.1126/science.aaw4741
- Raissi, M., Yazdani, A. & Karniadakis, G. E. Hidden fluid mechanics: a Navier–Stokes informed deep learning framework for assimilating flow visualization data. Preprint at arxiv.org/abs/1808.04327 (2018).
- Muñoz-Fernández, G. A., Seoane, J. M. & Seoane-Sepúlveda, J. B. A SIR-type model describing the successive waves of COVID-19. Chaos, Solitons & Fractals 144, 110682 (2021). doi:10.1016/j.chaos.2021.110682