Optimal perturbation growth on a breaking internal gravity wave

Abstract The breaking of internal gravity waves in the abyssal ocean is thought to be responsible for much of the mixing necessary to close oceanic buoyancy budgets. The exact mechanism by which these waves break down into turbulence remains an active area of research and can have significant implications on the mixing efficiency. Recent evidence has suggested that both shear instabilities and convective instabilities play a significant role in the breaking of an internal gravity wave in a high Richardson number mean shear flow. We perform a systematic analysis of the stability of a configuration of an internal gravity wave superimposed on a background shear flow first considered by Howland et al. (J. Fluid Mech., vol. 921, 2021, A24), using direct–adjoint looping to find the perturbation giving maximal energy growth on this evolving flow. We find that three-dimensional, convective mechanisms produce greater energy growth than their two-dimensional counterparts. In particular, we find close agreement with the direct numerical simulations of Howland et al. (J. Fluid Mech., 2021, in press), which demonstrated a clear three-dimensional mechanism causing breakdown to turbulence. The results are shown to hold at realistic Prandtl numbers. At low mean Richardson numbers, two-dimensional, shear-driven mechanisms produce greater energy growth.


Introduction
Buoyancy budgets of the global oceans suggest that turbulence, on scales too small to simulate directly in computational models, is an important element both to dissipate energy and to close the budget (Wunsch & Ferrari 2004;Gregg et al. 2018). Observations (Baker & Gibson 1987;Alford & Pinkel 2000) have shown that such turbulence is intermittent and localised, and the nonlinear breaking of internal gravity waves has been proposed as a likely candidate for the main source of the turbulence (MacKinnon et al. 2017).
Such wave breaking could be caused by a number of mechanisms. Lombard & Riley (1996) used linear stability analysis to show that instabilities on an internal wave are strongly dependent upon both the amplitude and the propagation angle of the wave, with strongly three-dimensional and two-dimensional modes being dominant in different cases. One important effect, not taken into account in these analyses, is the amplification of waves as they approach critical layers within the flow (Booker & Bretherton 1967), where the flow velocity matches the phase speed. Motivated by the observation in Alford & Pinkel (2000) of coinciding shear and large amplitude waves, Howland, Taylor & Caulfield (2021), henceforth denoted HTC21, numerically simulated the idealised flow arising from a superposition of a plane internal wave in a uniform density gradient, and a simple sinusoidal shear profile. They observed a clear three-dimensional, convective-like structure, with a definite spanwise wavelength, very different from the primarily two-dimensional Kelvin-Helmholtz billows and other shear instabilities often thought to dominate breakdown to turbulence. We exactly recreate the basic flow used in that work, but study it from a more theoretical viewpoint to analyse the mechanisms responsible.
Since the flow profile adopted by HTC21 is not steady, a traditional linear stability analysis is unsuitable for determining the structures which are important to its breakdown. One approach would be to perform linear stability analyses on 'frozen' background flows at different times, which has been done extensively, for example, on Kelvin-Helmholtz billows (Klaassen & Peltier 1985;Caulfield & Peltier 2000;Mashayek & Peltier 2012, to name but a few). This is a valid strategy for slowly varying background flows, or for quickly growing instabilities, but otherwise just gives a hint on the possible nonlinear behaviour.
The approach we take here is to ask, over a fixed finite time, which initial, infinitesimal perturbation is amplified by the greatest amount. This is still an entirely linear approach, but typically requires a lot more computation than traditional linear stability analyses. Indeed, even for a steady background flow, the finite time 'optimal growth' is still an interesting problem, since for non-normal linear operators such as in the Orr-Sommerfeld equations, the most unstable normal mode is not necessarily the structure that grows the most over a finite time interval (Schmid 2007).
The method we employ, direct-adjoint looping (DAL) (Corbett & Bottaro 2000;Luchini 2000), is essentially equivalent to that used by Arratia, Caulfield & Chomaz (2013) to study optimal growth on a two-dimensional (2-D) time-evolving Kelvin-Helmholtz billow. It is an iterative method, with each solution of the Navier-Stokes equations followed by a solution of the corresponding adjoint equations, which gives the flow sensitivity with respect to a given quantity of interest. Optimising, for example, the energy at time T of a infinitesimal perturbation at time t = 0 gives a particularly simple formulation.
For the non-parallel, non-steady flow studied herein, we have no reason a priori to assume that the fastest growing disturbance is a 2-D one, since recourse cannot be made to Yih's theorem (Yih 1955). However, since the background flow is two-dimensional, the lack of nonlinearity makes it sufficient to study individual Fourier modes in the (third) spanwise direction, for which we introduce a method using a fully 3-D numerical simulation code. Our aims in this paper are thus twofold. First, we wish to determine whether the optimal perturbations predicted by our DAL calculations are qualitatively or even quantitatively similar (for example in terms of the predicted spanwise wavelength) to the structures observed to trigger breakdown in the fully nonlinear simulations presented in HTC21. Second, we wish to determine the relative importance of shear-driven and convective growth mechanisms in the amplification of these optimal perturbations as they grow on the evolving background flow.
To address these twin aims, the remaining three sections of the paper are as follows: § 2 gives the precise flow we are considering, and gives the derivation and implementation details of the DAL algorithm. § 3 presents our results for different target times and discusses in detail two different cases, with subsections considering the influence of Prandtl number and Richardson number, and § 4 gives concluding remarks.

