Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Eur. Phys. J.

Plus (2012) 127: 39


DOI 10.1140/epjp/i2012-12039-5
THE EUROPEAN
PHYSICAL JOURNAL PLUS
Regular Article

A formulation to compute mass-consistent models


of hydrodynamic flows
M.A. Núñeza and J.E. Sánchez-Sánchez
Departamento de Fı́sica, Universidad Autónoma Metropolitana Iztapalapa, A. P. 55-534, C.P. 09340, D. F., Mexico

Received: 19 December 2011 / Revised: 6 March 2012


Published online: 10 April 2012 – 
c Società Italiana di Fisica / Springer-Verlag 2012

Abstract. Standard interpolation methods of measured data of an incompressible fluid yield a non-
solenoidal field v0 . A formulation to estimate a solenoidal field from v0 , is proposed. Variational calculus
reduces the problem to the solution of an elliptic equation for a Lagrange multiplier. Examples illustrate
how boundary conditions improve the mass-balance of velocity fields obtained in meteorology with similar
approaches. The elliptic equation is separable in meteorological problems over a complex orography. This
allows the use of fast-Poisson solvers. It is shown how the flow-rate can be used to define a low-pass filter
which improves the results given by the Fast Fourier Algorithm.

1 Introduction
The knowledge of meteorological fields is required in several areas such as air quality modeling [1,2], climate analysis [2]
or weather prediction [3,4]. Among these fields, a mass-consistent wind field is key for budget studies of all kinds [5,6].
There are several approaches to estimate the wind field going from interpolation to the numerical solution of primitive
equations [1,2]. Variational mass-consistent models (VMCM’s) of the wind field are intermediate in sophistication since
they attempt to satisfy the continuity equation from interpolated wind data. Reviews of these models are available
in [7–9]. Several studies give evidence that VMCM’s are suitable for estimating transport and dispersion of atmospheric
pollutants, among other applications [9–13]. The simplicity of these models has motivated its use in several studies
which include air quality studies [7–9], wind maps or wind energy conversion [14,15]. In this work, a formulation to
compute VMCM’s of hydrodynamic flows in meteorology and other areas such as oceanography or experimental fluid
mechanics, is given.
According to Sasaki’s proposal [16], a VMCM v satisfies the equation ∇ · v = 0 and is closer to an observed wind
field v0 with respect to a distance between vector fields. Variational calculus yields the boundary condition (BC)
λδv · n = 0 which has to be satisfied on the boundary Γ of the region of interest, where λ is a Lagrange multiplier,
δv the first variation of the velocity and n the outward unit normal to Γ [7–9]. As either λ or δv · n must be zero
on Γ , the following BC’s have been used by almost all authors: λ = 0 on open or “flow-through” boundaries, and
∂λ/∂n = 0 for closed or “no-flow-through” boundaries [6–9,17–22]. The condition ∂λ/∂n = 0 on solid boundaries is
in general inconsistent [23], some models based on conformal coordinates replace it by v · n = −v0 · n [24–29]. In this
work BC n · v = n · U0 is used on the whole boundary Γ , where U0 is obtained from v0 by integration of the equation
∇ · U0 = 0. The results of this work and refs. [30,31], show that such a BC improves the mass-balance of velocity
fields obtained with BC λ = 0.
˜
In sect. 2, we give the standard formulation of VMCM’s and our proposal. The former uses a functional J(ṽ) defined
in physical space xyz. In regions where the terrain varies substantially, the problem is worked in computational space
xyσ where σ is a terrain-following coordinate [7]. In this work we use a functional J(v) defined directly in space xyσ.
In general, different functionals J,˜ J, yield different VMCM’s. The field U0 is a limiting case of VMCM’s given by a
general functional J˜ [30,31]. In sect. 3, we see that a similar result holds with the field v given by our formulation,
which is suitable to get VMCM’s of velocity fields in oceanography or experimental fluid mechanics as well [32,33].
Sections 4 to 7 are devoted to the estimation of VMCM’s of interest in meteorology. The simplicity of functional
J(v) in meteorological problems, yields a separable elliptic problem which allows us to apply the so-called fast solvers
for the Poisson equation [34,35], which include the fast Fourier transform (FFT) algorithm. A semi-spectral solution
a
e-mail: manp@xanum.uam.mx
Page 2 of 20 Eur. Phys. J. Plus (2012) 127: 39

is used to report some examples in sect. 4. A complete spectral approximation vmnl is given in sect. 5 and it is shown
that its divergence ∇ · vmnl is determined only by a Fourier series whose coefficients do not depend on free parameters
in J(v).
Functional J(v) in space xyσ was employed by other authors [24,22], but they used BC λ = 0 and solved the
elliptic problem with finite-difference schemes and the SOR method, instead of using eigenfunction expansions. The
results reported in sect. 6 and refs. [30,31] show that BC λ = 0 yields a numerical field vn whose divergence ∇ · vn
has wrong pointwise convergence as vn tends to its correct limit in norm. The flux-rate of a field vn is insensitive to
these problems since the convergence in norm guarantees that the flux-rate tends to 0 as well. This is illustrated by
the results of sect. 6.
In general, Fourier coefficients have to be estimated by means of the FFT algorithm. In sect. 7 we show that the
coefficients corresponding to high frequencies must be eliminated because of its intrinsic error. To the best of our
knowledge, the role of filtering has not been considered in previous works. This can be attributed to the fact that
standard VMCM’s cannot be obtained in terms of eigenfunction expansions. The results of sect. 7 show that our
approach permits to define an efficient low-pass filter with the aid of the flux-criterion. Section 8 is devoted to some
concluding remarks.

2 Standard and proposed formulations


Consider a bounded region Ω with boundary Γ in a Cartesian system x = x1 , y = x2 , z = x3 . The standard
formulation to get a VMCM from an initial field v0 in Ω, is as follows. For a given symmetric and positive definite
matrix S = {Sij }, find the field ṽ that minimizes functional

˜
J(ṽ) = (ṽ − v0 ) · S(ṽ − v0 )dΩ, (2.1a)
Ω

subject to the constraint


∇ · ṽ = 0 in Ω (2.1b)
and the boundary condition (BC)
n · ṽ = n · vT on ΓN , (2.1c)
where n is the outward unit normal to Γ , vT denotes the true velocity field and ΓN denotes the part of Γ where vT · n
is known. In ref. [6] it is shown that the field ṽ is given by
ṽ = v0 + S−1 ∇λ, (2.1d)
where λ has to satisfy the Dirichlet boundary condition
λ=0 on ΓD ≡ Γ \ ΓN . (2.1e)
The standard procedure to simplify the boundary conditions imposed by the earth surface, consists in using a suitable
coordinate system σ j defined by a set of transformation equations
xi = xi (σ j ). (2.2)
σ , ΓN σ , ΓDσ , be the image of Ω,
In this case, ṽ and λ̃ are obtained as follows, for details see, e.g., ref. [6]. Let Ω
j √
ΓN , ΓD , under the inverse transformation σ = σ (x ) and let Jij = ∂x /∂σ , g = det(J). Abusing of notation, ṽ,
j j i i

v0 , are column vectors defined by Cartesian components ṽ j , v 0j , of ṽ, v0 , and ṽη , v0η , are column vectors defined
by the corresponding contravariant components ṽ i , v 0i . Thus the contravariant transformation law ṽ i = (∂xi /∂σ j )ṽ j
(repeated indices indicate summation) has the form ṽ = Jṽη and eq. (2.1a) takes the form

˜ √ 
J(ṽ) = (ṽη −v0η ) · M(ṽη −v0η ) gdΩ σ, with M ≡ Jt SJ. (2.3a)

Ω

The constraints (2.1b), (2.1c), have the form


σ ,
∇ · ṽη = g −1/2 ∇σ · g 1/2 ṽη = 0 in Ω η
nσ · ṽη = nσ · vT on ΓN σ , (2.3b)
where ∇σ is the column vector whose components are the partial derivatives ∂σj , and nσ is the outward unit normal
to ΓN σ . The field that minimizes functional (2.3a) subject to constraints (2.3b) is

ṽη = v0η + M−1 ∇σ λ̃, (2.4)


Eur. Phys. J. Plus (2012) 127: 39 Page 3 of 20

where λ̃ is solution of elliptic equation


√ σ √
Lσ λ̃ = g∇ · v0 in Ω with Lσ ≡ −∇σ · gM−1 ∇σ , (2.5a)

subject to the Neumann boundary condition (NBC)


η
Lσ λ̃ = nσ · (vT −v0η ) on ΓN σ with Lσ ≡ −∇σ · M−1 ∇σ , (2.5b)

and Dirichlet boundary condition (DBC)


