Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
108 views

Lecture2 PDF

The document discusses numerical methods for solving heat diffusion equations. It begins by presenting the general heat diffusion equation for 3D transient heat flow with heat generation. It then considers the simplified 2D steady-state case. There are three main approaches to solve such equations: numerical methods like finite difference and finite element, graphical methods, and analytical methods using separation of variables. The document focuses on the finite difference and finite element numerical methods. It provides detailed explanations of setting up the finite difference discretization, deriving the nodal equations, and solving the resulting system of algebraic equations using iterative methods like Jacobi and Gauss-Seidel. It then discusses the basic concepts and formulation of the finite element method.

Uploaded by

Karuppasamy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Lecture2 PDF

The document discusses numerical methods for solving heat diffusion equations. It begins by presenting the general heat diffusion equation for 3D transient heat flow with heat generation. It then considers the simplified 2D steady-state case. There are three main approaches to solve such equations: numerical methods like finite difference and finite element, graphical methods, and analytical methods using separation of variables. The document focuses on the finite difference and finite element numerical methods. It provides detailed explanations of setting up the finite difference discretization, deriving the nodal equations, and solving the resulting system of algebraic equations using iterative methods like Jacobi and Gauss-Seidel. It then discusses the basic concepts and formulation of the finite element method.

Uploaded by

Karuppasamy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Differential Equation

We take the heat diffusion equation as an example to demonstrate


the numerical methods to solve such equations.
H e a t D iffu s io n E q u a tio n

c p

T
2T
2T
2T
2

