Data-driven spectral turbulence modelling for Rayleigh–Bénard convection

Abstract A data-driven turbulence model for coarse-grained numerical simulations of two-dimensional Rayleigh–Bénard convection is proposed. The model starts from high-fidelity data and is based on adjusting the Fourier coefficients of the numerical solution, with the aim of accurately reproducing the kinetic energy spectra as seen in the high-fidelity reference findings. No assumptions about the underlying partial differential equation or numerical discretization are used in the formulation of the model. We also develop a constraint on the heat flux to guarantee accurate Nusselt number estimates on coarse computational grids and high Rayleigh numbers. Model performance is assessed in coarse numerical simulations at $Ra=10^{10}$. We focus on key features including kinetic energy spectra, wall-normal flow statistics and global flow statistics. The method of data-driven modelling of flow dynamics is found to reproduce the reference kinetic energy spectra well across all scales and yields good results for flow statistics and average heat transfer, leading to computationally cheap surrogate models. Large-scale forcing extracted from the high-fidelity simulation leads to accurate Nusselt number predictions across two decades of Rayleigh numbers, centred around the targeted reference at $Ra=10^{10}$.


Introduction
Turbulent flows are characterized by the distribution of kinetic energy over a vast range of scales.The nonlinearity in the Navier-Stokes equations ensures that large and small eddies interact with each other, resulting in a wide range of dynamic flow features [42].This process transfers kinetic energy from the large energy-containing scales toward smaller scales, until the kinetic energy is finally dissipated by viscosity at the smallest scales.The energy cascade towards the smallest scales yields a significant challenge in computational fluid dynamics in the turbulent regime [20,45].In order to accurately simulate the flow, the fluid dynamical model should resolve the scales of turbulence down to the Kolmogorov length scale.A direct approach would then require very fine computational grids which is often intractable even with modern-day computing resources.A common way to alleviate the large computational requirements is by reducing the numerical resolution at which an approximate solution to the flow is obtained.To compensate for the lack of refinement of the computational approach, a model term is subsequently added to the governing equations to represent the influence of unresolved dynamics on the resolved components of the flow [18,41,44,17].
In this paper, we describe how prior knowledge of flow statistics obtained from an offline fully resolved simulation may be incorporated to construct an online high-fidelity model for coarse numerical simulations.The proposed reduced-order model acts on the numerical solution in spectral space, employing techniques from time series modeling and data assimilation.This model is designed to yield accurate kinetic energy spectra, despite the rather coarse flow representation.We demonstrate the capabilities of this data-driven approach for two-dimensional Rayleigh-Bénard convection at high Rayleigh number.
Rayleigh-Bénard convection is a fundamental problem in fluid dynamics, describing buoyancy-driven flows heated from below and cooled from above [28,30,1,32].In particular, thermal convection is meaningful in geophysical processes, such as in describing convective processes in the atmosphere [24] or the ocean [38].The large range of scales present in turbulence is also further affected by buoyancy effects.For example, a common phenomenon observed in Rayleigh-Bénard convection is the formation of spatially coherent structures in large-scale circulation [1] and, in larger spatial domains, the formation of thermal superstructures [46].On the other hand, a thin boundary layer exists near either of the walls which becomes turbulent and increasingly thinner with growing temperature differences between the walls, i.e., growing Rayleigh number [31,52].Properly resolving the boundary layers requires large computational grids and poses a challenge even in two-dimensional Rayleigh-Bénard convection [52].This stresses the conundrum of computational fluid dynamics, where one strives to find a balance between simulating flows at modest computational costs without adversely affecting the prediction of flow statistics.
Simulating flows at modest computational costs while retaining a high level of accuracy is the aim of large-eddy simulation (LES) [45,20].Instead of fully resolving all length scales of the flow, a computationally less intensive approximation is found by coarsening the flow description and simultaneously including a subgrid model to accommodate the loss of explicit finer details in the dynamics.The coarsening is accomplished by spatial filtering, which, through the specification of the filter-width, establishes the required level of refinement that should be included in the numerical simulations.The subgrid model then approximates the effect the unresolved dynamics has on the resolved scales, and serves as a closure for the filtered equations.This approximation depends on both the adopted filter [21] and selected closure model as well as the choice of discretization and level of coarsening [34,5,7].
With the increase of computational resources, direct numerical simulations (DNS) of turbulent flows are achievable to an ever-increasing extent and may serve to generate data from which LES models could be derived.This data-driven LES has been an active topic of research in recent years.For example, the decomposition of unresolved dynamics into fixed global basis functions and corresponding time series yields an efficient approach for which only the latter needs to be modeled.In [16] DNS data were employed of the barotropic vorticity equation to model the time series of spherical harmonics as stochastic processes with memory effects, leading to accurate kinetic energy spectra in coarse-grid simulations.Using proper orthogonal decomposition (POD), [13] showed that applying corrections to coarse-grid numerical simulations may lead to significant error reduction.Machine-learning methods have also been successfully employed to find subgrid models [5], reporting improved results compared to traditional eddy-viscosity models.Examples include using artificial neural networks in two-dimensional decaying turbulence [39] and convolutional neural networks in three-dimensional homogeneous isotropic turbulence [33], yielding improved energy spectra and turbulent fluctuation distributions.Similar methods have also been applied to two-dimensional Rayleigh Bénard convection.A reduced-order model is developed in [40] by employing machine learning, where a combined convolutional autoencoder-recurrent neural network [49] is used to predict the local turbulent heat flux.Accurate probability density functions are obtained for the local heat flux, while a dimensionality reduction to 0.2% of the original size is achieved for the turbulence data.In a similar vein, [25] study moist Rayleigh-Bénard convection.The dimensionality of the system is reduced by applying POD to the high-fidelity data, after which the POD coefficients are predicted using echo state networks.Here a good agreement of low-order flow statistics is observed in the reduced-order model.Incorporating data into numerical models to improve flow predictions is well-established in geophysical fluid dynamics, where data assimilation has been successfully employed for several decades.The aim is to improve forecasting by minimizing the differences between observed and modeled values while accounting for uncertainties [22,9].In particular, continuous data assimilation (CDA) aims to nudge the model solution toward an observed reference by means of a feedback control term acting as external forcing [4,3].This concept is also extended to linear stochastic differential equations, arising as the continuous-time limit of the 3DVAR data assimilation algorithm [6], which has been shown to successfully steer coarse-grained numerical solutions of the two-dimensional Navier-Stokes equations towards an observed reference solution.Additionally, the convergence of coarse numerical solutions augmented by CDA to an observed reference solution has been proven [15] and shown numerically for two-dimensional Rayleigh-Bénard convection [2].
The purpose of this paper is to combine ideas from data assimilation with large-eddy simulation.In particular, we derive a model term based on statistical quantities from a reference high-resolution simulation and use this as a stand-alone model for coarse numerical simulations.Our proposed method incorporates Ornstein-Uhlenbeck processes in the evolution of the Fourier coefficients of the numerical solution, steering the solution towards an a priori measured statistically steady state.Only three parameters need to be defined for each Fourier mode, outlining the simplicity of the model.The parameters are inferred from data, do not depend on the adopted spatial or temporal discretization, and are defined such that the reference energy spectrum is closely reproduced in the coarse-grid simulations.The resulting prediction-correction scheme is of the form of the diagonal Fourier domain Kalman filter [23,37] with a fixed prescribed gain.This identification enables future research that combines LES and data assimilation.The same approach has been applied in a recent study of coarse-grid modeling of the two-dimensional Euler equations on the sphere [11], where a decomposition of the vorticity field into spherical harmonic basis modes was employed in the coarse-grid model.
The two main results reported in this paper are the following.Firstly, the highresolution data at Ra=10 10 can be used successfully to define a forcing acting on large scales of coarse numerical simulations.By improving the energy content in these forced scales in coarsened simulations an accurate estimate of the Nusselt number is obtained.The forcing calibrated at Ra=10 10 is found to yield accurate Nusselt number estimates across two decades of Rayleigh numbers, from Ra=10 9 to Ra=10 11 , without the need to re-compute a high-fidelity simulation for each Rayleigh number of interest.Secondly, combining forcing across all resolvable scales with prior knowledge of the heat flux in the domain leads to an 'offline/online' approach through which an accurate and effective coarsened model for online real-time predictions can be formulated.The model that yields such accurate coarsening is derived from the high-fidelity offline simulation.The result is a computationally cheap surrogate model for Rayleigh-Bénard convection, accurately representing the complex behavior up to the smallest resolvable scales on the coarse grid.This is demonstrated here at Ra=10 10 .
The paper is structured as follows.The governing equations and adopted discretization are described in Section 2. The data-driven model is introduced in Section 3, detailing the forcing in Section 3.1 and complementary heat flux correction in Section 3.2.The model performance for a variety of model configurations is assessed in Section 4. Conclusions are presented in Section 5.

