24074 Manuscript
This article is downloaded from
http://researchoutput.csu.edu.au
It is the paper published as:
Author: Z. Li and G. Mallinson Title: Dual Stream Function Visualization of flows Fields Dependent on Two Variables Journal: Computing and Visualization in Science ISSN: 1432-9360 1433-0369 Year: 2006 Volume: 9 Issue: 1 Pages: 33-41 Abstract: The construction of streamlines is one of the most common methods for visualising fluid motion. Streamlines can be computed from the intersection of two nonparallel stream surfaces, which are iso-surfaces of dual stream functions. Stream surfaces are also useful to isolate part of the flow domain for detailed study. This paper introduces a technique for calculating dual stream functions for momentum fields that are defined analytically and depend on only two variables. For axi-symmetric flows, one of the dual stream functions is the well-known Stokes stream function. The analysis reduces the problem from the solution of partial differential equations to the solution of two ordinary differential equations. Example applications include the Moffat [17] vortex bubble, for which new solutions are presented.
DOI/URL: http://dx.doi.org/10.1007/s00791-006-0015-z http://researchoutput.csu.edu.au/R/-?func=dbin-jump-full&object_id=24074&local_base=GEN01-CSU01 Author Address: [email protected] CRO Number: 24074
Dual stream function visualization of flows fields dependent on two variables
ZHENQUAN LI¹ AND GORDON MALLINSON²
¹Department of Mathematics and Computing Science, University of the South Pacific, Suva, Fiji Island
Email: [email protected] ²Department of Mechanical Engineering, The University of Auckland, Private Bag 92019, Auckland, New Zealand
Email: [email protected] Abstract The construction of streamlines is one of the most common methods for visualising fluid motion. Streamlines can be computed from the intersection of two nonparallel stream surfaces, which are iso-surfaces of dual stream functions. Stream surfaces are also useful to isolate part of the flow domain for detailed study. This paper introduces a technique for calculating dual stream functions for momentum fields that are defined analytically and depend on only two variables. For axi-symmetric flows, one of the dual stream functions is the well-known Stokes stream function. The analysis reduces the problem from the solution of partial differential equations to the solution of two ordinary differential equations. Example applications include the Moffat [17] vortex bubble, for which new solutions are presented.
1 Introduction
The construction of the lines of a vector field is a useful aid towards understanding its structure. For a steady state fluid flow, the lines of the velocity or momentum field are called streamlines.
For the case of a vector field V = (v1 , v2 , v3 ), in Cartesian space, (x1 , x2 , x3 ), a streamline is defined by the solution of:
dx dx dx 1 = 2 = 3 v1 v2 v3
if vi ≠ 0 (i = 1, 2 , 3), or by introducing an integration variable such as time, t,
dX = V . (1) dt
The integration of (1) is usually solved by a numerical process that involves interpolation schemes for the velocity field and integration along the streamline from a starting point [3, 7, 8, and 20]. The computation can be a complicated and computationally expensive process [2, 11, and 16].
1
Stream surfaces are surfaces across which there is no flow and can be more useful than streamlines because they permit regions of the flow domain to be isolated for detailed study. They can be used to visualise the structure of a complicated three-dimensional flow field, more quickly that relying on streamlines to delineate flow regions. Streamlines are contained within stream surfaces and can be generated by finding the intersections of appropriately chosen stream surfaces.
Mass conservation is a key issue associated with construction of streamlines and stream surfaces [15], particularly when the velocity field is interpolated from computational data. These issues can be resolved by interpolating suitable vector potentials or stream functions for the velocity field rather than the velocity itself [16, 10, 11]. Yih [21] proved that, for a steady compressible fluid, there exist two stream functions f and g related to the momentum vector by
ρV = ∇f × ∇g (2) where ρ is the fluid density. The momentum field described by (2) obeys the steady state law of mass conservation, as can be seen by taking the divergence of (2):
∇.()ρV = ∇(∇f × ∇g)
= ∇g.()∇ × ∇f − ∇f .(∇ × ∇g)= 0. The iso-surfaces of f and g are stream surfaces [21]. Because ∇f and ∇g are perpendicular to the stream surfaces that f and g represent, they are also perpendicular to the velocity field V and hence the cross product ∇f × ∇g is in the direction of the velocity field. Thus the intersection of the two stream surfaces represented by f and g in (2) is tangential everywhere to the velocity field V ; that is, the intersection is the streamline. Thus a potentially attractive method for constructing streamlines is to calculate f and g for a given velocity field and then use the intersections their iso-surfaces to construct the streamlines.
Unfortunately, as simple as the above method might seem, the calculation of global dual stream functions for general three-dimensional flow fields is an unsolved problem since one or both of the stream functions can be multi-valued. Previous applications of dual stream functions [2, 6, 9] have been limited to non-recirculating flows where both stream functions were single valued. Examples include extrusions, parabolic flows in ducts and potential flows in diffusers.
2 Reztsov and Mallinson [19] demonstrated that dual stream functions could be applied to classes of recirculating or swirling flow by assigning to one of the stream surfaces a structural significance in that it defined closed regions within the flow. The primary stream function (as it will be called here) was single valued and the other function multi-valued. Their approach differs from conventional dual stream function methods in which the two functions have equal significance.
This paper extends the concepts in [19] to velocity or momentum fields that can be reduced, by a coordinate transformation if necessary, to a dependence on two variables. This allows an easy identification of the structural stream function. The paper then considers the issue of calculating the second stream function and thence the streamlines. A novel method is presented whereby the process of finding the second stream function is reduced the solution of an ordinary differential equation. The process is illustrated for axi-symmetric flows with swirl that include a vortical bubble describe by Moffatt [17] for which the expressions for the second stream function are new results.
2 Mathematical preliminaries
The reduction to a dependence on two variables will generally rely in the definition of an appropriate curvilinear coordinate system. In this section the description of the velocity field and the transformed forms of equation (1) in an arbitrary curvilinear system is presented.
2.1 Curvilinear coordinate system
Consider a transformation from Cartesian coordinates (x1, x2 , x3 ) to a new set of coordinates denoted by (ξ1, ξ2, ξ3). The transformation equations are
ξ1 = ξ1(x1, x2, x3) ξ2 = ξ2 ()x1, x2, x3 ξ3 = ξ3()x1, x2, x3 .
The inverse transformation* is
x1 = x1(ξ1, ξ2, ξ3) x2 = x2 ()ξ1, ξ2, ξ3 x3 = x3()ξ1, ξ2, ξ3 .
* The inverse exists if and only if the Jacobian does not vanish, that is, when ∂x j / ∂ξi ≠ 0 .
3 A position vector from the origin to an arbitrary point in Cartesian coordinates ()x1, x2 , x3 , measured from the origin, is given by
r = x1 i+ x2 j+ x3 k .
In terms of the new coordinates,
r = r(ξ1, ,ξ 2 ,ξ3 ).
The differential dr can now be written
∂ r ∂ r ∂ r 3 ∂ r dr = dξ1 + dξ2 + dξ3 = ∑ dξi . ∂ξ1 ∂ξ2 ∂ξ3 i=1∂ξi
We now denote the covariant basis by (eˆ1, eˆ 2 , eˆ3) as follows
∂ r ∂ r ∂ r eˆ1 ≡ , eˆ2 ≡ , eˆ3 ≡ . ∂ξ1 ∂ξ2 ∂ξ3
The unit vectors (e1, e2 , e3), tangent to the coordinate lines of the new coordinate system are
eˆ eˆ eˆ e = i = i = i i = 1,2,3 i ˆ ei ∂r gi,i
∂ξi
where gi, j denotes the metric tensor,
3 ∂xk ∂xk gi, j = ∑ . k=1 ∂ξi ∂ξ j The differential distance can now be written as
3 dr = ∑ dξieˆ i i=1 3 = ∑ dξi gi,i ei . i=1
2.2 Velocity field description in the curvilinear coordinate system
The velocity field in the curvilinear coordinate system is given by
4 V = v1e1 + v2e2 + v3e3 = v1i + v2j + v3k d()x i + x j + x k = 1 2 3 dt dr = dt 3 dξi = ∑ gi,i ei . i=1 dt
dξ (The components v are the physical components of V whereas the components i are the i dt contravariant components.)
Comparison of the coefficients of ei leads to the following equations
gi,i dξi gi,i dξi = vi or = dt i = 1, 2, 3. (3) dt vi
For simplicity, we replace vi by vi (i = 1, 2, 3) in the rest of this paper so that it is understood that the components are physical components in the curvilinear system. Since the right hand sides of each of the equations in (3) are the same, and assuming that each of the scale factors gi,i is non- zero, we can write,
dξ dξ dξ 1 = 2 = 3 . v1 g 2,2 g3,3 v2 g1,1 g3,3 v3 g1,1 g 2,2
Provided the density is not zero, the equivalent set of equations for the momentum field can be written as,
dξ dξ dξ 1 = 2 = 3 . ρv1 g2,2g3,3 ρv2 g1,1g3,3 ρv3 g1,1g2,2
Without any loss of generality the scale factors gi,i can be replaced by hi so that,
dξ dξ dξ 1 = 2 = 3 . (4) ρ h2h3v1 ρ h1h3v2 ρ h1h2v3
It is worth noting that equation (4) is part of a general result [15] that if contravariant components of a mass flux density m are defined by
5 ρv g mi = i gi,i where g = det gij , the lines of the momentum and velocity fields are then defined by,
dξ dξ dξ 1 = 2 = 3 m1 m 2 m3 and the condition that the momentum field is solenoidal reduces to
∂m1 ∂m2 ∂m3 + + = 0 . ∂ξ1 ∂ξ2 ∂ξ3
In the next section we will derive the ordinary differential equations for the dual stream functions.
3 Derivation of Stream Function Equations
3.1 Definition of a two variable flow
A two variable flow is defined here as one in which the velocity field V , density ρ of the fluid and scale factors hi of the curvilinear system depend only on ξ1 , ξ3 . It is in fact a two-dimensional flow in the transformed space. The term “two variable” is used to distinguish the flow from the usual definition of two dimensional, namely a flow that depends on only two Cartesian coordinates.
3.2 The equation defining the primary stream function
The primary stream function is denoted by g and will be defined by the solution g = constant of the equation
dξ dξ 1 = 3 . (5) ρ h2h3v1 ρ h1h2v3
The surface represented by g = constant in the curvilinear coordinate system consists of lines parallel to e 2 through the points on the two-dimensional curve given by restricting g = constant on a ξ1ξ3 surface.
For example, if the orthogonal curvilinear coordinate system is a cylindrical coordinate system
(ξ1 = r, ξ3 = z ) and the flow is axi-symmetric, incompressible flow. Equation (5) becomes
6 dr dz = , rv1 rv3 or
rv3dr − rv1dz = 0. (6)
Differentiating the two sides of g = constant leads to
∂g ∂g dr + dz = 0 . (7) ∂r ∂z
Comparing the coefficients of dr and dz in (6) and (7), we obtain
c ∂g c ∂g v = − , v = , (8) 1 r ∂z 3 r ∂r where c is a constant. When c = 1, the function g in (8) is called the Stokes stream function, a well-known stream function in fluid mechanics [1].
The stream function g can be found independently from f by solving equation (5) that is an ordinary differential equation. We can choose the solution g = constant of (5) or a function that satisfies
1 ∂g 1 ∂g ρv1 = − , ρv3 = . (9) h2h3 ∂ξ3 h1h2 ∂ξ1
Note that g depends only on ξ1 and ξ3 .
3.3 The calculation of the second stream function
Let f be the other stream function. Unlike g , it will depend on all three coordinates. Substituting the equations in (9) into the orthogonal curvilinear form of (2), we get
1 ∂f ∂g ∂f ∂g 1 ∂f ∂g ∂f ∂g 1 ∂f ∂g ∂f ∂g ρV = − e1 + − e2 + − e3 h2h3 ∂ξ2 ∂ξ3 ∂ξ3 ∂ξ2 h1h3 ∂ξ3 ∂ξ1 ∂ξ1 ∂ξ3 h1h2 ∂ξ1 ∂ξ2 ∂ξ2 ∂ξ1
∂f h ∂f h ∂f ∂f 2 2 = −ρv1 e1 + ρv3 + ρv1 e2 − ρv3 e3 ∂ξ2 h3 ∂ξ3 h1 ∂ξ1 ∂ξ2
Taking f = −ξ2 + ϕ(ξ1, ξ3 ), the above equation becomes
7 h ∂ϕ h ∂ϕ 2 2 ρV = ρv1 e1 + ρ v3 + v1 e2 + ρv3 e3 . (10) h3 ∂ξ3 h1 ∂ξ1
Comparing the description of the velocity field V in the curvilinear coordinate system with (10), we get
h ∂ϕ h ∂ϕ 2 2 ρv2 = ρ v1 + v3 . (11) h1 ∂ξ1 h3 ∂ξ3
Equation (11) is a first order partial differential equation with two independent variables ξ1 and ξ3 . It is still difficult to solve. However, our purpose is to calculate the dual stream functions f and g such that (2) holds or equivalently, the expressions of V in terms of the partial derivatives of f and g satisfying system (4). To find f , or equivalently ϕ such that system (4) holds, we have to solve (11) and one of the two following equations
dξ dξ dξ dξ 1 = 2 , 2 = 3 ρ h2h3v1 ρ h1h3v2 ρ h1h3v2 ρ h1h2v3 on the surface g = constant . To explain more clearly, we set system (4) equal to a scalar amount dt . Such a setting is reasonable because system (4) represents a spatial curve or streamline. After making this setting, t is the parameter for the curve. On the surface g = constant , we have
dξ dξ 1 = ρ h h v , 3 = ρ h h v . dt 2 3 1 dt 1 2 3
Using (11), we get
dϕ ∂ϕ dξ1 ∂ϕ dξ3 h2 ∂ϕ h2 ∂ϕ = + = ρ h1h3 v1 + v3 = ρ h1h3v2 . dt ∂ξ1 dt ∂ξ3 dt h1 ∂ξ1 h3 ∂ξ3
Since f = constant presents a surface that can be described with two variables, ϕ can be a function that depends on one variable. With the introduction of parameter t , ξ1 , ξ3 can be written as functions ξ1 = ς1(t), ξ3 = ς3(t). Therefore ϕ can be a function depending on only the variable ξ1 ,
−1 −1 by substituting ξ3 = ς3()t = ς3(ς1 (ξ1)) into ϕ = ϕ(ξ1, ξ3) where t = ς1 (ξ1) is the inverse of
ξ1 = ς1(t). Alternatively function ϕ can also be a function depending on variable ξ3 only. The calculation for ϕ now reduces to solving either
8 dϕ ρ h2h3v1 = ρ h1h3v2 for ϕ = ϕ (ξ1) (12a) dξ1 or
dϕ ρ h1h2v3 = ρ h1h3v2 for ϕ = ϕ (ξ3) (12b) dξ3 on the surface g = constant .
Which equation we should be chosen depends on the solvability. Note that the equations in (12) depend on one variable only because we solve them on surface g = constant thereby deleting the other variable.
The equations in (9) and one of the equations in (12) hold for any velocities, i.e., the components in the velocity fields may be zero. Thus the equations in (9) can be used to calculate the primary stream function g and one of the equations in (12) together with g = constant can be used to calculate the other stream function f for any momentum field described by two variables.
4 Applications
In this section, we present some examples of how to calculate the dual stream functions for axi- symmetric flows using the techniques described in Section 3. Although all the flows in the examples are incompressible, there is no difficulty to extend the calculations to steady, compressible flows.
The condition of axi-symmetry means that the velocity field V given by
V = v1 ()r, θ , z e1 + v2 (r, θ , z)e 2 + v3 (r, θ , z)e3 in a cylindrical coordinate system (r, θ , z) satisfies
∂v ∂v ∂v 1 = 0 , 2 = 0 , 3 = 0 . ∂θ ∂θ ∂θ
Flows are said to be swirl free if v2 = 0 . We consider axi-symmetric flows with swirl (i.e. v2 ≠ 0 ) in this subsection.
9 4.1 Helical and Toroidal flows in a cylindrical coordinate system
For the cylindrical coordinate system the equations for g become those given in (8) with c = 1. The equations in (12) become
dϕ v dϕ v v = 2 , v = 2 . (13) 1 dr r 3 dz r
4.1.1 Helical flow
For simplicity, we consider helical flow that is equivalent to a uniform flow with constant swirl first. Suppose that the velocity field of the flow in the cylindrical coordinate system is
V = (0, α, β ),
α where α and β are constant and β ≠ 0 . The vorticity isς = 0., 0, r
Integrating the first equation in (8) with respect to z and the second equation with respect to r , we get
g = ω(r)
1 g = β r 2 + h(z). 2
1 Comparing these equations, we conclude that we could choose g()r = β r 2 and h()z = 0 . We 2 then have the primary stream function
1 g = β r 2 . 2
Since v1 = 0 , we have to solve the second equation in (13), i.e.,
dϕ v v = 2 3 dz r on a surface g = constant . Because g depends only on variable r , g = constant implies r = constant . The next step is to solve
dϕ α = dz β r
10 α z under the condition r = constant . Therefore ϕ = + χ(g) for some unknown function χ (.) ( χ (.) β r denotes a one variable function). Note that χ (g) is a constant on surface g = constant . If we take χ ()g = 0 , then
α z f = −θ + . β r
Figure
Fig. 1. Helical flow with f=1, g=1 and α=β=1 It is easy to demonstrate that (2) holds for this case. We can always choose χ()g = 0 but it may simplify the expression of f for some cases by choosing a suitable χ (g). A streamline for this flow is shown in Figure 1.
4.1.2 Toroidal flow
This is an example flow described by Reztsov and Mallinson [19]. The velocity field is defined by,
c c V = ()z − z0 , ω, − ()r − r0 r r
where r0 , z0 , c , andω are constant.
11 The vorticity is
c(r + r ) ω ς = 0, 0 , . r 2 r
Integrating the first equation in (8) with respect to z and the second equation with respect to r , we get
1 2 g = − c()z − z + p(r) 2 0
1 2 g = − c()r − r + q(z). 2 0
Comparing these equations, we conclude that g can be taken as
1 2 2 g = − c[()r − r0 + (z − z0 )]. 2
Note that r and z are not independent on a surface g = constant . We introduce a parameter γ according to the following
r = r + C cosγ , 0 (14) z = z0 + C sinγ .
Where C is a constant. System (14) assures that (r, z) is on the surface g = C . Substituting (14) into the second equation of (13) and simplifying leads to
dϕ ω 1 dz ω 1 ω = − = − C cosγ = − . dγ c C cosγ dγ c C cosγ c
Taking the integral constant to be zero leads to
ω ω z − z ϕ = − γ = − Arc tan 0 . c c r − r0
Therefore,
ω z − z f = −θ + ϕ = −θ − Arc tan 0 . c r − r0
12 Figure
Fig. 2. Toroidal flow with f=0, g=-1 and c=2, ω=0.15, r0 = 2 and z0 = 0 Which is the same as the solution given in [19]. A streamline is shown in Figure 2.
4.2 A vortical bubble in a spherical coordinate system
4.2.1 Equations in a spherical coordinate system
It is convenient sometimes to describe the velocity field in a spherical coordinate system. Here we simply list the corresponding versions of (9), (11) and (12) in a spherical coordinate system
(r, φ, θ ). Note that the following formulae correspond to those of ξ1 and ξ2 in Section 3.
The primary stream function g in the spherical coordinate system satisfies
1 ∂g 1 ∂g v = − , v = . (15) 1 r 2 sinφ ∂φ 2 r sinφ ∂r
Let f = −θ + ϕ(r, φ ), we have
∂ϕ ∂ϕ v = r sinφ v + sinφ v . (16) 3 1 ∂r 2 ∂φ
13 The equations in (12) become
dϕ v dϕ v rv = 3 , v = 3 . (17) 1 dr sinφ 2 dφ sinφ
We will use these equations to calculate the dual stream functions in spherical coordinate system.
4.2.2 Flow description and solution for primary stream function
The following example is from Moffatt [17], and is significant because it is the most complicated example of a recirculating flow with swirl that we have found that can be described analytically. The solution represents a "bubble" of vortical flow moving in a vorticity free, or irrotational, flow. Moffat presented the Stokes stream function but no solutions for the second stream function were given. The following discussion shows how to calculate the second stream function using the formula given in this paper.
A non-linear equation for the Stokes stream function is
D 2 g = r 2dH / dg − CdC / dg (18) for steady axi-symmetric flows in a cylindrical coordinate system, where D 2 = ∂ 2 / ∂r 2 − ∂ / r∂r + ∂ 2 / ∂z 2 [17]. Equation (18) is derived by the following procedure. a) Write the velocity field in terms of the Stokes stream function that satisfies c = 1 in (8). b) Calculate the vorticity field; assuming rv2 depends only on the Stokes stream function. c) Calculating the θ component of the vorticity under the above assumption. d) Substitute the result from step (3) into the expression obtained in (2).
As described by Moffat [17], an interesting family of solution for equations (18), each of which represents a blob of vorticity confined to the sphere R < a , exists when C(g) and H (g) have the forms
H = H0 − Ag, C = ±α g , where H0, A and α are constants. If we take α = 1 and C = g , for simplicity of the calculations, in the following a solution is
3 2 2 2 g = r sin φ − A + c()1/ r J 3 ()r (19) 2
14
where J 3 (r) is a Bessel function, c is a constant and the θ component of the velocity is 2 uθ = g /(r sinφ ) in a spherical coordinate system (r, φ, θ ). On the surface to the unit sphere, g can be matched to a stream function for the steady irrotational flow outside the sphere with velocity (0, 0, −U ) at infinity. The external stream function is,
1 g = − U (r 2 −1/ r)sin2 φ . (20) 2
4.2.3 Solution for the second stream function
We now show how to calculate the other stream function for only the flow inside the sphere r = 1. The calculation for the other stream function for the flow outside of the sphere can be achieved similarly.
Taking c = A / J 3 (1) in (19) for simplicity, the corresponding velocity inside the sphere r = 1 is 2
V = ( 2Acosφ[−1 + ()r cos r − sin r / b / r 3 ], Asinφ[2 + (r cos r − sin r)/ b / r 3 + sin r / b / r],
Ar sinφ[]−1 + ()r cos r − sin r / b / r 3 ) where b = cos1 − sin1. The second equation in (17) becomes
dϕ v 1 = 3 = . (21) dr rv1 sinφ 2cosφ
Because both r and φ in (21) are on a surface g = constant , they are not independent. Calculating cosφ by solving g = C′ for the stream function g in (19) and then substituting cosφ into (21) leads to
3 2 r − A + c()1/ r 2 J ()r dϕ 1 3/ 2 = ± , 3 dr 2 2 2 r − A + c()1/ r J 3/ 2 ()r − C′
15 π where C′ is the constant chosen for the streamline visualisation. When 0 ≤ φ < , the sign is 2 π positive and when < φ < π , the sign is negative. Integrating the above equation and taking the 2 integration constant to be zero, then
3 2 r v − A + c()1/ v 2 J ()v 1 3/ 2 ϕ = ± dv , (22) 2 ∫ 3 r 2 0 v − A + c()1/ v 2 J 3/ 2 ()v − C′
where r0 is a constant and r is on surface g = C′. This is an integral with parameter C′ . After
3 2 2 2 calculating the integral for ϕ , substituting C′ = r sin φ − A + c()1/ r J 3 ()r into the resulting 2 expression produces the final expression for result ϕ . The stream function is then f = −θ + ϕ .
4.2.4 Evaluation of the solution for the second stream function and the construction of streamlines
Although the integral in (22) cannot be evaluated analytically, it can be easily treated numerically because there is an analytical expression for the integrand. When a pair of coordinates ()f0, g0 is given, the procedure for drawing the streamline determined by stream surfaces f = f0 and g = g0 inside of the sphere is as flows.
a) Calculate the minimum r0 and maximum r1 of radius r for a given constant C by solving g = C for the stream function g in (19). This is done by taking sin2 φ = 1 and solving
C g = C (since function r determined by g = C reaches its maximum and minimum 2 sin φ π when φ = ). 2
3 2 r v − A + c()1/ v 2 J ()v 1 1 3/ 2 b) Calculate the integral κ = dv numerically; Simpson's 2 ∫ 3 r 2 0 v − A + c()1/ v 2 J 3/ 2 ()v − C′ method is used.
16 c) Calculate the coordinate arrays rj and φ j ( j = 1,L, p ) numerically such that
r0 ≤ r1 < L < rp ≤ r1 and g(rj , φ j ) = g0 ;
d) Calculate θ i . This is done by repeat the following two steps starting from n = 0 and then adding 1 to n after the two steps are completed once until the desired part of the streamline are drawn.
i. Calculate θ 2np+ j = 2nκ + ϕ j − f0 where ϕ j is the value of the integral in (22) from
r0 to rj for j = 1,L, p using Simpson's method;
ii. if a longer streamline is needed, let θ()2n+1 p+ j = 2nκ + ϕ p+1− j − f0 where ϕ j is
the negative value of the integral in (22) from r0 to rp+1− j for j = 1,L, p using Simpson's method;
e) Draw the line that connects points (rj , φ j , θ2np+ j ) and (rp+1− j , φ p+1− j , θ()2n+1 p+ j ) for
j = 1, L, p by straight-line segments according to the increasing order of the index of θ i . The resulting curve is the representation of the streamline.
Since function f is independent of φ from (22), the surface constructed by quadrilaterals connecting (rj , φt , θ2np+ j ) and (rp+1− j , φt , θ()2n+1 p+ j ) for j = 1, L, p and t = 1, L,T where
0 ≤ φ1 < L < φT ≤ π according to the increasing order of the indexes of θ i and φt is the approximation of the stream surface presented by f = f0 .
4.2.5 Results
Figure 3 shows some of the streamlines inside the unit sphere. In order to show the related positions between the streamlines and the sphere, the figure illustrates the streamlines from outside the sphere through a cut-off quarter of the sphere’s surface. Figure 4 shows streamlines inside the unit sphere from a different viewpoint. Figure 6 shows the streamlines for g = 0 which corresponds to surface of the unit sphere. For this case, we have θ = constant for r = 0 and r = 1 or a continuous variation in real number field for φ = 0 and φ = π from (21) and f = constant . However, the last case gives only two segments with one end at the centre of the unit sphere and the other at (1, 0, θ ) and (−1, π , θ ) respectively because (1, 0, θ ) gives the same point for any θ , so
17 does (−1, π , θ ). The streamlines cover the whole sphere and define a toroidal recirculation around the surface of the sphere and along the z axis.
The velocity outside of the sphere r = 1 without swirl is
1 1 1 V = −U 1 − cosφ , U 2 + sinφ , 0 . 3 3 r 2 r
Figure
Fig. 3. Vortical bubble : streamlines inside the unit sphere
18 Figure
Fig. 4 Vortical bubble: streamlines inside of unit sphere
Figure
Fig. 5. Vortical bubble: Streamlines external to the unit sphere
19 Figure
Fig. 6. Vortical bubble: Streamlines for g=0, on the unit sphere and z-axis
Because v3 = 0 in (17), we can take ϕ = 0 and therefore f = −θ . Figure 5 shows the streamlines outside of the sphere. As with Figure 3, the figure illustrates the relative positions of the streamlines and the sphere.
4.3 CFD velocity fields
A CFD velocity field is defined at discrete locations and is assumed to be an approximation to a continuous mass conservative velocity field in the same domain. Although a CFD field may be algebraically conservative in that the mass flow balance for each mesh cell is satisfied, to apply the technique introduced in this paper we need to construct an interpolation within each cell that represent a continuous mass conservative momentum field. Li [14] proposed a mass conservative streamline tracking method for three-dimensional CFD velocity fields defined on hexahedral or tetrahedral meshes. Because a hexahedron can be decomposed into five or six tetrahedra [18], it was sufficient to consider only tetrahedral meshes. As described in Section 2 of [14] interpolations satisfying mass conservation to a specified tolerance can be found by iterative subdivision of the cells. This process was used in [14] to construct streamlines by directly integrating the mass conservative momentum field.
20
The process of constructing stream surfaces and streamlines using the approach presented here can be illustrated for a velocity field in a three dimensional Cartesian coordinate system. Assume that a CFD velocity field depends on x and y only. A continuous velocity field V(x, y) can be constructed from the CFD velocity field using the approach of [14] The primary stream function g can be calculated for V(x, y) from (5). Letting
dx dy = = dt ρv1 ρv2 in (5) , rearrangement leads to
dx = v dt 1 (23) dy = v dt 2 for incompressible flows. We may conclude that the part of primary stream surface in each tetrahedron of the tetrahedral mesh is parallel to the z-axis and therefore we can solve the system in the xy plane. The expressions for the primary stream functions in each tetrahedron have been given for different cases in Section 3 of [13]. Because v1 and v2 are then continuous on the given CFD velocity domain, a differential function g in the terms of parameter t can be calculated from (23). g()x, y = 0 gives the primary stream surface in Cartesian coordinate system (x, y, z). The function ϕ in the second stream function f = −z + ϕ(x, y) can be calculated by equation (12a) on g()x, y = 0 and for this example ϕ is constant.
The above process can be extended to a CFD velocity field that depends on two coordinates in a three dimensional curvilinear coordinate system. A prerequisite is the generalization of the results in [13, 14] to curvilinear coordinate systems.
We have not found any methods that construct a continuous velocity field V(u,v) from a given
CFD velocity field in a three-dimensional space (ξ1, ξ2 , ξ3 ) where u or v ≠ any one of ξ1, ξ2 , ξ3 which means that the problem of finding the primary stream surface for an arbitrary flow field reduces to finding an appropriately aligned coordinate system and this remains as an unsolved problem.
21 5 Discussion
We have introduced a technique for calculating exact dual stream functions for flows depending on two variables. The technique reduces solving partial differential equations to solving two ordinary differential equations. The integral constant function χ(.) can be chosen as zero in the calculations. However, it is convenient sometimes to choose non-zero χ(.) such that the stream function is easy to analyse or has practical meaning. The two stream functions for all velocity fields with two variables given analytically can be calculated by the technique shown in this paper. The only condition is that the velocity components are continuous over the domain of integration.
Generally the flows that are dependent of only two variables such as three-dimensional axi- symmetric flows are important in practice. A generalised three-dimensional flow, such as the flow of cool air from an air conditioning outlet into a room, is quite difficult to analyse. Such flows are often approximated as being two-dimensional or axi-symmetric [p.73, 4] both cases being subsets of all flows that depend on only two variables. Using the technique given in this paper, two non- parallel stream functions for the flows that approximate the three dimensional ones can be constructed and used to analyse the behaviour of the flow and to construct streamlines using stream surfaces determined by the stream functions.
Acknowledgement The authors are grateful to Dr. Greg Balle, University of Washington for suggesting the Moffatt vortex as suitable example for the dual stream function approach. The research was supported by a New Zealand Science and Technology Post-Doctoral Fellowship awarded to Dr. Li.
REFERENCES
[1] Appel, D.W., Hubbard, P.G., Landweber, L., Laursen, E.M., McNown, J.S., Rouse, H., Siao, T.T., Toch, A., Yih, C.S.: Advanced Mechanics of Fluids. John Wiley & Sons, Inc. 1959 [2] Beale, S.B.: Visualisation of three-dimensional flow fields using two stream functions. In: Proc. of 10th International Symposium on Transport Phenomena, 1997 [3] Buning, P.: Sources of error in the graphical analysis of CFD results. J. Scientific Computing 3, 149-164 (1988) [4] Daugherty, R.L., Franzini, J.B., Finnemore E.J.: Fluid Mechanics with Engineering Applications. Eighth Edition, McGraw-Hill Book Company, 1985 [5] Feng, D., Wang, X., Cai, W., Shi, J.: A mass conservative flow field visualization method. Computers & Graphics 21(6), 749-756 (1997) [6] Greywall, M.S.: Streamwise computation of three-dimensional flows using two stream functions. J. of Fluids Engineering 115, 233-238 (1993) [7] Handscomb, D.C.: Spline representation of incompressible flow. IMA J. Numerical Analysis 4, 491-502 (1984)
22 [8] Handscomb, D.C.: Interpolation and differentiation of multivariate functions and interpolation of divergence-free vector fields using surfaces splines. Technical Report 91/5, Oxford Univ. Computing Laboratory (1991) [9] Keller, J.J.: A pair of stream functions for three-dimensional vortex flows. Z. angew Math Phys 47, 821-836 (1996) [10] Kenwright, D.N., Mallinson, G.D.: A 3-D streamline tracking algorithm using dual stream functions. In: Proc. IEEE Visualization 1992, Boston, 62-68 (1992) [11] Knight, D., Mallinson, G.D.: Visualising unstructured flow data using dual stream functions. IEEE Transaction and Computer Graphics 2(4), 355-363 (1996) [12] Li, Z.: Mallinson, G.D.: Mass conservative fluid flow visualization for CFD velocity fields. KSME International Journal 15(12), 1794-1800 (2001) [13] Li, Z., A mass conservative streamline tracking method for two dimensional CFD velocity fields. J. of Flow Visualization and Image Processing 9, 75-87 (2002) [14] Li, Z.: A mass conservative streamline tracking method for three dimensional CFD velocity fields. In: Proc. of FEDSM’03 (4TH ASME_JSME Joint Fluids Engineering Conference), FEDSM2003-45526, 2003 [15] Mallinson, G.D.: The calculation of the lines of a three dimensional vector fields. In: de Vahl Davies, G. Fletcher, C. (Eds.): Computation Fluid Mechanics, pp. 525-534, North Holland, 1988 [16] Mallinson, G.D., Davis, G. de Vahl : Three-dimensional natural convection in a box. J. Fluid Mech, 83, part 1, 1-31 (1977) [17] Moffatt, H.K.: The Degree of knottedness of tangled vortex lines. J. Fluid Mech. 35, 117-129 (1969) [18] Nielson, G. M: Tools for triangulations and tetrahedrization and construction functions defined over them. In: Nielson, G. M, Hagen, H., Mueller, H. (Eds.): Scientific Visualization: Overviews, Methodologies, and Techniques, pp. 429-526, IEEE CS Press, 1997 [19] Reztsov, A.V., Mallinson, G.D.: Dual stream functions for 3D swirling flows. In: Proc. of 13th Australian Fluid Mech. Conference, Melbourne, 179-182 (1998) [20] Yeung, P.K., Pope, S.B.: An algorithm for tacking fluid particles in numerical simulations of homogeneous turbulence. J. Computational Physics 79, 373-416 (1988) [21] Yih, C.S.: Stream functions in three dimensional flows. La Houlle Blanche 3, 445-450 (1957)
23