Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

APL 720

Assignment Sheet – 1
Finite Difference Method (FDM)

Note: This is due in the lab class next week (probably Wednesday). Please finish all
problems and come to class. The final two parts are to be discussed in the lab but if you
already know how to do them please finish them as well! Your answers will be examined
in the lab itself so no late submissions allowed.

Motivation: We will be looking at how to derive finite difference formulas for


differential equations given a simple stencil and how to solve a simple differential
equation using such formulas. The ideas used here can very easily be extend to solve the
Navier-Stokes equations as well (though there are some subtleties which we will consider
later).

1. Find finite difference formulas

d2 f
a) Find a 2nd order accurate finite difference formula for approximating using the
dx 2 i

points i-1, i and i+1

b) Find a 2nd order accurate finite difference formula for approximating df using the
dx i

points i, i-1 and i-2.

2. Steady state diffusion : No source terms

Steady state temperature in a constant cross-section cylindrical rod subject to just

d  dT 
conductive heat transfer is governed by  k   S  0 . Here T is the temperature, k
dx  dx 

is the thermal conductivity and S is the source term. (Some examples of S are: heat
generation due to an electric current passing through the rod or heat loss to the
atmosphere by a non-insulated rod). We will assume k to be constant.
Assume no source terms with the temperatures maintained at the ends as shown in the
figure.
a) Find the exact temperature at the middle of the rod (x = 0.5L) by solving the
differential equation analytically.
b) Using the simplest finite difference approximation you can think of, estimate the
temperature at the mid point using just one grid point within the domain
c) Is the result in part b) surprising?
d) How would you approximate (using a finite difference approximation) the
temperatures at x = 0.25L, 0.5L, 0.75L? Write down the equations and solve them using a
computer code.

3. Steady state diffusion: Constant source term

Repeat Q2 for the following problem:

The figure shows a large plate of thickness L = 2 cm with constant thermal


conductivity k = 0.5 W/m/K and uniform heat generation q = 1000 kW/m3. The
faces A and B are at temperatures of 100 °C and 200 °C respectively. Assuming that
the dimensions in the y- and z-directions are so large that temperature gradients are

significant in the x-direction only, the governing equation is d  k dT   q  0


dx  dx 
4. Steady state diffusion: Non-constant source term

We now consider the cooling of a circular fin by means of convective heat transfer along
its length. Convection gives rise to a temperature-dependent heat loss or sink term in the
governing equation. Shown in the figure is a cylindrical fin with uniform cross-sectional

area A. The base is at a temperature of 100 °C (T b) and the end is insulated (i.e. dT  0 at
dx

the right end). The fin is exposed to an ambient temperature of 20 °C. One-dimensional
heat transfer in this situation is governed by
d  dT 
 kA   hP (T  T )  0
dx  dx 

where h is the convective heat transfer coefficient, P the perimeter, k the thermal
conductivity of the material and T is the ambient temperature,

a) Find an expression for the exact temperature distribution along the fin
b) Approximate the temperature at the center of the fin using as simple an approximation
as possible. How does it compare with the analytical value?
c) Suppose you were asked to improve the approximation in b). You would need more
grid points than you took in b). Write out the set of equations you would need to solve if
you took 5 regularly placed interior grid points.
Data: L = 1 m, hP/{kA) = 25 m-2 (note kA is constant).
d) Write a program to solve this problem for any given number of grid points. The
program should plot the final temperature resulting from CFD and compare with the
exact solution.

The following are for the lab but you can do it at home too
e) By taking some error measure, verify that the method you used in 2 nd order accurate by
refining the grid
f) Do a grid convergence study. At what number of the grid points is the answer
sufficiently converged?

You might also like