Governing equations and numerical methods
In this section, we introduce the governing equations and the simulated case in Section 2.1, the employed numerical discretization in Section 2.2, and illustrate the effects of severe coarsening, without any modeling correction, on the quality of the solution in Section 2.3.

Governing equations
Rayleigh-Bénard (RB) convection is described by the incompressible Navier-Stokes equations coupled to buoyancy effects under the Boussinesq approximation.In nondimensional form, the equations read We restrict to two spatial dimensions in this work.Here, u denotes velocity, p the pressure and T the temperature.We denote by u and v the horizontal and vertical velocity components, respectively.Buoyancy effects are included in the momentum equation by means of the term T e y , where e y denotes the vertical unit vector.The dimensionless parameters that determine the flow are the Rayleigh number Ra = gβ∆L 3 y /(νκ) and the Prandtl number P r = ν/κ.The Rayleigh number describes the ratio between buoyancy effects and viscous effects and is set to 10 10 in order to set the focus on the challenging high-Ra convection regime.The Prandtl number determines the ratio of characteristic length scales of the velocity and the temperature and is set to 1.The gravitational acceleration is denoted by g, the thermal expansion coefficient by β, the temperature difference between the boundaries of the domain by ∆, the kinematic viscosity by ν, the thermal diffusivity by κ.The computational domain is rectangular with horizontal length L x and vertical length L y , which are chosen as 2 and 1, respectively.The domain is periodic for all variables in the horizontal direction and wall-bounded in the vertical direction.No-slip boundary conditions are imposed for the velocity at the walls.The non-dimensional temperature is prescribed at 1 at the bottom wall and 0 at the top wall.
Two-dimensional RB convection is fundamentally different from three-dimensional RB convection.The main advantage of restricting the flow to two spatial dimensions is that this enables direct numerical simulation (DNS) at a very large Rayleigh number [52].Additionally, the large-scale circulation that appears in three-dimensional RB convection displays quasi-two-dimensional behavior and shows strong similarities with the large-scale circulation in two-dimensional RB convection [48].

Numerical methods
The adopted spatial discretization is an energy-conserving finite difference method [50] and is parallelized as in [8].A staggered grid arrangement is used for the velocity, the pressure is defined at the cell centers, and the temperature is defined on the same grid as the vertical velocity.The latter choice ensures that no interpolation errors occur when computing the buoyancy term in Eq. (1) [47].A uniform grid spacing is used along the horizontal direction whereas a hyperbolic tangent grid profile is adopted along the vertical direction.The non-uniform grid realizes refinement near the walls to resolve the boundary layer.
Time integration is performed using the fractional-step third-order Runge-Kutta (RK3) scheme for explicit terms combined with the Crank-Nicholson (CN) scheme for implicit terms, as presented in [47].Every time step, from t n to t n+1 , consists of three sub-stages, of which the steps are outlined below.The superscript j, j = 0, 1, 2, denotes the sub-stage, where j = 0 coincides with the situation at t n .In each stage, a provisional velocity u * is computed according to The parameters γ, ρ, and α are the Runge-Kutta coefficients, given by γ = [8/15, 5/12, 3/4], ρ = [0, −17/60, −5/12], and α = γ + ρ [8,47,43].Moreover, H j is comprised of the discrete convective terms, the discrete horizontal diffusion terms, and the source terms.Here, the only source term is the buoyancy term appearing in the evolution of the vertical velocity.The discrete gradient operator is denoted by G.The discrete vertical diffusion, given by A y , is treated implicitly.The implicit treatment eliminates the severe viscous stability restriction caused by the use of a nonuniform mesh near the boundary [29].Subsequently, the Poisson equation ( 5) is solved for the pressure to impose the continuity constraint (2), Discretely, this equation takes the form Here, L is the discrete Laplace operator ∇ • ∇ and D is the discrete divergence operator ∇•.The velocity and pressure are subsequently updated according to and after which the velocity u j+1 is divergence-free.Time integration of the energy equation (3) follows similarly.The newly obtained velocity is used to generate the energy field T j+1 analogously to Eq. ( 4).The convective terms are discretized using the QUICK interpolation scheme [35].The diffusive terms are discretized using a standard second-order finite difference method, for both spatial directions.Similarly, the discrete gradient G, the discrete divergence D, and the discrete Laplacian L are defined using finite differences.