λ̃ = 0 on ΓDσ . (2.5c)
The most common BC’s used in meteorology are λ̃ = 0 for flow-through boundaries and Lσ λ̃ = −nσ ·v0η or ∂λ/∂n = 0
for impenetrable boundaries such as the earth surface [6–29], although the last NBC is inconsistent in general [23].
The formulation proposed in this work to compute VMCM’s, is based on two main ideas. i) Since functional
˜ (2.3a) is only a means to obtain a field ṽ that satisfies constraints (2.1b), (2.1c), we use a functional that leads to
J(·)
a boundary value problem (BVP) which is simpler than BVP (2.5). In sects. 4-7 we use this approach to get a BVP
that is separable in problems of meteorological interest and reduces the computational problem to the estimation of
Fourier series with the FFT algorithm. ii) The replacement of DBC (2.1e) by a NBC. In this section, we see that the
NBC is easily obtained from the initial field v0 and afterwards, examples reported in sect. 6 will show how this NBC
improves the mass-balance.
Consider a bounded region Ωσ in computational space σ 1 σ 2 σ 3 , with boundary Γσ . Let Γ be the image of Γσ given
by eq. (2.2). If n · vT is known on the whole boundary Γ , it is natural to consider the estimation of a velocity field
with the physical constraint
n · v = n · vT on the whole boundary Γ. (2.6)
This leads to the following.

Formulation 1. Find the field v whose contravariant form vη minimizes the functional

J(vη ) = (vη −v0η ) · S(vη −v0η )dΩσ (2.7)
Ωσ

subject to the constraints ∇ · v = 0, (2.6), where S is the matrix in (2.1a). In the appendix it is shown that vη is
unique and given by √
vη = v0η + gS−1 ∇σ λ. (2.8)
The constraints imply that λ is solution of problem
√ η
Lλ = g∇ · v0 in Ωσ , Lλ = nσ · (vT −v0η ) on Γσ , (2.9a)

where we set √
L ≡ −∇σ · gS−1 ∇σ , L = nσ · gS−1 ∇σ . (2.9b)
To see a difference between problems (2.5) and (2.9) consider the coordinates

σ 1 = x, σ 2 = y, σ 3 ≡ σ = σ(x, y, z) or z = z(x, y, σ). (2.10a)

These yield ⎛ ⎞ ⎛ ⎞
1 0 0 1 0 0
J = ⎝ 0 1 0 ⎠, J−1 =⎝ 0 1 0 ⎠, (2.10b)
zx zy zσ −zx /zσ −zy /zσ 1/zσ
where the notation zξ = ∂ξ z was used. In meteorology we can use

σ = z − h(x, y) with g = 1, (2.11)

where h(x, y) denotes the terrain elevation with respect to the xy plane. The coordinate

σ = (z − h)/(H − h) with g = H − h, (2.12)

and H independent of σ, can be used in both meteorology and oceanography. The most common form of S in
meteorology is a diagonal matrix S = {δij Sj } with constant elements Sj [6–29]. This matrix and the coordinate
σ (2.11) yield a BVP (2.5) with operator Lσ = −S1−1 ∂x (∂x − hx ∂σ ) − . . . whose coefficients include terrain derivatives
Page 4 of 20 Eur. Phys. J. Plus (2012) 127: 39

hx , hy . In contrast, the operator L (2.9b) has constant coefficients. In this work, we use this fact to get an explicit
spectral solution of BVP (2.9) for problems of meteorological interest.
To get a practical form of BVP (2.9) let us assume that the coordinate σ in (2.10a) has the form (2.11) or (2.12),

so that the Jacobian g is independent of σ and

σ(x, y, z) = 0 holds for z = h(x, y). (2.13)

Furthermore, we shall consider BVP (2.9) in the domain

Ωσ = Ωxy × (0, σM ), Ωxy = (0, xM ) × (0, yM ). (2.14)

To simplify the notation, ϕ | φξ1 ξ2 ... will be the integral of ϕφ with variables of integration ξ 1 , ξ 2 , . . . , e.g.,
 σM    σM
ϕ | φσ = ϕφdσ, ϕ | φxy = ϕφdxdy, ϕ | φxyσ = ϕφdxdydσ. (2.15)
0 Ωxy Ωxy 0

These integrals are inner products of spaces L2 (0, σM ), L2 (Ωxy ), L2 (Ωσ ), associated to BVP (2.9).
Since BC (2.6) is, in general, unknown on the whole boundary Γσ , it has to be estimated by means of a known
field v∗ which has to satisfy an integrability condition. To get this condition consider the following problem:

Lλ = g∇ · v0 in Ωσ , Lλ = nσ · (v∗η −v0η ) on Γσ . (2.16a)

Multiplying the elliptic equation by an arbitrary function φ and integrating by parts one sees that λ has to satisfy the
equation

 −1 √ √
gS ∇λ | ∇φ xyσ = g∇ · v | φ xyσ +
0
gφnσ · v∗η −v0 dsσ for “all” φ. (2.16b)
Γσ

Using φ = 1 and Gauss-divergence theorem, eq. (2.16b) takes the form


v∗ · nds = 0. (2.16c)
Γ

This condition is necessary but also sufficient to guarantee that there exists a unique λ (module an additive constant)
that satisfies the so-called weak form (2.16b) of BVP (2.16a) [36]. By hypothesis, the true field vT satisfies ∇ · vT = 0
which in turn implies (2.16c), so that BVP (2.9) is a well-posed problem.
A simple field satisfying (2.16c) is obtained as follows. In meteorology and oceanography the vertical velocity is
not measured by operational networks, so that the interpolation of data with standard methods will yield an initial
field of the form
v0 = u0 i + v 0 j. (2.17a)
This yields the simplest mass-consistent field
U0 = v0 + w0 k, (2.17b)
0
where the vertical velocity w is determined by the problem

∇ · U0 = 0 in Ω subject to U0 · n = 0 on σ = 0, (2.17c)

where we assumed that σ satisfies (2.13). Using U0η = J−1 U0 (eq. (2.10b)) we get
 σ
√ √
w (x, y, σ) = zx u (x, y, σ) + zy v (x, y, σ) −
0 0 0
(∂x gu0 + ∂y gv 0 )dσ  . (2.17d)
0

Equation ∇ · U0 = 0 implies that U0 satisfies (2.16c). This yields the following way to compute a mass-consistent
velocity field.

Formulation 2. Find the field v whose contravariant form vη minimizes J(vη ) (2.7) and satisfies the constraints

∇ · vη = 0 in Ωσ , n · v = n · U0 on Γ. (2.18)

In the appendix it is shown that vη has the form (2.8), replacing it into (2.18) one gets the problem

Lλ = g∇ · v0 in Ωσ , Lλ = nσ · (U0η −v0η ) on Γσ , (2.19)
Eur. Phys. J. Plus (2012) 127: 39 Page 5 of 20

with L and L given by (2.9b). The field in physical space xyz is



v = Jvη = v0 + gJS−1 ∇σ λ. (2.20)
BVP (2.19) constitutes a practical version of BVP (2.9) to compute mass-consistent models of hydrodynamic flows.
The field vT can be replaced by other fields in BC (2.9a), but one should be cautious since undesirable results can be
obtained with some fields v∗ [31].
In order to get a spectral solution of BVP (2.20) we consider a positive definite matrix of the form
⎛ ⎞
S1 (x, y) S12 (x, y) 0
⎜ ⎟
S = ⎝S12 (x, y) S2 (x, y) 0 ⎠ . (2.21)
0 0 S3
In terms of matrices      
S1 S12 ac ∂x
Sr = , S−1
r ≡ , ∇xy = ,
S12 S2 cb ∂y
and operators Lx = a∂x + c∂y , Ly = c∂x + b∂y , the operator L (2.9b) takes the form

L = −∂x gLx − ∂y gLy − gS3−1 ∂σ2 = g Lxy − S3−1 ∂σ2 , (2.22a)
where we set
Lxy ≡ −g −1 (∂x gLx + ∂y gLy ) = −g −1 ∇xy · gS−1
r ∇xy . (2.22b)
Thus, the elliptic equation (2.19) takes the form

Lxy − S3−1 ∂σ2 λ = g −1 F in Ωσ , with F ≡ g∇ · v0 . (2.23a)

Using U0η −v0η = J−1 (w0 k), (2.10b), the boundary condition (2.19) leads to
Lx λ|x=0,xM = Ly λ|y=0,yM = 0, ∂σ λ|σ=0 = S3 g −1 w00 , ∂σ λ|σ=σM = S3 g −1 wM
0
, (2.23b)

where the vertical velocity w0 (x, y, σ) (2.17d) was used and we set
w00 ≡ w0 (x, y, 0), 0
wM ≡ w0 (x, y, σM ). (2.23c)

3 Semi-spectral solution of BVP (2.23) and the limit S3 → 0


In this section, we report a spectral solution of BVP (2.23), which allows us to get an explicit measure of the accuracy
with which the corresponding velocity field satisfies ∇ · v = 0 (Result 1). In general, boundary value problems (2.5)
and (2.19) will yield different velocity fields ṽ (2.1d) and v (2.21). The questions is, then, how different are these
fields? A partial answer is given in this section. In refs. [30,31] we saw that ṽ tends to U0 as S3 → 0, for a matrix
S (2.21). In this section we shall see that a similar result holds for v given by BVP (2.23). Thus we get a similarity
result between ṽ and v for small S3 .
The spectral solution reported in this section, is obtained in terms of eigenfunctions of operator Lxy (2.22). Let
L2g (Ωxy ) be the Hilbert space endowed with the weighted inner product ϕ | φg,xy ≡ g · ϕ | φxy , where · | ·xy is

the inner product of L2 (Ωxy ) (eq. (2.15)). We assume that the Jacobian g from (2.10a), is independent of σ. Since
the relation ϕ | Lxy φg,xy = Lxy ϕ | φg,xy holds for ϕ, φ, that satisfy BC’s (2.23b) on x = 0, xM , y = 0, yM , Lxy is
symmetric in L2g (Ωxy ) and the problem

