Next Article in Journal
Modeling Heavy-Gas Dispersion in Air with Two-Layer Shallow Water Equations
Next Article in Special Issue
A Coupled OpenFOAM-WRF Study on Atmosphere-Wake-Ocean Interaction
Previous Article in Journal / Special Issue
Anisotropic RANS Turbulence Modeling for Wakes in an Active Ocean Environment
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Multi-Scale Localized Perturbation Method in OpenFOAM

Department of Aerospace and Ocean Engineering, Virginia Polytechnic Institute and State University, Blacksburg, VA 24061, USA
*
Author to whom correspondence should be addressed.
Fluids 2020, 5(4), 250; https://doi.org/10.3390/fluids5040250
Submission received: 9 October 2020 / Revised: 9 December 2020 / Accepted: 15 December 2020 / Published: 19 December 2020
(This article belongs to the Special Issue Selected Papers from the 15th OpenFOAM Workshop)

Abstract

:
A modified set of governing differential equations for geophysical fluid flows is derived. All of the simulation fields are decomposed into a nominal large-scale background state and a small-scale perturbation from this background, and the new system is closed by the assumption that the perturbation is one-way coupled to the background. The decomposition method, termed the multi-scale localized perturbation method (MSLPM), is then applied to the governing equations of stratified fluid flows, implemented in OpenFOAM, and exercised in order to simulate the interaction of a vertically-varying background shear flow with an axisymmetric perturbation in a turbulent ocean environment. The results demonstrate that the MSLPM can be useful in visualizing the evolution of a perturbation within a complex background while retaining the complex physics that are associated with the original governing equations. The simulation setup may also be simplified under the MSLPM framework. Further applications of the MSLPM, especially to multi-scale simulations that encompass a large range of spatial and temporal scales, may be beneficial for researchers.

1. Introduction

Advancements in computational methods and hardware have enabled researchers and engineers to use computers in order to understand and model increasingly-complex phenomena. High-resolution, large-eddy simulations of vehicle bodies are being performed at increasingly-high grid resolution with hundreds of millions of cells, allowing for simulations to better approach the scales of experimental studies [1]. More complex computational models are also being developed, including those that utilize multi-physics modeling. Researchers now have the ability to calculate, for example, not just the hydrodynamics of the Earth’s oceans over time, but also the distribution of temperature, salinity, mixed-layer depth, and sea-ice thickness, and then compare these quantities across different software and models [2].
The time and space resolution of a computational simulation limits the time- and length-scales, which may be resolved by any given simulation. When a wide range of scales must be resolved, computational resource limitations require that concessions be made in which scales receive adequate resolution, an example of this being turbulence modeling for modeling the smallest necessary scales. Multi-scale modeling and simulation often forgoes attempting to resolve all desired scales within a single simulation, and instead “nests” simulations of decreasing scale and increasing resolution within each other. Information can then be propagated between simulations, either from the large scales to the small scales or in both directions. This approach has seen success in weather simulations and simulations of wind around buildings [3,4]. A great degree of scale disparity is not necessarily required for multi-scale modeling and simulation. The Urban Multi-scale Environmental Predictor, for example, has models for a range of city-scale down to street-scale phenomena [5]. A novel application of multi-scale modeling include the coupling of a large-scale 1D pipe-flow simulation with a small-scale 3D fire-in-pipe simulation [6]. Groen et al. reviewed other applications of multi-scale modeling in science [7].
Perturbation methods are popular within science and engineering, due to their utility. Given a “base” solution to a differential equation, one can derive additional correction terms that are multiplied by a small perturbation parameter that accounts for a perturbation in the system [8]. This method assumes that the perturbation to a term is small when compared to the original term or other terms in the system. A variant of the perturbation method approach that is seen in fluid mechanics is the acoustic perturbation equations, where it is known a priori that sound waves are very small in amplitude when compared to a general incompressible flow, in which they propagate [9,10]. Such an approach produces additional source terms that are related to the evolution of the incompressible mean flow, which allows for the propagation of sound waves under their own dynamics as well as the influence of the incompressible mean flow.
The aim of this work is to simulate the dynamics of a perturbation to a geophysical flow while using modified forms of the governing equations of stratified fluid dynamics. The ability to study the evolution of a perturbation within a nominal "background" may be useful to geophysical flow studies, particularly environmental engineering or climatological ones. This approach, which is called the multi-scale localized perturbation method (MSLPM), is implemented in OpenFOAM, an open-source CFD software suite programmed in C++ [11]. The high-level language that OpenFOAM uses to build its solvers closely mirrors the mathematical expressions that one would find in the definition of a model. Its open-source nature also enables users to freely modify solvers for their own purposes and speed the development of new computational models. OpenFOAM has been used in order to successfully simulate incompressible flows under a variety of turbulence models [12,13,14,15].