Altered dynamics under coarsening
The DNS is carried out on a 4096 × 2048 grid, which has been shown to be a sufficiently high resolution for the chosen Rayleigh number [52].The coarse-grid numerical simulations will be performed on a 64 × 32 grid.This coarsening introduces significant discretization errors and does not allow for an accurate resolution of the smaller coherent structures present in the flow.The truncation error of the numerical method on this coarse grid introduces artificial dissipation and additional high-pass smoothing native to the discretization method [19].Figure 1 shows a snapshot of the DNS and the coarse-grid simulation, both in statistically steady states, from which the huge implications of such significant coarsening become apparent.
The temperature at the mentioned resolutions is shown in the top row of figure 1.The coarsened temperature displays only qualitative large-scale agreement with the DNS temperature, both yielding similar plumes of temperature and similar large-scale circulation.Obviously, the persistent small-scale coherent structures visible in the DNS snapshot are lost on the coarse grid.This loss may also be observed for the pressure, depicted in the second row of figure 1.The high-resolution and low-resolution fields exhibit clear qualitative differences, especially considering the absence of distinct lowpressure regions in the coarse-grid result.A better qualitative agreement between the results at the different resolutions is observed for the velocity components, shown in the bottom rows of figure 1.At low resolution, qualitatively the same flow patterns can be observed as appear in the high-resolution results, albeit with decreased magnitude.The discrepancies between the velocity and temperature fields at the different resolutions clearly pose the challenge we address in this paper.In the next section, we therefore specify our new forcing approach which aims to rectify the observed differences largely.The extent to which this new approach is successful will be scrutinized in Section 4.

Spectrum-preserving forcing
In this section, we describe a data-driven forcing to augment coarsened numerical simulations of statistically steady states.The high-resolution and low-resolution snapshots presented in the previous section hinted at the need of introducing explicit forcing to more accurately represent average flow patterns on coarse computational grids.Here, we propose a model to reproduce the kinetic energy spectra in coarse numerical simu-lations.
The model parameters are extracted from the reference data, obtained from a sequence of 8040 solution snapshots each separated by 0.05 time units of a DNS performed at a 4096×2048 computational grid.With these numerical data we achieve sufficiently many snapshots to reliably recover statistical properties of the flow, which is a pre-requisite for our model development.The Fourier components of horizontal cross-sections of the solution are computed for each snapshot, yielding time series for each streamwise wavenumber at each y-coordinate.The magnitudes of these complex time series yield mean values, variances, and correlation times that are used as model parameters.We next present the main steps in the construction of this model.

