# Multi-Scale Localized Perturbation Method in OpenFOAM
## 2 Materials and Methods
### Simulation Setup
#### 2.2.2 2D+t Simulation  
A rectangular 2D domain that is defined in Figure 2 is used for this demonstration case, similar to the one that was used by [PERSON] [22]. The 2D+t approach in this simulation can be used to approximate a steady, 3D domain while using far fewer cells than the 3D domain would nominally require, and the data periodically saved over the course of the unsteady simulation can be transformed into a third spatial dimension through a Galilean transform and a characteristic velocity \(U\) while using \(x=Ut\). These data can then be assembled into a 3D domain with the initial conditions located at \(x=0\). The downside to the 2D+t approach is that gradients in the \(x\) direction are lost, and so this approximation only holds if the flow slowly varies in this direction. Here, we assume that the shear layer varies in only one dimension reflective of a large-scale current, while [PERSON] shows that the treatment of flow that is similar to the axisymmetric current through a 2D+t application matches the experimental data well.  
The domain is periodic in the \(x\) dimension, and it has a damping beach that is placed on both sides of the domain that monotonically increases in strength as it approaches the lateral boundaries. Cell size is uniform within the central, undamped portion of the domain, but, within the beach, cells progressively stretch along the \(y\) axis as they approach the lateral boundaries. The domain is discretized into one cell in the \(x\) direction, 1125 cells in the \(y\) direction, and 751 cells in the \(z\) direction.  
Equations (34)-(38) are adapted from Hassid and used as initial conditions [22]. Here, \(U_{D0}=0.16~{}U_{0}\), \(k_{0}=(0.06U_{0})^{2}\), \(U_{0}=1\) m/s, and \(D=10\) m.  
\[\delta\mathrm{u}(y,z,t=0) =U_{D0}\left(1-\frac{8(y^{2}+z^{2})}{D^{2}}\right)\exp\left(\frac {-8(y^{2}+z^{2})}{D^{2}}\right) \tag{34}\] \[\delta\bar{U}(y,z,t=0) =(\delta\mathrm{u}(y,z,0),0,0)^{T}\] (35) \[\delta k(y,z,t=0) =k_{0}\exp\left(\frac{-4(y^{2}+z^{2})}{D^{2}}\right)\] (36) \[\delta e(y,z,t=0) =\sqrt{12k_{0}}\frac{k_{0}}{D}\exp\left(\frac{-6(y^{2}+z^{2})}{D ^{2}}\right)\] (37) \[\delta T(y,z,t=0) =-\frac{dT_{b}}{dz}z\exp\left(\frac{-4(y^{2}+z^{2})}{D^{2}}\right) \tag{38}\]  
Background fields are set from the results of the precursor simulation. Because only the perturbation fields are solved over the course of this simulation, no boundary conditions are needed for the background fields and, instead, their boundary values are set from the precursor simulation results. The outflow boundary conditions are used on the \(y\)-normal boundaries, free-slip conditions on the \(z\)-normal boundaries, and periodic boundary conditions on the \(x\)-normal boundaries. This simulation takes place over 3600 s.  
Overall, the following assumptions were made over the course of these simulations:  
* the background shear current is assumed to evolve very slowly when compared to the axisymmetric current and can be modeled as evolving approximately independently of it;
* the background shear current is assumed to evolve over a timescale much longer than the 2D+t simulation length, so over the course of this simulation it may be assumed fixed in time;
* the background shear varies in only the vertical direction;
* the axisymmetric current and any resulting internal gravity waves vary slowly in the streamwise direction; and,
* the axisymmetric current and any results internal gravity waves do not have any significant impact on the evolution of the background shear current.