Vortex Merger: A Numerical Investigation

University of California–Los Angeles
MAE 250E: Final Project
Vortex Merger:
A Numerical Investigation
Instructor:
Dr. John Kim
Author:
Maziar Hemati
June 9, 2009
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
Contents
1 Introduction
2
2 Numerical Method
3
2.1
Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
2.2
Fourier-Fourier Spectral Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
2.3
Time-Advancement of the Dynamical Equations
. . . . . . . . . . . . . . . . . . . .
4
2.4
Pseudo-Spectral Computation of the Nonlinear Term . . . . . . . . . . . . . . . . . .
5
2.5
Aliasing Removal via Zero-Padding and Truncation . . . . . . . . . . . . . . . . . . .
6
3 Results and Discussion
7
3.1
Physics of Vortex Merger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
3.2
Numerical Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
3.3
Comparison to Numerical Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
3.4
Comparison to Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
4 Conclusions
13
5 Appendix: Matlab m-files
14
5.1
main.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
5.2
getBhat.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
5.3
zeropad.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
6 References
20
1 of 20
MAE 250E
1
Vortex Merger: A Numerical Investigation
Maziar Hemati
Introduction
When two identical co-rotating vortices are brought within a critical distance of one another, a
substantial portion of their core vorticity will mix, resulting in vortex merger. This phenomenon is
mainly two-dimensional in nature and is fundamental in fluid motion. [8]
(a)
(b)
(c)
Figure 1: Cross-cut experimental dye visualization of two laminar co-rotating vortices (a) before
merger, (b) during merger, and (c) after merger (Meunier et al., 2005).
Vortex merging plays an important role in the evolution of aircraft trailing wakes. Any lifting
surface, such as the wing of an aircraft, generates a vortex sheet which sheds into the wake. The
distribution of vorticity in the wake is dictated by the geometry and lift distribution of the lifting
surface. On an aircraft wing, the vorticity shed from various components quickly roll-up in the
near-field to form a single line vortex. This roll-up in three-dimensions is analogous to the vortex
merging in two-dimensions.
Figure 2: Schematic of a typical vortex wake of a transport aircraft in high-lift configuration,
i.e. flaps deflected (Meunier et al., 2005).
In the present paper, the interaction of two identical co-rotating Gaussian vortices is simulated and
compared against past experimental and numerical results. Although this is an idealized model for
vortex roll-up in a three-dimensional aircraft wake, it allows for a preliminary study of this sort of
phenomenon.
2 of 20
MAE 250E
2
Vortex Merger: A Numerical Investigation
Maziar Hemati
Numerical Method
Two-dimensional numerical simulations of a co-rotating vortex pair are performed for this study.
The incompressible Navier-Stokes equations are solved based on the vorticity-streamfunction formulation via a Galerkin spectral method subject to doubly-periodic boundary conditions.
2.1
Governing Equations
In two-dimensional barotropic flow subject to a conservative force field, applying the curl operator
on the Navier-Stokes equations yields the vorticity-streamfunction equations
∂ω
+ N (u, ω) − ν∇2 ω = 0
∂t
(2.1)
∇2 ψ = −ω
(2.2)
N (u, ω) = u · ∇ω,
(2.3)
where
ω =∇×u=
∂u
∂v
−
,
∂x ∂y
(2.4)
and
∂ψ
∂ψ
v=−
.
(2.5)
∂y
∂x
Such a formulation has the benefit of satisfying the divergence-free velocity field automatically.
Moreover, pressure drops out of this representation, and a Poisson equation in ψ must be solved
instead. This form is also well suited for vortex merger simulations due to the physical significance
of vorticity in this problem.
u=
For the general development of the numerical method, we assume the initial conditions are provided
as
ω(x, y, to ) = ωo (x, y).
(2.6)
The computational domain is taken as a doubly-periodic square of length 2π; thus, the boundary
conditions to be satisfied are of the form
ω(x ± 2π, y) = ω(x, y ± 2π) = ω(x, y).
2.2
(2.7)
Fourier-Fourier Spectral Method
Since we have assumed the initial flowfield is 2π-periodic in both x- and y-directions, the solution
(ω, ψ, u) can be approximated by a truncated Fourier series for each of these field quantities
XX
ω(x, y, t) =
ω̂kx (t)ω̂ky (t)ei(kx x+ky y)
kx
ky
3 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
ψ(x, y, t) =
XX
u(x, y, t) =
XX
v(x, y, t) =
XX
kx
kx
kx
Maziar Hemati
ψ̂kx (t)ψ̂ky (t)ei(kx x+ky y)
ky
ûkx (t)ûky (t)ei(kx x+ky y)
ky
v̂kx (t)v̂ky (t)ei(kx x+ky y)
ky
N
N
[− 2y , 2y
[− N2x , N2x
where kx ⊆
− 1] ∈ N and ky ⊆
− 1] ∈ N. Such a representation guarantees the
doubly-periodic boundary conditions are satisfied due to the periodic nature of the Fourier basis
functions.
2.3
Time-Advancement of the Dynamical Equations
The governing equations are propagated forward in time in wave-number space using a low-storage
third-order Runge-Kutta algorithm (low-storage RK-3). This algorithm consists of performing a
Runge-Kutta integration on the nonlinear convective term, while performing an implicit CrankNicholson time integration on the linear diffusive term. In performing the low-storage RK-3, the
governing equations must first be transformed into their wave-number representations. Performing
a Fourier transform on (2.1) yields
∂ ω̂
= −ν(kx2 + ky2 )ω̂ − N̂
∂t
(2.8)
where N̂ represents the Fourier transform of the nonlinear convection term, which we assume is
known for this discussion. Computation of the nonlinear term will be addressed in detail in the
following section.
Equation (2.8) represents a nonlinear systems of ODEs which can be solved via a low-storage
RK-3 algorithm. Upon manipulation of implicit terms of the low-storage RK-3 algorithm, the flowfield at time n can be advanced forward to time n + 1 explicitly as follows
Step 1:
ω̂1 =
i
h
ω̂n − ∆t α1 ν(kx2 + ky2 )ω̂n + γ1 N̂n
1 + ∆tβ1 ν(kx2 + ky2 )
Step 2:
ω̂2 =
h
i
ω̂1 − ∆t α2 ν(kx2 + ky2 )ω̂1 + γ2 N̂1 + ρ1 N̂n
1 + ∆tβ2 ν(kx2 + ky2 )
Step 3:
ω̂n+1 =
h
i
ω̂2 − ∆t α3 ν(kx2 + ky2 )ω̂2 + γ3 N̂2 + ρ2 N̂1
1 + ∆tβ3 ν(kx2 + ky2 )
where the constants αi , βi , γi , and ρj are defined as
α1 = β1 =
4
8
, γ1 =
15
15
4 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
1
5
17
, γ2 =
, ρ1 = −
15
12
60
3
5
1
α3 = β3 = , γ3 = , ρ2 = − .
6
4
12
It is useful to note that the constants above can be redefined to absorb ∆t and ν where appropriate.
This leads to a lower computation count per iteration step.
α2 = β2 =
2.4
Pseudo-Spectral Computation of the Nonlinear Term
The above low-storage RK-3 algorithm assumes that the nonlinear convection term, N̂ , has already
been computed. Here, we demonstrate how this computation is performed pseudo-spectrally for
this study.
Thus far we have only made use of the vorticity transport equation (2.1) in formulating our numerical method. In order to compute the nonlinear term (u · ∇ω), we will need to make use of
the remaining governing equations. Since we already know ω (or equivalently ω̂), we first focus our
attention on determining u = (u, v).
The first step in doing this is to transform (2.2) into wave-number space
∇2 ψ = −ω ←→
ψ̂
= ω̂.
kx2 + ky2
Thus, we have an expression for ψ̂ in terms of ω̂, namely
ψ̂ = (kx2 + ky2 )ω̂
(2.9)
It is important to note that this solution is not valid for (kx , ky ) = (0, 0) since this corresponds to
a singularity in ω̂. Following the recommendation of Peyret, we set ψ̂(0, 0) = 0, which corresponds
to taking the mean of ψ equal to zero. [10]
Recalling (2.5), yields a relationship between ψ̂ and each velocity component
u(x, y) =
∂ψ
←→ û = iky ψ̂
∂y
(2.10)
and
∂ψ
←→ v̂ = −ikx ψ̂.
(2.11)
∂x
Now that we have expressions for û and v̂, we find an expression for ∇ω in wave-number space
v(x, y) = −
d
d
d = ∂ω êx + ∂ω êy = ikx ω̂êx + iky ω̂êy .
∇ω
∂x
∂y
(2.12)
Now, instead of computing N̂ = u\
· ∇ω by a convolution sum, we can compute it pseudo-spectrally
from equations (2.10), (2.11), and (2.12). That is,
5 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
d
1. Perform an inverse Fourier transform on û, v̂, and ∇ω.
∂ω
2. Multiply these according to N = u ∂ω
∂x + v ∂y in the physical domain.
3. Finally, transform the resulting N back into wave-number space to obtain the solution for N̂ .
2.5
Aliasing Removal via Zero-Padding and Truncation
Since the nonlinear term is computed pseudo-spectrally, we expect our result to be subject to
aliasing errors. As such, we will require a method of de-aliasing. Here we choose to use the “3/2rule.” This technique cleverly eliminates sources of aliasing error by padding the size-N data set
with N/2 zeros. Thus, instead of dealing with N data points, we deal with M = 3N/2 data points.
Since these additional data points are zeros, they do not introduce any new information to our data
set; however, they do serve to increase the “sampling rate” of our fft algorithm. So, every time a
Fourier transform is required, a zero-padded signal is input to the fft algorithm. Moreover, every
time we wish to transform back into the physical domain, an inverse fft is called and the data is
truncated to 2/3 (i.e. the data corresponding to the zero-padded elements is removed). Such an
operation increases the cost of the fft transform to (45/4)N log2 (3N/2). [1] In the limit of large N ,
the pseudo-spectral computation with aliasing removal proves to have a lower computational count
than performing the convolution sum directly.
6 of 20
MAE 250E
3
Vortex Merger: A Numerical Investigation
Maziar Hemati
Results and Discussion
Here we present the results of the Fourier-Galerkin spectral method and compare to experimental
and numerical results found in the literature.
3.1
Physics of Vortex Merger
When the separation distance between two equally signed vortices is sufficiently larger than the coresize of the pair, the large-scale non-viscous dynamics of the system can be described adequately
by a point-vortex approach. In such a model description, the two vortices of strength Γ remain
separated by a constant distance bo and rotate about each other at a constant angular rate
Ω=
Γ
πb2o
as in the case of point-vorticies with concentrated vorticity at each vorticity centroid.
In reality, this model’s validity deteriorates over time due to the growth of each vortex core
due to viscous diffusion. Eventually, any pair of same-signed vorticies of finite Reynolds number
(Re = Γ/ν) will merge, since the viscous growth of the cores will force the ratio a/b to approach
the critical merging value, (a/b)c ≈ 0.3. Once this critical value is exceeded, the two vortics rapidly
deform, eject arms of vorticity, and merge into a single vortex. [8]
3.2
Numerical Initialization
In the present numerical study, the initial vorticity distribution is prescribed to coincide with that
of two Gaussian vortices
2
X
Γ
(x − xi )2 + (y − yi )2
.
(3.1)
ω(x, y) =
exp −
πa2o
a2o
i=1
It is important to note that such an initialization may present numerical and model inaccuracies in
our spectral method. This is due to the net non-zero circulation in each computational box. Since
circulation is the dominant term in a multipole expansion, the non-zero circulation from each of
the surrounding boxes may influence the simulation of the vortex merger.
One method of dealing with this issue is to overlay a uniform vorticity field across the domain
such that the net circulation in each computational box is zero. This certainly prevents inaccuracies in terms of the numerics; however, the model problem is no longer identical to the one we wish
to analyze. As such, in the present study, we choose the core sizes and separation distances of the
two vortices to be small compared to the length of the computational box. This should be sufficient
in ignoring the circulation term in the multipole expansion, thus the influence of the neighboring
vortex pair should not introduce errors in the computation.
7 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
2.5
6
5
2
y−axis
4
1.5
3
2
1
1
0
0
1
2
3
x−axis
4
5
6
0.5
Figure 3: Initial vorticity field due two Gaussian vortices (ao /bo = 0.25).
3.3
Comparison to Numerical Results
Ferreira da Sousa et al. analyze the laminar vortex merger problem by solving the pressure-velocity
form of the Navier-Stokes equations. The momentum equations are spatially discretized on a staggered mesh by finite differences and all derivatives are evaluated with implicit fourth-order compact
finite-difference schemes. The fourth-order accurate Runge-Kutta scheme is used for temporal discretization in their study. At each time-step, an Alternate-Direction-Implicit (ADI) scheme is used
to solve the pressure poisson equation.
Unfortunately, a direct quantitative comparison is not possible here because Ferreira da Sousa
et al. do not report on their initial conditions. The only information provided regarding the initial
vorticity distribution is that it is one associated with two gaussian vortices. Since the ratio of core
radius to separation distance is not provided, a qualitative comparison will need to suffice.
Four snapshots of the computed vorticity field are shown in Figures 4–7 and discussed below.
Again, it is important to note that Ferreira da Sousa et al. did not report the initial conditions for
their study. As such, the initial conditions implemented in the two simulations are inconsistent,
thus only qualitative comparisons can be made.
Early Diffusive Stage (Figure 4) The influence of one vortex on the other is apparent in the
egg-shaped vorticity field associated with each vortex. Additionally, the vorticity of each
vortex has diffused outward to some extent, and the magnitude of the peak vorticity has
dropped in comparison to the initial conditions. Both methods demonstrate this behavior
consistently.
Late Diffusive Stage (Figure 5) The egg-shape of the two vorticity distributions has become
more prominent, and the vortices are drawn in towards one another. Moreover, the peak
vorticity has dropped since the Early Diffusive Stage. Again, both computational methods
demonstrate agreeing behavior.
8 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
1.6
6
1.4
5
y−axis
1.2
4
1
3
0.8
0.6
2
0.4
1
0
0.2
0
1
2
3
x−axis
4
5
6
0
(a) Re = 750
(b) Re = 1500
Figure 4: Early diffusive stage vorticity field comparison of (a) Fourier-Galerkin spectral
method to (b) finite-difference method of Ferreira da Sousa et al.
1.2
6
1
5
0.8
y−axis
4
3
0.6
2
0.4
1
0.2
0
0
1
2
3
x−axis
4
5
6
0
(a) Re = 750
(b) Re = 1500
Figure 5: Late diffusive stage vorticity field comparison of (a) Fourier-Galerkin spectral
method to (b) finite-difference method of Ferreira da Sousa et al.
Convective Stage (Figure 6) The topological characteristics of the vorticity contours has drastically changed by this point. In prior stages, there was no sharing of vorticity contours
between the two vortices. Now, however, several of the outer contours are shared between
the two vortices. This denotes the early stage of vorticity exchange and mixing between the
two vortices. Both computational methods give similar results, both in terms of the vorticity
contour topology and geometry.
Near-Merger Stage (Figure 7) As the vortices spiral into and about one another, the merging
process comes near its end. All of the vorticity contours, except those very close to the remaining distinct cores are shared by the resulting spiral vorticity distribution. This spiraling will
continue until the two distinct cores merge into a single peak vorticity point. Both computational schemes give similar topological characteristics here, but the geometrical characteristics
9 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
of the spiral are not quite as similar. This discrepancy is associated with the difference in
initial conditions and, perhaps slightly, due to the difference in Reynolds numbers.
0.9
6
0.8
5
y−axis
0.7
4
0.6
3
0.5
0.4
2
0.3
1
0
0.2
0
1
2
3
x−axis
4
5
6
0.1
(a) Re = 750
(b) Re = 1500
Figure 6: Convective stage vorticity field comparison of (a) Fourier-Galerkin spectral method to
(b) finite-difference method of Ferreira da Sousa et al.
0.6
6
0.55
5
0.5
0.45
4
y−axis
0.4
0.35
3
0.3
2
0.25
0.2
1
0.15
0
0
1
2
3
x−axis
4
5
6
0.1
(a) Re = 750
(b) Re = 1500
Figure 7: Near-merger stage vorticity field comparison of (a) Fourier-Galerkin spectral method
to (b) finite-difference method of Ferreira da Sousa et al.
The agreement between both computational methods at all four stages analyzed is enough to
validate the qualitative character of the Fourier-Galerkin spectral method for analyzing the vortex
merger problem, at least up to the point in which the finite-difference solution is accurate.
3.4
Comparison to Experimental Results
A qualitative validation of both numerical schemes can be accomplished by looking at the experimental results of Devenport et al. Though their results correspond to a three-dimensional vortex
10 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
merger process, they serve to validate the two-dimensional numerical solutions qualitatively due to
the fact that vortex merger is mainly a two-dimensional phenomenon. [8]
Figure 8: Schematic of the wind-tunnel test-section showing the 0.203m chord NACA 0012 halfwings and coordinate systems (Devenport et al. 1999).
The experimental results match the numerical results very nicely. Figure 9(a)–(c) can be compared
against Figures 4–7. Figure 9(d) can be compared to Figure 10.
11 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
Figure 9: Axial mean vorticity contours, ωc/U∞ (Devenport et al., 1999).
0.5
6
y−axis
0.4
4
0.3
0.2
2
0.1
0
0
2
4
x−axis
6
Figure 10: Post-merger vorticity field (Re=750).
12 of 20
MAE 250E
4
Vortex Merger: A Numerical Investigation
Maziar Hemati
Conclusions
The results of the Fourier-Galerkin spectral computation proved to yield qualitatively dependable
results. However, it is worth noting that this method may not be the “best” in terms of computational efficiency and accuracy. This is due to the necessity of keeping the relevant problem length
scales small compared to the computational box lengths. In computing more accurate solutions
(i.e. ones in which the neighboring circulations becomes negligible), the computational efficiency
must be sacrificed. The region of interest becomes a small fraction of the entire domain, implying
that there is a lot of “wasted effort” inherent in this method. Of course, for the purpose of this
paper, it has been shown that even with rather large problem length scales, the qualitative behavior
of the results still proves to be representative of those obtained by other methods and in experiments.
Though it has been stated several times that vortex merging is primarily a two-dimensional phenomenon, three-dimensional simulations are still necessary in analyzing real-world dynamics. The
finite length of trailing vortices, for example, will necessarily demonstrate different behavior than
what can be predicted in two-dimensional simulations. This is not to say that three-dimensional
merging does not undergo the same stages of the merging process; rather, three-dimensional dynamics are similar in this respect to their two-dimensional counterparts. However, there are many instabilities that have potential for arising in three-dimensions which are not possible in two-dimensions.
Additionally, different orientations of the vorticity patches will also yield different behavior than
anything that can be analyzed in two-dimensional simulations.
In making an extension to three-dimensional simulations, the present numerical methods must
be extended to incorporate non-periodic boundary conditions in at least one coordinate direction.
Additionally, it may be beneficial to leave period boundary conditions behind completely, and to
use non-periodic boundary conditions in all three directions in order to improve computational
efficiency. As previously mentioned, periodic boundary conditions necessitate small problem length
scales relative to the computation domain’s length scales, thus resulting in “wasted effort.” It would
be wise to approach this problem via non-periodic boundary conditions in the future for this reason
alone.
13 of 20
MAE 250E
5
5.1
Vortex Merger: A Numerical Investigation
Maziar Hemati
Appendix: Matlab m-files
main.m
clear all;
for ree = [750 3000 30000];
for d00 = 0.15./[0.21 0.25];
tic;
% Define all problem parameters
Lx = 2*pi;
Ly = 2*pi;
Nx = 128;
Ny = 128;
Nt = 3e4;
Nt0 = 1;
Nstore = 5e1;
dt = 1e-2;
Nt = 1.2e4;
re = ree;
nu = 1/re;
config = strcat(’Re’,num2str(re),’Nx’,num2str(Nx),’Ny’,num2str(Ny), ...
’dt’,num2str(dt),’Nt’,num2str(Nt),’D’,num2str(d00));
% Compute all dependent parameters
compParams;
% Initialize Wave-Space
initWaveSpace;
% Initial Conditions
initVorticity;
% Transform Initial Conditions to Wave-Space Representation
%
AND Set Odd-Ball Wave-Numbers to Zero
what0 = fft2(w0)/Ngrid;
what0(0.5*Nx+1,:) = 0;
what0(:,0.5*Ny+1) = 0;
%==========================================================================
% Begin Low-Storage RK-3 Routine
alf1 = 4/15*nu*dt;
alf2 = 1/15*nu*dt;
alf3 = 1/6*nu*dt;
bet1 = alf1;
14 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
bet2
bet3
gam1
gam2
gam3
rho1
rho2
=
=
=
=
=
=
=
Maziar Hemati
alf2;
alf3;
8/15*dt;
5/12*dt;
3/4*dt;
-17/60*dt;
-5/12*dt;
what1 = zeros(Nx,Ny);
save(strcat(config,’_000000.mat’),’x’,’y’,’w0’)
for tt = Nt0:Nt
% Step 1
what32 = zeropad(what0,Nx,Ny,Nx32,Ny32,1);
Bhat032 = getBhat(what32,kx32,ky32,Nx32,Ny32,Ngrid32);
Bhat0
= zeropad(Bhat032,Nx,Ny,Nx32,Ny32,0);
for ii = 1:Nx
for jj = 1:Ny
k2 = (kx(ii)^2+ky(jj)^2);
what1(ii,jj) = ((1-alf1*k2)*what0(ii,jj) ...
-gam1*Bhat0(ii,jj))/(1+bet1*k2);
end
end
% Step 2
what32 = zeropad(what1,Nx,Ny,Nx32,Ny32,1);
Bhat032 = getBhat(what32,kx32,ky32,Nx32,Ny32,Ngrid32);
Bhat1
= zeropad(Bhat032,Nx,Ny,Nx32,Ny32,0);
for ii = 1:Nx
for jj = 1:Ny
k2 = (kx(ii)^2+ky(jj)^2);
what0(ii,jj) = ((1-alf2*k2)*what1(ii,jj) ...
-gam2*Bhat1(ii,jj)-rho1*Bhat0(ii,jj))/(1+bet2*k2);
end
end
% Step 3
what32 = zeropad(what0,Nx,Ny,Nx32,Ny32,1);
Bhat032 = getBhat(what32,kx32,ky32,Nx32,Ny32,Ngrid32);
Bhat0
= zeropad(Bhat032,Nx,Ny,Nx32,Ny32,0);
for ii = 1:Nx
15 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
for jj = 1:Ny
k2 = (kx(ii)^2+ky(jj)^2);
what1(ii,jj) = ((1-alf3*k2)*what0(ii,jj) ...
-gam3*Bhat0(ii,jj)-rho2*Bhat1(ii,jj))/(1+bet3*k2);
end
end
w0 = real(ifft2(what1))*Ngrid;
what0 = what1;
if ~mod(tt,10)
disp([num2str(tt)])
end
if ~mod(tt,Nstore)
fileSaver;
end
end
toc;
end
end
%==========================================================================
5.2
getBhat.m
function [Bhat] = getBhat(what,kx,ky,Nx32,Ny32,Ngrid32)
%##########################################################################
%
% This function computes the nonlinear term in wave space, given the
% following zero-padded data:
%
%
what: Vorticity matrix in wave-space
%
kx: x-wave-number array
%
ky: y-wave-number
%
Nx32: Size of zero-padding in x-direction
%
Ny32: Size of zero-padding in y-direction
%
Ngrid32: Product of Nx32*Ny32
%
%
Bhat: Wave-space representation of the nonlinear term
%
% Reference: Peyret Ch. 6.2 and Ch. 5.2
%
%##########################################################################
16 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
%==========================================================================
% Step 1: Solve for \hat{Psi} from Laplacian(Psi) = -w.
%
%
\hat{Psi} = k^2*\hat{omega}
%
%
Note: As recommended in Ch. 6.3 of Peyret, set PSI(1,1) = 0,
%
thus taking the mean-value of PSI to be zero.
%
%==========================================================================
psihat = zeros(Nx32,Ny32);
for ii = 1:Nx32
kx2 = kx(ii)^2;
for jj = 1:Ny32
if ii==1 && jj==1
continue
else
psihat(ii,jj) = what(ii,jj)/(kx2+ky(jj)^2);
end
end
end
psihat(1,1) = 0;
%==========================================================================
% Step 2: Solve for u(x,y) and v(x,y) from definition of Psi.
%
%
u(x,y) = dPsi/dy --> \hat{u} = i(k_y)\hat{Psi}
%
v(x,y) = -dPsi/dx --> \hat{v} = i(k_x}\hat{Psi}
%
%==========================================================================
uhat = zeros(Nx32,Ny32);
kxT = transpose(kx);
for ii = 1:Nx32
uhat(ii,:) = i*ky.*psihat(ii,:);
end
vhat = zeros(Nx32,Ny32);
for jj = 1:Ny32
vhat(:,jj) = -i*kxT.*psihat(:,jj);
end
%==========================================================================
% Step 3: Compute \hat{\nabla\omega}
%
%
dw/dx --> \hat{dw/dx} = i(k_x)what
%
dw/dy --> \hat{dw/dy} = i(k_y)what
%
17 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
%
This step is required before pseudo-spectral computation of the
%
nonlinear term (Bhat) can commence.
%
%==========================================================================
dwdxhat = zeros(Nx32,Ny32);
for jj = 1:Ny32
dwdxhat(:,jj) = i*kxT.*what(:,jj);
end
dwdyhat = zeros(Nx32,Ny32);
for ii = 1:Nx32
dwdyhat(ii,:) = i*ky.*what(ii,:);
end
%==========================================================================
% Step 4: Perform pseudo-spectral calculation of nonlinear term (Bhat).
%
%==========================================================================
%-------------------------------------------------------------% Step 4a: Transform into physical space.
%
%
uhat
--> u(x,y)
%
vhat
--> v(x,y)
%
dwdxhat --> dwdx(x,y)
%
dwdyhat --> dwdy(x,y)
%
%-------------------------------------------------------------u
= ifft2(uhat)*Ngrid32;
v
= ifft2(vhat)*Ngrid32;
dwdx = ifft2(dwdxhat)*Ngrid32;
dwdy = ifft2(dwdyhat)*Ngrid32;
%-------------------------------------------------------------% Step 4b: Compute B(V,w).
%
%
Bhat --> B = V.*grad(w)
%
%-------------------------------------------------------------B = u.*dwdx + v.*dwdy;
%-------------------------------------------------------------% Step 4c: Transform back into wave space to obtain Bhat
%
%
B --> Bhat
%
18 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
%-------------------------------------------------------------Bhat = fft2(B)/Ngrid32;
5.3
zeropad.m
function whatNew = zeropad(what,Nx,Ny,Nx32,Ny32,pad)
% what: Initial data
%
Nx:
%
Ny:
% Nx32:
% Ny32:
% pad: 1 = zero-pad, else = un-zero-pad
if pad
whatNew =
whatNew =
whatNew =
Nx32-Nx)
whatNew =
else
whatNew =
whatNew =
whatNew =
whatNew =
end
[what(:,1:Ny/2) zeros(size(what,1),Ny32-Ny) what(:,Ny/2+1:Ny)];
whatNew’;
[whatNew(:,1:Nx/2) zeros(size(whatNew,1), ...
whatNew(:,Nx/2+1:Nx)];
whatNew’;
[what(:,1:Ny/2) what(:,Ny32-Ny/2+1:Ny32)];
whatNew’;
[whatNew(:,1:Nx/2) whatNew(:,Nx32-Nx/2+1:Nx32)];
whatNew’;
19 of 20
MAE 250E
Vortex Merger: A Numerical Investigation
Maziar Hemati
References
[1] C. Canuto, M.Y. Hussaini, A. Quateroni, and T.A. Zang. Spectral Methods: Fundamentals in
Single Domains. Springer-Verlag, 2006.
[2] A.J. Chorin. Vorticity and Turbulence. Springer-Verlag, 1994.
[3] P.J.S.A. Ferreira da Sousa and J.C.F. Pereira. Reynolds number dependence of two-dimensional
laminar co-rotating vortex merging. Theoret. Comput. Fluid Dynamics, 19:65–75, 2005.
[4] W.J. Devenport, C.M. Vogel, and J.S. Zsoldos. Flow structure produced by the interaction
and merger of a pair of co-rotating wing-tip vortices. J. Fluid Mech., 394:357–377, 1999.
[5] Ch. Josserand and M. Rossi. The merging of two co-rotating vortices: a numerical study. Euro.
J. Mech. B/Fluids, 26:779–794, 2007.
[6] W.H. Matthaeus, W.T. Stribling, D. Martines, S. Oughton, and D. Montgomery. Decaying,
two-dimensional, navier-stokes turbulence at very long times. Physica D, 51:531–538, 1991.
[7] M.V. Melander, N.J. Zabusky, and J.C. McWilliams. Symmetric vortex merger in two dimensions: causes and conditions. J. Fluid Mech., 195:303–340, 1988.
[8] P. Meunier, S. Le Dizes, and T. Leweke. Physics of vortex merging. C.R. Physique, 6:431–450,
2005.
[9] P. Orlandi. Two-dimensional and three-dimensional direct numerical simulation of co-rotating
vortices. Physics of Fluids, 19(013101):1–18, 2007.
[10] R. Peyret. Spectral Methods for Incompressible Viscous Flow. Springer-Verlag, 2002.
[11] L.N. Trefethen. Spectral Methods in Matlab. SIAM, 2000.
20 of 20