Reconstructing the energy spectra
The momentum equation ( 1) and temperature equation ( 3) can be written as a system of complex ODEs for the mode coefficients through projection onto a Fourier basis.In what follows, we only describe a spectrum-preserving forcing for the momentum.The same derivation is used to define a forcing for the temperature.We note that a spectral decomposition of the velocity and temperature fields is not straightforward due to the presence of boundaries along one spatial dimension.Therefore, we restrict ourselves to one-dimensional periodic horizontal profiles to ensure that the Fourier series is welldefined.This choice enables the model to explicitly identify wall-induced features of the flow.Alternatively, after taking into account the nonuniform grid spacing in the wall-normal direction the velocity field can be decomposed by applying a sine transform in the wall-normal direction or by periodically extending the domain and applying a Fourier transform, but these approaches are not pursued in this study.
For a fixed vertical coordinate y l , the profile u(x, y l , t) is decomposed into Fourier modes and corresponding complex coefficients c k,l , where k denotes the wavenumber.The coefficients satisfy the system of ODEs where L involves the spectral representation of of u • ∇, ∇, ∇ 2 and the source term in Eq. ( 1).We have already assumed a finite truncation of the number of Fourier modes in this formulation.The vector c is comprised of all Fourier coefficients up to the largest resolvable wavenumber.
To arrive at a spectrum-preserving forcing, it is sufficient to consider only the magnitude of the Fourier coefficients |c k,l |.These evolve according to a system of ODEs where L r is introduced to simplify notation.In the model implementation, the definition and explicit computation of L and L r is not required.Regarding |c k,l | as a stationary stochastic process, we observe that E (|c k,l | 2 ) describes the mean energy content of the k th Fourier mode at height y l .By the definition of variance, we find that Thus, it is sufficient to obtain an accurate mean value and variance of |c k,l | to achieve the desired energy content in the k th Fourier mode.We aim to reproduce the mean value and variance of |c k,l | by augmenting Eq. ( 10) with an Ornstein-Uhlenbeck (OU) process, where µ k,l , τ k,l and σ k,l are statistical parameters inferred from a sequence of snapshots of the reference solution.The desired mean value of |c k,l | is given by µ k,l , the term σ k,l dW t k,l serves to match the measured variance.Here, dW t k,l is a general stochastic process which can be tailored to the data [12], although the common choice is to let it be a Gaussian process with a variance depending on the time step size [26].We adopt the latter and include the variance scaling in the definition of σ k,l .The forcing strength is determined by a timescale τ k,l and can be specified per k, l separately.Detailed specifications of the adopted values of µ k,l , σ k,l , and τ k,l follow shortly.The combination of the original dynamics and the feedback control, including the stochastic term, arises as the continuous-time limit of the 3DVAR data assimilation algorithm [6].The model assumes that the unresolved dynamics can be accurately represented by independent stochastic processes.Interactions in the vertical direction are included via the fully resolved simulations which are basis to the forcing.We will demonstrate that this model is capable of producing accurate results.
The model will be applied as a prediction-correction scheme.In the case of the RK3 scheme adopted in this work, the following steps are performed for each RK sub-stage.First, the provisional velocity u * is computed as in Eq. ( 4).The Fourier coefficients ck,l are computed for this provisional velocity, after which the model is applied in the form of a correction.In terms of the Fourier coefficients, the algorithm reads cj+1 k,l = c j k,l + ∆tα j L(c j , k, l) (time integration), ( 13) Here, Eq. ( 13) is a simplified notation of the time marching method presented in Section 2.2 and the superscript j, j = 0, 1, 2, denotes the RK sub-stage.The values of ∆W k,l are samples from a standard normal distribution, independently drawn for each k and l.These are determined for each time step and kept constant throughout the sub-stages comprising the time step.The correction only affects the magnitudes of the Fourier coefficients, the phases of c j+1 k,l are the same as those of cj+1 k,l .Velocity fields are subsequently obtained by applying the inverse Fourier transform to the corrected coefficients c j+1 k,l .After this procedure, the Poisson equation ( 6) is solved using the newly obtained velocity fields and the remaining steps of the sub-stage are completed.Applying the model before solving the Poisson equation ensures that the flow is incompressible at the end of each RK sub-stage.The entire algorithm, with the exception of solving the Poisson equation, may also be applied to the temperature equation.This prediction-correction algorithm has the additional benefit that the model can be easily implemented into already existing computational methods.Applying the correction once every few time steps instead of every time step is common in data assimilation, where real-time data becomes available sequentially and may not be available at each time step of the numerical simulation.In the current study, all data is collected before performing a coarse numerical simulation and serves to define a forcing term aiming to counteract coarsening effects.The subsequent application of the correction does not noticeably add to the computational effort and is hence applied at each RK sub-stage.
The correction (14) will be referred to as nudging.We distinguish between stochastic nudging, which is described by Eq. ( 14), and deterministic nudging, for which the stochastic term in Eq. ( 14) is omitted.We define a mean µ k,l,stoch and µ k,l,det for these methods, respectively, and specify these below.
The mean µ k,l is specified such that the desired energy content is reproduced for small values of τ k,l .The magnitude of the coefficients is fully determined by the model in the limit of small τ k,l and, as a result, Eq. ( 11) can be used to derive the mean µ k,l in this limit.To attain the desired energy contents when using stochastic nudging, we require that µ k,l,stoch = E (|c k,l |).In the case of deterministic nudging with small τ k,l , the magnitudes of the coefficients remain constant at the value of µ k,l,det .Thus, the variance of |c k,l | is set to zero and we require that µ k,l,det = E (|c k,l | 2 ).We note that the limit of small τ k,l is used to derive the model parameters, but the actual measured values of τ k,l from the high-resolution data will be (considerably) larger.As a result, the magnitudes obtained using the model will be a combination of the coarse discretization and the high-resolution data.
Treating the evolution operator L r of the magnitudes of the Fourier coefficients in Eq. ( 10) as the identity operator allows us to specify the noise magnitude σ k,l .This assumption is used in the 3DVAR data assimilation algorithm [36] and is valid in statistically stationary states and on short assimilation intervals.This allows replacing |c j+1 k,l | by |c j k,l | and reduces Eq. ( 14) to a first-order autoregressive (AR(1)) process.We observe that the drift coefficient is (1 − α j ∆t/τ k,l ) and assume that the sample variance s 2 k,l is known from the high-fidelity data for every k, l.The noise magnitude follows by matching the variance of the AR(1) process with the sample variance, leading to the expression In this paper, the time scale τ k,l will be defined as the correlation time of the corresponding Fourier coefficient, measured from the high-resolution data.We note that, with the adopted definitions of µ k,l and σ k,l , the time scale τ k,l can take on a range of values whilst still yielding accurate energy spectra.Robustness of the model under variations of τ k,l is studied in Section 4.4.In fact, τ k,l can take on any positive value larger than or equal to α j ∆t.Small lengthscales are expected to yield a small value of τ k,l , resulting in an increased weight towards the model term and an increased noise magnitude for the stochastic term in the nudging.The model term will have a decreased weight at scales for which a large τ k,l is measured, which is often observed for large spatial scales.These would correspondingly follow the deterministic resolved dynamics more closely.The proposed prediction-correction method is of the same form as Fourier domain Kalman filtering [37,23].By defining a prediction and an observation, the approach can be understood as a steady-state filter with a prescribed gain factor and can be placed in the context of data assimilation.The only necessary parameters are the means µ k,l , the variances σ 2 k,l and the correlation times τ k,l , which are interpreted as follows.At each sub-stage of the RK3 scheme, the prediction is obtained by evolving the velocity and temperature fields according to the coarse-grid discretization.The 'observation' then consists of velocity or temperature fields sampled from the reference statistically stationary state.For stochastic nudging, these are velocity or temperature fields where the magnitudes of the Fourier coefficients are drawn from normal distributions with mean µ k,l,stoch and variance σ 2 k,l .In the deterministic case, the observation consists of these fields with Fourier coefficients of prescribed magnitudes µ k,l,det .The prediction is subsequently nudged towards the observation by correcting the predicted magnitudes of the Fourier coefficients.The weight of the model, often referred to as the 'gain', is determined by α j ∆t/τ k,l , for each k, l separately.