Methods
The Boussinesq equations consist of the Navier-Stokes equation, the advection-diffusion equation for buoyancy and the incompressiblity condition, governing the evolution of velocity u, pressure p and buoyancy b These equations have been non-dimensionalised using a typical length scale L, velocity U, gravitational acceleration g, density ρ, density gradient ρ z , kinematic viscosity ν and density diffusion coefficient κ to give the non-dimensional Reynolds number Re = UL/ν, Prandtl number Pr = ν/κ and bulk Richardson number Ri b = gρ z L 2 /ρU 2 . Following HTC21, we consider an internal gravity wave with wavevector k = (k 1 , 0, k 3 ) (and define k = k ) and 'wave steepness' s incident on a background flow that is uniformly stratified and has a sinusoidal velocity profile, which gives a particularly simple and periodic model of a stratified shear flow. At time t = 0, then, where ω 2 = Ri b (k 2 1 /k 2 ) is the (squared) frequency of the internal wave, so that the phase speed of this wave in isolation is given by kω/k 2 . The wave steepness s is defined such that s > 1 produces a region of negative buoyancy gradient where the wave overturns. The evolution of this 2-D background flow is complex, as will be seen in § 3. The initial evolution of the wave can be characterised as refraction of the wave by the mean shear flow. We restrict this study to that of a 2-D base flow, since motion out of the plane of the wave cannot affect this linear refraction process. However, we cannot preclude the possibility that a 3-D base flow modifies the subsequent nonlinear breakdown of the wave that we analyse here. Further research is needed to isolate how such 3-D base flows may impact internal wave breaking.
As discussed in more detail by HTC21 the idealised flow arising from (2.1) and (2.2) necessarily neglects a range of important processes that can lead to internal wave breaking in the ocean. For example, we neglect rotation in (2.1) by assuming that the Coriolis frequency f is significantly smaller than the buoyancy frequency N = −gρ z /ρ. Although rotation is absent in our system, one could associate the background shear in (2.2) with rotationally dominated processes on a larger horizontal scale such as eddies or near-inertial waves. The use of an initial value problem to model wave breaking can also be questioned. However, the alternative setup of continuously forcing a stratified flow at large scales can exhibit results that depend non-trivially on the details of the forcing (Howland, Taylor & Caulfield 2020).
An infinitesimal (now three-dimensional) perturbation to (2.1) satisfies the linear equations (the primes denote the perturbation) In these equations, the 2-D background fields u(x, z, t) and b(x, z, t) evolve with time according to (2.1) from initial conditions (2.2) parameterised by s, Ri b and k. Since the background fields are purely two-dimensional and the perturbation is infinitesimal, there is no nonlinearity in the spanwise y direction, and therefore it is sufficient to consider individual spanwise Fourier modes, and then vary the domain size to investigate different wavelengths. We consider the evolution of perturbations following (2.3), starting from time t = 0. The choice of when to perturb the background flow in its evolution is somewhat arbitrary, but t = 0 is the most obvious and agrees with HTC21.
2.1. Direct-adjoint looping The power iteration DAL algorithm, as described by Schmid (2007) and Arratia et al. (2013), on the evolving background flow, allows us to find optimal perturbations at a target time T with respect to the perturbation energy where the integration is performed over the full periodic domain. Consider the space of state vectors X = (u , b ) satisfying ∇ · u = 0 (p can be determined from these by solving a Poisson equation). Let us define a linear operator Φ T acting on this space, defined as the solution of (2.3a)-(2.3c) up to time t = T. Further, we define an inner product so that an energy for the perturbation X is given by X, X /2. We wish to find the maximum possible energy growth of a perturbation of fixed energy over a time T, i.e. to maximise the Lagrangian Here, λ is a Lagrange multiplier that enforces the normalisation of the initial state X 0 . The precise choice of this initial energy is irrelevant, since the system is linear and we are only interested in the energy gain, i.e. the ratio of final energy to initial energy, but for a well-posed problem we nevertheless must constrain the initial energy.X is a Lagrange multiplier state we call the adjoint state -for reasons which will become clear below -that enforces that X T = Φ T X 0 . For an optimal perturbation, all variations of the Lagrangian vanish, so that integrated backwards in time from t = T to t = 0. The derivation of these is given in Appendix A. Equations (2.7) can be solved to give at an optimal, which suggests the iterative method (2.10) This is in fact precisely the power iteration eigenvalue algorithm to find the eigenvalue of greatest modulus of the linear operator Φ † T Φ T , and so will converge given a unique such eigenvalue. Since Φ † T Φ T is self-adjoint, the eigenvalue will be real. The value of the eigenvalue is given by which is exactly (twice) the energy growth we wish to maximise. Therefore, so long as the 'initial guess' state has a component in the direction of the optimal, (2.10) will find the maximum energy growth and the state needed to excite it.

