0% found this document useful (0 votes)
29 views25 pages

Unit 2 With QP

The document discusses numerical methods for solving partial differential equations (PDEs) called finite difference and finite volume methods. It begins by explaining that numerical solutions provide discrete approximations of continuous analytical solutions to PDEs. Next, it describes how the domain is divided into a discrete grid and how the PDE is discretized and solved at each grid point to approximate the solution over the entire domain. Finally, it outlines the finite volume method for one-dimensional and two-dimensional steady-state diffusion problems, including grid generation, discretization of the governing PDE over control volumes, and solution of the resulting algebraic equations.

Uploaded by

jaga67676734
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views25 pages

Unit 2 With QP

The document discusses numerical methods for solving partial differential equations (PDEs) called finite difference and finite volume methods. It begins by explaining that numerical solutions provide discrete approximations of continuous analytical solutions to PDEs. Next, it describes how the domain is divided into a discrete grid and how the PDE is discretized and solved at each grid point to approximate the solution over the entire domain. Finally, it outlines the finite volume method for one-dimensional and two-dimensional steady-state diffusion problems, including grid generation, discretization of the governing PDE over control volumes, and solution of the resulting algebraic equations.

Uploaded by

jaga67676734
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

UNIT II FINITE DIFFERENCE AND FINITE VOLUME METHODS FOR DIFFUSION

Derivation of finite difference equations – Simple Methods – General Methods for first and second order accuracy
– Finite volume formulation for steady state One, Two and Three –dimensional diffusion problems –Parabolic
equations – Explicit and Implicit schemes – Example problems on elliptic and parabolic equations – Use of Finite
Difference and Finite Volume methods.

DISCRETIZATION
Analytical solutions of partial differential equations involve closed-form expressions which give the variation of
the dependent variables continuously throughout the domain. In contrast, numerical solutions can give answers
at only discrete points in the domain, called grid points.

o Consider Fig. 4.1, which shows a section of a discrete grid in the xy plane. For convenience, let us assume that
the spacing of the grid points in the x direction is uniform and given by Δx and that the spacing of the points in
the direction is also uniform and given by Δy, as shown in Fig. 4.1. In general, Δx and Δy are different.
o Fig. 4.1, the grid points are identified by an index i which runs in the x direction and an index j which runs in the
y direction. Hence, if (i, j) is the index for point P in Fig. 4 .1, then the point immediately to the right of P is
labeled as (i + 1, j), the point immediately to the left is (i - 1, j), the point directly above is (i, j + 1) , and the point
directly below is (i, j - 1)
o Indeed, it is not absolutely necessary that Δx or Δy be uniform; we could deal with totally unequal spacing in both
directions, where Δx is a different value between each successive pairs of grid points, and similarly for Δy.
o However, the majority of CFD applications involve numerical solutions on a grid which contains uniform
spacing in each direction, because this greatly simplifies the programming of the solution, saves storage space,
and usually results in greater accuracy. This uniform spacing does not have to occur in the physical xy space; as
is frequently done in CFD,
o The numerical calculations are carried out in a transformed computational space which has uniform spacing in
the transformed independent variables but which corresponds to non-uniform spacing in the physical plane.
o In any event, in this chapter we will assume uniform spacing in each coordinate direction but not necessarily
equal spacing for both directions; i.e., we will assume Δx and Δy to be constants, but Δx does not have to equal
Δy .
o Figure 4.1 is an example of a structured grid

INTRODUCTION TO FINITE DIFFERENCES


o We are interested in replacing a partial derivative with a suitable algebraic difference quotient, i.e., a finite
difference.
o Most common finite-difference representations of derivatives are based on Taylor's series expansions. For
example, referring to Fig. 4.1, if ui,j denotes the x component of velocity at point (i, j) , then the velocity ui+1,j , at
point (i + 1, j) can be expressed in terms of a Taylor series expanded about point (i, j) as follows

Equation ( 4 . 1) is mathematically an exact expression for ui+1,j if (1 ) the number of terms is infinite and the
series converges and/or (2) Δx -+ 0.
FINITE VOLUME FORMULATION
INTRODUCTION
o Here we develop the numerical method based on this integration, the finite volume (or control volume) method,
by considering the simplest transport process of all: pure diffusion in the steady state.
o The governing equation of steady diffusion can easily be derived from the general transport equation (2.39) for
property φ by deleting the transient and convective terms.