k(

T q
2
2
2
t
x
y
z

This equation governs the temperature distribution for a


three-dimensional unsteady, heat flow problem involving
heat generation.
For steady state / t = 0
No generation q 0
To solve for the full equation, it requires a total of
six boundary conditions: two for each co-ordinate. Only
one initial condition is needed to account for the
transient behavior.

Two-Dimensional, Steady State


Case
For a 2 - D, steady state situation, the heat equation is simplified to
2T 2T
2 0, it needs two boundary conditions in each direction.
2
x
y

There are three approaches to solve this equation:


Numerical Method: Finite difference or finite element
methods, usually will be solved using computers.
Graphical Method: Limited use. However, the conduction
shape factor concept derived under this concept can be
useful for specific configurations.
Analytical Method: The equation can be solved using
method of separation of variables.

Numerical Methods
Due to the increasing complexities encountered in the development

of modern technology, analytical solutions usually are not available.


For these problems, numerical solutions obtained using
high-speed computer are very useful, especially when the geometry
of the object is irregular, or the boundary conditions are nonlinear.
In numerical analysis, three different approaches are commonly
used:
(a) finite difference, (b) finite volume and (c) finite element methods.
In this chapter, the finite difference and finite element methods will
be introduced. The finite volume method, which has become
quite popular for fluid flow and heat transfer problems, will be
covered in a detailed manner in the subsequent chapters.

The Finite Difference Method


The finite difference method involves the following steps:
Discretize the domain into nodes (nodal networks). If the
distance between points is small enough, the differential
equation can be approximated locally by a set of finite
difference equations. Each node now represents a small region
where the nodal temperature is a measure of the average
temperature of the region.
Derive finite difference approximations for the governing
equation at both interior and boundary nodes
Develop an algebraic equation for each unknown node, and
establish a system of linear algebraic equations
Solve the system of equations using numerical schemes

Approximating derivatives using finite


differences

f(x+h/2)
f'(x)
f(x-h/2)

x-h

x-h/2

x+h/2

x+h

f ( x h / 2) f ( x h / 2)
f ' ( x)
h
f ' ' ( x)

f ( x h) 2 f ( x ) f ( x h)
h2

Grid generation in 2D domain


m is the grid point counter in x direction (m ranging from 1 to MM)
n is the grid point counter in y direction (n ranging from 1 to NN)
x=mDx, y=nDy

m,n+1

Dx
m-1,n

Dy

m,n

m+1, n

m,n

m,n-1
m-,n

m+,n

Discretization of differential
equation
Take the example of heat diffusion equation:
q 1 T
2
T
k t
k
where
is thermal diffusivity, and q is the heat generation.
C p
Assuming steady state and no heat generation, 2T 0
The 1st order differential at intermediate points (m+1/2,n) & (m-1/2,n)

T
x
T
x

( m 12 , n )

( m 12 , n )

DT

Dx
DT

Dx

( m 12 , n )

( m 12 , n )

Tm 1,n Tm,n
Dx
Tm ,n Tm1,n
Dx

Finite Difference
Approximation (contd...)
Discretization of the second order differentiation at (m,n)

2T
x 2

T
x

x
m 12 , n
Dx

( m,n )

m 12 , n

Tm 1,n Tm1,n 2Tm,n


(Dx) 2

Similarly, the y direction derivative will be

2T
y 2

( m ,n )

Tm ,n 1 Tm ,n 1 2Tm,n
( Dy ) 2

Finite Difference
Approximation (contd...)
2
2
Tm1,n Tm1, n 2Tm, n Tm, n 1 Tm, n 1 2Tm,n

T
2
T 2 2

2
2

y
(
D
x
)
(
D
y
)

( m,n)

For Dx Dy, and for 2T 0 (steady state, no heat generation)


Tm1, n Tm 1, n Tm ,n 1 Tm, n 1 4Tm,n 0

The nodal equations derived above are valid for all interior points.
For each node, there is one such equation.
For example: for nodal point m=2, n=3, the equation is
T3,3 + T1,3 + T2,4 + T2,2 - 4T2,3 =0
Hence, the temperature at (2,3) can be expressed as
T2,3=(1/4)(T3,3 + T1,3 + T2,4 + T2,2)

Nodal Equations for boundary nodes


Nodal relations for boundary nodes (with unknown temperature)

need to be derived separately depending on the node location


and boundary conditions. The table subsequently shown in
this presentation lists the possible cases, with case 1
corresponding to the interior node, while the other cases
corresponding to various location and boundary conditions.
Once we have one equation for each nodal point (including both
interior and unknown boundary points) in the system of interest,
the result is a system of N algebraic equations for a total of N
nodal points.

Summary of nodal finite difference methods

Summary of nodal finite difference methods (contd)

The System of Equations


We have N unknown nodes, hence a system of N equations

...

In a matrix form: [A][T]=[B]

Numerical Solutions
Matrix form: [A][T]=[C].
The solution for temperature would be:
[A]-1[A][T]=[A]-1[C], [T]=[A]-1[C]
where [A]-1 is the inverse of matrix [A].
Usually, for most practical problems, the order of matrix will
be quite high as N would be large. As this will require
enormous amount of computational effort, direct matrix
inversion for solution of temperature will be impractical.
For high order matrix, iterative methods are usually more
efficient.
The popular Jacobi & Gauss-Seidel iteration
methods are introduced subsequently.

Jacobi Iteration Method


The general algebraic equation for the nodal point can be
written as:
i 1

a T
ij

j 1

aiiTi

a T
ij

Bi

j i 1

Rewrite the equation in the form:

Ti

(k )

N a
Bi i 1 aij ( k )
ij

T j T j( k 1)
aii j 1 aii
j i 1aii

Replace (k) by (k-1)


for the Jacobi iteration

Jacobi Iteration Method (contd)


(k) denotes the level of the iteration, (k-1) means the
present level and (k) represents the new level.
An initial guess (k=0) is needed to start the iteration.
By substituting iterated values at (k-1) into the equation,
the new values at iteration (k) can be estimated.
The iteration will be stopped when max Ti(k)-Ti(k-1) ,
where specifies a predetermined value of acceptable error

Gauss-Seidel Iteration Method


First, the generalized discretization equation is considered:

aPTP anbTnb b

Or,

*
a
T

nb nb b
TP
aP

where T*nb is the current estimate of temperature on any grid


point
This can be solved if T*nbs are known.
Procedure:
(i) Start with an initial guess temperature distribution
(ii) Visit a grid point, substitute latest estimate for Tnb , get new T
(iii) Visit all points in this manner
(iv) Iterate until convergence

The Finite Element Method


The domain is broken into a set of discrete elements.
The shape of the elements can be arbitrary. In two
dimensions, that are usually triangles or quadrilaterals,
while in three dimensions, tetrahedral or hexahedral
elements are often used.
The equations are multiplied by a weight function before
they are integrated over the entire domain.
The solution is approximated by simple piecewise functions
(shape functions) valid on elements to describe the local
variations of the unknown variable (or scalars). Such a
function can be constructed from its values at the corners of
the elements called nodes.

Finite Element Method (contd)


This approximation is then substituted into the weighted
integral of the governing equation, and a residual is defined
to measure the deviation from the actual solution. The
algebraic equations to be solved are derived by minimizing
the residual.
The continuum has an infinite number of degrees-of-freedom
(DOF), while the discretized model has a finite number of
DOF.
The number of equations is usually large for most practical
applications. Hence, the solution of such large system of
equations requires a computational method.
The ever-increasing computational power of modern day
digital computers and creation of advanced user friendly
softwares have brought FEM within reach of engineers
working in small industries, and college students.

Theoretical Basis for FEM


Formulation
There are several approaches to convert a differential equation
into a discretized finite element formulation.
If the physical formulation is described as a differential
equation, then the most popular solution method is the
Method of Weighted Residuals (MWR).
If the physical formulation is presented as the minimization of
a function, then the Variational Formulation (VF) is usually
used.

Method of Weighted Residuals (MWR)


In the MWR, an approximate solution is substituted into the differential equation.
Since the approximate solution does not identically satisfy the equation, a residual
is obtained.
Consider a differential equation
Dy( x) Q 0 (1)
Suppose that y = h(x) is an approximate solution to (1). Substitution then gives
Dh( x) Q R , where R is a nonzero residual. The MWR then requires that

W ( x) R( x) 0
i

(2), where Wi(x) are the weighting functions.

The number of weighting functions equals the number of unknown


coefficients in the approximate solution.

Galerkins Method

There are several choices for the weighting functions, Wi.


In the Galerkins method, the weighting functions are the same functions
that were used in the approximating equation.

Variational Method (VM)


The VM involves the integral of a function to produce a number.
Integration of each function produces a number.
The function that produces the lowest number has the additional
property of satisfying a specific differential equation.
Consider the integral
D

p y( x) Qy dx 0 (1)
2

The numerical value of p can be calculated given a specific


equation y = f(x).
Variational calculus shows that the particular equation y = g(x)
which yields the lowest numerical value for p is the solution to
the differential equation
Dy( x) Q 0 (2)

Heat Conduction in a 2D domain: FEM


solution
Select triangular shaped element to discretize a 2D domain
Choose a linear temperature function for each element as:

t ( x, y ) a1 a2 x a3 y
a1

a1 a2 x a3 y 1 x y a2
a
3

where u and v describe temperature gradients at (xi,yi).

1 Element, 3 Nodes, with 2 degrees of freedom (x, y)

FEM solution (contd)


Choose a Temperature Function

T N i ti N j t j N m t m
In matrix form :
ti

T N i N j N m t j

t m

T temperature function, N shape function,


t nodal temperature

FEM solution (contd)


Define Temperature Gradient Relationships
T N i
x x
g
T N i
y y

N j N m
ti
x x
tj

N j N m
tm

y y

1 i j m
B N

x
x i j m

Heat flux/Temperature Gradient :


q x
K xx 0
g Dg

q y
0 K yy

FEM solution (contd)


Derive element matrix and equations for heat diffusion
with a convective boundary condition:
T

k B DBdV hN N dS
T

tAB D B
T

AK xx

1 - 1
- 1 1

x
L 1
L x x
hP
dx
1

x L L
0
L
hPL 2 1

6 1 2

FEM solution (contd)


For heat source term:

1
T
QV
f Q Q V dV 1 for constant heat source
3
V
1

f k t for each element


Solution:
Assemble element equations, apply BCs

F K t
Solve for Nodal Temperatures
Solve for Element Temperature Gradient & Heat Flux

Solving PDEs
Finite element method
Finite difference method (our focus)
Converts PDE into matrix equation
Linear system over discrete basis elements

Result is usually a sparse matrix


Matrix-based algorithms represent matrices
explicitly
Matrix-free algorithms represent matrix values
implicitly (our focus)

Class of Linear
Second-order PDEs
Linear second-order PDEs are of the form
Auxx 2Buxy Cu yy Eux Fuy Gu H

where A - H are functions of x and y only


Elliptic PDEs: B2 - AC < 0
(steady state heat equations with heat source)

Parabolic PDEs: B2 - AC = 0
(transient heat transfer equations)

Hyperbolic PDEs: B2 - AC > 0


(wave equations)

MODULE 2: Review Questions

How do numerical solution methods differ from analytical methods?


What are the advantages and disadvantages of numerical and analytical
methods?

What is the basis of energy balance method in numerical analysis?


How does it differ from the formal finite difference method using
Taylor series approximation? For a specified nodal network, will these
two methods result in the same or a different set of equations?

Consider a medium in which the finite difference formulation of a


general interior node is given in its simplest form as
Is heat transfer in this medium steady or transient?
Is heat transfer one-, two-, or three-dimensional?
Is there heat generation in the medium?
Is the nodal spacing constant or variable?
Is thermal conductivity of the medium constant or variable?

MODULE 2 Review Questions (contd...)

Consider a medium in which the finite difference formulation of a general interior node is
given in its simplest form as
Is heat transfer in this medium steady or transient?
Is heat transfer one-, two-, or three-dimensional?
Is there heat generation in the medium?
Is the nodal spacing constant or variable?
Is thermal conductivity of the medium constant or variable?

What is an irregular boundary? What is a practical way of handling irregular boundary


surfaces with the finite difference method?

When performing numerical calculations of heat diffusion on a structured Cartesian grid in


two dimensions, a simplified form of the equations states that the temperature at a node is
simply the average of its four adjacent neighbours. What assumption is NOT required to
allow this simplified form
a) must have no heat generation
b) must not be at a domain boundary
c) must have uniform cell dimensions in both directions
d) must be a solid medium

MODULE 2 Review Questions (contd...)


Show that the central difference scheme is more accurate than
forward or backward difference schemes.
What is meant by conservative formulation of a differential
equation?
What is the basis of the finite volume method? State the main
difference between the FVM and FDM?
Describe the method of weighted residuals in Finite element
method. Show that the Finite Volume Method is a special case
of the Finite Element Method.

You might also like