You are on page 1of 9

Streamline calculations.

Lecture note 1

February 23, 2007

Application of streamlines
Visualization and analyzation of vector fields (flow fields). Used in e.g.
Fluid dynamics
Aerodynamics
Magnetostatics (e.g. medical imaging)
Electrostatics
Flow through porous media
Reservoir simulation (multiphase flow in porous media)

Visualization
Reformulation/simplification of the flow equations
History matching
Upscaling

Ground water flow


Contaminant transport (particle tracking)
Flow nets
Flow based gridding

Streamlines and path lines


General definition of a streamline s( ) = x( ) says that the tangent
to the streamline should be equal to the velocity at a given instant in
time:
dx( )
= v(x, t),
x(0) = x0
(1)
d
Here, is a parameter that follows (parameterizes) the streamline,
whereas t is the real (physical) time.

Since the streamlines are independent of time, the streamlines describe


the (direction of the) flow field at a given instant in time.
The parameter measures the pseudo-time (measured in ) needed
for a particle to travel a given distance along the streamline at a given
instant of the physical time t.
Note: In reservoir simulation, both and the shape of the streamline
are important, wheras in other applications, such as visualization, only
the shape of the streamlines may be important.
General definition of a path line p(t) = x(t) says that the tangent to
the pathline, at a given time t and position x, should be equal to the
velocity at the same time and space position:
dx(t)
= v(x, t),
dt

x(0) = x0

(2)

A pathline describes the geometry of the trajectory of a particle exposed to the velocity field v(x, t).
The parameter t of the path line gives the (physical) time needed for
a particle to travel a given distance along its path line.
Note: We use notation x() for both path lines and streamlines, which
makes it difficult to distinguish between a path line and a streamline. We have therefore introduced the additional notation s( ) for a
streamline, and p(t) for a path line. Alternatively, Equations (1) and
(2) could have been written
ds( )
= v(s),
d
dp(t)
= v(p, t),
dt

s(0) = s0
p(0) = p0 .

Since this notation did not seem to be less unambiguous, it was discarded.
Example
Compute the path lines p(t), and then the streamlines s( ), at t = 1
for
 
t
v=
,
(3)
1
such that s(0) = p(0) = [0, 0]. The solution is easily obtained by
direct integration (or inspection) of the component equations of (1)
2

=3

t=3

2.5

t=2
2

=2

1.5

t=1
1

=1
0.5

0.5

1.5

2.5

3.5

4.5

Figure 1: A path line in red, and a streamline in blue. Values of the parameters t and are indicated at some points.
and (2):
 

s( ) =

p(t) =

 t2 
2

(4)

See Figure 1
If v is independent of t, streamlines and path lines coincide.
We can think of a streamline as a path line for a steady flow field.
Alternative definitions of streamline:
Cross product
v ds = 0

(5)

The system of equations (1) or (5) can be written in component


form as
dx
= vx , x(0) = x0 ,
(6)
d
dy
= vy , y(0) = y0 ,
(7)
d
dz
= vz , z(0) = z0 .
(8)
d
Elimination of time parameter. In 2D:
vy
dx
dy
dy
=
=

(9)
vx
vy
dx
vx
In 3D:
dy
dz
dx
=
=
vx
vy
vz
3

(10)

4
3

Figure 2: Field plot for v = [1, y]. A streamline s( ) is started from s(0) =
s0 = [1, 1] and traced to the point s(1).

2.1

Integration

We start by analytical methods.


Simplest case: Equations are separable: Example: v = [1, y], x0 =
[1, 1]. Then s( ) = [ + 1, e ], or y = ex1 . See Figure 2.
Divergence of a vector field:
v =
Curl of a vector field:

i
j k


v = x y
z
v
vy vz
x

vx vy
vz
+
+
.
x
y
z

(11)









= vz vy i + vx vz j + vy vx k

y
z
z
x
x
y

In 2D, if v = [vx (x, y), vy (x, y), 0], then




vx
vy

v =
k
x
y

(12)

2.1.1

Potential flow

Suppose we have both divergence free and irrotational flow in 2D


v =0

v =0

(13)

Define an analytic function F (z) (complex potential) as


F (z) = (x, y) + i(x, y)

(14)

From the Cauchy-Riemann equations, we know that

=
x
y

=
y
x

(15)

Define v = , or
vx =

vy =

,
y

(16)