Lxy φij = Eij φij in Ωxy , subject to Lx φij x=0,xM = Ly φij y=0,yM = 0, (3.1a)

has a discrete set of eigenvalues Eij with finite multiplicity and the (orthonormalized) eigenfunctions φij constitute a
basis of L2g (Ωxy ) [36]. The lowest eigenvalue and its normalized eigenfunction are

Eij=0 = 0, φij=0 = 1 | 1−1/2


g,xy , (3.1b)

for ij > 0 we have Eij > 0. The projection of g −1 Q on the space generated by the set {φij }mn 2
ij=0 in Lg (Ωxy ), is denoted
by

mn

−1
Qmn ≡ Pmn (g Q) = Qij φij with Qij = g −1 Q | φij g,xy = Q | φij xy , (3.2)
ij=0
Page 6 of 20 Eur. Phys. J. Plus (2012) 127: 39

Following the Ritz method, BVP (2.23) is replaced by problem


 
Lxy + S3−1 (−∂σ2 ) λmn = Fmn , ∂σ λmn |σ=0 = S3 w0mn
0
, ∂σ λmn |σ=σM = S3 wM
0
mn , (3.3)

with

mn
−1
Fmn = Pmn (g F) = Fij φij , Fij = F | φij xy ,
ij=0

mn

0
w0mn = Pmn (g −1 w00 ) = 0
w0ij φ, 0
w0ij = w00 | φij xy , (3.4)
ij=0

mn
 0
−1 0
ij = wM | φij xy .
0 0 0
wM mn = Pmn (g wM ) = wM ij φij , wM
ij=0

In order to get a problem with homogeneous boundary conditions at σ = 0, σM , we introduce the functions
0
C = wM − w00 /σM , q = w00 σ + σ 2 C/2, (3.5a)

whose projections are

0 
mn
0
Cmn = Pmn (g −1 C) = wM mn − w0mn /σM =
0
Cij φij , Cij = wM ij − w0ij /σM ,
0

ij

mn (3.5b)
−1 0 2 0
qmn = Pmn (g q) = w0mn σ + Cmn σ /2 = qij φij , qij = w0ij σ + Cij σ 2 /2.
ij=0

Replacing the decomposition


λmn = S3 (ψmn + qmn ) (3.6)
into eq. (3.3) and using ∂σ qmn |σ=0 = 0
w0mn , ∂σ qmn |σ=σM = 0
wM mn , one gets the problem

Aψmn = −Fmn − Aqmn with ∂σ ψmn = 0 at σ = 0, σM , (3.7)

where we set A = ∂σ2 − S3 Lxy = −S3 [Lxy + S3−1 (−∂σ2 )]. Replacing the series


mn
ψmn = ψij (σ)φij (x, y) (3.8)
ij=0

into (3.7) and using (3.1a), one arrives to the problem

Aij ψij = −Fij − Cij + S3 Eij qij with ψ̇ij = 0 at σ = 0, σM , for all ij, (3.9a)

where we set Aij = ∂σ2 − S3 Eij and the notation ψ̇ij = ∂σ ψij was used. The decomposition
FC q
ψij = ψij + ψij (3.9b)

is computed by solving the following problems:


FC
Aij ψij = −Fij − Cij with FC
ψ̇ij =0 at σ = 0, σM , (3.9c)
q q
Aij ψij = S3 Eij qij with ψ̇ij =0 at σ = 0, σM . (3.9d)
q
a) For ij = 0 we have Eij = 0, ψij = 0. Integrating ∂σ2 ψij = −Fij − Cij and using relation (A.5) in the appendix, one
gets 
0
ψ̇ij = wij (σ) − q̇ij (σ), with wij0
(σ) ≡ w0 (x, y, σ) | φij xy , (3.10a)
0
where the relation q̇ij (σ) = w0ij + σCij (3.5b) was used. Hence we get

0
λ̇ij = S3 (ψ̇ij + q̇ij ) = S3 wij (σ). (3.10b)
Eur. Phys. J. Plus (2012) 127: 39 Page 7 of 20

b) For ij > 0 we have Eij > 0. This implies that operator −Aij = −∂σ2 + S3 Eij is positive definite in L2 (0, σM ) with
the inner product ϕ | φσ (2.15). In fact, integration by parts yields
−Aij ϕ | ϕσ = ϕ̇ | ϕ̇σ + S3 Eij ϕ | ϕσ ≥ S3 Eij ϕ | ϕσ > 0,
for ϕ
= 0 that satisfies ϕ̇ = 0 at σ = 0, σM . Hence, the solution of problems (3.9c), (3.9d), is unique. Using the
corresponding Green’s function [37] one gets
  σM  σ 
q −1
ψij = −W S3 Eij ϕ0 qij (s)ϕ1 (s)ds + ϕ1 qij (s)ϕ0 (s)ds , (3.11)
σ 0
  σM  σ 
q
ψ̇ij = −W −1 S3 Eij ϕ̇0 qij (s)ϕ1 (s)ds + ϕ̇1 qij (s)ϕ0 (s)ds ,
σ 0

where ϕ0 = cosh(rσ), ϕ1 = cosh(rσ − rσM ), r = S3 Eij , W = r sinh(rσM ). For ψij FC
we have
  σM  σ 
FC
ψij = W −1 ϕ0 fij (s)ϕ1 (s)ds + ϕ1 fij (s)ϕ0 (s)ds , (3.12)
σ 0
  σM  σ 
FC −1
ψ̇ij =W ϕ̇0 fij (s)ϕ1 (s)ds + ϕ̇1 fij (s)ϕ0 (s)ds ,
σ 0
mn q
with fij ≡ Fij + Cij . Thus we get λmn = ij=0 λij φij , λij = FC
S3 (ψij + ψij + qij ), and

mn
 FC q 
∇xy λmn = S3 ψij + ψij + qij ∇xy φij , (3.13a)
ij>0
mn 
 
 0 
S3−1 ∂σ λmn = wij (σ)φij ij=0 + FC
ψ̇ij q
+ ψ̇ij + q̇ij φij , (3.13b)
ij>0

0
with q̇ij = w0ij + Cij σ. According to eq. (2.8), λmn yields the velocity field

η
vmn = v0η + gS−1 ∇σ λmn , (3.14a)
which has the components
 η   0
umn u √ √
η = + gS−1
r ∇xy λmn ,
η
wmn = v 0η3 + gS3−1 ∂σ λmn . (3.14b)
vmn v0
The corresponding field and its components in physical space xyz are given by

vmn = v0 + gJS−1 ∇σ λmn , (3.15a)
   0
umn u √
= + gS−1 r ∇xy λmn , (3.15b)
vmn v0
√ √
wmn = g[(zx a + zy c)∂x λmn + (zx c + zy b)∂y λmn + gS3−1 ∂σ λmn ]. (3.15c)
Since coefficients λij of λmn are given exactly by eqs. (3.5b), (3.11) and (3.12), we say that λmn is a semi-spectral
solution of BVP (2.23). In practical situations the integrals (3.12) cannot be computed exactly, in this case we can
use the spectral solution of problem (3.9c) that is given in sect. 5.

η
The field vmn (3.14) yields ∇ · vmn = (g −1/2 ∇σ · g)vmn
η
= ∇ · v0 − g −1/2 Lλmn with ∇ · v0 = g −1/2 F ; eq. (2.23a)
and the elliptic equation (3.3) yield Lλmn = gFmn . Hence we obtain

∇ · vmn = g 1/2 g −1 F − Fmn . (3.16)
The above results can be summarized as follows.
Result 1. Let v be the velocity field defined by Formulation 2 in a region Ωσ (2.14) with the following data: h(x, y) is the

terrain elevation on the horizontal region Ωxy , the coordinate σ (2.10a) yields g independent of σ and satisfies (2.13),
the field U0 (2.17b) has the vertical velocity (2.17d), S is a positive definite matrix given by (2.21). Then the field
vmn (3.15) is an approximation of v, the divergence ∇ · vmn is independent of S3 and is determined by the pointwise
convergence of series Fmn towards g −1 F = g −1/2 ∇ · v0 .
If v0 (2.17a) coincides with the horizontal part of the true field vT , we may have vT = U0 . Thus, we can say
that a formulation or scheme to compute mass-consistent fields, is physically consistent if it allows us to recover U0 .
According to the following result (proved in the appendix), this is the case of field vmn (3.15).
Page 8 of 20 Eur. Phys. J. Plus (2012) 127: 39

Result 2. Let Ω be the image of Ωσ under the transformation equations (2.10a). Then the field vmn (3.15) converges
point by point to U0 as S3 → 0, according to the following relations:
     
lim umn − u0  = lim vmn − v 0  = lim g −1 wmn − Pmn (g −1 w0 ) = 0 in Ω. (3.17)
S3 →0 S3 →0 S3 →0

4 Examples with σ = z − h(x, y)


In this section, we give some examples with a diagonal and constant matrix S = {δij Sj } and the coordinate σ =

z − h(x, y), which is useful for meteorological applications since the Jacobian g = 1 leads to a separable BVP (2.23).
In fact, the problem takes the form

Lλ = F in Ωσ , (4.1)
∂x λ|x=0,xM = ∂y λ|y=0,yM = 0, ∂σ λ|σ=0 = S3 w00 , ∂σ λ|σ=σM = 0
S3 wM ,