This gives

o By working with the one-dimensional steady state diffusion equation, the approximation techniques that are
needed to obtain the so-called discretized equations are introduced.

Finite volume method for one dimensional steady state diffusion


Step 1: Grid generation
o The first step in the finite volume method is to divide the domain into discrete control volumes.
o Let us place a number of nodal points in the space between A and B. The boundaries (or faces) of control volumes
are positioned mid-way between adjacent nodes. Thus each node is surrounded by a control volume or cell. It is
common practice to set up control volumes near the edge of the domain in such a way that the physical boundaries
coincide with the control volume boundaries.

Step 2: Discretisation
The key step of the finite volume method is the integration of the governing equation (or equations) over
a control volume to yield a discretised equation at its nodal point P. For the control volume defined above this
gives
Here
A -is the cross-sectional area of the control volume face,
ΔV-is the volume and
D -is the average value of source
S -Source over the control volume
Step 3: Solution of equations
Discretised equations of the form (4.11) must be set up at each of the nodal points in order to solve a
problem. For control volumes that are adjacent to the domain boundaries the general discretised equation (4.11)
is modified to incorporate boundary conditions. The resulting system of linear algebraic equations is then solved
to obtain the distribution of the property φ at nodal points.
ANIN_C04.qxd 29/12/2006 09:57 AM Page 129

4.4 Finite volume


method for The methodology used in deriving discretised equations in the one-
two-dimensional dimensional case can be easily extended to two-dimensional problems. To
diffusion problems illustrate the technique let us consider the two-dimensional steady state
diffusion equation given by
∂ A ∂φ D ∂ A ∂φ D
BΓ E + B Γ E + Sφ = 0 (4.51)
∂x C ∂x F ∂y C ∂y F

A portion of the two-dimensional grid used for the discretisation is shown in


Figure 4.12.

Figure 4.12 A part of the two-


dimensional grid

In addition to the east (E) and west (W) neighbours a general grid node
P now also has north (N) and south (S) neighbours. The same notation as in
the one-dimensional analysis is used for faces and cell dimensions. When the
above equation is formally integrated over the control volume we obtain
A D A D
 ∂∂x BC Γ ∂φ∂x EF dx . dy +  ∂∂y BC Γ ∂∂φy EF dx . dy +  S dV = 0 (4.52)
φ
∆V ∆V ∆V
So, noting that Ae = Aw = ∆y and An = As = ∆x, we obtain
G A ∂φ D A ∂φ D J
H Γe Ae B E − Γw Aw B E K
I C ∂x F e C ∂x F wL

G A ∂φ D A ∂φ D J
+ H Γn An B E − Γs As B E K + D∆V = 0 (4.53)
I C ∂y F n C ∂ y F sL

As before, this equation represents the balance of the generation of φ in a


control volume and the fluxes through its cell faces. Using the approxima-
tions introduced in the previous section we can write expressions for the flux
through control volume faces:
∂φ (φP − φW)
Flux across the west face = Γw Aw = Γw Aw (4.54a)
∂x δxWP
w

∂φ (φ − φP)
Flux across the east face = Γe Ae = Γe Ae E (4.54b)
∂x δxPE
e

∂φ (φ − φS)
Flux across the south face = Γs As = Γs As P (4.54c)
∂y δ ySP
s

∂φ (φ − φP)
Flux across the north face = Γn An = Γn An N (4.54d)
∂y δ yPN
n
ANIN_C04.qxd 29/12/2006 09:57 AM Page 130

By substituting the above expressions into equation (4.53) we obtain


(φE − φP−) Γ A (φP − φW) (φN − φP)
Γe Ae w w + Γn
δxPE δxWP An δ yPN

− Γs As (φP − φS)
+ D∆V = 0 (4.55)
δ ySP
When the source term is represented in the linearised form D∆V = Su + SpφP, this
equation can be rearranged as

A Γw Aw Γe Ae Γs − Γn ASn p φP D
B + +
A + E
C δxWP δxPE s δ ySP δ yPN F

A Γw Aw D A Γe Ae D A Γs As D A Γn An D
= B E φW + B E φE + B E φS + B E φN + Su
C δxWP F C δxPE F C δ ySP F C δ yPN F