Heat transport correction
The heat transport in the turbulent flow is described by the Nusselt number and is considered the key response of the system to the imposed Rayleigh number [1].The definition of the Nusselt number that we adopt here is which is well-suited for use on coarse computational grids.An alternative definition of N u involves a gradient of temperature, which is more sensitive to coarse-graining.In Eq. ( 16) Ω denotes the domain with area |Ω| and ⟨•⟩ Ω denotes the domain average.It is clear from definition (16) that vT needs to be modeled accurately to recover skillful predictions of the heat flux.To achieve this, we propose a constraint to be used in conjunction with the model described in Section 3.1.
The volume average in ( 16) is comprised of averages of the heat flux along horizontal cross-sections of the domain.For a fixed vertical coordinate y l , we denote the heat flux along this cross-section by ⟨vT ⟩ l .Along this cross-section, we indicate the Fourier coefficients of the velocity and temperature with a hat symbol • and observe that where the subscript k signifies the k th Fourier coefficient.The subscript 0 indicates that we consider the zeroth mode of the Fourier series, which by definition equals the value of ⟨vT ⟩ l .We assume that a mean heat flux along the horizontal cross-section is known from the reference high-resolution data and denote this value by F l .Subsequently, the heat flux along the horizontal cross-section in a coarse numerical simulation is corrected by minimizing the error ∥F l − k v * k T k ∥ 2 with respect to T .Here, we minimize the error by varying the phases of the Fourier coefficients T k .We alter the temperature instead of the vertical velocity so that the velocity field remains divergence-free.Adapting the phases only ensures that the spectrum of the temperature along the horizontal cross-section is invariant under the heat transport correction.In total, the heat flux correction is an extension of the nudging procedure (14).It enables a correction of the temperature field solely based on a statistic of the reference solution, rather than on a dynamic equation.In doing so, the dependence between the vertical velocity and the temperature is taken into account in the nudging procedure.Thus, applying the heat flux correction ensures an improved average Nusselt number estimate and is therefore expected to improve the accuracy of the numerical solutions.
The error ∥F l − k v * k Tk ∥ 2 is minimized using a gradient descent algorithm.We note that the correction may in principle yield an arbitrarily good approximation of the reference heat flux, but this is not guaranteed to produce physically relevant results.Instead of aiming for an exact agreement of the mean heat flux, we apply the gradient descent algorithm until the heat flux in the horizontal cross-section is within a 10% margin of the reference value.This serves to demonstrate the added value of the correction.Preliminary tests have shown that this already improves the heat flux significantly without qualitatively altering the temperature field.In the next section, coarse numerical simulations are performed both with and without the heat flux correction.The optimization of this procedure is beyond the scope of this paper.

Model performance
In this section, we apply the model in eight different configurations to numerical simulations on the coarse grid.The configurations are listed in table 1 and differ in the variable that is being forced, the wavelengths at which the forcing is applied, and whether the forcing is deterministic or stochastic.These configurations will be referred to as M0-7, inspired by the nomenclature used in the comparison of LES models in [51].Here, the wavenumbers at which the forcing is applied are chosen as l ≤ 5 and l ≤ 32.The former implies that the model only explicitly acts on the large scales of motion and the latter implies that all resolved scales are directly affected by the model.This set of configurations is chosen to distinguish between the effects of large-scale forcing and small-scale forcing, deterministic forcing and stochastic forcing, and the choice of the forced variable.The model simulations are run with a time step size ∆t = 0.02.Recall that the filtered DNS provides the reference solution.Fig. 2 shows the correlation times of the Fourier coefficients τ k,l for each pair k, l for the horizontal velocity, the vertical velocity, and the temperature, measured from the high-fidelity data.As expected, large streamwise wavenumbers, i.e., structures with small length-scales, correspond to small correlation times.Conversely, small wavenumbers, i.e., large length-scale structures, correspond to large correlation times.This confirms that the model contribution to the dynamics of the Fourier coefficients at small scales is stronger than at large scales.The horizontal velocity and the temperature generally yield smaller correlation times in the bulk of the domain compared to the region near the walls, whereas the opposite is observed for the vertical velocity.There is a notable difference at the zero-wavenumber correlation time for the vertical velocity, which is due to the fact that the average vertical velocity is always zero.Finally, we note that τ k,l is observed to be nowhere below α j ∆t, thus implying that the magnitudes of the Fourier coefficients do not depend solely on the model in any case, but also take contributions from the discretized equations directly.
We first provide in Section 4.1 an impression of the qualitative improvements obtained when applying the model.In the ensuing subsections, a detailed quantitative comparison is carried out.Several quantities will be compared with the filtered DNS data to gain insight into the quality of the model.In Section 4.2, we first verify that the model approximates the average energy spectra of the filtered DNS by comparing the spectra of the velocity and the temperature near the wall and in the core of the domain.In Section 4.3, the mean temperature, the mean heat flux, and the root-mean-square deviation (rms) are measured as a function of wall-normal distance and compared to the reference.Finally, global flow statistics such as the total kinetic energy and the Nusselt number are examined in Section 4.4.
The rms, mean temperature and mean heat flux rely on averages along horizontal cross-sections of the domain.For a fixed value of y, we adopt the following definition where ⟨•⟩ A denotes the average over the horizontal cross-section with length |A| and f is the field of interest.The mean temperature and heat flux are computed as the mean ⟨•⟩ A of the corresponding fields.The global kinetic energy will be computed as and the Nusselt number follows from definition (16).Our interest lies in the time average of the aforementioned quantities.The quality of coarse-grid models is therefore measured by comparing averaged quantities rather than instantaneous quantities [34,51].The energy spectra, rms values and mean temperature, and heat flux will be measured after the coarse-grid numerical simulations have reached a statistically steady state.The global quantities of interest are illustrated using a rolling average over time.

Qualitative model performance
A qualitative comparison of the model configurations M0-7 is given in figures 3 to 6 by means of instantaneous snapshots in of the obtained statistically stationary states.In these figures, the snapshots of the DNS and of M0 are the same as depicted in figure 1.A comparison of the temperature fields in statistically steady states is provided in figure 3. Here, we observe that the configurations M1-4 do not lead to significant qualitative changes in the temperature field when compared to the no-model configuration M0.In these configurations, the temperature is not explicitly forced and suffers from artificial dissipation inherent to the coarsening.The model configurations M5-7, in which the temperature is forced directly, display more pronounced small-scale features.At the same time, the large-scale circulation pattern is still visible in these results.In addition, from the results of M6 and M7 we conclude that applying the heat flux correction does not lead to qualitatively different temperature fields.
The pressure fields of the corresponding solutions are shown in figure 4. Here, we recall that any detail obsereved in the DNS pressure field is lost in the coarse nomodel result M0.No improvements are observed in the pressure field when only the temperature is explicitly forced, as is done in M5.The remaining model configurations all yield a distinct qualitative improvement in the pressure fields.In particular, only applying a large-scale velocity correction already qualitatively changes the pressure field.This is observed for the deterministic and the stochastic forcing, given by M1 and M3, respectively.The addition of forcing the velocity at small scales or simultaneously forcing the temperature does not yield additional significant changes.A noticeable difference exists between the deterministic and stochastic methods.As becomes clear from M3-4, the random forcing leads to a fragmentation of the coherent structures in Figure 4: Pressure fields in statistically steady states.Shown are the reference solution and the results obtained with coarse numerical simulations M0-7.The color scheme is the same as used for the pressure fields shown in figure 1.
the pressure field.
The horizontal velocity fields and vertical velocity fields are provided in figures 5 and 6, respectively.We observe that all coarse numerical solutions display agreement with the DNS in terms of large-scale coherent structures.Nonetheless, artificial dissipation leads to an underestimate of the velocity magnitude in cases M0 and M5.This suggests that only forcing the temperature is not sufficient for accurately reproducing the velocity fields.The other cases indicate that explicitly forcing the velocity leads to accurate velocity magnitudes.