with L = Lxy − S3−1 ∂σ2 , Lxy = −S1−1 ∂x2 − S2−1 ∂y2 . The eigenvalues and eigenfunctions of Lxy are

Eij = Eij = S1−1 Ei + S2−1 Ej , φij = φi φj , (4.2)

where Ei , φi , are eigensolutions of operator −∂x2 subject to NBC’s (4.1) at x = 0, xM , namely,


√ 
Ei = ωi2 , ωi = iπ/xM for i ≥ 0, φi=0 = 1/ xM , φi≥1 = 2/xM cos ωi x. (4.3)

The pair Ej , φj , is similar. The coefficients of fields vmn reported in this section, were obtained analytically with
eqs. (3.11), (3.12). Since eq. (3.15) yields vmn at any point (x, y, z), we used the fourth-order Runge-Kutta method
to compute its streamlines with the desired accuracy.
Consider the field v0 = u0 (x, y)i + v 0 (x, y)j. Since vmn and U0 are similar for small S3 (eq. (3.17)) we begin with
a description of streamlines of U0 . Let x̃(t, x0 , y0 ), ỹ(t, x0 , y0 ), be the solution of the initial value problem

ẋ = u0 (x, y), ẏ = v 0 (x, y) with x = x0 , y = y0 , at t = 0. (4.4)

Replacing x̃, ỹ, into the equation


 σ
ż = w0 [x, y, σ(x, y, z)] = hx u0 + hy v 0 − (∂x u0 + ∂y v 0 )ds, (4.5)
0

and solving it with z(0) = z0  h(x0 , y0 ), we get z = z(t, x0 , y0 , z0 ). Thus the streamlines of U0 have the vector form

r(t, x0 , y0 , z0 ) = rxy (t, x0 , y0 ) + z(t, x0 , y0 , z0 )k with rxy = x̃i + ỹj.

This equation is a particular case of the expression

R(t, z, x0 , y0 ) = rxy (t, x0 , y0 ) + zk,

which is the vectorial equation of the cylindrical surface defined by moving vertically the horizontal curve rxy (t, x0 , y0 ).
Hence, for small S3 , the surface R(t, z, x0 , y0 ) contains the streamlines of U0 and vmn with the same condition (x0 , y0 ).
This is not the case for vmn with S3  1. According to eq. (A.7) in the appendix, the horizontal equations of streamlines
of vmn , have the form

ẋ = u0 (x, y) + S3 O(S3 ; x, y, σ), ẏ = v 0 (x, y) + S3 O(S3 ; x, y, σ). (4.6)

These equations are coupled with the vertical coordinate z because of the terms with S3 , so that in general streamlines
with the same condition (x0 , y0 ) do not belong to the surface R(t, z, x0 , y0 ). As is shown below, this coupling can be
used to generate a more realistic flow.

Example 1. Consider a constant field v0 = u0 i+v 0 j. a) Equation (4.4) yields the equation of a plane R = tv0 +zk+r0 ,
r0 = x0 i + y0 j, which contains the streamlines of U0 with the same condition (x0 , y0 ). The solution of eq. (4.5) is
z = h(x, y) + z0 − h(x0 , y0 ). Thus, streamlines of U0 are obtained by moving vertically the curve defined by the
intersection of plane R with the topography. b) We have ∇ · v0 = 0 but v0 does not satisfy BC v0 · n = 0 on z = h.
This yields ∇ · vmn = 0 for all m, n, the product mn determines the accuracy with which vmn satisfies n · vmn = 0
Eur. Phys. J. Plus (2012) 127: 39 Page 9 of 20

4.5

3.5

z (km) 2.5

1.5

0.5

0 1 2 3 4 5 6 7 8 9 10
x (km)

Fig. 1. Fields U0 (−) and vm=n=200 (→) on the plane xz, for Example 1, with S3 = 10−6 .

4
z (km)

0
10

2 10
8
y (km) 6
4
0 2
0
x (km)
Fig. 2. Streamlines of vm=n=200 with S3 = 10−2 , for Example 1.

on z = h. The field vm=n=200 is computed in a domain Ωσ with xM = yM = 15 km, σM = 4 km, u0 = v 0 = 0.5 ms−1 .
The topographic surface is

h = [1 + cos(ωh x) cos(ωh y)] /2 with ωh = 10π/xM . (4.7)

In agreement with eq. (3.17), fig. 1 shows that vmn and U0 are indistinguishable on the xz plane for S3 = 10−6 .
This is confirmed by streamlines plotted in fig. 2 for vmn with S3 = 10−2 . As occurs with U0 , streamlines with the
same datum (x0 , y0 ) are obtained by moving vertically the intersection of topography with plane R. This property is
lost for S3 ≥ 10−1 . Figure 3 shows that the effect of topography on streamlines, decreases rapidly as z0 increases for
S3 ≥ 10−1 . As expected from (4.6), we see that streamlines on the terrain with x0 ≥ 2, y0 = 0, do not belong to a
plane R.

Example 2. Consider v0 = βxi + βyj with constant β. a) The solution x = x0 e−βt , y = y0 e−βt , of eq. (4.4) yields
the equation of a plane R = xi + y0 x/x0 j + zk. Equation (4.5) takes the form ż = ḣ − 2βσ and yields z = h(x, y) +
[z0 − h(x0 , y0 )]e−2βt , so that the streamlines of U0 converge asymptotically toward the topography for β > 0. b) We
have ∇ · v0 = F = 2β and v0 does not satisfy BC v0 · n = 0 on z = h. Since the basis φi φj includes the constant

φ0 φ0 = 1/ xM yM (3.1b), we have F = Fmn , ∇ · vmn = 0 for n, m ≥ 1, mn determines the accuracy with which
vmn is tangent to the terrain. The field vm=n=200 is computed in a domain Ωσ with xM = yM = 10 km, σM = 4 km,
Page 10 of 20 Eur. Phys. J. Plus (2012) 127: 39

z (km)
2

0
10

10
2 8
6
y (km) 4
0 2
0 x (km)
Fig. 3. Streamlines of vm=n=200 with S3 = 100 , for Example 1.

3
z (km)

0
10

6 10
8
4
6
2 4
y (km) 2
0 0 x (km)
Fig. 4. Streamlines of vm=n=200 with S3 = 10−4 , for Example 2.

β = 10−1 s−1 , and terrain h (4.7). As expected, fig. 4 shows that the streamlines of vm=n=200 with S3 = 10−4 and
the same condition (x0 , y0 ), belong to a plane R and tend asymptotically to the topography. Figure 5 shows that
vm=n=200 is sensitive to S3 , since the streamlines with S3 = 10−2 and (x0 = 0.35, y0 = 5.0) move away from the plane
R. Figure 6 shows that this behavior is enhanced for S3 = 10−1 .
The above examples show that small values of S3 yield unphysical fields vmn , which are basically equal to U0 ,
since the behavior of streamlines on the terrain is almost the same for larger z values. The same examples show that
the effect of the terrain on vmn can be adjusted with values S3 of order 1. This confirms the convenience of using free
parameters in matrix S to get more realistic fields, as was pointed out by other authors [7–9].

5 Spectral solution of BVP (2.23) and the flux criterion



In practical situations the integrals (3.12) cannot be obtained exactly because of the complexity of F = g∇ · v0 ,
which is determined by both the field v0 and terrain derivatives ∂x h, ∂y h (eq. (A.3)). In this section, we give a spectral
solution of problem (3.9c). The decomposition (3.9b) allows us to compute exactly the contribution of q (3.5a) since
integrals (3.11) are replaced by exact algebraic expressions. In the case of coordinate σ = z − h, this spectral solution
reduces the problem of computing the field vmn of Result 1, to the estimation of Fourier coefficients. Examples with
analytic coefficients are used in sect. 6 to study the effect of boundary conditions, and the use of FFT algorithm is
studied in sect. 7.
Eur. Phys. J. Plus (2012) 127: 39 Page 11 of 20

z (km)
1

10

8
0.8
7 0.7
0.6
6 0.5
y (km) 5 0.4
x (km)
−2
Fig. 5. Streamlines of vm=n=200 , Example 2, with S3 = 10 , (x0 = 0.35, y0 = 5.0, z0 ), z0 = h(x0 , y0 ), 1, 2, 3 km.

2
z (km)

10

6
1
y (km) 0.8 0.9
0.6 0.7
5 0.5
0.3 0.4
x (km)
Fig. 6. Streamlines of vm=n=200 , Example 2, with S3 = 10−1 , (x0 = 0.35, y0 = 5.0, z0 ), z0 = h(x0 , y0 ), 1, 2, 3 km.

The eigenvalue problem,


−∂σ2 φk = Ek φk with φ̇k = 0 at σ = 0, σM , (5.1)
has the solutions
√ 
Ek = ωk2 , ωk = kπ/σM for k ≥ 0, φk=0 = 1/ σM , φk≥1 = 2/σM cos ωk σ. (5.2)
The set {φk }∞
k=0 is an orthonormal basis of L (0, σM ). For ij ≥ 0 problem (3.9c) is replaced by
2

FC
Aij ψijl = −Fijl − Cij with FC
ψ̇ijl =0 at σ = 0, σM , (5.3)
where Fijl is the Fourier series