Algorithm implementation
Because of the large storage requirements of the 2-D background state (u, b), which must be known at every point in time, the following algorithm is used, which employs 'checkpointing': (i) The 2-D background state is evolved according to (2.1) from t = 0 to t = T. Every 100 timesteps, the state is stored to disk. (ii) An initial perturbation state X 1 is generated randomly. Set n = 1. (iii) The value of X n is scaled to have unit energy (required by (2.7a)). (iv) The perturbation state X n is evolved from t = 0 to t = T in blocks of 100 timesteps (required by (2.7b)): (a) The background state is loaded at the start of the block, and evolved by 100 timesteps according to (2.1), with results at each timestep stored in memory. (b) The perturbation state is evolved from the start to the end of the block according to (2.3), using the background states stored in memory. (v) The adjoint stateX n is initialised as the negative of the result of step 4 at t = T (required by (2.7d)). (vi) The adjoint state is evolved from t = T to t = 0 in blocks of 100 timesteps (required by (2.7c)): (a) The background state is loaded at the start of the block, and evolved by 100 timesteps according to (2.1), with results at each timestep stored in memory. (b) The adjoint state is evolved from the end to the start of the block according to (2.8), using the background states stored in memory (in reverse order). (vii) The next state X n+1 is initialised to be the negative of the result of step 5 at t = 0. (viii) Repeat from step 3 with n → n + 1 until the (normalised) residual X n+1 − X n , X n+1 − X n / X n , X n < 10 −5 . (2.12) The algorithm was started with noisy states created by randomly exciting the first six of the Fourier modes in the vertical and streamwise directions. The precise choice of initial condition does not affect the results. Convergence was found to require 10-100 iterations before the residual was sufficiently small, with those converging to entirely 2-D results requiring more iterations.