Energy spectra
We now establish that the model proposed in Section 3.1 improves the average energy spectra of the forced variables.The average energy spectra of the velocity components and the temperature are shown in figure 7, displaying the spectra along a horizontal cross-section near the wall and in the center of the domain.Both near the wall and in the center of the domain, respectively shown in the top and bottom row, the no-model M0 results exhibit significant differences compared to the filtered DNS.The measured energy levels of the velocity are too low with M0 at all resolved scales.In contrast, a significant discrepancy in the temperature spectra is observed only for wavenumbers larger than 10.
The discrepancies in the spectra of M0 and the reference are attributed to artificial dissipation caused by the coarsening.In particular, the numerical dissipation affects both the velocity and the temperature spectra at higher wavenumbers.Through the nonlinear interactions in the momentum equation the velocity is adversely affected at  all wavenumbers.This is further corroborated by the results of M2 and M4, where all available lengthscales are forced only for the velocity.In the core of the domain, where the coarsening is strongest, these results display accurate velocity spectra but yield no improvement in the temperature spectra, suggesting that the temperature still suffers from artificial viscosity in these cases.Apparently, the improvements in the velocity spectra influence the prediction of the temperature only to a small degree.
The large-scale velocity forcing applied in M1 and M3 yields improved velocity energy levels at low wavenumbers.However, the improvement gradually vanishes at higher wavenumbers.These configurations exhibit no improvement in the temperature spectra.The cases M2 and M4 lead to an improved agreement on the velocity spectra at all wavenumbers in the center of the domain, establishing the spectrum-reconstructing property of the model described in Section 3.1.Nonetheless, all models underestimate the large-scale energy in the center of the domain.At these scales, the measured correlation time τ is large and therefore the model contribution is limited.
Near the wall, the horizontal velocity is accurately represented at all wavenumbers despite the fact that the energy of the vertical velocity deviates from the reference for wavenumbers larger than 15.The temperature spectra for M2 and M4 near the wall show good agreement with the reference.Comparing this to the results of M1 and M3 indicates that the prediction of near-wall temperature is improved by the forcing of small-scale velocity despite no explicit forcing being applied to the temperature.No improvement is observed for these cases in the center of the domain, which we attribute to artificial dissipation.
The velocity spectra show no significant change when only the temperature is explicitly forced, as observed from the results of M5.This case produces an accurate temperature spectrum in the core of the domain and yields an improved spectrum near the wall.Additionally forcing the velocity significantly improves the velocity spectra, as is observed for cases M6 and M7.Here, we observe good agreement for the velocity and the temperature across all length scales in the center of the domain.In particular, a definite improvement is observed when comparing the temperature spectrum to those of M1-4.Near the wall, the horizontal velocity and the temperature are both captured accurately, while the vertical velocity still deviates for wavenumbers larger than 15.The similarity between the spectra obtained for M6 and M7 indicates that the heat flux correction described in Section 3.2 does indeed not lead to significant changes in the spectra.

Flow statistics
The mean temperature and mean heat flux are displayed in figure 8 as a function of the wall-normal distance.All models except M5 efficiently mitigate the small mean temperature discrepancy between M0 and the reference.
The mean heat flux of the no-model M0 case is consistently too low, which is a direct result of underestimating the vertical velocity.Applying the large-scale velocity forcing as done in cases M1 and M3 yields an improved heat flux.In particular, the measured heat flux near the wall shows good agreement with the reference.The mean heat flux is consistently overestimated when the velocity is forced at all wavenumbers, which is the case for M2, M4, and M6.Comparison of the results of M6 with M7 establishes that the heat flux correction described in Section 3.2 ensures a better prediction of the mean Figure 7: Time-averaged energy spectra measured along horizontal cross-sections of the domain for the horizontal velocity (left column), vertical velocity (middle column), and temperature (right column).The cross-sections are taken near the bottom wall (top row) and the core of the domain (bottom row).The cross-sections are taken at y = 8.5×10 −4 , y = 5.5×10 −1 for the horizontal velocity and at y = 5.0×10 −4 , y = 5.0×10 −1 for the vertical velocity and the temperature.The solid lines show the average spectra of the filtered DNS, the model results are displayed using the symbols in table 1.These observations in combination with the energy spectra of the previous subsection expose the simplifying model assumptions discussed in Section 3.1.Despite accurate energy spectra of all variables, the M6 model does not yield an accurate heat flux.This indeed suggests that the energy spectra alone do not provide sufficiently strict modeling criteria for obtaining accurate coarse-grid numerical simulations, and instead benefit from additional cross-variable constraints such as the imposed heat flux.
The rms of the velocity components are shown in the left and middle panels of figure 9 as a function of the wall-normal distance.A strong reduction of the turbulent intensity of the velocity is observed for the no-model M0 results.Similar to previous observations for case M5, only forcing the temperature does not lead to improvements in the rms of the velocity.All other model configurations lead to a comparable improvement in the rms of the horizontal velocity.A slight difference between the stochastically forced and deterministically forced solutions may be distinguished in the rms profiles of the horizontal velocity, visible in the results of M3-4.Comparable results are observed for the rms of the vertical velocity, where all models except M0 and M5 display good agreement with the reference.
The average temperature fluctuations are shown in the right panel of figure 9. We observe that all model configurations except M0 and M5 predict the wall-normal distance of the peak of the fluctuations accurately.However, the model overestimates the maximal predicted rms by 7.5% to 18%.

