Sunteți pe pagina 1din 5

Vorticity – Stream function Solver in Cylindrical Coordinates

L. Brieda
May 27, 2016

This document summarizes equations used to solve flow in a cylindrical pipe using the stream function
approach as seen in https://www.particleincell.com/2016/vorticity-streamfunction-cylindrical.

1 Governing Equations
1.1 Velocity Components
Velocity components of an incompressible axisymmetric flow can be described using Stokes stream function
ψ as [1]

1 ∂ψ
uz = u = (1)
r ∂r
1 ∂ψ
ur = v = −
r ∂z
The azimuthal component uθ does not depend on the stream function and can be defined independently. In
this writeup, uθ = 0. Also, the volumetric flow bounded by streamtube ψ is Q = 2πψ. This formulation
automatically satisfies continuity ∇ · ~u = 0, since

1 ∂(rur ) ∂uz 1 ∂2ψ 1 ∂2ψ


+ =− + =0
r ∂r ∂z r ∂r∂z r ∂z∂r

1.2 Vorticity
~ = ∇ × ~v . For axisymmetric flow with ∂/∂θ = 0 and uθ = 0 only the wθ component
Vorticity is defined as ω
survives and we have
∂v ∂u
ω = ωθ = − (2)
∂z ∂r

1.3 Stream function governing equation


By substituting definitions of velocity in terms of Stokes stream function, Eq. 1, into Eq. 2 for vorticity, we
obtain
   
∂ 1 ∂ψ ∂ 1 ∂ψ
ω=− −
∂z r ∂z ∂r r ∂r
2 2
1∂ ψ 1∂ ψ 1 ∂ψ
=− − + 2
r ∂z 2 r ∂r2 r ∂r
or
∂ 2 ψ ∂ 2 ψ 1 ∂ψ
+ − = −ωr (3)
∂z 2 ∂r2 r ∂r
The left side of this equation is not ∇2 ψ due to the negative sign on the last term on the left side.

1
1.4 Vorticity Transport Equation
The temporal evolution of vorticity is given by the vorticity transport equation. This equation is normally
derived by taking curl of the momentum equation, for instance see [2] for details, and is given by

∂ω
+ ~v · ∇ω = ν∇2 ω
∂t
For the axisymmetric flow we have
 2
∂ ω ∂ 2 ω 1 ∂ω

∂ω ∂w ∂w
+u +v =ν + + (4)
∂t ∂z ∂r ∂z 2 ∂r2 r ∂r

2 Finite Difference Form


2.1 Stream function
Equation 3 is discretized using standard central difference as
1 1 1
(ψi−1,j − 2ψi,j + ψi+1,j ) + 2 (ψi,j−1 − 2ψi,j + ψi,j+1 ) − (ψi,j+1 − ψi,j−1 ) = ωi,j ri,j (5)
∆2 z ∆ r 2ri,j ∆r

This equation is solved using an SOR-accelerated Jacobi solver, with convergence check ||ψ k+1 − ψ k || < tol .

2.2 Vorticity
The vorticity transport equation, Equation 4, is advanced using the Runge-Kutta fourth-order (RK4)
method. Letting vorticity transport equation be given by
 2
∂ ω ∂ 2 ω 1 ∂ω

∂ω ∂w ∂w
=ν 2
+ 2
+ −u −v
∂t ∂z ∂r r ∂r ∂z ∂r
∂ω
= R(ω)
∂t
we have [3]

∆t k
w(1) = wk + R (6)
2
∆t (1)
w(2) = wk + R (7)
2
w(3) = wk + ∆tR(2) (8)
∆t  k 
wk+1 = wk + R + 2R(1) + 2R(2) + R(3) (9)
6

3 Boundary Conditions
In order to solve this equation (using finite difference method) we need to specify boundary conditions.
There are five types of boundaries to consider for the tube problem: 1) wall, 2) axis of revolution, 3) inlet,
4) outlet on zmax, and 5) outlet on rmax. These are sketched in Figure 3.

3.1 Inlet
We assume the flow entering through the inlet is parallel to the cylinder axis. Thus at the inlet ur = v = 0
or
∂ψ
=0 (10)
∂z inlet

2
Figure 1: Boundary types for pipe problem

Substituting v = 0 into the vorticity equation gives us


∂u
ω inlet = − (11)
∂r
These equations are discretized using first order scheme as ψ0,j = ψ1,j and ω0,j = (u0,j−1 − u0,j+1 )/(2∆r).

3.2 Axis of Revolution