2. Materials and Methods

The MSLPM is derived from the idea of scale separation between background fields and corresponding perturbations from the background. Beginning with a partial differential equation operating on an arbitrary simulation variable ϕ , such that
P D E ϕ = 0
One can then decompose ϕ into a background component ϕ b and a perturbation component δ ϕ . Within this paper, the subscript b is added to a variable in order to indicate that it is a background field, and a prefix δ is added to a variable to indicate that a perturbation field. It is assumed that both background and perturbation components may vary in time and space.
ϕ = ϕ b + δ ϕ
This substitution may be freely made into Equation (1), as it does not change the nature of the governing PDE. However, we may expand the governing PDE, as shown in Equation (3), where the original PDE in terms of background and perturbation components can be written as a sum of the original PDE in terms of background fields only, the original PDE in terms of perturbation fields only, and then the non-linear interaction between the background and perturbation fields. The latter terms, which are denoted by N L ϕ b , δ ϕ , arise due to any non-linearity in the governing PDE and they are assumed to go to zero if either the background or perturbation is identically zero. This process is shown for an example partial differential equation in Appendix A.
P D E ϕ b + δ ϕ = P D E ϕ b + P D E δ ϕ + N L ϕ b , δ ϕ = 0
Closing the above equation now remains, and this is accomplished through assumptions regarding the evolution of the background and perturbation components. Geophysical flows exhibit a great degree of scale separation; an atmospheric front may evolve on the scale of days to weeks and span continents, while the wake of a wind turbine may evolve over the span of minutes to hours and over meters to kilometers. If it is assumed that the phenomena that are associated with the background are large-scale, long-timescale in nature, and that phenomena associated with the perturbation are much smaller in scale than those in the background, then one may assume that the perturbation will diffuse before it can impart any significant changes upon the background. In this way, the background can be assumed to evolve independently from the perturbation, due to a separation of scales. Mathematically, this is equivalent to saying that the background evolves, as if δ ϕ 0 everywhere for all time, and, therefore, Equation (3) becomes P D E ( ϕ b ) = 0 . With this second equation, a set of governing equations forms:
P D E ϕ b = 0 P D E ϕ b + P D E δ ϕ + N L ϕ b , δ ϕ = 0
This simplifies to
P D E ϕ b = 0
P D E δ ϕ + N L ϕ b , δ ϕ = 0
The outcome of this separation of background and perturbation components is a set of governing equations that are derived from the original governing equation. This set of equations is one-way coupled, which means that the second equation depends on the solution of the first for the current timestep, but the first does not depend on the solution of the second. Equation (4) describes the evolution of the background as a function of background field only and it has the same form as Equation (1). Equation (5) describes the evolution of the perturbation field as a function the perturbation field as well as any non-linear interaction between the background and perturbation. The effect of this interaction on the background is assumed to be negligible, but it is potentially significant for the perturbation.
This assumption lends itself to many geophysical flows. For example, one might be able to determine the average wind velocity and turbulence profile for a given field of land. If a wind turbine was built upon this field, the average wind velocity and turbulence profiles were measured again, then a wake would be found, where the velocity immediately downstream of the turbine is lower and turbulence immediately downstream of the turbine is higher, but, outside of this wake, the average wind and turbulence profiles would not experience a great change. This is because the wind and turbulence at these locations is far more dependent on other factors than they are on the presence and operation of the wind turbine, and this holds even far downstream of the wind turbine when the wake has effectively dissipated. In the notation of the MSLPM, the wind velocity and turbulence profiles in the case without the wind turbine could be considered as the background conditions, and the deviations from these conditions that the wind turbine introduces are the perturbation to the background. The perturbations are localized to the vicinity of the wind turbine and they do not have an appreciable impact on the evolution of the background far away from the wind turbine when compared to factors, such as diurnal forcing and topography, including upstream mountain ranges. Therefore, we might say that the background evolution can be assumed to be independent of the perturbation.
The assumption of the evolution of the background independent of the perturbation may not hold for perturbations, which would, upon interacting with the background, affect the evolution of the background to the point where it evolves on the same timescale as the perturbation. An example of this may be the case where the background is marginally stable and the perturbation is enough to destabilize a large portion of the background. In the MSLPM, this perturbation-on-background interaction would not be resolved, and the background would continue to evolve as if the perturbation was not there, which is not reflective of the actual physics.
The derivation that is shown above is not explicitly restricted to stratified fluid flows, so it is possible for it to be applied to other sets of governing equations given that the aforementioned assumptions are also valid for the new governing equations. A more thorough derivation of the above equations may be seen in [16]. It should be noted that the perturbation that was introduced into this system can be made distinct from the background due to temporal- and spatial-scale separation, unlike traditional perturbation methods that assume the perturbation is small relative to the other terms in the governing equation.
Several different approaches may be taken in order to solve Equations (4) and (5). One may apply a time-marching scheme in order to solve Equation (4) for the background fields for each timestep, and then use this updated information to solve Equation (5) for the perturbation fields. For one-way coupled multi-scale simulations, in which a large-scale simulation is performed beforehand, one may also spatially and temporally interpolate the fields from the large-scale simulation onto the small-scale simulation as the background fields, and then simulate a perturbation on the small-scale domain. This method, as roughly shown in Figure 1, is reminiscent to the nested simulations that are seen in multi-scale simulations at present, and may be beneficial for these types of simulations. In this way, only Equation (5) needs to be solved. Another possible method is to prescribe the background fields from an analytic or empirical expression. When assuming the timescale of the simulation is very small when compared to the timescale of the background, one may also treat the background fields as constant in time and, therefore, treat them as a function of space only.