Total kinetic energy and heat flux
A comparison of the rolling mean of the total kinetic energy (KE) is shown in figure 10.The improvement obtained by M1-4, M6, and M7 is evident.The coarse simulations are initialized from a snapshot of the filtered DNS in the reference statistically stationary state.Due to coarsening effects, this statistically stationary state cannot be sustained in coarse simulations without including a model term.Numerical dissipation and other discretization effects lead to deviations from the filtered DNS on coarse grids, despite  adopting the same physical parameters as in the high-resolution simulation.The forcing model aims to steer the coarse numerical simulation towards the reference statistically stationary state by applying a correction at each time step.Nonetheless, this procedure is approximate and does not necessarily yield the same total kinetic energy and Nusselt number as observed in the reference.Therefore, transient behavior is observed initially until the coarse simulations settle at a different statistically steady state.At t = 400, the mean of the KE for M0 is approximately 31% of the reference KE.Only forcing the temperature, shown by M5, deteriorates the total energy and yields roughly 27% of the reference value.The other models contain between 72% and 77% of the reference value.It is reasonable to assume that this discrepancy is predominantly caused by the model underestimating the energy in large scales in the center of the domain, as was discussed in Section 4.2.
A quantification of the total heat flux in the domain is provided by comparing the time-averaged Nusselt number, shown in figure 11.Note that the reference value Figure 11: Comparison of the rolling mean of the Nusselt number over time.The solid line at N u = 95 shows the theoretically predicted value, with 5% error margins given by the dashed lines.The model results are displayed using the symbols in table 1.
N u = 95 is shown with 5% error margins.The no-model coarse-grid simulation leads to an underestimated heat flux resulting from the reduced velocity magnitude induced by artificial dissipation.The temperature forcing in case M5 was previously shown to not yield any improvements in the mean temperature or the velocity and does therefore not improve the Nusselt number estimate.A correction of the large-scale velocity features in configurations M1 and M3 leads to a very accurate Nusselt number estimate.Nonetheless, an accurate description of the velocity does not guarantee an accurate heat flux.This is underpinned by the results of M2, M4, and M6, which all exhibit an accurate representation of large and small velocity features, but consistently overestimate the Nusselt number.Finally, we observe that this adverse effect is efficiently mitigated by the heat flux correction, as becomes evident from the resulting Nusselt number estimate of M7.

Robustness under variations in forcing strength
The robustness of flow predictions with respect to the forcing strength is addressed next.A comparison of various forcing strengths is carried out by multiplying all measured τ k,l by 0.5, increasing the forcing strength, or by 2, 4, and 8, decreasing the forcing strength.These scalings are applied to the model configurations M0-7 described in table 1. Figures 12 and 13 show the energy spectra in the bulk of the domain and the rms of the function of the wall-normal distance, respectively, obtained when multiplying the measured τ k,l by 8.The results are only shown for this scaling since these differ the most from the results obtained with the unscaled forcing strength.Increasing the forcing strength leads to numerical solutions that closely follow the reference kinetic energy spectra.As a result, the rms values as a function of the wall-normal distance also improve considerably with respect to the no-model coarse numerical simulation.However, no significant differences have been observed when compared to the results obtained with the original (unscaled) values of τ k,l .Decreasing the forcing strength leads to coarse numerical simulations that follow the reference energy spectra less closely, but nonetheless improve upon the no-model coarse simulation.This is displayed in Fig. 12.This result is also reflected in the rms as illustrated in Fig. 13.Changing the forcing strength has a noticable effect on the total kinetic energy and the measured Nusselt number.The time-averages of the total kinetic energy and Nusselt number are depicted in Fig. 14 as a function of the scaling of the forcing strength.All model configurations except M5, where only the temperature is explicitly forced, show a decrease of the kinetic energy and of the Nusselt number as the forcing strength is decreased.

Generalization to other Rayleigh numbers
We now turn our attention to the model performance at different Rayleigh numbers.Increasing the Rayleigh number in three-dimensional Rayleigh-Bénard convection affects the velocity spectra and the temperature spectra along horizontal cross-sections.In [10] a range of Rayleigh numbers between 7 × 10 4 and 2 × 10 6 is considered at Pr = 0.71 in a large aspect ratio box.An increase of high-wavenumber excitation is reported for kinetic energy, temperature fluctuations, heat flux, and kinetic energy dissipation, and is observed near the top and bottom plates and in the bulk of the domain.The maximum energy dissipation is found to shift towards higher wavenumbers as the Rayleigh number is increased.This might suggest that a coarse simulation at larger Rayleigh numbers benefits from increased forcing at larger wavenumbers.
When increasing the Rayleigh number, the mean velocity and temperature profiles in two-dimensional Rayleigh-Bénard convection behave similarly when normalized by the friction velocity and corresponding characteristic temperature, respectively In the range between 11 to Ra = 10 14 , the displayed the same behavior in the viscous sublayer near the wall at each simulated Rayleigh number.This is followed by a log layer for the velocity and a flat region for the temperature.These results indicate that the mean profiles do undergo quantitative changes but no qualitative changes in this range of Rayleigh numbers.Therefore, a model calibrated at a particular Rayleigh number might still have merit when different Rayleigh numbers are considered in coarse numerical simulations.Here, we assess the Nusselt number estimates at different Rayleigh numbers using the forcing calibrated at Ra=10 10 .The Nusselt number estimates in coarse simulations without a model (M0) and with deterministic large-scale momentum forcing (M1) are compared to reference values reported in [27] and [52].The reference scaling exponents for the Nusselt number as a function of the Rayleigh number are 0.285 for 10 9 ≤ Ra ≤ 10 13 and 0.35 for Ra ≥ 10 13 .We consider only the model configuration M1 in this comparison, since this configuration was already found to produce an accurate Nusselt number at Ra=10 10 without using explicit knowledge of the heat flux.The results are summarized in Fig. 15, showing the measured Nusselt number as a function of the Rayleigh number.These results show that the large-scale momentum forcing yields accurate Nusselt number estimates across several decades of Rayleigh numbers without using high-resolution data for these parameter regimes.At the transition to the socalled ultimate regime, observed at Ra = 10 13 [52], the Nusselt number estimates of the coarse numerical simulations deteriorate somewhat.The estimates lose accuracy for much larger Rayleigh numbers compared to the reference Ra = 10 10 .This is likely a result of the gradually accumulating quantitative flow differences as the Rayleigh number increases.Extending the range of accurate predictions provides a challenge for future work.