l
Fijl = Fijk φk with Fijk = Fij | φk σ for all ij. (5.4)
k=0

In the appendix it is shown that the term Fijk φk with k = 0 satisfies Fij0 φ0 + Cij = 0 for all ij. This relation and
eq. (5.1) imply that eq. (5.3) has the solution

l
Fijk
FC F FC
ψijl = ψijk φk with ψijl = for all ij. (5.5)
Ek + S3 Eij
k=1
Page 12 of 20 Eur. Phys. J. Plus (2012) 127: 39

The sum

mn
q
FC
ψmnl = ψijl + ψij φij (5.6)
ij=0

yields the following approximation of BVP (3.3):


λmnl = S3 (ψmnl + qmn ) . (5.7)
According to eq. (3.15), the corresponding velocity field in physical space xyz is

vmnl = v0 + gJS−1 ∇σ λmnl , (5.8)
with components
   
umnl u0 √
= + gS−1
r ∇xy λmnl (5.9a)
vmnl v0

wmnl = g[(zx a + zy c)∂x λmnl + (zx c + zy b)∂y λmnl + zσ S3−1 ∂σ λmnl ], (5.9b)
and

mn
 q 
∇xy λmnl = S3 FC
ψijl + ψij + qij ∇xy φij , (5.9c)
ij>0
mn 
 
 0 
S3−1 ∂σ λmnl = wij (σ)φij ij=0 + FC
ψ̇ijl q
+ ψ̇ij + q̇ij φij . (5.9d)
ij>0

To get an expression of ∇ · vmnl we require some relations. Using (5.1), (3.1a), (5.3) and (3.9d), the operator
A = ∂σ2 − S3 Lxy yields

mn
q

mn
Aψmnl = φij Aij FC
ψijl + ψij = φij (−Fijl − Cij + S3 Eij qij ) . (5.10a)
ij=0 ij=0

In a similar manner, from (3.5b) and (3.1a), we obtain


2 
mn 
mn
Aqmn = ∂σ − S3 Lxy qmn = Cmn − S3 φij Eij qij = φij (Cij − S3 Eij qij ) . (5.10b)
ij=0 ij=0

Replacing (5.10a) and (5.10b) into Aλmnl = S3 (Aψmnl + Aqmn ) (eq. (5.7)), we get
Aλmnl = −S3 Fmnl , (5.10c)
where we have

mn 
l
Fmnl = Fijk φij φk with Fijk = F | φij φk xyσ . (5.11)
ij=0 k=0

Equation (2.22) yields L = −gS3−1 A and using (5.10c) we get


Lλmnl = −gS3−1 AS3 (ψmnl + qmn ) = gFmnl . (5.12)
Using vmnl (5.8) and (5.12) we obtain the desired expression
∇ · vmnl = g 1/2 (g −1 F − Fmnl ). (5.13a)
In the particular case of coordinate σ = z − h we can summarize as follows.
Result 3. Consider the data of Result 1 with σ = z − h, a constant positive definite matrix S = {δij Sj } and the
basis φij = φi φj (4.3). To compute the field vmnl (5.8) at a given point (x, y, σ) we follow the next steps: i) compute
0 0 0 q q
integrals Fijk (5.11), wM ij , w0ij (3.4), Cij (3.5b), ii) compute wij (σ) (3.10a), qij (σ), q̇ij (σ), ψij (σ), ψ̇ij (σ) (3.11), iii)
FC
compute series ψijl FC
(σ), ψ̇ijl (σ) (5.5), iv) compute the series ∇xy λmnl , S3−1 ∂σ λmnl (5.9c) and (5.9d), which yield the
components (5.9a) and (5.9b). The divergence
∇ · vmnl = F − Fmnl (5.13b)
does not depend on the matrix S and is determined by the convergence of series Fmnl (5.11) towards F .
Eur. Phys. J. Plus (2012) 127: 39 Page 13 of 20

The main criterion to check the accuracy of numerical VMCM’s vn to satisfy (2.1a), has been the estimation of
∇ · vn on a mesh [6–29]. The examples reported in sect. 6 show that ∇ · vmnl (5.13b) has oscillations which can hide
the goodness of vmnl to satisfy the mass balance. Additionally, if BC λ = 0 is used, ∇ · vn may have a wrong pointwise
convergence [31]. A criterion to check the mass balance is the flow-rate through a region Ω ∗ with boundary Γ ∗

FΩ ∗ (w) = w · ndΓ ∗ . (5.14)


Γ∗

The Gauss-divergence theorem and (5.13b) yield the expression



FΩ ∗ (vmnl ) = (F − Fmnl ) dΩ ∗ (5.15)
Ω∗

used in sects. 6 and 7, to compute the flux. The Schwarz inequality yields
|FΩ ∗ (vmnl )| = |1 | F − Fmnl Ω ∗ | ≤ |Ω ∗ | × F − Fmnl Ω ∗ , (5.16)
∗ ∗ ∗
where |Ω | is volume of Ω , and · | ·Ω ∗ , · Ω ∗ , denote the inner product and norm of L (Ω ), respectively (eq. (2.15)).
2

The completeness of basis φi φj φk given by (4.3), (5.2), implies that F − Fmnl Ω ∗ tends to 0 as m, n, l, increase.
Hence, for any  > 0, there are m , n , l , such that
|FΩ ∗ (vmnl )| ≤ |Ω ∗ | ×  holds for m > m , n > n , l > l . (5.17)
Thus, to get vmnl with a prescribed flow-rate we only need to compute the coefficients Fijk of Fmnl (5.11).

6 Effect of boundary conditions in mass balance and criterion %M∗


In this section, we study briefly the effect of boundary conditions in the mass-balance of velocity fields given by
standard formulations and our proposal, a detailed study is given in refs. [30,31]. We consider v0 = u0 i + v 0 j in a
region Ω = [0, xM ] × [0, yM ] × [0, zM ] with flat terrain h = 0, the coordinate σ = z, a constant matrix S = {δij Sj },
and U0 given by problem (2.17c). In this case the unique difference between problems (2.5) and (2.19) is a Dirichlet
boundary condition (DBC). The coefficients of series reported in this section were computed analytically, the effects
of using FFT are studied in sect. 7.
To specify DBC’s we have to distinguish between the planes Γx = {x = 0, xM }, Γy = {y = 0, yM }, ΓzM = {z = zM },
Γz=0 = {z = 0}, which bound Ω. Two velocity fields are computed with DBC’s:
A) Consider the field v1 = v0 + S−1 ∇λ(1) with λ(1) given by problem

Lλ(1) = F, ∂z λ(1) = 0, λ(1) = 0 on Γx ∪ Γy ∪ ΓzM , (6.1)
z=0

L = −∇·S−1 ∇. v1 minimizes functional J (2.1a) subject to n·v = n·U0 on Γz=0 . The approximated equation Lλmnl =
(1)

(1) (1) (1)


Fmnl is obtained with eigenfunctions φijk of L subject to boundary conditions (6.1), yielding φijk = φdi (x)φdj (y)φnd
k (z)
where  
φdj = 2/yM sin ω̃j y, ω̃j = jπ/yM , φnd k = 2/zM cos ω̂k z, ω̂k = (2k − 1)π/2zM ; (6.2)
φdi is similar to φdj . Superscripts d or n indicate the Dirichlet or Neumann type of BC used to get eigenfunctions. The
= v0 + S−1 ∇λmnl is obtained with the series
1 (1)
velocity field vmnl

(1)

mn
(1) (1) 
Fmnl = Fijk φdi φdj φnd
k , Fijk = F | φdi φdj φnd
k xyz . (6.3)
i,j,k=1

B) Consider v2 = v0 + S−1 ∇λ(2) with λ(2) given by problem


  
Lλ(2) = F, ∂z λ(2) = ∂x λ(2) = ∂y λ(2) = 0, λ(2) = 0 on ΓzM . (6.4)
z=0 Γx Γy

(2) (2)
v2 minimizes J (2.1a) subject to n · v = n · U0 on Γx ∪ Γy ∪ Γz=0 . The approximated equation Lλmnl = Fmnl is
(2) (2)
obtained with eigenfunctions φijk of L subject to boundary conditions (6.4), which yield φijk = φi φj φnd
k with φi , φj ,
= v0 + S−1 ∇λmnl is obtained with the series
2 (2)
given by (4.3). The field vmnl

(2)

mn 
l
(2) (2) 
Fmnl = Fijk φi φj φnd
k , Fijk = F | φi φj φnd
k xyz . (6.5)
i,j=0 k=1
Page 14 of 20 Eur. Phys. J. Plus (2012) 127: 39

−6
x 10
1

0.5

∇. v mnl = F−F mnl (s )


−1
0

−0.5

−1

(∇. v(1) ) /50, λ = 0 on Γ U Γ U Γ


mnl x y z
M
(2)
−1.5 ∇. v mnl /50, λ=0 on Γ z
M
0
∇. v , n.v = n.U on Γ
mnl

0 5 10 15 20 25 30
x (km)

Fig. 7. Behavior of the divergence on the x-axis with z = zM /2, y = yM /2.