We require v = 0 as there can be no flow across the axis of revolution. Therefore ∂ψ/∂z = 0, and value of
ψ is constant along the axis. We set this value to zero, giving us

ψ axis = 0 (12)

Zero radial velocity also implies that along the axis ω = −∂u/∂r. Axial symmetry implies ∂()/∂r = 0 at
r = 0, and
ω axis = 0 (13)

3.3 Wall
Q = 2π(ψ2 − ψ1 ) is the volumetric flow rate between two stream tubes. With ψ1 = 0 being the axis of
revolution, we have Dirichlet
1 2
ψ wall = u0 rinlet (14)
2
along the outer wall. Vorticity boundaries along the wall are derived using similar approach to [2]. Since the
stream function is constant along a wall, derivatives of ψ in Equation 3 vanish in the wall direction. Along
a left wall we have
∂ 2 ψ
= −ωr
∂z 2 wall

Assuming the wall is at i = L, we can write the following Taylor series expansion

∂ψ ∂ 2 ψ ∆z 2
ψL+1,j = ψL,j + ∆z +
∂z L,j ∂z 2 L,j 2

Since ∂ψ/∂z = −vr


∂ 2 ψ ∆z 2
ψL+1,j = ψL,j − vL,j r∆z +
∂z 2 L,j 2

or
∂ 2 ψ 2(ψL+1,j − ψL,j ) 2vL,j r
2 = +
∂z L,j ∆z 2 ∆z
and finally
2(ψL,j − ψL+1,j ) 2vL,j
ω L,j = − (15)
r∆z 2 ∆z

3
Using similar approach, the boundary condition for a right wall at i = R is found to be
2(ψR,j − ψR−1,j ) 2vR,j
ω R,j = + (16)
r∆z 2 ∆z
Along the top wall, ∂ψ/∂z = 0 and Equation 3 reduces to
 2 
∂ ψ 1 ∂ψ
− = −ωr
∂r2 r ∂r wall
Again we start by expanding the second derivative,
∂ψ ∂ 2 ψ ∆r2
ψi,T −1 = ψi,T − ∆r +
∂r i,T ∂r2 i,T 2

Using ∂ψ/∂r = ur, the above reduces to


∂ 2 ψ 2(ψi,T −1 − ψi,T 2uT,j r
2 = 2
+
∂r i,T ∆r ∆r
Substituting into the original equation,
2(ψi,T −1 − ψi,T ) 2ui,T r
+ − ui,T = −ωr
∆r2 ∆r
or
2(ψi,T − ψi,T −1 ) 2ui,T ui,T
ω i,T = 2
− + (17)
r∆r ∆r r
There is no bottom wall in this problem, but for generality, the matching boundary condition can be found
to be
2(ψi,B − ψi,B+1 ) 2ui,B ui,B
ω i,B = 2
+ + (18)
r∆r ∆r r

3.4 Zmax outlet


In general, the flow will be aligned with the z-axis, however, there may be some non-zero v component due
to jet expansion. As such, simply setting ∂ψ/∂z|zmax = 0 may not be valid. Following approach in [2], on
zmax we let
∂ψ
= −vr (19)
∂z zmax

which is differenced as ψni−1,j = ψni−2,j − ∆zvni−1,j rj . Vorticity boundary condition on the outlet is set as
∂ω
=0 (20)
∂z zmax

or ωni−1,j = ωni−2,j

3.5 Rmax outlet


This is the trickiest of all boundaries and I am not particularly sure what boundary condition is most
applicable. Generally, we expect there to be very little / no flow here. Setting no-flow boundary is analogous
to making this boundary a wall, with ψ = ψwall and ω set from Equation 17. However, I think more
appropriate boundary may be requiring that any flow there may be is perpendicular to the wall, hence u = 0
and
∂ψ
=0 (21)
∂r rmax
which is differenced as ψi,nj−1 = ψi,nj−2 . Vorticity boundary condition is set similarly to the zmax outlet
∂ω
=0 (22)
∂r rmax

or ωni−1,j = ωni−2,j

4
References
[1] Wikipedia, “Stokes Stream Function”, Accessed May 10th, 2016, https://en.wikipedia.org/wiki/Stokes_stream_
function
[2] Salih, A., “Streamfunction-Vorticity Formulation”, Department of Aerospace Engineering Indian Institute of Space Science
and Technology, March 2013, https://www.iist.ac.in/sites/default/files/people/psi-omega.pdf
[3] Tannehill, J., Anderson, D., Pletcher, R., Computational Fluid Mechanics and Heat Transfer, Taylor & Francis, 2nd ed.,
1997

S-ar putea să vă placă și