Conclusions and outlook
In this paper, we have proposed a data-driven model for coarse numerical fluid simulations and assessed its performance when applied to two-dimensional Rayleigh-Bénard convection.Statistical information of Fourier coefficients of a reference direct numerical simulation was used to infer model parameters, which constituted a forcing term for reproducing the reference energy spectra.The model parameters are defined such that small scales of motion are corrected strongly.Various model configurations were applied to gain insight into the model performance, generally leading to improved results compared to using no model.
Applying the model at all wavelengths resulted in significant improvement of the spectra both near the walls and near the center of the domain, which established that the model had its desired effect on the numerical solution.Additionally, the application of the model was found to yield improved estimates of flow statistics.In particular, the average turbulent fluctuations and average temperature improved significantly compared to the no-model case.The total kinetic energy was found to improve upon using the model but highlighted that modeling the effects of unresolved dynamics on the large-scale flow features as independent processes might be too restrictive.The measured total heat flux was accurately captured for several model configurations, although accurately reconstructing energy spectra was shown not to be a sufficient criterion for this purpose.The latter problem was efficiently alleviated by including a constraint on the average heat flux in the model, leading to a computationally cheap data-driven surrogate model for the highly complex flow dynamics.Applying large-scale momentum forcing in the coarse numerical simulations yielded an accurate Nusselt number estimate without requiring explicit knowledge of the heat flux.Furthermore, accurate Nusselt number estimates were obtained across two decades of Rayleigh numbers using only the forcing calibrated at Ra = 10 10 .Future work will be dedicated to expanding the proposed model by consulting Kalman filtering theory.Specifically, the interactions between the Fourier modes can be explicitly represented by including covariance estimates in the model.This would additionally serve to verify at which frequencies the Fourier modes evolve independently, which is expected to result in a better understanding of the modeling of small-scale flow features.Alternatively, spatially coherent structures can be included in the model by applying proper orthogonal decomposition to the reference data, as demonstrated in [14].Although no assumptions are made about the numerical method or adopted coarse resolution in the formulation of the model, further numerical experiments adopting a different resolution or discretization may be carried out to assess the robustness of the model.Finally, we note that the presented method might be extended to threedimensional flows.This could be achieved by extending the method presented in this paper to also cover the reconstruction of two-dimensional energy spectra.For simple domains, covered with a structured tensor grid, this could be achieved by treating each horizontal (or constant-index) cross-section of the three-dimensional domain separately.Alternatively, one can employ proper orthogonal decomposition and recover the POD spectrum as in [14] and readily extend this from two dimensions to three dimensions.

Figure 1 :
Figure 1: Snapshots of the DNS (4096×2048 grid, left) and coarse no-model simulation (64×32 grid, right) in statistically steady states.From top to bottom, we show temperature, pressure, horizontal velocity, and vertical velocity.

Figure 2 :
Figure 2: Correlation times τ k,l of the Fourier coefficients for the horizontal velocity (left), vertical velocity (middle), and temperature (right) measured from the highfidelity data.

Figure 3 :
Figure 3: Temperature fields in statistically steady states.Shown are the reference solution and the results obtained with coarse numerical simulations M0-7.The color scheme is the same as used for the temperature fields shown in figure 1.

Figure 5 :
Figure 5: Horizontal velocity fields in statistically steady states.Shown are the reference solution and the results obtained with coarse numerical simulations M0-7.The color scheme is the same as used for the horizontal velocity fields shown in figure 1.

Figure 6 :
Figure 6: Vertical velocity fields in statistically steady states.Shown are the reference solution and the results obtained with coarse numerical simulations M0-7.The color scheme is the same as used for the vertical velocity fields fields shown in figure 1.

Figure 8 :
Figure 8: Comparison of the time-averaged temperature (left) and time-averaged heat flux (right) measured along horizontal cross-sections of the domain and displayed as a function of the wall-normal distance.The solid line shows the mean values of the filtered DNS, the model results are displayed using the symbols in table 1.

Figure 9 :
Figure 9: Root mean square (rms) of the horizontal velocity (left), vertical velocity (middle), and temperature (right), measured along horizontal cross-sections of the domain and displayed as a function of the wall-normal distance.The solid line shows the rms values of the filtered DNS, the model results are displayed using the symbols in table 1.

Figure 10 :
Figure 10: Comparison of the rolling mean of the kinetic energy (KE) over time.The solid line shows the KE of the filtered DNS, and the model results are displayed using the symbols in table 1.

Figure 12 :
Figure12: Time-averaged energy spectra measured along horizontal cross-sections of the domain for the horizontal velocity (left column), vertical velocity (middle column), and temperature (right column).The cross-sections are taken near the core of the domain, at y = 5.5 × 10 −1 for the horizontal velocity and at y = 5.0 × 10 −1 for the vertical velocity and the temperature.The model results are obtained by multiplying the measured correlation times by 8.The solid lines show the average spectra of the filtered DNS, the model results are displayed using the symbols in table 1.

Figure 13 :
Figure 13: Root mean square (rms) of the horizontal velocity (left), vertical velocity (middle), and temperature (right), measured along horizontal cross-sections of the domain and displayed as a function of the wall-normal distance.The model results are obtained by multiplying the measured correlation times by 8.The solid line shows the rms values of the filtered DNS, the model results are displayed using the symbols in table 1.

Figure 14 :
Figure 14: Comparison of the final rolling mean values of the total kinetic energy (KE, left) and Nusselt number (right) for for different scalings of the correlation times τ k,l used in the model.The model results are displayed using the symbols in table 1.

Figure 15 :
Figure 15: Measured Nusselt numbers as a function of the Rayleigh number.The solid red line shows reference Nusselt number predictions from literature, with 5% error margens given by the dashed lines.The no-model and large-scale forcing results are obtained with configurations M0 and M1, respectively.The reference scaling exponents are 0.285 for 10 9 ≤ Ra ≤ 10 13 and 0.35 for Ra ≥ 10 13 .

Table 1 :
Model configurations used in the coarse numerical simulations.