1 2
The fields vmnl and vmnl have the divergence,
(i)
∇ · vmnl
i
= F − Fmnl , (6.6)
(i)
which is independent of S and is determined by the convergence of series Fmnl toward F as m, n, l, increase. Let vmnl
be the field of Result 3. Accordingly, to compute ∇ · vmnl
i
, ∇ · vmnl , we only need to compute the coefficients of series
(i) 0 0 0
Fmnl , Fmnl (5.11). Consider v = u i, u = βef g, with constant β and

e(y) = 1, f = ze−z/H , g = cos wx, H = 10 km, w = π/2xM , (6.7)

β is obtained with the average velocity u0  = 1 | u0 xyz /xM yM zM = 10 ms−1 . Although F = βef ġ does not depend
(1)
of y, Fmnl requires the series of e = 1 with the basis φdj (6.2) since it does not include a constant eigenfunction because
(2)
of using DBC’s at y = 0, yM . The series Fmnl , Fmnl , only need the term with j = 0 since the series of e = 1 is

exactly e = yM φj=0 . The fields were computed in the region Ω = [0, 31.2]2 × [0, 4] km3 , which was used in ref. [27] to
simulate atmospheric pollutant transport with a variational mass-consistent wind field obtained by solving a problem
like (2.4) with lateral Dirichlet boundary conditions and v0 was obtained by interpolation of data and a geostrophic
wind vg = −38i + 40j ms−1 . Figure 7 shows the graph of x vs. ∇ · vmnl , ∇ · vmnl
i=1,2
, for z = zM /2, y = yM /2. The values
i=1,2
from vmnl were divided by 50 to plot them in the range of vmnl −values. The graph shows that BC n · v = n · U0
i=1,2
on the whole boundary Γ (eq. (2.18)), improves significantly the values ∇ · vmnl given by the use of DBC λ = 0 in a
part of Γ .
The oscillations observed in fig. 7 are inherent to trigonometric series, but there are qualitative differences between
(1)
the series Fmnl (5.11) of our proposal and Fmnl (6.3). a) The coefficients of Fmnl coincide with those of the even
extension F e of F to domain Ω e = {|x| < xM , |y| < yM , |z| < zM }. If F is continuous on Ω = [0, xM ]×[0, yM ]×[0, zM ],
F e is continuous on Ω e and Fmnl converges point by point to F e in Ω e . This is illustrated in fig. 8 where we see that
(1)
the amplitude of oscillations of F − Fmnl decreases as m, l, increase. b) The coefficients of series Fmnl coincide with
those of the odd extension F o of F to domain Ω e . If F is nonzero in a part Γ̃ of Γ , F o is discontinuous on Γ̃ and
(1) (1)
Fmnl exhibits the Gibbs phenomenon. This is illustrated in fig. 7 where Fmnl − F has small oscillations in a vicinity
of x = 0 because F is zero at such a point, but the amplitude of oscillations increases as x tends to xM because F is
not zero at xM .
i=1,2
The flow-rate FΩ ∗ is suitable to measure the accuracy with which vmnl satisfy the mass-balance, since it is
(i)
insensitive to both oscillations and wrong pointwise convergence of Fmnl . In fact, we have
    
 ∗ i=1,2   i=1,2 
FΩ vmnl  ≤ |Ω ∗ | × F − Fmnl  , (6.8)
Ω∗
Eur. Phys. J. Plus (2012) 127: 39 Page 15 of 20

−7
x 10
5
(∇. v )/6.5, m=l=24
ml

4 ∇. v , m=l=100
ml
∇. v , m=l=200
ml

(s−1) 1
mnl
= F−F

0
mnl

−1
∇. v

−2

−3

−4

−5
0 2 4 6 8 10 12 14 16 18 20
x (km)
Fig. 8. Behavior of the divergence on the x-axis with z = zM /2, y = yM /2, and increasing values of m, l.

Table 1. Values of %M ∗ (6.9) on the boundary of some regions Ω ∗ = (x1 , x2 )2 × (0, z2 ) with t = 3 h. Velocity fields were
obtained from v0 = iβef g (6.7) with β = 1.02 × 10−2 s−1 , m = n = 80, l = 20, in a domain Ω = (0, 31.2)2 × (0, 4) km3 .
Ω∗ (13, 17)2 × (0, 2) (10, 20)2 × (0, 2.5) (5, 25)2 × (0, 3) (0, 30)2 × (0, 4) (0, 31.2)2 × (0, 4)
1
vmnl 10−1 1 10−1 10 10
2 −2 −1
vmnl 10 1 10 10 10
vmnl 10−2 10−2 10−2 10−5 10−13

i=1,2
k , φi φj φk , imply that FΩ ∗ (vmnl ) tends to 0 as m, n, l, increase. The flow-rate
and the completeness of basis φdi φdj φnd nd

criterion is complemented with a characteristic time of the process under study, as follows. Since the equation ∇·v = 0
is valid under the assumption that the density ρ is approximately constant in Ω, the mass in Ω ∗ is M ∗ ∼ ρ|Ω ∗ | and
the percentage of mass that flows through Γ ∗ in a time t is
100 t
%M ∗ (v, Ω ∗ , t) ≡ |FΩ ∗ (v)| . (6.9)
|Ω ∗ |

From (5.16) and (6.8), it follows that vmnl i=1,2


, vmnl , yield %M ∗ that tends to 0 as m, n, l, increase, even when the
corresponding series of F do not converge correctly in some points. A characteristic time in the study of transport of
atmospheric pollutants is the time required by a fluid particle to go from x = 0 to xM . In the case of the fields of fig. 7
we have tc = u0 /xM = 52 min. Table 1 yields values of %M ∗ in some regions Ω ∗ for t = 3.46tc = 3 h, the time used
i=1,2
in ref. [27] to estimate the spatial distribution of SO2 in the region Ω = (0, 31.2)2 × (0, 4) km3 . The fields vmnl yield
∗ ∗ ∗
a small value %M for the smallest region Ω , but the %M values are unacceptable for larger regions. This result
i=1,2
reflects the fact that in fig. 7, the average behavior of ∇ · vmnl moves away from 0 as x tends to xM . In contrast, the
values from vmnl are smaller and tend to the machine zero as Ω ∗ tends to domain Ω. This confirms that BC (2.18)
improves significantly the mass-balance in Ω.
In sect. 7, we shall see that Discrete Cosine transform (DCT) allows us to estimate the coefficients of vmnl with a
uniform mesh having (m + 1)(n + 1)(l + 1) points. The finite-element method (FEM) is a version of spectral methods
where a basis function is associated to each node, and the finite-difference method (FDM) reduces BVP (4.1) to a
system of equations with (m + 1)(n + 1)(l + 1) unknowns. These discretization methods can yield an estimation of
1 2
BVP (4.1) with a similar accuracy. Since the coefficients of above series vmnl , vmnl , vmnl , with m = n = 80, l = 21,
were computed analytically, the results of table 1 constitute a lower bound of the results given by DCT, FEM, DFM,
using a mesh with 81 × 81 × 21 points, the mesh used in ref. [27] to compute the wind field with a FEM and λ = 0 on
Γx ∪ Γy . To see the possible behavior of %M ∗ as a mesh becomes finer we compute it in Ω ∗ = (10, 20)2 × (0, 2.5) km3
i=1,2
with vmnl , vmnl , having increasing values m, n, l. Region Ω ∗ contains almost all the plume of SO2 estimated in
1
3 hours of simulation in ref. [27]. Fourier coefficients were computed analytically. Table 2 shows that vmnl yields
2 nd
oscillating values, the values from vmnl decrease with a larger number of basis functions φk , the values from vmnl
have a similar behavior but they have the feature of being one order of magnitude smaller. These results confirm that
BC (2.18) improves the mass-balance given by standard VMCM’s.
Page 16 of 20 Eur. Phys. J. Plus (2012) 127: 39

Table 2. Values %M ∗ in the region Ω ∗ = (10, 20)2 × (0, 2.5) km3 and t = 3 h, for the fields of table 1 and increasing values of
m, n, l.

1 1 1 2
l vm=n=32,l vm=n=64,l vm,n=128,l vm=n=32,64,128,l vm=n=32,64,128,l
−1
8 10 1 1 1 10−1
16 10−1 10−2 10−1 10−1 10−2
−1 −1 −3 −2
32 10 10 10 10 10−3

Table 3. Values of %M ∗ obtained by summing all the terms of series Fml , Fml
DCT
, with data Ω ∗ , t, v0 , of table 2. Coefficients
DCT
of Fml were computed analytically and those of Fml were obtained with the DCT on a (m + 1)(l + 1)-uniform mesh.

DCT DCT DCT


Fm=32,l F64,l F128,l F32,l F64,l F128,l
l = 32 2 × 10−3 3 × 10−3 3 × 10−3 2 × 10−1 2 × 10−1 2 × 10−1
l = 64 4 × 10−3 5 × 10−4 5 × 10−4 6 × 10−2 5 × 10−2 5 × 10−2
−3 −4 −4 −2 −2
l = 128 5 × 10 2 × 10 1 × 10 2 × 10 1 × 10 1 × 10−2

7 Discretization of series coefficients, FFT and filtering


