1 Introduction
Modeling the dynamics of physical processes that evolve over space and time and vary over a wide range of spatial and temporal scales is a fundamental task in science. Computational fluid dynamics (CFD) is at the heart of climate modeling and has direct implications for understanding and predicting climate change. However, the current paradigm in atmospheric CFD is purely physicsdriven
: known physical laws encoded in systems of coupled partial differential equations (PDEs) are solved over space and time via numerical differentiation and integration schemes. These methods are tremendously computationallyintensive, requiring significant computational resources and expertise. Recently,
datadriven methods, including deep learning, have demonstrated great success in the automation, acceleration, and streamlining of highly computeintensive workflows for science [prabhat_nature_2019]. But existing deep learning methods are mainly statistical with little or no underlying physical knowledge incorporated, and are yet to be proven to be successful in capturing and predicting accurately the properties of complex physical systems.Developing deep learning methods that can incorporate physical laws in a systematic manner is a key element in advancing AI for physical sciences [mlfm]. Towards this goal, we investigate the challenging problem of predicting a turbulent flow, governed by the highdimensional nonlinear NavierStokes equations. Recently, several studies have attempted incorporating knowledge about a physical system into deep learning. For example, [PDECDNN] proposed a warping scheme to predict the sea surface temperature, but only considered the linear advectiondiffusion equation. [xie2018tempogan] and [eulerian] developed deep learning models in the context of fluid flow animation, where physical consistency is less critical. [jinlong_2019] and [constrain1]
introduced statistical and physical constraints in the loss function to regularize the predictions of the model. However, their studies only focused on spatial modeling without temporal dynamics, besides regularization being adhoc and difficult to tune the hyperparameters.
In this work, we propose a hybrid learning paradigm that unifies turbulence modeling and deep representation learning. We develop a novel deep learning model, TurbulentFlow Net (TFNet
), that enhances the capability of predicting complex turbulent flows with deep neural networks.
TFNet applies scale separation to model different ranges of scales of the turbulent flow individually. Building upon a promising and popular CFD technique, the RANSLES coupling approach [turb3], our model replaces a priori spectral filters with trainable convolutional layers. We decompose the turbulent flow into three components, each of which is approximated by a specialized Unet to preserve invariance properties. To the best of our knowledge, this is the first hybrid framework of its kind for predicting turbulent flow. We compare our method with stateoftheart baselines for forecasting velocity fields up to 60 steps ahead given the history. We observe that TFNet is capable of generating accurate and physically meaningful predictions that preserve critical quantities of relevance. In summary, our contributions are as follows:
We study the challenging task of turbulent flow prediction as a test bed to investigate incorporating physics knowledge into deep learning in a principled fashion.

We propose a novel hybrid learning framework, TFNet, that unifies a popular CFD technique, RANSLES coupling, with customdesigned deep neural networks.

