Week 7
Week 7
(11)
Where the terms have been numbered as (i) to (v) for our reference
e
Finite Element Method
(31)
Finite Element Methods
(32)
Finite Element Method
The convective heat loss term (iii) can be obtained as:
(33)
(34)
Finite Element Method
3
The shape functions for the vertices of the elemental domain:
(35)
Finite Element Method
(36)
All the above mentioned elemental matrices and vectors have been
obtained from the integration of the expressions for N1, N2 and N3 , as
defined in the equation (11)
Finite Element Method
All the above mentioned elemental matrices and vectors have been obtained from the
integration of the expressions for N1 , N2 and N3 , as defined in Eq. (11). Let us, for the
present, consider a problem with no radiating boundary. Thus, the nodal equation for
any of the nodes of the FEM can be constructed by appropriately summing up the
contributions from the (i) heat conduction term (ii) heat generation term (iii) convective
boundary terms and (ii) the heat flux boundary. If the point lies on a known temperature
boundary, the nodal equation is very simple, it takes the form Ti = Tb for the node i
where Tb is the prescribed boundary temperature.
To find the properties of the overall system, we must assemble all the individual
element equations, that is, to combine the matrix equations of each element in an
appropriate way such that the resulting matrix represents the behaviour of the entire
solution region of the problem. The boundary conditions must be incorporated after
the assemblage of the individual element contributions that is
{K }{T } ={G}
Where {K } is the global LHS matrix, which is the assemblage of the individual
element LHS matrices, {G} is the global load vector which is assemblage of the
individual element load vectors and {T } is the global unknown vector
Finite Element Method
Global matrix equation in terms of nodal temperatures:
(37)
(38)
(39)
Finite Element Method
Although hr varies over the length of the line element L(e) due to
variation in the value of T* , it may not be worth the trouble if the
element sizes are not too large. In such situations:
(40)
where i and j are the nodes which make up the concerned radiation
boundary element.
Finite Element Method
The Unsteady Problems:
Governing equation for the problem is:
(41)
(42)
Finite Element Method
The resulting global matrix equation derived from equation
(42) takes the form:
(43)
For the implicit scheme, substituting for {Tn }k+1 from equation (43), we
get:
(47)
Solving the matrix equation (47), the temperature vector at the (k+1)th
time level can be obtained, knowing the kth level temperature vector.
Finite Element Method
(48)
4 3
1 2
Finite Element Method
Elements of Higher Orders::
(49)
Finite Element Method
(50)
(51)
The size of the elemental matrices will also be different for higher-
order elements.
Finite Element Method
Data Structure for Assembly
1. IEN array, the connectivity array, creates the connection between Local
node and Global node
IEN (1:Nen, 1: Nel)
Nen is the number of local nodes
Nel is the number of elements
2. ID array, the destination array, establishes the relation between Global
node number and the equation number
ID (1: Nnp)
Nnp is number of (Global) points
ID (A) = { P, P is any integer, denotes Eqn. number
{ 0, if A ∈ ng
Here ng is the Dirichlet boundary. The boundary value is specified. In
such cases, no computation is needed. There will be no equation
number.
Finite Element Methods
Data Structure for Assembly
Global node
ID
IEN
Equation Element
LM
Finite Element Methods
Example
Temp.
Specified 2
2 3 4 3
4 3 1
3
3 5 3
3
5 5 2 3
4 2 5
1
1 1
1 2
4 2
1 2 1 2 1
Temp.
Specified 4 5
denotes a local
3 node number
Here Nen=3, Nel=4, Nnp=5. denotes
1 2 element
number
Finite Element Methods
Example
LM Array: LM (3,4)
Nel
1 2 3 4
1 0 0 0 0
2 0 0 0 0
Nen 3 1 1 1 1
Finite Element Method
Fundamentals of the Finite Element Method for Heat and Fluid Flow,
Roland Lewis, Perumal Nithiarasu and K.N. Seetharamu, John Wiley and
Sons, 2004, Chichester, England
Thank You
Chapter 5
Vorticity-Stream Function
Approach
5.1 Introduction
The vorticity-stream function method is one of the most popular methods for
solving 2-D incompressible Navier -Stokes equations. The governing equations
are
∂u ∂u ∂p
ρ u +v =− + µ ∇2 u (5.1)
∂x ∂y ∂x
∂v ∂v ∂p
ρ u +v =− + µ ∇2 v (5.2)
∂x ∂y ∂y
and
∂u ∂v
+ =0 (5.3)
∂x ∂y
As it was discussed earlier, it is difficult to deal with equation (5.1 and 5.2)
due to the lack of presence of a separate equation for pressure p. We introduce
stream function (ψ) and vorticity (ω) as
∂ψ ∂ψ
u= , v=− (5.4)
∂y ∂x
∂v ∂u
ω= − (5.5)
∂x ∂y
We can readily see that existence of (5.4) automatically satisfies continuity equa-
tion (5.3).
1
5.2 Computational Fluid Dynamics
2
ψi+1, j + ψi−1, j + (ψi, j+1 + ψi, j−1 ) λ + ωi, j (∆x)2
or, ψi, j =
2 (1 + λ2 )
where λ is the mesh aspect ratio (∆x)/(∆y). Putting ∆x = ∆y, we get
1
∆x2
ψi, ψi+1, j + ψi−1, j + ψi,
j = j+1 + ψi, j−1 + ωi, j (5.8)
4
Now for equation (5.7) we can write
ψi+1, j − ψi−1, j
vi, j =− (5.12)
2∆x
Thus we have now a system of simultaneous equation, (5.8), (5.10), (5.11) and
(5.12) to be solved for ψi, j , ωi, j , ui, j and vi, j . Let us discuss the solution
procedure
3. Choose initial values of ψi, j and ωi, j at the interior grid points. Taking
initial values for vorticity as zero is usually acceptable. Initial values for
ψi, j at each i column of points can be calculated from the axial velocity
profile at that location. However, ui, j for interior points may be taken as
U∞ and vi, j = 0.
′
where, ψi,k j is the value from previous calculation, ψi,k+1
j is the most recent
′
value, F is the overrelaxation factor and ψi,k+1
j is newly adjusted better
guess.
5.4 Computational Fluid Dynamics
5. Calculate ui, j and vi, j at all the internal grid points using equation (5.11
and 5.12).
6. In a subsequent step, calculate ωi, j at all interior mesh points using equa-
tion (5.10).
7. Apply appropriate boundary conditions (which has been discussed, in de-
tails, in a following section).
8. Go back to step (4) and calculate ψi,k+1j with the help of current value of
k
ωi, j and ψi, j values, where k denotes the previous level. After, evaluating
′
ψi,k+1 k+1
j at all points, find out ψi, j at all points which are indeed improved
values. Start repeating steps 4 to 8 untill the desired degree of convergence
is achieved.
or, " 2 #
ym − y
u1, j = 1.5 Uav 1 − (5.18)
ym
j=js to JMAX
The stream function ψ1, j can be obtained from the axial velocity profile at the
inlet as Z y at j
ψ1, j = u(y) dy (5.20)
y at js
inlet
5.6 Computational Fluid Dynamics
Vorticity (ωi, j ) also depends on inlet velocity profile. Pao and Daugherty
(1969) used uniform axial velocity profile, v = 0, and then specified ω1, j =
0. Greenspan (1969) fixed up ψ1, j from axial velocity profile and assumed
∂v/∂x = 0, which results in
∂2ψ ∂u
ω1, j =− 2
=− (5.21)
∂y ∂y
∂u ∂v
= =0 (5.22)
∂x ∂x
Thoman and Szewczyk (1966) developed outflow boundary conditions through
setting
∂ω
=0 (5.23)
∂x
∂v ∂2ψ
Then, from = 0, they derived = 0. For constant ∆x, at i = IM AX,
∂x ∂x2
this gives:
ωIMAX, j = ωIMAX−1, j (5.24)
ψIMAX, j = 2 ψIMAX−1, j − ψIMAX−2, j (5.25)
∂ω
In a similar way, v can be evaluated. These are then used in equation (5.9)
∂y
for the subsequent development of equation (5.10).
2 ∂u ∂v ∂u ∂v
∇ p = 2ρ −
∂x ∂y ∂y ∂x
or,
" 2 #
∂2ψ ∂2ψ ∂2ψ
2
∇ p = 2ρ − (5.32)
∂x2 ∂y 2 ∂x∂y
1 ∂ψ ∂ψ
vr = and vθ = − (5.34)
r ∂θ ∂r
5.8 Computational Fluid Dynamics
2 ∂u ∂v ∂u ∂v
∇ p = 2ρ −
∂x ∂y ∂y ∂x
or,
" 2 #
∂2ψ ∂2ψ ∂2ψ
2
∇ p = 2ρ − (5.32)
∂x2 ∂y 2 ∂x∂y
1 ∂ψ ∂ψ
vr = and vθ = − (5.34)
r ∂θ ∂r
Vorticity-Stream Function Approach 5.9
∂ 2 ψ 1 ∂ψ 1 ∂2ψ
+ + 2 = −ω (5.35)
∂r2 r ∂r r ∂θ2
The boundary conditions for stream function and vorticity have to be derived.
The stream function is a constant on the axis (θ = 0 and θ = π). This follows
vθ = 0 by the virtue of axisymmetry. On the solid surface, at r = R0 , a
constant stream line is obtainable following the normal velocity vr = 0 on the
cylinder.This flow configuration demands that the axis and the cylinder surface
are the parts of the same streamline. The value of the stream function can be
set equal to zero on these surfaces (Figure 5.2). Therefore, we can write
ψ = 0 on θ = 0, r ≥ R0
ψ = 0 on θ = π, r ≥ R0
ψ = 0 on r = R0 , 0 ≤ θ ≤ π (5.36)
r → ∞ ψ → U0 r sin θ (5.37)
ψ = U0 R∞ sin θ at r = R∞ (5.38)
5.10 Computational Fluid Dynamics
ω = 0 at r = R∞ (5.39)
The velocity is uniform and velocity gradients are zero, the above-mentioned
condition if justified. On the axis (θ = 0 and π), ∂vr /∂θ = 0 due to axisymmetry
and ψ = 0 for all r.
Thus, from Equations (5.34) and (5.35) it can be seen that
ω = 0 on θ = 0, r ≥ R0
ω = 0 on θ = π, r ≥ R0 (5.40)
At r = R0 , the vorticity is not zero. Here, the wall vorticity has to be derived in
the same way as in the backward facing step problem. Equation (5.35) together
with the impervious and no-slip conditions of vr = 0 and vθ = 0 (or ψ = 0 and
∂ψ/∂r = 0 for all θ), yields
∂2ψ
= −ω (5.41)
∂r2
Now, the wall vorticity can be calculated using the same strategy as (5.14).
Considering a cylindrical-polar grid as shown in Figure 5.2, the derivatives of
stream function as well as vorticity can be replaced by their central difference
forms as:
Similarly, expressions for the derivatives of vorticity can also be obtained. Sub-
stituting these expressions into the governing equations (5.33) and (5.34) the
nodal equations of all interior nodes (i = 2, ... imax − 1, j = 2, ...jmax − 1) can
be derived. Finally, the set of discretized equations and boundary conditions are
solved by iterative methods. An upwinding strategy for the convective terms
can be implemented based on the magnitudes of vr and vθ , in a similar manner
as described earlier.
References
1. Fromm, J.E. and Harlow, F.H., Numerical Solution of the Problem of
Vortex Street Development, The Physics of Fluids, Vol. 6, pp. 975-982,
1963.
2. Greenspan, D., Numerical Studies of Prototype Cavity Flow Problems,
The Computer J., Vol. 12, pp. 88-93, 1969.
3. Pao, Y.H. and Daugherty, R., Time Dependent Viscous Incompressible
Flow Past a Finite Flat Plate, Boeing Scientific Research Laboratories,
D1 - 82 - 0822, 1969.
4. Sundararajan, T., Solution of Viscous Incompressible Flows by the Stream
Function- Vorticity Formulation, in Computational Fluid Flow and Heat
Transfer, 2nd Edition, pp. 209- 227 ed. K Muralidhar and T. Sundarara-
jan,Narosa Publishing House, India, 2003.
5. Thoman, D.C. and Szewczyk, A. A., Numerical Solutions of Time De-
pendent Two-dimensional Flow of a Viscous Incompressible Fluid Over
Stationary and Rotating Cylinders, Tech. Rept. 66-14, Heat Transfer and
Fluid Mechanics Lab., University of Notre Dame, Indiana, USA, 1966.
Problems
1. Suppose you are modeling laminar flow by Stream-function-vorticity method
in a method in a 2D plane channel as shown below. Write the boundary
conditions for u, v, ψ and ω on AB, BC, CD and AD sides (please follow
the order in which they appear)
2. Drive first order and second order accurate vorticity boundary conditions
on a solid surface.