Professional Documents
Culture Documents
A Formulation To Compute Mass Consistent Models of Hydrodynamic Flows
A Formulation To Compute Mass Consistent Models of Hydrodynamic Flows
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.
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)
eσ
Ω
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
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
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)
Γσ
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
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)
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
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
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)
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
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
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)
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
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
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
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
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
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
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].
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.
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
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
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
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 Γ ∗
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).
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)
mn
(1) (1)
Fmnl = Fijk φdi φdj φnd
k , Fijk = F | φdi φdj φnd
k xyz . (6.3)
i,j,k=1
(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
−0.5
−1
0 5 10 15 20 25 30
x (km)
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
β 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)
|Ω ∗ |
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.
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
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
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Ωσ .
Ωσ
B) Proof of (2.16b) and (2.16c). It is known [43] that a pair of integrable functions ϕ, φ, obey the relation
√ √ η
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
σ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.