Title: Finite-Difference Solutions Part 1
1Finite-Difference SolutionsPart 1
2Finite-difference allow us to solve a
differential equation by solving a system of
ordinary non-linear equations. Given for example
the differential equation Over a domain We
first divide the domain in N-1 interval giving N
nodes as illustrated here Then we can
evaluate de derivative for a node by using the
information from its neighbors.
x1
x2
x3
xN-2
xN-1
xN
x
a
b
3Simple Initial Boundary Problem
- Type of problem
-
- Where f(x a) is known
- Solution evaluate function f(x a ?x) based
on the value of f(x a) by replacing the
derivative by a finite-difference
4Example
On the domain with the boundary condition
f(x0) 0
First lets divide the domain in two intervals
using 3 node For the first node we already know
that f(x0) 0
We can estimate the derivative at the next node
based on
1.0
0.5
0.5
1.0
so becomes which yields
et
5Now with 10 intervals and 11 nodes we have
1.0
0.5
0.5
1.0
6First Order Finite Difference Equations
- Forward difference
- Backward difference
- Central difference
7 8Second Order Finite Difference Equations
- Forward difference
- Which yields
- if we get
9Second Order Finite Difference Equations
- Backward difference
- Which yields
- if we get
10Second Order Finite Difference Equations
- Central difference
- if ?x is constant
11Second Order Finite Difference Equations
12Example
over with initial values conditions f(x0) 0
and
Divide domain in 4 intervals using 5 node as
illustrated, then start at x 0
is already known and we have
f(x 0.5), can be evaluated using
for x 1.0, 1.5 and 2.0 we us
13So for x 0.0 and x 0.5
And for x 1.0 to x 2.0
which yields
so
so
14If we use 50 intervals and 51 nodes we get
15Boundary Conditions Problems
- Here
- Where f(x a) et f(x b)
- Requires us to build a system of equations and
solve it for each node
16Given We develop
Forward difference
Central difference
Backward difference
N equations and N unknowns
17Here the first nodal equation using forward
difference is
So the first equation of our system of equation is
Generally we have
18using central difference we have
Which gives
Generally
19using backward difference we have
so
and
And the system of equation becomes
20Which can be solved using Gauss-Seidel
Iteration. Example solve for
See java program Solution.java
21Example  Using finite differences determine the
temperature distribution in a nuclear fuel plate
and in the cladding
Cladding
Fuel Plate
Water
C
0
a
b
x
Assumptions Steady state One dimensional
system
22Data T0 500oC , temperature at the centre of
the plate Tu temperature in fuel Tc
temperature in cladding T1 temperature at the
fuel cladding joint Tce temperature on
external surface of cladding rate of
energy produced by fuel per unit volume Energy
balance in fuel  Acc Ein Eout Egen
so
23In cladding  Acc Ein Eout Egen
so
Solution  Divide domain (0,a) in N-1 equal
intervals. Step Divide domain (a,b) in N-1
equal intervals. Step We have N node in fuel
for a total of 2N-1 node since one is common to
both the fuel and the cladding. Â So if N5
X9
X7
C
X1
X2
X3
X4
X5
X6
X8
X10
24- at x10 we have
- at x2, temperature must satisfy
- Using central difference
- by symmetry we also have
-
- therefore which distort the solution to much
at the centre for small ?u . So we use -
- which gives
25- at x3 andt x4, temperature must satisfy
- Using central difference
- Similarly for node 6, 7 et 8 using      Â
- we have
- 5. At node 5 and
26- where uses backward difference and
-
- forward difference
- Node 9 is special since at x b we have a
boundary condition - to treat it we introduce a 10th node at a
distance ?c in the water and use the central
difference to evaluate -
27so
Node 9 must also satisfy
so
the 11 equations can be written as
28données
29So
In an array form
30Analytical solution
comparison