When evaluated on turbulence simulations, TFNet achieves 11.1% reduction in prediction RMSE, 30.1% improvement in the energy spectrum, 21% turbulence kinetic energy RMSEs and 64.2% reduction of flow divergence in difference from the target, compared to the best baseline.
2 Background in Turbulence Modeling
Most fluid flows in nature are turbulent, but theoretical understanding of solutions to the governing equations, the Navier–Stokes equations, is incomplete. Turbulent fluctuations occur over a wide range of length and time scales with high correlations between these scales. Turbulent flows are characterized by chaotic motions and intermittency, which are difficult to predict.
The physical system we investigate is twodimensional RayleighBénard convection (RBC), a model for turbulent convection, with a horizontal layer of fluid heated from below so that the lower surface is at a higher temperature than the upper surface. Turbulent convection is a major feature of the dynamics of the oceans, the atmosphere, as well as engineering and industrial processes, which has motivated numerous experimental and theoretical studies for many years. The RBC system serves as an idealized model for turbulent convection that exhibits the full range of dynamics of turbulent convection for sufficiently large temperature gradients.
Let
be the vector velocity field of the flow with two components
, velocities along and directions, the governing equations for this physical system are:Continuity Equation  
Momentum Equation  
Temperature Equation  (1) 
where and are pressure and temperature respectively, is the coefficient of heat conductivity, is density at temperature at the beginning, is the coefficient of thermal expansion, is the kinematic viscosity, the body force that is due to gravity. In this work, we use a particular approach to modeling RBC that uses a Boussinesq approximation, resulting in a divergencefree flow, so should be zero everywhere [Dragosthesis]. Figure 1 shows a snapshot in our RBC flow dataset.
CFD allows simulating complex turbulent flows, however, the wide range of scales makes it very challenging to accurately resolve all the scales. More precisely, fully resolving a complex turbulent flow numerically, known as direct numerical simulations – DNS, requires a very fine discretization of spacetime, which makes the computation prohibitive even with advanced highperformance computing. Hence most CFD methods, like ReynoldsAveraged NavierStokes and Large Eddy Simulations ([turb1, turb2, mcdonough2007introductory], resort to resolving the large scales whilst modeling the small scales, using various averaging techniques and/or lowpass filtering of the governing equations (Eqn. 1). However, the unresolved processes and their interactions with the resolved scales are extremely challenging to model. CFD remains computationally expensive despite decades of advancements in turbulence modeling and HPC.
Deep learning (DL) is poised to accelerate and improve turbulent flow simulations because welltrained DL models can generate realistic instantaneous flow fields with physically accurate spatiotemporal coherence, without solving the complex nonlinear coupled PDEs that govern the system [tompson2017accelerating, mazier1, mazier2]. However, DL models are hard to train and are often used as "black boxes" in physical science as they lack knowledge of the underlying physics and are very hard to interpret. While these DL models may achieve low prediction errors they often lack scientific consistency and do not respect the physics of the systems they model. Therefore, it is critical to infusing known physics and design efficient turbulent flow prediction DL models that are not only accurate but also physically meaningful.
3 TurbulentFlow Net
Inspired by techniques used in CFD to separate scales of this multiscale system, the global idea behind TFNet is to decompose the flow into three components of different scales with trainable modules for simulating each component. First, we provide a brief introduction of the CFD techniques which are built on this basic idea.
Reynoldsaveraged Navier–Stokes (RANS)
decomposes the turbulent flow into two separable time scales: a timeaveraged mean flow and a fluctuating quantity . The resulting RANS equations contain a closure term, the Reynolds stresses, that require modeling, the classic closure problem of turbulence modeling. While this approach is a good first approximation to solving a turbulent flow, RANS does not account for broadband unsteadiness and intermittency, characteristic of most turbulent flows. Further, closure models for the unresolved scales are often inadequate, making RANS solutions to be less accurate. here is the moving average window size.
(2) 
Large Eddy Simulation (LES)
is an alternative approach based on lowpass filtering of the NavierStokes equations that solves a part of the multiscale turbulent flow corresponding to the most energetic scales. In LES, the large scales are a spatially filtered variable , which is usually expressed as a convolution product by the filter kernel . The kernel is often taken to be a Gaussian kernel. is a subdomain of the solution and depends on the filter size [LESbook].
(3) 
The key difference between RANS and LES is that RANS is based on time averaging, leading to simpler steady equations, whereas LES is based on a spatial filtering process which is more accurate but also computationally more expensive.
Hybrid RANSLES Coupling
combines both RANS and LES approaches in order to be able to take advantage of both methods [turb3, hybrid1]. It decomposes the flow variables into three parts: mean flow, resolved fluctuations and unresolved (subgrid) fluctuations. RANSLES coupling applies the spatial filtering operator and the temporal average operator sequentially. We can define in discrete form with using as an intermediate term,
(4)  
(5) 
then can be defined as the difference between and :
(6) 
Finally we can have the threelevel decomposition of the velocity field.
(7) 
Figure 3 shows this threelevel decomposition in wavenumber space [turb3]. is the wavenumber, the spatial frequency in the Fourier domain. is the energy spectrum describing how much kinetic energy is contained in eddies with wavenumber . Small corresponds to large eddies that contain most of the energy. The slope of the spectrum is negative and indicates the transfer of energy from large scales of motion to the small scales. This hybrid approach combines the ease and computational efficiency of RANS with the resolving power of LES to provide a technique that is less expensive and more tractable than pure LES.
Turbulent Flow Net
We describe TFNet, a hybrid deep learning framework based on the multilevel spectral decomposition of hybrid RANSLES Coupling method. We decompose the velocity field into three components of different scales using two scale separation operators, the spatial filter and the temporal filter . In traditional CFD, these filters are usually predefined, such as the Gaussian spatial filter. In our model, both filters are trainable neural networks. The spatial filtering process is realized by applying one convolutional layer with a single 55 filter to each input image. The temporal filter is implemented as a convolutional layer with a single 11 filter applied to every images. The motivation for this design is to explicitly guide the DL model to learn the nonlinear dynamics of both large and small eddies as relevant to the task of spatiotemporal prediction.
We design three identical encoders to encode the three scale components separately. We use a shared decoder to learn the interactions among these three components and generate the final prediction. Each encoder and the decoder can be viewed as a Unet without duplicate layers and middle layer in the original architecture [unet]
. The encoder consists of four convolutional layers with double the number of feature channels of the previous layer and stride 2 for downsampling. The decoder consists of one output layer and four deconvolutional layers with summation of the corresponding feature channels from the three encoders and the output of the previous layer as input. Figure
2 shows the overall architecture of our hybrid model TFNet. To generate multiple timestep forecasts, we perform onestep ahead prediction and roll out autoregressively. Furthermore, since the turbulent flow under investigation has zero divergence ( should be zero everywhere), we include as a regularizer to constrain the predictions, leading to Con TFNet.4 Related work
Turbulence Modeling
Recently, machine learning models, especially DL models have been used to accelerate and improve the simulation of turbulent flows. For example,
[ling2016reynolds, fang2018deep]studied tensor invariant neural networks to learn the Reynolds stress tensor while preserving Galilean invariance, but Galilean invariance only applies to flows without external forces. In our case, RBC flow has gravity as an external force. Most recently,
[kim2019deep] studied unsupervised generative modeling of turbulent flows but the model is not able to make real time future predictions given the historic data. [raissi2017physics] applied a Galerkin finite element method with deep neural networks to solve PDEs automatically, what they call “Physicsinformed deep learning”. Though these methods have shown the ability of deep learning in solving PDEs directly and deriving generalizable solutions, the key limitation of these approaches is that they require explicitly inputs of boundary conditions during inference, which are generally not available in realtime. [Arvind] proposed a purely datadriven DL model for turbulence, compressed convolutional LSTM, but the model lacks physical constraints and interpretability. [jinlong_2019] and [constrain1] introduced statistical and physical constraints in the loss function to regularize the predictions of the model. However, their studies only focused on spatial modeling without temporal dynamics, besides regularization being adhoc and difficult to tune the hyperparameters.Fluid Animation
In parallel, the computer graphics community has also investigated using deep learning to speed up numerical simulations for generating realistic animations of fluids such as water and smoke. For example, [tompson2017accelerating]
used an incompressible Euler’s equation with a customized Convolutional Neural Network (CNN) to predict velocity update within a finite difference method solver.
[chu2017data] propose double CNN networks to synthesize highresolution flow simulation based on reusable spacetime regions. [xie2018tempogan] and [eulerian] developed deep learning models in the context of fluid flow animation, where physical consistency is less critical. [Steffen] proposed a method for the datadriven inference of temporal evolutions of physical functions with deep learning. However, fluid animation emphases on the realism of the simulation rather than the physical consistency of the predictions or physics metrics and diagnostics of relevance to scientists.Video Prediction
Our work is also related to future video prediction. Conditioning on the observed frames, video prediction models are trained to predict future frames, e.g., [mathieu2015deep, finn2016unsupervised, xue2016visual, villegas2017decomposing, Chelsea]. Many of these models are trained on natural videos with complex noisy data from unknown physical processes. Therefore, it is difficult to explicitly incorporate physical principles into the model. The turbulent flow problem studied in this work is substantially different from natural video prediction because it does not attempt to predict object or camera motions. Instead, our approach aims to emulate numerical simulations given noiseless observations from known governing equations. Hence, some of these techniques are perhaps undersuited for our application.
5 Experiments
5.1 Dataset
The dataset for our experiments comes from two dimensional turbulent flow simulated using the Lattice Boltzmann Method [Dragosthesis]. We use only the velocity vector fields, where the spatial resolution of each image is 1792 x 256. Each image has two channels, one is the turbulent flow velocity along direction and the other one is the velocity along direction. The physics parameters relevant to this numerical simulation are: Prandtl number , Rayleigh number and the maximum Mach number 0.1. We use 1500 images (snapshots in time) for our experiments. The task is to predict the spatiotemporal velocity fields up to steps ahead given initial frames.
We divided each 1792 by 256 image into 7 square subregions of size 256 x 256, then downsample them into 64 x 64 pixels sized images. We use a sliding window approach to generate 9,870 samples of sequences of velocity fields: 6,000 training samples, 1,700 validation samples and 2,170 test samples. The DL model is trained using backpropagation through prediction errors accumulated over multiple steps. We use a validation set for hyperparameters tuning based on the average error of predictions up to six steps ahead. The hyperparameters tuning range can be found in Table 2 in the appendix. All results are averaged over three runs.
5.2 Baseline
We compare our model with a series of stateoftheart baselines for turbulent flow prediction.

[leftmargin=*]

ResNet [He2015]: a 34layer Residual Network by replacing the final dense layer with a convolutional layer with two output channels.

ConvLSTM [convlstm]: a 3layer Convolutional LSTM model used for spatiotemporal precipitation nowcasting.

UNet [unet]: Convolutional neural networks originally developed for image segmentation, also used for video prediction.

GAN: Unet trained with a discriminator like the Generative Neural Networks.

SST [PDECDNN]: hybrid deep learning model using warping scheme for linear energy equation to predict sea surface temperature, which is also applicable to the linearized momentum equation that governs the velocity fields.

DHPM [dhpm]: Deep Hidden Physics Model is to directly approximate the solution of partial differential equations with fully connected networks using space and time as inputs. The model is trained twice on the training set and the test set with boundary conditions.
Here ResNet, ConvLSTM, Unet and GAN are pure datadriven spatiotemporal deep learning models for video predictions. SST and DHPM are hybrid techniques that aim to incorporate prior physical knowledge into deep learning for fluid simulation.
5.3 Evaluation Metrics
Even though Root Mean Square Error (RMSE) is a widely accepted metric for quantifying the differences between model predictions and the ground truth, it is still insufficient to apply the predicted turbulent flows with good RMSE to scientific fields. We need to check whether the predictions are physically meaningful and preserve desired physical quantities, such as Turbulence Kinetic Energy, Divergence and Energy Spectrum. Therefore, we include a set of additional metrics for evaluation.
Root Mean Square Error We calculate the RMSE of all predicted values from the ground truth for each pixel,.
Divergence Since we investigate incompressible turbulent flows in this work, which means the divergence,
, at each pixel should be zero, we use the average of absolute divergence over all pixels at each prediction step as an additional evaluation metric.
Turbulence Kinetic Energy In fluid dynamics, turbulence kinetic energy is the mean kinetic energy per unit mass associated with eddies in turbulent flow. Physically, the turbulence kinetic energy is characterised by measured root mean square velocity fluctuations, , where and is the time step. We calculate the turbulence kinetic energy for each predicted sample of 60 velocity fields.
Energy Spectrum The energy spectrum of turbulence, , is related to the mean turbulence kinetic energy as .
is the wavenumber, the spatial frequency in 2D Fourier domain. We calculate the Energy Spectrum on the Fourier transformation of the Turbulence Kinetic Energy fields. The large eddies have low wavenumbers and the small eddies correspond to high wavenumbers. The spectrum tells how much kinetic energy is contained in eddies with wavenumber
.6 Results
Figure 5 shows the growth of RMSE with prediction horizon up to time steps ahead. TFNet consistently outperforms all baselines, and constraining it with divergence free regularizer can further improve the performance. We also found DHPM is able to overfit the training set but performs poorly when tested outside of the training domain. Neither Dropout nor regularization techniques can improve its performance. Also, the warping scheme of the [PDECDNN] relies on the simplified linear assumption, which was too limiting for our nonlinear problem.
Figure 5 shows the averages of absolute divergence over all pixels at each prediction step. TFNet has lower divergence than other models even without additional divergence free constraint for varying prediction step. It is worth mentioning that there is a subtle tradeoff between RMSE and divergence. Even though explicitly constraining model with the divergencefree regularizer can reduce the divergence of the model predictions, it also has the side effect of smoothing out the small scale eddies, which results in a larger RMSE.
Figure 6 displays the turbulence kinetic energy fields of all models’ predictions at the leftmost square field in the original rectangular field. Figure 7 shows the energy spectrum of our model and two best baseline at the leftmost square subfield. We also convert square predicted images back to the big rectangular ones and calculate the Energy Spectrum on the entire domain, which can be found in Figure 10 in the appendix. While the turbulence kinetic energy of TFNet, Unet and ResNet appear to be similar in Figure 6, however, from the energy spectrum in Figure 7 and Figure 10, we can see that TFNet predictions are in fact much closer to the target. Extra divergence free constraint does not affect the energy spectrum of predictions. Thus, unlike other models, TFNet is able to generate predictions that are physically consistent with the ground truth.
Figure 8 shows the ground truth and the predicted velocity fields from all models from time step to . We also provide videos of predictions by TFNet and several best baselines in https://www.youtube.com/watch?v=sLuVGIuEE9A and https://www.youtube.com/watch?v=VMeYHID5LL8, respectively. We see that the predictions by our TFNet model are the closest to the target based on the shape and the frequency of the motions. GAN is able to generate flows with finegrained details but physics are not captured in a correct way, which also shows the benefit of developing hybrid models with embedded physics knowledge. Unet is the best performing datadriven video prediction baseline. [marie] also found the Unet architecture is quite effective in modeling dynamics flows.
We also performed an additional ablation study of TFnet to understand each component of TFnet investigate whether the TFnet has actually learned the flow with different scales. The video, https://www.youtube.com/watch?v=ysdrMUfdhe0, includes the predictions of TFnet, and the outputs of each small Unet while the other two encoders are zeroed out. We can see that the outputs of each small unet are the flow with different scales. During Inference, we applied the trained TFnet to the entire input domain instead of square subregions. We observed that the boundaries between square subregions in the previous videos have disappeared. We also did the same experiments on an additional dataset (Rayleigh number = ). TFNet still consistently outperforms the best two baselines, Unet and ResNet, based on all four evaluation metrics. The results are shown in in Figure 12 in the appendix.
7 Discussion and Future work
We have presented a novel hybrid deep learning model, TFNet, that unifies representation learning and turbulence simulation techniques. TFNet exploits the multiscale behavior of turbulent flows to design trainable scaleseparation operators to model different ranges of scales individually. We provide exhaustive comparisons of TFNet and baselines and observe significant improvement in both the prediction error and desired physical quantifies, including divergence, turbulence kinetic energy and energy spectrum. We argue that different evaluation metrics are necessary to evaluate a DL model’s prediction performance for physical systems that include both accuracy and physical consistency. A key contribution of this work is the skillful combination of stateoftheart turbulent flow simulation paradigms with deep learning. Future work includes extending these techniques to very highresolution predictions, 3D turbulent flows and incorporating additional physical variables, such as pressure and temperature, and additional physical constraints, such as conservation of momentum, to improve the accuracy and faithfulness of physicallyinformed deep learning models.
References
Appendix A Appendix
a.1 Additional Results
Table 1
displays the number of parameters, the best number of input frames, the best number of accumulated errors for backpropogation and training time for one epoch on 8 v100 GPUs for each model. We can conclude that our model has significantly smaller number of parameters than most baselines yet achieves the best performance. About 25 historic images are enough for deep learning models to generate reasonable predictions, and ConvLSTM require large memory and training time, especially when the number of historic input frames is large. Additionally, Table
2 displays the hyperparameters tuning range of models.Models  TFnet  U_net  GAN  ResNet  ConvLSTM  SST  DHPM 
#params(10^6)  15.9  25.0  26.1  21.2  11.8  49.9  2.12 
input length  25  25  24  26  27  23  \ 
#accumulated errors  4  6  5  5  4  5  \ 
time for one epoch(min)  0.39  0.57  0.73  1.68  45.6  0.95  4.591 
Hyperparameters Tuning Range  










1e1 1e6  16 128  1 10  1 30  210  39  1 5  32 512 
Figure 9 shows the ground truth and the predicted velocity fields over time steps. Similar to the velocity predictions, we observe that the predictions from TFNet are the closest to the target. Unet and GAN generate smooth predictions and miss the details of small scale motion. There is still room for improvement in longterm prediction for all the models.
We converted square predicted images back to the big rectangular ones and calculated the Energy Spectrum on the entire domain, as shown in Figure 10. we can see that TFNet predictions are in fact much closer to the target on small wavenumbers and more stable on large wavenumbers.
We visualized the learned filters in Figure 11. We only found two types of spatial and temporal filters from all trained TFNet models, with and without the divergence regularizer. The meaning of these learned filters are yet to be explored.
We also performed the same experiments on an additional dataset (Rayleigh number =). TFNet still consistently outperforms the best two baselines, Unet and ResNet, based on all four evaluation metrics. The results are shown in Figure 12.
a.2 Implementation Details
We adapt SST [PDECDNN] to model nonlinear turbulent flow. SST successfully infused a deep learning model into the solution of the linear energy equation to predict sea surface temperature. If we make the assumption that the advection term in the momentum equation is a linear term , where c is unknown, then we can use two separate models to predict and , and the inputs of both parts are the same stacked and from previous time steps.
For DHPM [dhpm]
, we approximate both the velocity field two 6layer neural networks with 512 neurons per hidden layer and use and a 4layer neural networks with 512 neurons per hidden layer to represent pressure
and an nonhomogeneous term that encapsulates the influence of temperature and viscosity. During the training, we make sure the outputs of these neural networks satisfy the continuity and momentum equations. It is worth mentioning that the DHPM model is supposed to be trained twice, first on the training set then on the initial and boundary conditions of the test set. This model can be formulated as below.Where , and
Comments
There are no comments yet.