2.1. Governing Equations

The MSLPM is applied to the governing equations of stratified turbulent flow in order to determine the equations of motion for the background fields and perturbation fields. Beginning with the incompressible unsteady Reynolds-averaged Navier–Stokes equations and a scalar transport equation for temperature T, as given in Equations (6)–(8), below. Here, U is the velocity vector; ν , kinematic viscosity; R ¯ , Reynolds stress tensor; p, deviation from the hydrostatic pressure; ρ 0 , constant reference density; ρ , density of the fluid; g , gravity vector; and, κ , molecular diffusivity of temperature. An eddy diffusivity model, such that turbulent diffusivity κ t ν t , where ν t is the eddy viscosity, is used in order to close the turbulent fluxes for T. The divergence of the Reynolds stress tensor accounts for the average affect of turbulent fluctuations on the mean flow.
· U = 0
U t + U · U ν 2 U = 1 ρ 0 p · R ¯ + ρ ρ 0 ρ 0 g
T t + U · T · [ κ + κ t ] T = 0
The total fields are then decomposed into their background and perturbation components following the MSLPM, which results in two sets of equations, with the first set describing the motion of the background fields given in Equations (9)–(11) and the second set describing the motion of the perturbation fields, including any non-linear interaction between the background and perturbation fields, in Equations (12)–(14). A linear equation of state, as defined in Equations (15)–(17), is used, where the thermal expansion coefficient of seawater β is taken as 2.1 × 10 4 ° C/m. Equation (18) gives the Brunt–Väisälä frequency N in terms of both density and temperature.
· U b = 0
U b t + U b · U b ν 2 U b = 1 ρ 0 p b · R ¯ b + ρ b ρ 0 ρ 0 g
T b t + U b · T b · [ κ + κ t b ] T b = 0
· δ U = 0
δ U t + U b + δ U · δ U ν 2 δ U = 1 ρ 0 δ p · δ R ¯ + δ ρ ρ 0 g δ U · U b
δ T t + U b + δ U · δ T · [ κ + κ t b + δ κ t ] δ T = δ U · T b + · ( δ κ t T b )
ρ b ( T b ) = ρ 0 + ρ 0 β ( T b T r e f )
ρ ( T ) = ρ 0 + ρ 0 β ( T T r e f )
δ ρ ( δ T ) = ρ ( T ) ρ b ( T b ) = β δ T
N 2 = g ρ 0 ρ z = g β T z
The buoyant k ϵ turbulence model is used in order to close the turbulent momentum fluxes [17]. This model is an extension to the popular k ϵ model, and it accounts for the effects of buoyancy through a source term in both the k and ϵ equations [18]. While this model is not the most realistic for geophysical turbulence, it was chosen for its speed in the case presented here. The model equations are given in total form in Equations (19)–(21), with their equivalents for the background turbulence fields in Equations (22)–(24), and the governing equations for the perturbation turbulence variables in Equations (25)–(27). The following model coefficients are used: C μ = 0.09 , C 1 ϵ = 1.44 , C 2 ϵ = 1.92 , C 3 ϵ = 0.1 , σ k = 1 , σ ϵ = 1.3 , and σ t = 1 .
k t + U · k · ν t σ k k = P G ϵ
ϵ t + U · ϵ · ν t σ ϵ ϵ = ϵ k C 1 ϵ P C 3 ϵ G C 2 ϵ ϵ 2 k
ν t = C μ k 2 ϵ
where
P ν t U + U T : U G ν t σ t N 2
k b t + U b · k b · ν t b σ k k b = P b G b ϵ b
ϵ b t + U b · ϵ b · ν t b σ ϵ ϵ b = ϵ b k b C 1 ϵ P b C 3 ϵ G b C 2 ϵ ϵ b 2 k b
ν t b = C μ k b 2 ϵ b
δ k t + U b + δ U · δ k · ν t b + δ ν t σ k δ k = δ P δ G δ ϵ δ U · k b + · δ ν t σ k k b δ ϵ t + U b + δ U · δ ϵ · ν t b + δ ν t σ ϵ δ ϵ = ϵ k C 1 ϵ P C 3 ϵ G
ϵ b k b C 1 ϵ P b C 3 ϵ G b C 2 ϵ ϵ 2 k ϵ b 2 k b δ U · ϵ b + · δ ν t σ ϵ ϵ b
δ ν t = C μ k 2 ϵ k b 2 ϵ b

