Fully Convolutional Approach for Simulating Wave Dynamics

We investigate the performance of fully convolutional networks to predict the motion and interaction of surface waves in open and closed complex geometries . We focus on a U-Net type architecture and assess its ability to capture and extrapolate wave propagation in time as well as the reflection , interference and diffraction of waves . We investigate how well the network generalises both to long-time predictions and to geometric configurations not seen during training . We demonstrate that this neural network is capable of accurately predicting the height distribution of waves on a liquid surface within curved and multi-faceted open and closed geometries , when only simple box and right-angled corner geometries were seen during training . We found that the RMSE of the predictions remained of order 1× 10−4 times the characteristic length of the domain for at least 20 time-steps . 1 INTRODUCTION Figure 1 : Rollouts of our U-Net . It simulates wave motion on a fluid surface with the possible existence of solid walls [ video ] . Predicting the spatio-temporal dynamics of physical systems is a recurrent problem in many areas of science and engineering . A well-established process consists of describing the physical phenomena by human-engineered mathematical models , which capture our current understanding of the physical laws governing the systems , but whose complexity may prevent finding analytical solutions . Scientists therefore frequently turn to numerical solvers to simulate such mathematical models and generate accurate approximations to their solution . The huge progress in machine learning ( ML ) algorithms and increased availability of computational power during the last decade has motivated a significant growth in the popularity of data-driven physics . In this field , the interpolation capabilities of neural networks ( NNs ) have been mostly used in two ways : first , to solve partial differential equations ( PDEs ) in an unsupervised manner ( Dissanayake & Phan-Thien , 1994 ; Lagaris et al. , 1998 ; 2000 ; Raissi et al. , 2019 ) and second , to predict the physical dynamics from previous observations without knowledge of the underlying equations ( Guo et al. , 2016 ; Farimani et al. , 2017 ; Thuerey et al. , 2018 ; Lee & You , 2019 ) . Unlike the first approach , the latter does not lead to an ana- lytical representation of the physical dynamics , however , it makes feasible to produce predictions for a diversity of physical domains , boundary conditions and initial conditions without needing to re-train the network , provided that the physical laws are unaltered . Recent studies applying convolutional neural networks ( CNNs ) to simulate fluid dynamics have reported a speed-up of up to four orders of magnitude , in comparison to traditional numerical solvers , while keeping a similar accuracy ( Guo et al. , 2016 ) . The major shortcoming of NNs are their often poor generalization to unseen configurations and poor long-time predictions in unsteady simulations . We investigate the application of fully convolutional neural networks to the problem of forecasting surface wave dynamics , the motion of which is described by the shallow water equations , a system of three non-linear PDEs ( Ersoy et al. , 2017 ) . Computational modelling of surface waves is widely used in seismology , computer animation and flood modelling ( Ersoy et al. , 2017 ; Garcı́a-Navarro et al. , 2019 ) . Our network learnt to simulate a range of physical phenomena including wave propagation , reflection , interference and diffraction at sharp corners . This kind of NN could supplement or potentially replace numerical algorithms used to solve the shallow water PDEs , reducing the inference time by several orders of magnitude and allowing for real-time solutions . This has particular relevance in iterative design scenarios and potential applications such as tsunami prediction . Contribution . We demonstrate that our U-Net architecture is able to accurately predict surface wave dynamics in complex straight-sided and curved geometries , even when trained only on datasets with simple straight-sided boundaries . The generalisation to different initial conditions and longertime predictions are also evaluated . Additionally , we show how including the MSE of the wave gradient into the loss function significantly reduces spurious oscillations in predicted solutions and may help improve the prediction of the position of the wavefronts . Our network is able to simulate wave dynamics four orders of magnitude faster than a state-of-the-art spectral/hp element numerical solver ( Karniadakis & Sherwin , 2013 ) , so it could be an effective replacement for numerical solvers in applications where performance is critical . 2 RELATED WORK . Physics-informed NNs for solving PDEs . The use of NNs for the solution of PDEs has been investigated since the early 1990s . Most of the relevant research at that time built on the idea of exploiting the universal function approximator property of multi-layer perceptrons ( MLPs ) ( Dissanayake & Phan-Thien , 1994 ; Dissanayake & Phan-Thien , 1994 ; Lagaris et al. , 1998 ) . In such an approach , the solutions to the PDEs are approximated as MLPs whose only inputs are the spatio-temporal coordinates . These MLPs are trained in an unsupervised way to satisfy the governing PDEs as well as the initial and boundary conditions . The main advantage of this paradigm is that the solution is obtained in a differentiable , closed analytic form , easily usable in any subsequent calculations . Nevertheless , these networks can not extrapolate to different domains , boundary conditions or initial conditions ; making it necessary to re-train the network for every slight modification of the problem . These techniques inspired the more modern physics-informed neural networks ( PINNs ) ( Raissi et al. , 2017 ; Yazdani et al. , 2018 ; Raissi et al. , 2019 ; Lu et al. , 2019 ) , which include deeper MLPs and random collocation points . CNNs for simulating steady physics . During the last five years , most of the networks used to predict continuous physics have included convolution layers . For instance , CNNs have been used to solve the Poisson ’ s equation ( Tang et al. , 2018 ; Özbay et al. , 2019 ) , and to solve the steady NavierStokes equations ( Guo et al. , 2016 ; Miyanawala & Jaiman , 2018 ; Yilmaz & German , 2017 ; Farimani et al. , 2017 ; Thuerey et al. , 2018 ; Zhang et al. , 2018 ) . The use of CNNs allows for visual inputs representing physical information , such as the domain geometry or the initial condition , and for visual outputs representing the solution fields . In contrast to PINNs , the network predictions are purely based on observation , without knowledge of the underlying governing equations . This paradigm has proven to extrapolate well to domain geometries , boundary conditions and initial conditions not seen during training ( Thuerey et al. , 2018 ) . The evaluation of these networks for prediction is considerably faster than traditional PDE solvers , allowing relatively accurate solutions to be predicted between one and four orders of magnitude faster ( Guo et al. , 2016 ; Farimani et al. , 2017 ) . These reasons make CNNs perfect for developing surrogate models , complementing expensive numerical solvers ( Guo et al. , 2016 ; Miyanawala & Jaiman , 2018 ) , or for real-time animations ( Kim et al. , 2019 ) . Our work takes inspiration from Guo et al . ( 2016 ) in the use of a binary geometry field to represent the physical domain . Although Guo et al . ( 2016 ) ; Farimani et al . ( 2017 ) and Thuerey et al . ( 2018 ) proved the generalisation of their networks to domain geometries not seen during training , these unseen domains contain elementary geometrical entities included within the training data . We go one step further by training the network with exclusively straight boundaries and demonstrating the network is able to generalise to domains incorporating boundaries with varying radius of curvature . CNNs for simulating unsteady physics . Unsteady physics have also been explored from the computer vision perspective ( Lee & You , 2019 ; Sorteberg et al. , 2018 ; Wiewel et al. , 2019 ; Kim et al. , 2019 ; Fotiadis et al. , 2020 ) , although to a lesser extent than steady physics . Here , the input to the network is a sequence of past solution fields , while the output is a sequence of predicted solution fields at future times . When predicting unsteady phenomena there is an additional challenge : keeping the predictions accurate along time . To address this , Sorteberg et al . ( 2018 ) ; Wiewel et al . ( 2019 ) and Kim et al . ( 2019 ) proposed to use encoder-propagator-decoder architectures , whereas Lee & You ( 2019 ) and Fotiadis et al . ( 2020 ) continued to use encoder-decoder architectures similar to those used for steady problems . Inspired by Fotiadis et al . ( 2020 ) , which showed that feed-forward networks perform at least as well as recurrent networks in wave forecasting , we opt to use a U-Net architecture ( Ronneberger et al. , 2015 ) to perform each time-step of the simulations . 3 METHOD . 3.1 WAVE DYNAMICS DATASETS . The datasets used during training and testing were generated by solving the inviscid , twodimensional shallow water equations with Nektar++ , a high-order spectral/hp element solver ( Cantwell et al. , 2015 ) . In conservative form , these equations are given by ∂ ∂t ( h hu hv ) +∇ · hu hvhu2 + gh2/2 hvu huv hv2 + gh2/2 = 0 , ( x , y ) ∈ D ( 1 ) where g = 9.80665 m/s2 is the acceleration due to gravity and D ∈ R2 denotes the domain under consideration . Unknown variables in this system are the water depth h ( x , y , t ) and the components of the two-dimensional velocity vector u ( x , y , t ) and v ( x , y , t ) . We imposed two forms of boundary conditions : solid wall boundaries , which result in wave reflection and diffraction ; and open boundaries , which allow waves to exit the domain . As initial conditions we considered a droplet , represented mathematically by a localized two-dimensional Gaussian superimposed on a unitary depth : h10 = 1 + I exp ( − C ( ( x− xc ) 2 + ( y − yc ) 2 ) ) ( 2 ) where I is set to 0.1 m , C is randomly sampled from a uniform distribution between 400 and 1000 m−2 and the droplet centre , ( xc , yc ) , is randomly sampled from a uniform distribution in D. Each simulation in the datasets is associated with a binary geometry field , Ω ( x , y ) , which satisfies Ω ( x , y ) = { 0 , if ( x , y ) ∈ D , 1 , otherwise . ( 3 ) Therefore , Ω = 0 inside the fluid domain and Ω = 1 in the solid boundaries ( Guo et al. , 2016 ) . This geometry forms an additional input to the network , required to provide information about the walls location . Figure 2 shows the geometry field for the seven categories of fluid domains included in the datasets . The table below summarises the training and testing sets . The sequences in each dataset contain 100 snapshots of the height field sampled at intervals of ∆t = 0.003 seconds . For full details of the datasets , see Appendix A . 1

Summary: In this paper, a methodology for simulating wave dynamics is presented based on convolutional neural networks. A standard analytic wave dynamics solver was used to generate a large dataset of 2D wave simulations. A deep net based on U-Net was trained to predict the next state of the wave field given the five previous states. The training was done with both standard MSE loss and also GradLoss, which placed a loss on the gradients of the field as well. The results show that the network trained with GradLoss performs significantly better over successive rollouts than the one trained with MSE. The results also show that the trained network is able to generalize to qualitatively different environments from the training set.