(4.56)
Equation (4.56) is now cast in the general discretised equation form for
interior nodes:

aPφP = aWφW + aEφE + aSφS + aNφN + Su (4.57)

where

aW aE aS aN aP
Γw Aw Γe Ae Γs As Γn An
aW + aE + aS + aN − Sp
δxWP δxPE δySP δyPN

The face areas in a two-dimensional case are Aw = Ae = ∆y; An = As = ∆x.


We obtain the distribution of the property φ in a given two-dimensional situation
by writing discretised equations of the form (4.57) at each grid node of the sub-
divided domain. At the boundaries where the temperatures or fluxes are known the
discretised equations are modified to incorporate boundary conditions in the manner
demonstrated in Examples 4.1 and 4.2. The boundary-side coefficient is set to zero
(cutting the link with the bound-ary) and the flux crossing the boundary is
introduced as a source which is
appended to any existing Su and Sp terms. Subsequently, the resulting set of
equations is solved to obtain the two-dimensional distribution of the prop-erty φ.
Example 7.2 in Chapter 7 shows how the method can be applied to calculate
conductive heat transfer in two-dimensional situations.
ANIN_C04.qxd 29/12/2006 09:57 AM Page 131

4.5 Finite volume


method for Steady state diffusion in a three-dimensional situation is governed by
three-dimensional ∂ A ∂φ D ∂ A ∂φ D ∂ A ∂φ D
diffusion problems BΓ E + BΓ E + B Γ E + Sφ = 0 (4.58)
∂x C ∂x F ∂ y C ∂ y F ∂z C ∂z F

Now a three-dimensional grid is used to sub-divide the domain. A typical


control volume is shown in Figure 4.13.

Figure 4.13 A cell in three


dimensions and neighbouring
nodes

A cell containing node P now has six neighbouring nodes identified as


west, east, south, north, bottom and top (W, E, S, N, B, T). As before, the
notation w, e, s, n, b and t is used to refer to the west, east, south, north,
bottom and top cell faces respectively.

Integration of Equation (4.58) over the control volume shown gives


G A ∂φ D A ∂φ D J G A ∂φ D
H Γe Ae B E − Γw Aw B E K + H Γn An B E
I C ∂x F e C ∂ x F wL I C ∂y F n

A ∂φ D J G A ∂φ D A ∂φ D J
− Γs As B E K + H Γt At B E − Γb Ab B E K + D∆V = 0
C ∂ y F sL I C ∂z F t C ∂z F bL
(4.59)
Following the procedure developed for one- and two-dimensional cases the
discretised form of equation (4.59) is obtained:
G (φ − φP) (φ − φW) J G (φ − φP)
H Γe Ae E − Γw Aw P K + H Γn An N
I δxPE δxWP L I δyPN

(φP − φS) J G (φ − φP) (φ − φB) J


− Γs As K + H Γt At T − Γb Ab P K
δySP L I δzPT δzBP L
+ (Su + SPφP) = 0 (4.60)
ANIN_C04.qxd 29/12/2006 09:57 AM Page 132

As before, this can be rearranged to give the discretised equation for interior
nodes:

aPφP = aW φW + aEφE + aSφS + aNφN + aB φB + aT φT + Su (4.61)

where

aW aE aS aN aB aT aP
Γw Aw Γe Ae Γs As Γn An Γb Ab Γt At aW + aE + aS + aN
δxWP δxPE δ ySP δ yPN δzBP δzPT + aB + aT − SP

Boundary conditions can be introduced by cutting links with the appropri-


ate face(s) and modifying the source term as described in section 4.3.

Parabolic equations
describe time-dependent problems, which involve significant amounts of diffusion. Examples are
unsteady viscous flows and unsteady heat conduction. The prototype parabolic equation is the diffusion equation

∂φ ∂ 2φ
=α (2.46)
∂t ∂x2

The transient distribution of temperature (again φ = T) in an insulated rod of metal whose ends at x = 0 and x =
L are kept at constant and equal tem-perature T0 is governed by the diffusion equation. This problem arises
when the rod cools down after an initially uniform source is switched off at time t = 0. The temperature
distribution at the start is a parabola with a maximum at x = L/2 (Figure 2.7).

Figure 2.7 Transient


distribution of temperature in an
insulated rod