2.2. Simulation Setup

A simulation case focusing on the application of the MSLPM to a geophysical fluid flow is defined, focusing on the interaction of a perturbation with the background current. A thermally-mixed axisymmetric current is initialized as a perturbation within the computational domain, where a vertically-varying background shear layer is present. The currents are situated, such that they flow perpendicular with respect to each other. The axisymmetric current is allowed to evolve in time and, as the simulation begins, this current will collapse from buoyancy forces, forming internal gravity waves. These internal gravity waves will radiate out, with some of them reaching the background shear layer and interacting with it. Such internal gravity wave-shear layer interactions have been theoretically studied by Eltayeb and McKenzie, and numerically studied by Galmiche et al. and Javam et al. [19,20,21]. It is assumed that the background shear layer is also slowly varying, such that it can be assumed to be constant in time over the span of the simulation. This case may be representative of a sewage outflow into a bay or estuary with a strong submerged current. This demonstration simulation is divided into two sections: a one-dimensional (1D) precursor simulation where turbulence fields are initialized and background fields are constructed, and then a 2D+t simulation where the axisymmetric current evolves under its own dynamics as well as influence from the shear layer. The axisymmetric current and its associated turbulence fields in the latter simulation are initialized to its respective perturbation fields, while the quantities that are associated with the shear layer are stored within the background fields. Because the background shear layer is held fixed in time, only Equations (12)–(14) and (25)–(27) are solved each timestep. These equations are implemented into OpenFOAM while using the methods described in [16].

2.2.1. Precursor Simulation