The field vmnl of Result 3 requires the coefficients Fijk (5.11) which are easily computed with the FFT algorithm, by
this reason the approach proposed in this work admits the use of the so-called fast direct methods to solving elliptic
equations [34]. An alternative way is the combination of Fourier analysis with cyclic reduction (FACR) methods
which require O(N log N ) operations to solving BVP (2.23), although multigrid methods can solve the latter in O(N )
operations on a N -grid point [34]. These last methods will be studied in forthcoming works. Since the main aim of
this work is to get a velocity field that satisfies the mass-balance, rather than the solution of BVP (2.23), we shall see
how the FFT algorithm can be used to get a suitable mass-consistent velocity field with our formulation.
According to (5.15), (5.16) and (6.9), for any  > 0 there are m , n , l , such that
100t
%M ∗ = |1 | F − Fmnl Ω ∗ | ≤ 100t for m ≥ m , l ≥ l , n ≥ n . (7.1)
|Ω ∗ |
This reduces the problem of computing vmnl with a prescribed %M ∗ value, to the estimation of Fourier coefficients
Fijk (5.11) with the basis φi φj φk (4.3), (5.2). To simplify the discussion consider the series

m
fm (x) = ni f˜i φi (x) with f˜i = f | cos wi xxM , (7.2)
i=0

ni is the normalization constant of cos wi x. Using extended trapezoidal rule to estimate f˜i on a uniform mesh xj ≡ jΔx
defined by an integer N and Δx = xM /N , we get the approximation
N −1  
˜(N ) f (0)  ij (−1)i f (xM )
fi = + f (xj ) cos π + . (7.3)
2 j=0
N 2

(N )
˜ }N , which can be computed with a
The Discrete Cosine transform (DCT) of the set {f (xj )}N i=0 is the set {fi i=0
version of the FFT algorithm that requires 2.5N log2 N flops, assuming the N is a power of 2 [35].
Consider values of %M ∗ with data of tables 1 and 2. Since F = β ġ(x)f (z) does not depend of y, the series
Fmnl only requires the terms with j = 0 and the subscript n will be omitted. Let Fml denote the series (5.11) with
DCT
coefficients computed analytically, and let Fml be the corresponding series with coefficients given by DCT on a
(m + 1)(l + 1)-uniform mesh. Table 3 reports the values of %M ∗ obtained by summing all the terms of series Fml ,
DCT
Fml . As expected, Fml yields values %M ∗ that decrease as m, l, increase, but the values from FmlDCT
have a very
poor convergence.
The poor %M ∗ values given by Fml
(N )
DCT
are due to the error of coefficients f˜i with large i. According to the
expression
xM d2 (f cos wi x) xM  
(N ) (N )
Ei = f˜i − f˜i = (Δx)2 2
= (Δx)2 f¨ + wi2 f cos wi x − 2wi f˙ sin wi x, (7.4)
12 dx 12
Eur. Phys. J. Plus (2012) 127: 39 Page 17 of 20

Table 4. Values of %M ∗ obtained with the data of table 3 and partial sums Fm
ml ml
 l (7.5) with m = l = 200. Coefficients Fik

were obtained via DCT with values of F on a (201 × 201)-uniform mesh.

m = 32 64 128
 −3 −3
l = 32 7 × 10 2 × 10 2 × 10−3
l = 64 9 × 10−3 4 × 10−3 4 × 10−3
l = 128 1 × 10−2 5 × 10−3 5 × 10−3

(N )
with wi = iπ/xM [38], the error Ei is of order O[(Δx)2 i2 ]. Thus, as the mesh becomes finer, the error of the “first”
coefficients is smaller whereas the high-frequency coefficients have a large error. Table 3 shows that this last error
yields %M ∗ values which are two orders of magnitude larger than those obtained with analytic coefficients. The values
of %M ∗ can be used to identify the coefficients with a poor accuracy as follows. Let Fik
ml
be the coefficients given by
DCT with values of F on a (m + 1)(l + 1)-uniform mesh and consider the computation of %M ∗ with the partial sum
 

m n
ml ml
Fm  l = Fik φi φk . (7.5)
i,k=0

Reliable coefficients Fik ml


yield the smaller values of %M ∗ . For instance, consider the set Fmml
 l computed on a 201 × 201
∗  
mesh with the data of table 3. Table 4 shows that values of %M with m = 64, 128, l = 32, coincide with the value
2 × 10−3 reported in table 3 for the analytic coefficients Fml with m = 32, l = 32. Larger values of m , l , yield %M ∗
ml ml
that increases because of the inaccuracy of high-frequency coefficients. Thus, the field vm  l (5.8) given by the set Fik

with 0 ≤ i ≤ 64, 0 ≤ k ≤ 64, via eqs. (5.5) and (5.9), can be considered as an optimally filtered mass-consistent field.
In practice, this filtering can be automatized.

8 Concluding remarks
Formulation 2 is suitable to compute VMCM’s of hydrodynamic flows in areas such as meteorology, oceanography or
experimental fluid mechanics. The examples of sect. 6 confirm that BC (2.18) improves significantly the mass-balance
of VMCM’s given by the use of DBC λ = 0. Other fields can be used instead of U0 in BC (2.18), but one should
be cautious since undesirable results can be obtained [31]. Different functionals J, ˜ J, with the same matrix S (2.21)
will yield, in general, different fields ṽ, v, but these are similar for small values of S3 . If v0 (2.17) coincides with the
horizontal part of the true field vT , we may have vT = U0 . Result 2 assesses that U0 is a limiting case of VMCM’s
given by Formulation 2. In meteorology, one of the methods used to estimate the vertical velocity from a smooth field
v0 (2.17a), is the estimation of U0 (2.17) or a similar one [39,40]. The examples of sect. 4 show that U0 may be
unrealistic since the behavior of its streamlines can be the same at any height. The same examples confirm that the
elements of matrix S can be used to get VMCM’s closer to the observations [7–9].
The use of DBC λ = 0 in sect. 6 shows that the divergence ∇ · vn of a numerical field vn , may have a wrong
pointwise convergence as vn tends in the norm to its exact limit field. The flow-rate FΩ ∗ (vn ) is insensitive to this
problem. The percentage mass %M ∗ yields a way of complementing the flux criterion with a characteristic time of
the process under study. The sensitiveness of ∇ · vn to the elements of a constant S = {δij Sj }, was used to define
suitable values of such elements [19]. This sensitiveness can be attributed to the numerical methods used to compute
vn since equations (3.16) and (5.13b) show that ∇ · vn can be independent of S. Other criteria to define S have been
proposed [7–9,41,42] but we believe that additional research is needed.
Formulation 2 with σ = z −h and a constant matrix S = {δij Sj }, is useful in meteorology since BVP (2.23) is easily
solved with eigenfunctions expansions. The field vmn (3.15) is useful when integrals (3.12) can be computed analytically.
In problems with complex data h(x, y), v0 , one can compute the field vmnl of Result 3, where the contribution of
BCs (4.1) at σ = 0, σM , is computed exactly via integrals (3.11). This allows us to get ∇ · vmnl = F − Fmnl (5.13b).
Thus, the problem of computing vmnl with a prescribed divergence ∇ · vmnl or flux FΩ ∗ (vmnl ), is reduced to the
estimation of Fmnl (5.11) with the FFT algorithm. The computation of vmnl with FARC or multigrid methods [34],
will be studied in other works.
The results of sect. 7 shows that the sole FFT algorithm yields a field with a poor mass-balance because of the error
of high-frequency coefficients. The flux or %M ∗ can be used to define low-pass filter with which the high-frequency
coefficients with a significant error, are eliminated. To the best of our knowledge, the improvement of numerical
VMCM’s via filtering, has not been reported by other authors.

One of us (MAN) wishes to thank Ma. T. Nuñez for her invaluable support.
Page 18 of 20 Eur. Phys. J. Plus (2012) 127: 39

Appendix A.
A) Minimization of J(vη ) (2.7). Consider the following sets: L2 (Ωσ ) is the space of square integrable functions in
Ωσ endowed with inner product ϕ | φxyσ , H 1 (Ωσ ) = {ϕ : ∂σi ϕ ∈ L2 (Ωσ )}, L̂2 is the space of vector fields w  with
components w i 2 
 in L (Ωσ ), let H(div) = {w  ∈ L̂ : ∇σ · w
2  ∈ L (Ωσ )} with ∇σ · w
2  ≡ ∂σi w
 . In ref. [31] we saw that the
i

projection theorem for Hilbert spaces and an orthogonal decomposition of L̂2 into solenoidal and gradient fields [43],
lead to the following result: If 
S is a positive definite symmetric matrix with continuous elements on Ω σ = Ωσ ∪ Γσ ,
and v ∗ satisfies

 ∗ · nσ dsσ = 0,
v
Γσ

0 
then for each v in H(div)  , λ, such that v
there exists a pair v 0 = v−
S−1 ∇σ λ, with λ ∈ H 1 (Ωσ ) and v
 is the unique

element in V = {w  = 0 in Ωσ , nσ · w
 : ∇σ · w  = nσ · v ∗
 on Γσ }, that minimizes the functional

 w)
J(  =  −v
(w 0 ) ·   −v
S(w  0 )dΩσ .
Ωσ

If we replace w  is equivalent to minimize J(wη ) (2.7) in the set of physically


 = g 1/2 wη , the minimization of J in V
consistent fields V = {w : ∇ · w = 0 in Ωσ , nσ · w = nσ · vT
η η η η
on Γσ }, with ∇ · wη = g −1/2 ∇σ · g 1/2 wη . Thus, for
each initial field v there is a pair v , λ, that satisfies (2.8) and vη is the unique field in V that minimizes J(wη ).
0 η

B) Proof of (2.16b) and (2.16c). It is known [43] that a pair of integrable functions ϕ, φ, obey the relation

