Loading...

PPT – Finite-Difference Solutions Part 1 PowerPoint presentation | free to download - id: 7b9c2b-MWNmZ

The Adobe Flash plugin is needed to view this content

Finite-Difference SolutionsPart 1

Finite-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

Simple 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

Example

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

Now with 10 intervals and 11 nodes we have

1.0

0.5

0.5

1.0

First Order Finite Difference Equations

- Forward difference
- Backward difference
- Central difference

- Central difference
- if

Second Order Finite Difference Equations

- Forward difference
- Which yields
- if we get

Second Order Finite Difference Equations

- Backward difference
- Which yields
- if we get

Second Order Finite Difference Equations

- Central difference
- if ?x is constant

Second Order Finite Difference Equations

- Also used as

Example

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

So for x 0.0 and x 0.5

And for x 1.0 to x 2.0

which yields

so

so

If we use 50 intervals and 51 nodes we get

Boundary 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

Given We develop

Forward difference

Central difference

Backward difference

N equations and N unknowns

Here the first nodal equation using forward

difference is

So the first equation of our system of equation is

Generally we have

using central difference we have

Which gives

Generally

using backward difference we have

so

and

And the system of equation becomes

Which can be solved using Gauss-Seidel

Iteration. Example solve for

See java program Solution.java

Example 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

Data 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

In 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

- 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

- 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

- 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

so

Node 9 must also satisfy

so

the 11 equations can be written as

données

So

In an array form

Analytical solution

comparison