Results
The (2.1), (2.3) and (2.8) are solved on a triply periodic grid with a pseudo-spectral method, using a modified version of the code developed for Parker, Caulfield & Kerswell (2019). We use 2048 gridpoints in the streamwise (x) direction, with a domain length L x = 8π, and 512 gridpoints in the vertical (z) direction, with a domain height of L z = 2π. The resolutions in these directions match those employed in the non-turbulent phase of the flow evolution by HTC21. As no nonlinearity is present in the spanwise (y) direction, only the first two Fourier modes are evaluated, allowing mode-0 (i.e. spanwise independent, exactly two-dimensional) disturbances, and mode-1 disturbances, with a wavelength that matches the domain depth L y . We vary L y to determine the spanwise wavelength of the fastest growing disturbance. This is a straightforward way of simulating a single Fourier mode with a full pseudo-spectral DNS code by using only three gridpoints in this direction (with dealiasing deactivated), and has the added benefit of determining for which wavelengths the spanwise independent optimal perturbation grows faster than the mode-1 optimal perturbation.  All calculations employ Re = 5000, the lowest used by HTC21 for computational efficiency and direct comparison. This is too low to be realistic for oceanic flows, but is sufficiently high to capture the initial behaviour studied in HTC21, before the breakdown to turbulence. Initially we used Pr = 1 and Ri b = 1; variation of these parameters is discussed below. In the initial conditions (2.2) we took the wave steepness to be s = 0.75 and the wave vector to be k = (1/4, 0, 3) as in HTC21. With this choice, one wavelength in the streamwise direction and three wavelengths in the vertical direction fit within the periodic box. We consider only a single choice of Re and s, rather than vary them as in HTC21, and choose instead to examine the effects of other Pr and Ri b . Figure 1 shows the complex, nonlinear evolution of this two-dimensional flow. By tracing ray paths for internal waves through the sinusoidal shear, HTC21 predict a cluster of critical layers close to the central height z = π (shown in figure 2 of that paper). A clear amplification of the wave near these central critical layers is apparent, as predicted by classical wave theory. Regions with negative vertical buoyancy gradient are visible near the critical layers after approximately t = 5. Figure 2 shows the nonlinear evolution of a finite amplitude, 3-D perturbation to this background flow. See HTC21 for details of this simulation. Up to t = 20, the behaviour is simple, with a clear concentration of activity in those regions with negative background buoyancy gradient (indicated by a black contour in panels b,d,f,h). Subsequently, turbulence develops, and we should not expect to capture this behaviour in the present study.
We perform DAL with target times T ∈ {5, 10, 20, 30}, chosen to capture the time horizon of the initial behaviour of the simulations of HTC21. The spanwise domain size was varied over a range L y ∈ [0.1, 1.6] (initially with increments of 0.2, with additional calculations where necessary to smooth the curves), which is sufficiently large to capture  Figure 2. Perturbation vorticity (a,c,e,g) and buoyancy (b,d, f,h) of the nonlinear simulation from HTC21 whose parameters match those considered here, i.e. Re = 5000, s = 0.75. The black contour on the right surrounds those regions of the background flow for which the buoyancy gradient is statically unstable, which are strongly correlated with increased perturbation growth.
mode-1 structures in the π/2 domain of HTC21. The results are shown in figure 3(c). In each case, when the spanwise domain size L y is sufficiently small, the optimal structures become entirely two-dimensional, and are independent of L y . These results are shown as dashed horizontal lines. HTC21 used a periodic domain of size L y = π/2, so assuming a normal mode structure in this direction, wavelengths π/2, π/4, π/6, etc. are permissible, as well as purely 2-D structures. The first six of these possible wavelengths are shown as vertical lines on the figure. Note that the results of figure 3(c) show no evidence of the 'ultraviolet catastrophe' found when performing stability analyses of frozen background profiles, for example in Salehipour, Peltier & Mashayek (2015). This is perhaps unsurprising due to the inherent time-dependent evolution of the background flow. Figure 3(a) shows a x-y slice through the simulation of figure 2, which shows a clear, if noisy, mode-4 structure. The wavelength of this spanwise mode is marked by the vertical red line in figure 3(c). There is a strong agreement here with our results, as the wavelength measured from this DNS corresponds very closely to the wavelength of maximum growth from our analysis, at both T = 20 and T = 30. Figures 4 and 5 show the development of the optimal perturbation for target time T = 30, in respectively the 2-D case (which was found by the 3-D computations for L y ≤ 0.1), and the maximal growth case with L y = 0.4, for which there is a simple normal mode structure in the spanwise direction, shown in figure 3(b). The two figures are typical of the 2-D and 3-D mechanisms, respectively, which are qualitatively completely different from one another.
The 2-D optimal perturbations, exemplified by figure 4, exploit the Orr mechanism, the transient amplification of elongated spanwise vortices as they are rotated 'tilted over' and   Figure 4. The x-z plane slices of the perturbation spanwise vorticity field ∂u /∂z − ∂w /∂x (a,c,e,g) and buoyancy b (b,d, f,h) for the 2-D optimal perturbation (calculated using L y = 0.1) with T = 30. Alternating spanwise vortices are tilted and distorted by the background shear, as is typical of the Orr mechanism. The black contour on the right surrounds regions of negative (and hence statically unstable) background buoyancy gradient.
distorted by a shear (Orr 1907), which is commonly found in transient growth analyses of shear flows (Arratia et al. 2013;Kaminski, Caulfield & Taylor 2014). In this case, a patch of alternating-signed vortices is visible, at locations of high shear within the background flow. This grows in both spatial extent and amplitude as it is sheared and advected by the background. Compared with the 2-D optimal perturbation for lower target times, the vortex pattern visible is of particularly high wavenumber, which allows the Orr mechanism more time to amplify the disturbance. There does not appear to be any component, in these optimal perturbations, of a Kelvin-Helmholtz-type shear instability -which would manifest as spanwise vortices of only one sign which are not significantly distorted and sheared as the flow evolves -as opposed to the transient Orr process. The patch in figure 4 consists of vertically counterrotating vortices, either side of the black contour which surrounds the region of negative buoyancy gradient in the background flow. The optimal perturbation is therefore exploiting the unstable stratification for energy growth via spanwise counterrotating convective rolls. Figure 6(a) shows the buoyancy flux, defined as and the shear production for this 2-D optimal perturbation. These terms from the perturbation energy equation are derived in Appendix B. While the buoyancy flux monotonically increases exponentially, as the convection is increasingly exploited towards the end of the time window, the shear production, orders of magnitude less important, shows two small peaks at t ≈ 5 and t ≈ 25 associated with Orr-like transient processes, before becoming strongly negative at the end of the time window. This suggests that the transient Orr mechanisms, while present, are not the dominant process. The 3-D optimal perturbations, exemplified by figure 5, show no evidence of any Orr mechanism, and instead take the form of a single patch of quasi-streamwise-independent, counterrotating, streamwise-aligned vortices. As the flow evolves, this patch is advected and significantly amplified. The patch exactly aligns with one of the regions of negative buoyancy gradient in figure 1, strongly suggesting that these are indeed convective rolls, being amplified by the statically unstable stratification, though it is likely that the lift-up mechanism, a viscous algebraic instability of shear flows (Landahl 1980) is also being exploited. Figure 6(b) shows the buoyancy flux and shear production for this optimal perturbation. In this case, both components are roughly equally important, and both grow monotonically and roughly exponentially throughout the time window. This is in stark contrast to the 2-D results in figure 6(a), and suggests that in this case, the result is not merely transient growth but a genuine instability. Figure 7 shows the energy growth for both of these T = 30 optimal perturbations. Both of these, after some initial waviness, show apparently exponential energy growth, suggesting the dominant mechanism in each case is a convective instability, rather than the transient Orr mechanism or the algebraic lift-up mechanism. The 3-D optimal perturbation is many orders of magnitude more energetic. The figure additionally shows the energies of the T = 20 optimal perturbations, when continued up to t = 30, which is the target time which corresponds most closely to the results of HTC21, as a breakdown to turbulence was observed around t = 20. The 3-D result for T = 20 appears almost identical to that Figure 5. Slices of the perturbation vorticity (a,c,e,g) and buoyancy field (b,d, f,h) for L y = 0.4 with T = 30. The streamwise-aligned vortices are greatly amplified as they are advected. The black contour on the right surrounds statically unstable regions for which the background buoyancy gradient is negative. with T = 30, but the 2-D result is markedly different. At the larger target time, the 2-D optimal perturbation has much smaller initial growth, but ends with exponential growth, whereas at smaller target times, there is no exponential final region, but a much larger initial growth, suggesting stronger exploitation of the Orr mechanism.
3.1. The effects of Prandtl number The results have thus far been restricted to the case of Pr = 1, which is consistent with HTC21. However, this value is inappropriate for the oceans, as the ratio of the thermal diffusivity and kinematic viscosity of water has a typical value of Pr ≈ 7. Numerous computational studies have noted that nonlinear behaviour is strongly dependent on Pr ( for the optimal perturbation with T = 30 when Pr = 7, Ri b = 1, which is a simple normal mode in the spanwise direction with period L y = 0.3. It is very similar to the Pr = 1 optimal perturbation in figure 5, despite the fact that the gain is orders of magnitude higher in this case. Salehipour et al. 2015;Parker, Caulfield & Kerswell 2021). We therefore repeat our T = 30 study at Pr = 7, with an increased resolution of 3072 streamwise gridpoints and 768 vertically.
In this case it was found that the energy growth was approximately maximised at L y = 0.3 rather than L y = 0.4, but the form of the optimal perturbation, shown in figure 8, is qualitatively very similar to that found for Pr = 1, with the same mechanisms at work. The final energy of the perturbation in this case was 6.21 × 10 13 , significantly greater than the 6.77 × 10 10 which was found for Pr = 1. This difference is despite the fact that the background flow fields have very similar evolution and energy for flows with Pr = 1 and Pr = 7, as the value of Pr has little effect on the evolution of the internal wave as it is distorted by the shear layer.