∂σi ϕ | φxyσ = φϕn̂σi dsσ − ∂σi ϕ | φxyσ . (A.1)


Γσ
√ √
For a field w in H(div) = {w : ∇ · w ∈ L2 (Ωσ )} with contravariant components wηi , we have g∇ · w =∂σi gwηi
and using (A.1) we get the following version of the Gauss-divergence theorem:

√ √ η
 g∇ · w | 1xyσ = gw · nσ dsσ for all w in H(div). (A.2)
Γσ

From (A.1) and BC (2.16a) we get (2.16b). Using φ = 1 and eq. (A.2) with w = v0 , eq. (2.16b) takes the following
form where the surface integral is equal to that of eq. (2.16c):

√ ∗η
gv · nσ dsσ = 0.
Γσ

C) Proof of some relationships. a) The matrix J−1 (2.10b) and v0 (2.17a) yield
√ √ √ √
F = ∂x gu0 + ∂y gv 0 + ∂σ gv 0η3 , v 0η3 = − zx u0 + zy v 0 / g. (A.3)
Integrating we get  
σ

 
σ =σ σ √ √
F (x, y, σ )dσ = −zx u0 − zy v 0 σ =0 + ∂x gu0 + ∂y gv 0 dσ  .
0 0
A comparison with w0 (2.17d) and w00 = [zx u0 (x, y, σ) + zy v 0 (x, y, σ)]σ=0 yields
 σ
F (x, y, σ  )dσ  = w00 (x, y) − w0 (x, y, σ). (A.4)
0

b) Using Fij = F | φij xy , (A.4), and Fubini’s theorem we obtain


 σ  σ  σ !
Fij (σ  ) dσ  = F | φij xy dσ  = F dσ  | φij = −wij
0 0
(σ) + w0ij for all ij, (A.5)
0 0 0 xy
0
with wij (σ) ≡ w0 (x, y, σ) | φij xy . Relations (A.5), wM 0
ij = wij (σM ), Cij = (wM ij − w0ij )/σM , yield
0 0 0

 σM
Fij | 1σ = Fij (σ  ) dσ  = −wM 0
ij + w0ij = −σM Cij
0
for all ij. (A.6)
0

Using φk=0 = 1/ σM and (A.6), we get the relation Fij | φk=0 σ φk=0 + Cij = 0 used in (5.5).
Eur. Phys. J. Plus (2012) 127: 39 Page 19 of 20

(0)
D) Proof of (3.17). For ij ≥ 0 and small S3 the solution ψij of eq. (3.9a) has the form ψij = ψij + O(S3 ) [44],
(0)
where ψ (0) satisfies ψ̈ij = −Fij − Cij , ψ̇ (0) = 0 at σ = 0, σM . Integrating and using (A.5) we get
 σ
Fij (σ  )dσ  − Cij σ = wij
(0)
ψ̇ij = − 0
(σ) − w0ij
0
− Cij σ = wij
0
(σ) − q̇ij .
0

(0)
Replacing ψ̇ij into λ̇ij = S3 (ψ̇ij + q̇ij ) we obtain
 σ
0
λ̇ij = S3 wij (σ) + O(S32 ), λij = S3 0
wij (s)ds + O(S32 ). (A.7)
0
mn
This yields limS3 →0 ∇xy λmn = 0, limS3 →0 S3−1 ∂σ λmn = ij=0
0
wij 0
(σ)φij = wmn = Pmn (g −1 w0 ), and using (3.14b),
eq. (3.17) follows.

References
1. N.L. Seaman, Atmos. Environ. 34, 2231 (2000).
2. P. Zannetti, Air Pollution Modeling: Theories, Computational Methods and Available Software (van Nostrand Reinhold,
New York, 1990).
3. J.P. Peixoto, A.H. Oort, Physics of Climate (AIP, New York, 1992).
4. R. Daley, Atmospheric Data Analysis (Cambridge University Press, New York, 1991).
5. K.E. Trenberth, J.W. Hurrell, A. Solomon, J. Climat. 8, 692 (1995).
6. D.W. Byun, J. Atmos. Sci. 56, 3808 (1999).
7. C.F. Ratto, R. Festa, C. Romeo, O.A. Frumento, M. Galluzzi, Environ. Softw. 9, 247 (1994).
8. C.F. Ratto, An overview of mass-consistent models, in Modeling of Atmospheric Flows, edited by D.P. Lala, C.F. Ratto
(World Scientific Publishing, Singapore, 1996) pp. 379–400.
9. G.F. Homicz, Three-Dimensional Wind Field Modeling: A Review, Sandia National Laboratories, report SAN2002-2597
(2002).
10. R. Martens, H. Thielen, T. Sperling, K. Masmeyer, Int. J. Environ. Pollut. 14, 573 (2000).
11. S. Finardi, G. Tinarelli, A. Nanni, G. Brusasca, G. Carboni, Int. J. Environ. Pollut. 16, 472 (2001).
12. X. Guo, J.P. Palutikof, Boundary-Layer Meteor. 53, 303 (1990).
13. G. Gross, Boundary-Layer Meteor. 77, 379 (1996).
14. F. Castino, L. Rusca, G. Solari, J. Wind Eng. Ind. Aerodyn. 91, 1353 (2003).
15. A. Conte, A. Pavone, C.F. Ratto, J. Wind Eng. Ind. Aerodyn. 74-76, 355 (1998).
16. Y. Sasaki, Mont. Weather Rev. 98, 875 (1970).
17. M.H. Dickerson, J. Appl. Meteorol. 17, 241 (1978).
18. C.A. Sherman, J. Appl. Meteorol. 17, 312 (1978).
19. T. Kitada, A. Kaki, H. Ueda, L.K. Peters, Atmos. Environ. 17, 2181 (1983).
20. J.C. Barnard, H.L. Wegley, T.R. Hiester, J. Climate Appl. Meteorol. 26, 675 (1987).
21. D.G. Ross, I.N. Smith, P.C. Manins, D.G. Fox, J. Appl. Meteorol. 27, 785 (1988).
22. Y. Heta, J. Meteorol. Soc. Jpn 70, 783 (1992).
23. M.A. Núñez, C. Flores, H. Juárez, J. Comput. Methods Sci. Eng. 6, 365 (2006).
24. T. Kitada, K. Igarashi, M. Owada, J. Appl. Meteorol. 25, 767 (1986).
25. N. Moussiopoulos, Th. Flassak, J. Appl. Meteorol. 25, 847 (1986).
26. H. Ishikawa, J. Appl. Meteorol. 33, 733 (1994).
27. N. Sanı́n, G. Montero, Adv. Eng. Softw. 38, 358 (2007).
28. M.A. Núñez, C. Flores, H. Juárez, J. Comput. Methods Sci. Eng. 7, 21 (2007).
29. C. Flores, H. Juárez, M.A. Núñez, M.L. Sandoval, Numer. Methods Partial Differ. Equ. 26, 826 (2010).
30. M.A. Núñez, New scheme to compute mass-consistent models of geophysical flows, in Proceedings of the I Workshop on
Asymptotics for Parabolic and Hyperbolic Systems (Laboratóiro Nacional de Computação Cientı́fica, Petrópolis-R. J., 2008).
31. M.A. Núñez, Eur. Phys. J. Plus 127, 40 (2012).
32. C. Wunsch, The Ocean Circulation Inverse Problem (Cambridge University Press, New York, 1996).
33. Raffel Markus, C.E. Willert, J. Kompenhans, Particle Image Velocimetry: A Practical Guide (Springer, Berlin, 1998).
34. W.H. Press, S.A. Teukolsky, W.T. Vetterling, B.P. Flannery, Numerical Recipes in FORTRAN (Cambridge University
Press, Cambridge, 1992).
35. C. van Loan, Computational Frameworks for the Fast Fourier Transform (SIAM, Philadelphia, 1992).
36. K. Rektorys, Variational Methods in Mathematics, Science and Engineering (D. Reidel, Dordrecht, 1977).
37. H.F. Weinberger, A First Course in Partial Differential Equations: with Complex Variables and Transform Methods (Dover,
New York, 1995).
38. R.L. Burden, J.D. Faires, Numerical Analysis (PWS-KENT, Boston, 1985).
Page 20 of 20 Eur. Phys. J. Plus (2012) 127: 39

39. J. Holton, An introduction to Dynamic Meteorology (Academic Press, San Diego, 1992) Sect. 3.5.
40. T.N. Krishnamirti, An introduction to Numerical Weather Prediction Techniques (CRC Press, Boca Raton, 1996) Chapt. 3.
41. E. Rodrı́guez, G. Montero, R. Montenegro, J.M. Escobar, J.M. Gonzalez-Yuste, Lect. Notes Comput. Sci. 2339, 950 (2002).
42. M. Harada, S. Hayashi, Wakimizu, J. Fac. Agric., Kyushu Univ. 44, 403 (2000).
43. V. Girault, P.A. Raviart, Finite Element Methods for Navier-Stokes Equation, Theory and Algorithms (Springer, Berlin,
1986).
44. H. Hochstadt, Differential Equations: A Modern Approach (Dover, New York, 1964) Chapt. 6.

You might also like