then (x, y) is harmonic, and


2 2

v = =
+ 2 =
+
2
x
y
x y
y
2

= 0,

(17)

and
vy
vx
2
2

= 0.
x
y
xy yx

(18)



+
=

= 0.
x x
y y
y x
x y

(19)

| v| =
We also have,
=

which implies that level curves of and are orthogonal.


The function is called a potential function, and is called the stream
function.
The function must be the harmonic conjugate of .
Since the velocity v is orthogonal to the level surfaces of (x, y) (v =
), the function must describe the streamlines.

2.5
2
1.5
1
0.5
0
0.5
1
1.5
2
2.5
2.5

1.5

0.5

0.5

1.5

2.5

Figure 3: Field lines (blue arrows) for v = [2x, 2y], streamlines (red
curves), and equipotential curves (green lines).
Example
Let


(x, y) =

2x
v=
2y

(20)

We have

= 2x
x

2xdx = x2 + k(y),

(21)

and

= h (y) = 2y
y

h(y) = y 2

(x, y) = x2 y 2 (22)

The function is the harmonic conjugate of . It is easy to see that


(x, y) = 2xy

2.1.2

(23)

Stream function in 2D

Assume only v = 0. Then


  " #
v
v = x = y
vy

x
where (x, y) is called the stream function.
6

(24)

A streamline can be defined by rewriting Equations (6) and (7) as


vy vx

dy
= 0.
dx

(25)

We then have
dy
dy
d
(x, y(x)) =
+
= vy + vx
= 0.
dx
x
y dx
dx

(26)

Thus,
(x, y) = const

(27)

represents a streamline.
Determining the streamfunction: If v = 0, the streamfunction can
be determined from Equation (24) by integration:
Z

= vy

(x, y) = vy dx + h(y)
x
Which implies,

Z
vy

=
dx + h (y)
vx =
y
y

Z
Z Z
vy
h(y) = vx dy +
dx dy
y

Z
Z
Z Z
dvy
(x, y) = vx dy vy dx +
dx dy
dy

(28)
(29)

Note: it might seem that the last two terms on the right hand side
will cancel, since by changing the order of integration, we have


Z Z
Z
Z Z
dvy
dvy
dx dy =
dy dx = vy dx,
(30)
dy
dy
but in fact, they will give quite different information about the unknown integration constant.
Example
Let


Ax + B
v=
Ay + C

v = 0.

(31)

Find the streamfunction passing through x = (1, 1). We have



Z
Z
Z Z
dvy
dx dy =
(x, y) = vx dy vy dx +
dy
(Ax + B)y (Ay + C)x Axy = Axy + By Cx (32)
7

The streamline is given by


(x, y) = const
(1, 1) = A + B C
2.1.3

(33)

const = A + B C

(34)

dx
dz
=
vx
vz

(35)

Stream functions in 3D

We will solve
dy
dx
=
vx
vy

dy
dz
=
vy
vz

The solution to these equation should be a streamline. It can be


shown, that if v = 0, this can be expressed as the intersection of
two independent surfaces,
f (x, y, z) =

g(x, y, z) = ,

(36)

where and are constants, such that (since the streamlines are embedded in level curves of both f and g)
v = f g

(37)

I have not found (so far) any general way to determine the functions
f and g.
For cases below we can determine them:
Example 1
Let v = [z, z, (x + y)]. Then
dy
dx
=
vx
vy

dy
dx
=
z
z

y = x + C1

(38)

Choose the constant C1 = 0. Then


dz
dx
=
vx
vz

x2 +

dx
dz
=
z
2x

z2
= C2
2

2xdx = zdz

x2 y 2 z 2
+
+
= C2
2
2
2

(39)

x2 y 2 z 2
+
+
2
2
2

(40)

Then let
f (x, y, z) = x y

g(x, y, z) =

And we can check that v = f g.


8

Example 2
Let v = [x, 1, 1]. Then
dy
dx
=
vx
vy

dx
dy
=
x
1

x = C3 ey

(41)

Choose C3 = 1. Then
dy
dz
=
vy
vz

dz
dy
=
1
1

y = z + C4

Choose C4 = 0. Then let


f (x, y, z) = x ey

g(x, y, z) = y z

(42)

But now

References


i
j
k

f g = 1 ey 0
0
1
1




= [ey , 1, 1] 6= v

(43)

You might also like