The 1D precursor simulation is performed in order to generate the background fields for the 2D+t simulation. A 500 m tall 1D domain, stretching from z = −250 m to z = 250 m, is discretized into 751 cells, and the simulation itself takes place over 3200 s, such that it ends when the lowest Richardson number in the domain, as defined by Equation (28), is just above 0.25. The shear layer is initially 40 m wide and it is centered at z = 50 m, and it is initialized within this region using Equation (29), and elsewhere the fluid is initially quiescent.
R i = N 2 d v b / d z 2
v b ( z , t = 0 ) = 0.1 + 25 N sinh 1 2 z 12 3
The remainder of the fields are initialized using the following equations:
U b ( z , t = 0 ) = 0 , v b ( z , 0 ) , 0 T
T b ( z , t = 0 ) = T s + d T b d z z
k b ( z , t = 0 ) = 2.4 × 10 9 m 2 / s 2
ϵ b ( z , t = 0 ) = 1.9 × 10 11 m 2 / s 3
N is the Brunt-Väisälä frequency and it is set at 5 cph for this simulation. d T b / d z is taken as 0.00505 ° C/m. The values for k b and ϵ b are bounded, such that they do not decrease below the values that they are initialized at. Free-slip conditions are used on the z-normal boundaries and periodic conditions are used on the lateral boundaries.

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 Hassid [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 = U t . 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 Hassid 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 D 0 = 0.16 U 0 , k 0 = ( 0.06 U 0 ) 2 , U 0 = 1 m/s, and D = 10 m.
δ u ( y , z , t = 0 ) = U D 0 1 8 ( y 2 + z 2 ) D 2 exp 8 ( y 2 + z 2 ) D 2
δ U ( y , z , t = 0 ) = δ u ( y , z , 0 ) , 0 , 0 T
δ k ( y , z , t = 0 ) = k 0 exp 4 ( y 2 + z 2 ) D 2
δ ϵ ( y , z , t = 0 ) = 12 k 0 k 0 D exp 6 ( y 2 + z 2 ) D 2
δ T ( y , z , t = 0 ) = d T b d z z exp 4 ( y 2 + z 2 ) D 2
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.

3. Results

3.1. Precursor Simulation

The 1D domain is simulated for nearly 3200 s to develop a final velocity and turbulence field. Figure 3 provides the vertical profile of the initial and final horizontal velocity normalized by the initial axisymmetric current centerline velocity U D 0 , which is taken to be 0.16 m/s here. Figure 4 gives the vertical profile of eddy viscosity normalized by the molecular kinematic viscosity, here 10 6 m 2 /s. This field is determined algebraically from the k and ϵ fields of the precursor simulation, and these fields are mapped onto the 2D+t fields as well. The shear layer is shown to be highly turbulent, with eddy viscosity on the order of tens of thousands of times larger than molecular viscosity. This background turbulence may lead to interactions between itself and the perturbation flow, including any perturbation to turbulence. Finally, the vertical profile of 1 / R i is given by Figure 5. The line 1 / R i = 4 denotes the classical Miles–Howard stability criterion, where regions in which R i < 1 / 4 are dynamically unstable and prone to the formation of shear instabilities. The entire domain can be assumed to be stable because the entire profile has an inverse Richardson number of less than 4. Once the 1D precursor simulation is completed, its fields may be mapped to the 2D+t domain to be used as the time-constant background fields.

3.2. 2D+t Simulation

The 2D+t domain is simulated for one hour of simulation time with background fields being held constant in time. The results show that the axisymmetric current collapses due to density differences between it and the ambient stratification. This collapse generated internal gravity waves that radiate out in all directions, with some internal gravity waves entering the shear layer located above the axisymmetric current. The waves that enter are advected in the y direction by the strong shear current, and interactions between the internal gravity waves and the background shear layer may be seen.
Figure 6, Figure 7 and Figure 8 show the perturbations to the x, y, and z components of velocity, respectively, at the final timestep. The axisymmetric current retains most of its original velocity distribution in the x direction, but internal gravity waves are seen in the δ v and δ w components. These internal gravity waves are seen entering the shear layer, and then dissipating due to the strong transverse current and high background turbulence within the shear layer, particularly seen in the close-up of the perturbation to vertical velocity in Figure 9. In spite of this, a wave-like pattern is still seen within the shear layer shown in Figure 7 and Figure 8. The magnitude of the velocity perturbation is small, as seen in Figure 10, approximately 3% of the original centerline velocity defect. Figure 11 shows the perturbation to eddy viscosity δ ν t at the final timestep. This variable serves as a surrogate for the general state of turbulence that is introduced by the perturbation and the interaction between the perturbation and background. The highest perturbation to eddy viscosity is seen within the decaying axisymmetric current and within the shear layer just above the axisymmetric current. Turbulent viscosity is seen advected downstream by the shear current, and small quantities of δ ν t are also seen upstream within the shear layer. These latter quantities likely result from small perturbations to the shear layer that are caused by the axisymmetric perturbation and generated internal gravity waves.

4. Discussion

The ability to independently track the evolution of a perturbation within an evolving background is one of the most prominent benefits of the MSLPM. Using traditional methods, several simulations may be required in order to ascertain the time history of a simulation without perturbation so that the effects of a perturbation can be determined. However, with the MSLPM, this perturbation is intrinsically separated and tracked. This benefit becomes more apparent when one must perform a series of calculations as part of a parametric study, where one may compare the evolution of a perturbation across a range of different background conditions. The separation of a perturbation from a nominal background may also yield numerical benefits, as linear solvers may be determining a solution based around zero rather than the conditions of the background state.
In the simulation documented here, a time-constant background field is defined within the domain and the perturbation allowed to interact with it. This is done without the need for boundary conditions or body source terms, which may be of interest in stratified fluid cases. The generation of internal gravity waves that radiate in all directions may result in internal gravity waves impinging on the upstream boundary, and the use of an inlet boundary condition on this same surface may lead to the reflection of waves back into the domain. Localizing the internal gravity waves to the perturbation allows for the user to place an inlet boundary condition on the background flow, then a sponge layer and an open boundary condition may be placed upon the perturbation fields in order to prevent any waves from reflecting back into the domain.
Furthermore, as the background is imposed upon the domain while using data that were collected from a precursor simulation, the influences acting upon the background can be retained, even if they are not resolved within a small-scale simulation. While it is not seen here, one could ensure that the background evolves over a certain scale. This may be important for multi-scale simulation. For example, a large-scale simulation examining continental wind patterns may examine how an upstream mountain range affects a potential downstream site, which is the subject of a small-scale simulation. This smaller-scale simulation may utilize the large-scale simulation data as a set of initial conditions, but, once the information is localized to the small-scale domain, it loses any influences of far-upstream or far-downstream phenomena which may be important. A possible remedy for this is to couple the two simulations together, which is done by the MSLPM.

4.1. Limitations of Assumptions

The MSLPM is derived under the assumption that there is sufficient scale separation between the background and perturbation, and that the perturbation does not have a significant influence upon the background. This assumption limits the perturbations that may be studied, for example, a large temperature or velocity perturbation to the entire domain, as these perturbations may have a significant impact on the dynamics of the background. Because the one-way coupling of the background and perturbation is the result of this assumption, the implementation of two-way coupling may partially relax this assumption and permit a greater range of perturbations to be studied.
Certain solution methods may also limit the applicability of the MSLPM. The case that is described in Section 2 and Section 3 above assumes that the time scale of the background processes is so large compared to the simulation duration that the background can be assumed to be constant in time. This requirement may be restrictive, depending on the background flow used, but two other solution methods are described in Section 2. The simultaneous solution of background and perturbation fields on the same domain may also be used for this case and, in particular, may have been more appropriate given the nature of the background shear flow. Interpolating the background fields temporally and spatially from a separate simulation could also be used. This method may be of interest to nested multi-scale simulations; however, one must ensure that proper interpolation is used.
The 1D and 2D+t simulations were also conducted under the assumption that the flow evolves slowly in certain directions. The 1D simulation was performed in order to provide initial conditions for the background shear in the 2D+t simulation, and as such it loses any evolution in other directions, particularly the y direction in which it flows. Within the 2D+t simulation, any significant changes in the direction in which the axisymmetric current flows is lost. While this mainly affects the evolution of the axisymmetric current, the interactions between internal gravity waves and the background shear layer may lose any 3D effects that may be important in the interactions. Similarly, the choice of a k ϵ type model may also affect the quantitative values that are seen in Figure 6, Figure 7, Figure 8, Figure 9 and Figure 10. In this case, the results seen here may only be qualitatively correct. As a final note, this case is demonstrative of the capabilities of the MSLPM, so no quantitative conclusions should be drawn from these results.

4.2. Future Work

Further cases with more diverse phenomena and physics may be useful in order to better quantify the capabilities of the MSLPM relative to traditional simulation methods. In particular, the different solution methods that are described in Section 2 may be tested, as these will give researchers the ability to fine-tune their simulation for the given background flows of interest. Further benchmark cases may be useful in understanding which background solution method is most practical for different flows and phenomena. Two-way coupling of the background and perturbation fields may also be of interest in order to allow for the perturbation to affect the evolution of the background. This is particularly relevant to turbulence quantities, as the great range in temporal and spatial scales of turbulent motion means that scale overlap is nearly guaranteed. While the methods that are described in this paper are in their infancy, they show great promise for geophysical flows, including multi-scale simulation of geophysical flows and, potentially, other realms of computational physics.

Author Contributions

Conceptualization, E.H., J.P. and E.P.; methodology, E.H.; software, E.H.; validation, E.H.; formal analysis, E.H.; investigation, E.H.; resources, E.P.; data curation, E.H.; writing—original draft preparation, E.H.; writing—review and editing, J.P. and E.P.; visualization, E.H.; supervision, J.P. and E.P.; project administration, E.P.; funding acquisition, J.P. and E.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Acknowledgments

The authors acknowledge Advanced Research Computing at Virginia Tech for providing computational resources and technical support that have contributed to the results reported within this paper. URL: arc.vt.edu. The authors would also like to thank the anonymous referees for their constructive feedback.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The expansion shown in Equation (3) can be demonstrated with an example case for the following partial differential equation in Equation (A1), but this process is also identical for other partial differential equations, including multi-variable ones, as well ordinary differential equations.
P D E ( ϕ ) = ϕ t ϕ ϕ x = 0
The variable ϕ is accordingly decomposed into a background component ϕ b and a perturbation component δ ϕ such that ϕ = ϕ b + δ ϕ . This yields Equation (A2).
P D E ( ϕ ) = P D E ( ϕ b + δ ϕ ) = ( ϕ b + δ ϕ ) t ( ϕ b + δ ϕ ) ( ϕ b + δ ϕ ) x = 0
Equation (A2) can then be manipulated into the form shown in Equation (A3).
P D E ( ϕ b + δ ϕ ) = ϕ b t ϕ b ϕ b x + δ ϕ t δ ϕ δ ϕ x δ ϕ ϕ b x ϕ b δ ϕ x = 0
One may notice the first two terms in the middle equality of Equation (A3) are identical in form to the original P D E ( ϕ ) but only depending on the background component ϕ b , and the next two terms are identical in form to the original PDE but only depending on the perturbation component δ ϕ . The final two terms arise from the non-linearity of P D E ( ϕ ) and would be absent if this differential equation were linear. Similarly, if either ϕ b or δ ϕ were identically zero for all time, these terms would be equal to zero. We may, therefore, make the following definitions in Equations (A4)–(A6).
P D E ( ϕ b ) ϕ b t ϕ b ϕ b x
P D E ( δ ϕ ) δ ϕ t δ ϕ δ ϕ x
N L ( ϕ b , δ ϕ ) δ ϕ ϕ b x ϕ b δ ϕ x
which, when substituted into Equation (A3), yield Equation (3).

References

  1. Fureby, C.; Anderson, B.; Clarke, D.; Erm, L.; Henbest, S.; Giacobello, M.; Jones, D.; Nguyen, M.; Johansson, M.; Jones, M.; et al. Experimental and numerical study of a generic conventional submarine at 10° yaw. Ocean. Eng. 2016, 116, 1–20. [Google Scholar] [CrossRef]
  2. Danabasoglu, G.; Yeager, S.G.; Bailey, D.; Behrens, E.; Bentsen, M.; Bi, D.; Biastoch, A.; Böning, C.; Bozec, A.; Canuto, V.M.; et al. North Atlantic simulations in Coordinated Ocean-ice Reference Experiments phase II (CORE-II). Part I: Mean states. Ocean. Model. 2014, 73, 76–107. [Google Scholar] [CrossRef] [Green Version]
  3. Talbot, C.; Bou-Zeid, E.; Smith, J. Nested Mesoscale Large-Eddy Simulations with WRF: Performance in Real Test Cases. J. Hydrometeorol. 2012, 13, 1421–1441. [Google Scholar] [CrossRef]
  4. Wiersema, D.J.; Lundquist, K.A.; Chow, F.K. Mesoscale to Microscale Simulations over Complex Terrain with the Immersed Boundary Method in the Weather Research and Forecasting Model. Mon. Weather. Rev. 2020, 148, 577–595. [Google Scholar] [CrossRef]
  5. Lindberg, F.; Grimmond, C.; Gabey, A.; Huang, B.; Kent, C.W.; Sun, T.; Theeuwes, N.E.; Järvi, L.; Ward, H.C.; Capel-Timms, I.; et al. Urban Multi-scale Environmental Predictor (UMEP): An integrated tool for city-based climate services. Environ. Model. Softw. 2018, 99, 70–87. [Google Scholar] [CrossRef]
  6. Colella, F.; Rein, G.; Verda, V.; Borchiellini, R. Multiscale modeling of transient flows from fire and ventilation in long tunnels. Comput. Fluids 2011, 51, 16–29. [Google Scholar] [CrossRef]
  7. Groen, D.; Zasada, S.J.; Coveney, P.V. Survey of Multiscale and Multiphysics Applications and Communities. Comput. Sci. Eng. 2014, 16, 34–43. [Google Scholar] [CrossRef] [Green Version]
  8. Lin, C.C.; Segel, L.A. Mathematics Applied to Deterministic Problems in the Natural Sciences, 1st ed.; Macmillan: New York, NY, USA, 1974. [Google Scholar]
  9. Hardin, J.C.; Pope, D.S. An acoustic/viscous splitting technique for computational aeroacoustics. Theor. Comput. Fluid Dyn. 1994, 6, 323–340. [Google Scholar] [CrossRef]
  10. Ewert, R.; Schröder, W. Acoustic perturbation equations based on flow decomposition via source filtering. J. Comput. Phys. 2003, 188, 365–398. [Google Scholar] [CrossRef]
  11. Jasak, H.; Jemcov, A.; Tuković, Ž. OpenFOAM: A C++ Library for Complex Physics Simulations. In Proceedings of the International Workshop on Coupled Methods in Numerical Dynamics, Zagreb, Croatia, 19–21 September 2007; pp. 47–66. [Google Scholar]
  12. Alfonsi, G.; Ferraro, D.; Lauria, A.; Gaudio, R. Numerical Investigation of Natural Rough-Bed Flow. In Numerical Computations: Theory and Algorithms; Sergeyev, Y.D., Kvasov, D.E., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 280–288. [Google Scholar]
  13. Tafarojnoruz, A.; Lauria, A. Large eddy simulation of the turbulent flow field around a submerged pile within a scour hole under current condition. Coast. Eng. J. 2020, 62, 489–503. [Google Scholar] [CrossRef]
  14. Lauria, A.; Alfonsi, G.; Tafarojnoruz, A. Flow Pressure Behavior Downstream of Ski Jumps. Fluids 2020, 5, 168. [Google Scholar] [CrossRef]
  15. Vuorinen, V.; Chaudhari, A.; Keskinen, J.P. Large-eddy simulation in a complex hill terrain enabled by a compact fractional step OpenFOAM® solver. Adv. Eng. Softw. 2015, 79, 70–80. [Google Scholar] [CrossRef]
  16. Higgins, E.T. Multi-Scale Localized Perturbation Method for Geophysical Fluid Flows. Master’s Thesis, Virginia Polytechnic Institute and State University, Blacksburg, VA, USA, 2020. [Google Scholar]
  17. Rodi, W. Examples of calculation methods for flow and mixing in stratified fluids. J. Geophys. Res. 1987, 92, 5305. [Google Scholar] [CrossRef]
  18. Launder, B.E.; Spalding, D.B. The Numerical Computation of Turbulent Flows. Comput. Methods Appl. Mech. Eng. 1974, 3, 21. [Google Scholar] [CrossRef]
  19. Eltayeb, I.A.; McKenzie, J.F. Critical-level behaviour and wave amplification of a gravity wave incident upon a shear layer. J. Fluid Mech. 1975, 72, 661–671. [Google Scholar] [CrossRef]
  20. Galmiche, M.; Thual, O.; Bonneton, P. Direct Numerical Simulation of Turbulence in a Stably Stratified Fluid and Wave-Shear Interaction. Appl. Sci. Res. 1997, 59, 15. [Google Scholar] [CrossRef]
  21. Javam, A.; Imberger, J.; Armfield, S.W. Numerical study of internal wave–caustic and internal wave–shear interactions in a stratified fluid. J. Fluid Mech. 2000, 415, 89–116. [Google Scholar] [CrossRef]
  22. Hassid, S. Collapse of turbulent wakes in stably stratified media. J. Hydronautics 1980, 14, 25–32. [Google Scholar] [CrossRef]
Figure 1. Example of an application of multi-scale localized perturbation method (MSLPM) using nested domains. Here, one could simulate meso-scale wind pattern, including the affects of a nearby mountain range, and then perform a micro-scale simulation of a wind turbine site localized within the meso-scale domain.
Figure 1. Example of an application of multi-scale localized perturbation method (MSLPM) using nested domains. Here, one could simulate meso-scale wind pattern, including the affects of a nearby mountain range, and then perform a micro-scale simulation of a wind turbine site localized within the meso-scale domain.
Fluids 05 00250 g001
Figure 2. Simulation domain with the axisymmetric current and shear layer (not to scale).
Figure 2. Simulation domain with the axisymmetric current and shear layer (not to scale).
Fluids 05 00250 g002
Figure 3. Initial and final velocity for the precursor simulation, normalized by the initial axisymmetric current centerline velocity. Taken from [16].
Figure 3. Initial and final velocity for the precursor simulation, normalized by the initial axisymmetric current centerline velocity. Taken from [16].
Fluids 05 00250 g003
Figure 4. Final eddy viscosity ν t b from precursor simulation, normalized by molecular kinematic viscosity. Taken from [16].
Figure 4. Final eddy viscosity ν t b from precursor simulation, normalized by molecular kinematic viscosity. Taken from [16].
Fluids 05 00250 g004
Figure 5. Final inverse gradient Richardson number profile from the precursor simulation. Taken from [16].
Figure 5. Final inverse gradient Richardson number profile from the precursor simulation. Taken from [16].
Fluids 05 00250 g005
Figure 6. x velocity component perturbation at t = 3600 s. Adapted from [16].
Figure 6. x velocity component perturbation at t = 3600 s. Adapted from [16].
Fluids 05 00250 g006
Figure 7. y velocity component perturbation at t = 3600 s. Adapted from [16].
Figure 7. y velocity component perturbation at t = 3600 s. Adapted from [16].
Fluids 05 00250 g007
Figure 8. z velocity component perturbation at t = 3600 s. Adapted from [16].
Figure 8. z velocity component perturbation at t = 3600 s. Adapted from [16].
Fluids 05 00250 g008
Figure 9. Close up of the z velocity component perturbation at t = 3600 s.
Figure 9. Close up of the z velocity component perturbation at t = 3600 s.
Fluids 05 00250 g009
Figure 10. Magnitude of the velocity perturbation at t = 3600 s. Adapted from [16].
Figure 10. Magnitude of the velocity perturbation at t = 3600 s. Adapted from [16].
Fluids 05 00250 g010
Figure 11. Perturbation to eddy viscosity at t = 3600 s. Adapted from [16].
Figure 11. Perturbation to eddy viscosity at t = 3600 s. Adapted from [16].
Fluids 05 00250 g011
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Higgins, E.; Pitt, J.; Paterson, E. Multi-Scale Localized Perturbation Method in OpenFOAM. Fluids 2020, 5, 250. https://doi.org/10.3390/fluids5040250

AMA Style

Higgins E, Pitt J, Paterson E. Multi-Scale Localized Perturbation Method in OpenFOAM. Fluids. 2020; 5(4):250. https://doi.org/10.3390/fluids5040250

Chicago/Turabian Style

Higgins, Erik, Jonathan Pitt, and Eric Paterson. 2020. "Multi-Scale Localized Perturbation Method in OpenFOAM" Fluids 5, no. 4: 250. https://doi.org/10.3390/fluids5040250

Article Metrics

Back to TopTop