The steady state consists of a uniform distribution of temperature T = T0 throughout the rod. The
solution of the diffusion equation (2.46) yields the exponential decay of the initial quadratic temperature
distribution. Initial conditions are needed in the entire rod and conditions on all its boundaries are
required for all times t > 0. This type of problem is termed an initial–boundary-value problem.
A disturbance at a point in the interior of the solution region (i.e. 0 < x < L and time t1 > 0) can only
influence events at later times t > t1 (unless we allow time travel!). The solutions move forward in time and
diffuse in space. The occurrence of diffusive effects ensures that the solutions are always smooth in the
interior at times t > 0 even if the initial conditions contain discontinuities. The steady state is reached as
time t → ∞ and is elliptic. This change of character can be easily seen by setting ∂φ/∂t = 0 in equation
(2.46). The governing equation is now equal to the one governing the steady tem-perature distribution in
the rod.
Equilibrium problems
The problems in the first category are steady state situations, e.g. the steady
state distribution of temperature in a rod of solid material or the equilibrium
stress distribution of a solid object under a given applied load, as well as many
steady fluid flows. These and many other steady state problems are governed
by elliptic equations. The prototype elliptic equation is Laplace’s equa-
tion, which describes irrotational flow of an incompressible fluid and steady
state conductive heat transfer. In two dimensions we have

∂ 2φ ∂ 2φ
+ =0 (2.45)
∂x2 ∂ y2

A very simple example of an equilibrium problem is the steady state heat


conduction (where φ = T in equation (2.45)) in an insulated rod of metal
whose ends at x = 0 and x = L are kept at constant, but different, tempera-
tures T0 and TL (Figure 2.6).

Figure 2.6 Steady state


temperature distribution of an
insulated rod

This problem is one-dimensional and governed by the equation kd 2T/dx2


= 0. Under the given boundary conditions the temperature distribution in
the x-direction will, of course, be a straight line. A unique solution to this
and all elliptic problems can be obtained by specifying conditions on the
dependent variable (here the temperature or its normal derivative the heat
flux) on all the boundaries of the solution domain. Problems requiring data
over the entire boundary are called boundary-value problems.
An important feature of elliptic problems is that a disturbance in the
interior of the solution, e.g. a change in temperature due to the sudden
appearance of a small local heat source, changes the solution everywhere else.
Disturbance signals travel in all directions through the interior solution.
Consequently, the solutions to physical problems described by elliptic equa-
tions are always smooth even if the boundary conditions are discontinuous,
which is a considerable advantage to the designer of numerical methods. To
ensure that information propagates in all directions, the numerical techniques
for elliptic problems must allow events at each point to be influenced by all
its neighbours.
Explicit and Implicit schemes

Unsteady one-dimensional heat conduction is governed by the equation


∂T ∂ A ∂T D
ρc = Bk E + S (8.3)
∂ t ∂x C ∂x F

In addition to the usual variables we have c, the specific heat of the material
(J/kg.K).
Consider the one-dimensional control volume in Figure 8.1. Integration
of equation (8.3) over the control volume and over a time interval from t to
t + ∆t gives
t +∆t t +∆t t +∆t
∂ A ∂T D
 ∂T
ρc dV dt =
∂t  B k E dV dt +
∂x C ∂x F   S dV dt (8.4)
t CV t CV t CV

This may be written as


G t +∆t t +∆t
J GA J
e

H kA ∂T D − A ∂T D K
  H
H
I t
ρc
∂T K
dt
∂t KL
dV =  H B ∂x E
IC Fe
B kA E K dt
C ∂x F wL
w t

t +∆t

+  D∆V dt (8.5)
t

In equation (8.5), A is the face area of the control volume, ∆V is its volume,
which is equal to A∆x, where ∆x = δxwe is the width of the control volume,
and D is the average source strength. If the temperature at a node is assumed
to prevail over the whole control volume, the left hand side can be written as

G t +∆t J
 
H
H ρc
∂T K
∂t
dt K dV = ρc(TP − T P )∆V
o
(8.6)
CV I t L
In equation (8.6) superscript ‘o’ to refers to temperatures at time t; tempera-
tures at time level t + ∆t are not superscripted. The same result as (8.6)
would be obtained by substituting (TP − T Po )/∆t for ∂T/∂t, so this term has
been discretised using a first-order (backward) differencing scheme. Higher-
order schemes, which may be used to discretise this term, will be discussed
briefly later in this chapter. If we apply central differencing to the diffusion
terms on the right hand side equation (8.5) may be written as
t +∆t
GA J
H k A TE − TP D − A k A TP − TW D K dt
ρc(TP − T Po )∆V =  H
IC
B e E
δxPE F C
B w E
δxWP F KL
t