The effects of Richardson number
We also repeated the T = 30 calculations at Ri b = 0.1 and Pr = 1, as opposed to Ri b = 1. For domain sizes L y ∈ {0.1, 0.4, 2.0}, the zeroth Fourier mode was always preferred, so that 2-D spanwise-independent optimal perturbations very similar to those found at low L y for Ri b = 1 give more growth than any spanwise-varying perturbations. This is not particularly surprising, since with a decreased influence of stratification, 2-D shear mechanisms are expected to be strengthened, whereas 3-D convective instabilities will be damped.

Conclusion
The linear optimal energy growth analysis we have employed has provided an explanation of the early phase of the simulations described by Howland et al. (2021, herein referred to as HTC21). For target time T = 20, around which time the DNS of HTC21 begins to break down into turbulence for the matching parameter values, we see a clear optimal wavelength which matches that found in the DNS (figure 3). The magnitude of the energy amplification found (> 10 6 at t = 20) indicates why streamwise rolls are apparent in the simulations: if the initial disturbance has any component of this wavenumber, it is so massively amplified it will necessarily be visible as the simulation progresses. As turbulence develops as a result of this energy growth, the rolls break down and are no longer visible.
More generally, we have shown that both spanwise-independent and fully 3-D perturbations are able to exploit negative (statically unstable) buoyancy gradients which arise in the background flow as the internal wave is amplified near the critical layer, despite the high value of Ri b which was used. For longer times, the fully 3-D perturbations can experience orders of magnitude more energy growth than the spanwise-independent perturbations. For example, the 3-D optimal perturbation at the ideal spanwise wavelength of around 0.4 (with T = 30) was found to grow by a factor O(10 5 ) larger than the equivalent 2-D optimal perturbation. Understanding where these very large energy growth factors come from and how they vary with all the parameters of the problem involves unravelling what is happening in the complicated time-dependent underlying 2-D flow. Figure 1 shows a series of thin statically unstable layers (where db/dz < 0) concentrated over an O(1) width for the parameters considered here. The optimal 3-D disturbance is focused on one of these layers (see figure 5) and possesses a spanwise length scale apparently comparable to the vertical (height) scale of the layer. This height scaling must also set the growth factor and so teasing out how this depends on all the parameters of the problem is an important challenge for the future.
This study was motivated by the hope that linear energy growth computations, which include only a single Fourier mode in the spanwise direction, could capture some essence of the expensive DNS results reported in HTC21. The fact that the optimal wavenumber which emerges in the former resembles that found significant in the latter (admittedly in only one point of comparison) augurs well for a systematic exploration of parameter space which would be impractical using DNS. HTC21 investigated different s, and found viscous effects to hinder the development of turbulence at smaller values. The method presented here could add considerably more detail on how low-steepness waves break at higher, more geophysically relevant values of Re, further investigating the subtle interplay between shear-driven and convective processes. We have already performed a brief analysis of the effects of Pr and Ri b , but this could be expanded greatly, to determine at what Ri b the 2-D mechanisms become dominant, for example. The efficiency of this method means it may be possible, in reasonable computation times, to examine Pr up to 700, characteristic of salt-stratified flows, which requires a very fine numerical grid. This study has focused on the case of a shear and wave aligned in the same 2-D plane, but for a wave coming in obliquely we may well have a qualitatively different background flow evolution, and thus the optimal perturbations could be quite different. In this oblique case, shear instabilities in particular would be altered. However, this case would require fully 3-D computations. There is clearly much to explore.
where we have used the incompressibility condition to simplify some of the terms. Then integrating the sum of these two expressions (with an appropriate scaling factor of Ri b for the second expression) gives the equation for energy change d dt using the divergence theorem over our periodic domain to eliminate most of the terms. The terms remaining on the right-hand side then give the expressions for the buoyancy flux (3.1) and the shear production (3.2).