t +∆t

+  D∆V dt (8.7)
t

To evaluate the right hand side of this equation we need to make an assump-
tion about the variation of TP, TE and TW with time. We could use tempera-
tures at time t or at time t + ∆t to calculate the time integral or, alternatively,
a combination of temperatures at time t and t + ∆t. We may generalise the
approach by means of a weighting parameter θ between 0 and 1 and write
the integral IT of temperature TP with respect to time as
t +∆t

IT =  T dt = [θT + (1 − θ)T ]∆t


P P
o
P (8.8)
t

Hence

θ 0 1/2 1
IT T Po ∆t –12 (TP + T Po )∆t TP ∆t

We have highlighted the following values of integral IT: if θ = 0 the tem


perature at (old) time level t is used; if θ = 1 the temperature at new time
level t + ∆t is used; and finally if θ = 1/2, the temperatures at t and t + ∆t
are equally weighted.
Using formula (8.8) for TW and TE in equation (8.7), and dividing by A∆t
throughout, we have
A T − T Po D G ke(TE − TP) kw(TP − TW) J
ρc B P E ∆x = θ H − K
C ∆t F I δxPE δxWP L

G k (T o − T Po ) kw(T Po − T Wo )J
+ (1 − θ) H e E − K + D∆x (8.9)
I δxPE δxWP L
which may be rearranged to give
G ∆x A k k DJ
H ρc + θ B e + w E K TP
I ∆t C δxPE δxWP F L

ke k
= [θTE + (1 − θ)T Eo] + w [θTW + (1 − θ)T Wo ]
δxPE δxWP

G ∆x k k J
+ H ρc − (1 − θ) e − (1 − θ) w K T Po + D∆x (8.10)
I ∆t δxPE δxWP L
Now we identify the coefficients of TW and TE as aW and aE and write
equation (8.10) in the familiar standard form:

aPTP = aW[θTW + (1 − θ)T Wo ] + aE[θTE + (1 − θ)T Eo ]


+ [aPo − (1 − θ)aW − (1 − θ)aE]T Po + b (8.11)

where

aP = θ (aW + aE) + aPo

and
∆x
aPo = ρc
∆t
with

aW aE b
kw ke
D∆x
δxWP δxPE

The exact form of the final discretised equation depends on the value of θ.
When θ is zero, we only use temperatures T Po , T Wo and T Eo at the old time
level t on the right hand side of equation (8.11) to evaluate TP at the new time
and the resulting scheme is called explicit. When 0 < θ ≤ 1 temperatures at
the new time level are used on both sides of the equation and the resulting
schemes are called implicit. The extreme case of θ = 1 is termed fully
implicit and the case corresponding to θ = 1/2 is called the Crank–
Nicolson scheme (Crank and Nicolson, 1947).

Explicit scheme

In the explicit scheme the source term is linearised as b = Su + SpT Po . Now


the substitution of θ = 0 into (8.11) gives the explicit discretisation of the
unsteady conductive heat transfer equation

aPTP = aWT Wo + aET Eo + [aPo − (aW + aE − Sp)]T Po + Su (8.12)

where
aP = aPo

and
aW aE
∆x
aPo = ρc kw ke
∆t
δxWP δxPE

The right hand side of equation (8.12) only contains values at the old time step so the left hand
side can be calculated by forward marching in time. The scheme is based on backward
differencing and its Taylor series truncation error accuracy is first-order with respect to time. A
Advantages

FDM

1. Easy to formulate.
2. For multidimensional prob lems, meshes must b e structured in either two or three
dimensions. Curved meshes must be transformed into orthogonal cartesian coordinates
so that finite difference equations can b e written on structured cartesian meshes.
3. Neumann boundary conditions can only be approximated, not exactly enforced.

FVM

1. Formulations can be based on either FDM or FEM.


2. Surface integrals of normal fluxes guarantee the conservation properties through­out the
domain.
3. Complex geometries and unstructured meshes are easily accommodated, no
coordinate transformations needed.

2 Marks

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy