Você está na página 1de 30

Numerical Method

Finite Differencing
1
x=0

i-1

i+1

N-2 N-1 N
x=1

Consider uniform interval h is constant


f(x) is assigned at each node, f1, f2,

fi-1, fi, fi+1, fN-2, fN-1, fN

f
2 f
Approximate
&
at each node
2
x
x

Discretization
Example : use one node at each side
Taylor Series Expansion :
For Internal Nodes ( 2 i N 1)
f i 1

1 2 f
f
f i h 2
2 x
x i

2
h O( h 3 )
i

f i 1

1 2 f
f
f i h 2
2 x
x i

2
h O( h3 )
i

f
Solve for
x i
f i 1 f i 1
f

2h
x i

Accuracy O( h3 )

Discretization
Example : use one node at each side
Taylor Series Expansion :
For Internal Nodes ( 2 i N 1)
f i 1

1 f
f
f i h 2
2 x
x i

2
h O ( h 3 )
i

f i 1

1 2 f
f
f i h 2
2 x
x i

2
h O ( h 3 )
i

2 f
Solve for 2
x
2 f
2
x

f f i 1 2 f i
i 1
2
h
i

Accuracy O ( h4 )

For Nodes at the Boundary Nodes (i=1, i=N)


(a ) Function specified at the boundary : f1 is k nown
f
f
(b) Gradient is specified, is k nown or A Bf 1 0
x 1
x 1
1 2 f
f
f 2 f1 h 2
2 x
x 1
1 2 f
f
f 3 f1 2h 2
2 x
x 1

1
f
4 f 2 f 3 3 f1 2 h
x 1

2
h O( h3 )
1

4h2 O( h3 )
1

2 f
Eliminate 2
x

Accuracy O( h3 )

Example: Numerical Solution of the Fin Problem


1

x=0

i-1

i+1

N-2 N-1 N
x=1

h
2
d

a f 0
A0

0 X 1

where a( X ) and f ( X ) are specified

(0) 1 & (1) H (1) 0

For Interior Nodes (2 i N-1)


1

i-1

i+1

N-2 N-1 N
x=1

x=0

Using one node at each side, we approximate


i 1 i 1
i 1 i 1 2 i
i
& i
2h
h2
i 1 i 1 2 i
i 1 i 1 d 2
ai
a i

f i i 0
2
h
2h
A0
for 2 i N 1

Boundary Nodes (i = 1 and i = N)

For i 1,

1 1

For i N
1
N 1 N N h N h2 O ( h3 )
2
1
N 2 N N 2h N 4h2 O ( h3 )
2

Eliminate N
h
4 N 1 N 2 3 N 2 N
, obtain
Eliminate N

4 N 1 N 2 3 2 Hh N

H N 0
since N

Algebraic Equation

In the matrix form : Ax b


x : unknown vector

x 2,

3 , ... N 1 ,
b : known vector

b a2 / h2 a2 / 2h ,

AN 1 xN 1 : coefficient matrix

0,

0, ... 0

Algebraic Equation
The coefficient of A matrix form :
A1,1 2a2 / h2 d 2 f 2 / A0

A1,2 a2 / h2 a2 / 2h

Ai ,i 1 ai / h2 ai / 2h

Ai ,i 2ai / h2 d 2 f i / A0

Ai ,i 1 ai / h2 ai / 2h

AN 1, N 3 1
AN 1, N 2 4
AN 1, N 1 3 2hH

Solution

To solve :
Direct Method Invert A matrix
x A1b
Indirect Method - Iterative solution

Fin

ASSIGNMENT 2 due Feb 16


Cross-section

h=0
Top view

h=h1

w0
Tb
r1

k=k1
1

h=h2

k=k2
2

r2
r3

Streaming fluid T0

r2
r1

r3

ASSIGNMENT 2
For two fin whose cross - sections are shown calculate the
temperature and the heat flux at any cross -section. Run the
program for a perfect interface.
Tb 150 C , T0 20 C , h1 100 W / m 2C , h2 150 W / m 2C ,
k1 40 W / m C , k 2 60 W / mC ,
w0 3.0cm, r1 5cm, r2 7.0 cm, r3 9.0cm, 15 .

Find the temperature at the cross-section where the fin


changes shape. Plot the temperature as a function of r in
r1 r r3.

ASSIGNMENT 2

Use the fact that the temperature and the heat flux are
continuous at the cross-section for a perfect interface.

T1 ( xI , y, z, t ) T2 ( xI , y, z, t )
T1
T2
k1
k2
x
x

Conduction-Conditions at the Interface


Perfect Interface

T1 ( xI , y, z, t ) T2 ( xI , y, z, t )

Interface

Material 1
k1 T1(x,y,z)

Material 2
k2 T2(x,y,z)

x = xI

Rc is the contact resistance


Rc 10-6 10-3 m2K/W
hc 102 106 W/m2K

T1
T2
k1
k2
x
x
Imperfect Interface

T1
hc T1 T2 k1
x
T1
T2
k1
k2
x
x

Introduce Normalized Variables:

Region 1 :
R r / r1 , A1 2rw0 , A0 2r1w0
h1S1 k1 f1 ( R)
T1 T0 (Tb T0 )1 ( R).
A1
4r1h1
a1 ( R)
R and f1 ( R)
R
A0
k1
1 R R2 where R2 r2 r1

Region 1 :

Equation for 1 ( R) :
2
1 1

2h r
( R1) R1 0 where
w0 k1
2
1

2
1

Introduce Normalized Variables:

Region 2 :

R2 R R3 where R3 r3 r1

R r / r1 , A2 2rw, w w0 2r r2 tan
h2 S 2 k 2 f 2 ( R )
T2 T0 (Tb T0 ) 2 ( R ).
A2
4r1h2
a2 ( R )
R1 cR R2 and f 2 ( R )
R
A0
k2
r1
with c 2 tan
w0

Region 2 :

R2 R R3

Equation for 2 ( R) :
2
2
h
r
(a2 2 ) 22 R 2 0 where 22 2 1
w0 k 2

a2 ( R) R1 cR R2

r1
where c 2 tan
w0

Boundary Conditions with the Perfect Interface

at the base
R 1

1 (1) 1

at the interface, R R2

1 R2 2 R2

(temperature continuous)

and heat flux continuous at the interface


1R2 2 R2 where k1 k 2
at the tip
R R3 2 ( R3 ) 0

Boundary Conditions with the imperfect Interface

at the base
R1

1 (1) 1

at the interface, R R2
1 H c 1 2 0 where H c hc r1 k1
and heat flux continuousat the interface
1 R2 2 R2 where k1 k 2
at the tip
R R3 2 ( R3 ) 0

Special Case = 0
For
1 R R2
2
2
h
r
2
2

( R1 ) 1 R1 0 where 1 1 1
w0 k1

For

R2 R R3

2
2
h
r
( R 2 ) 22 R 2 0 where 22 2 1
w0 k 2
1 (1) 1,
2 ( R3 ) 0

For a perfectinterface

1 R2 2 R2
1R2 2 R2 where k1 k 2

Solution

The solution for 1 ( R) and 2 ( R)


can be expressedin modified Bessel funtions
of order zero, first and second kind

1 ( R) AI0 1 R BK0 1 R
and

2 ( R) CI 0 2 R DK 0 2 R
Constants( A, B, C , D) can be determined
by applying the boundary conditions :

Equations for (A,B,C,D)are :

1 AI0 1 BK0 1 ,

0 CI1 2 R3 DK1 2 R3 ,
AI0 1 R2 BK0 1 R2

CI 0 2 R2 DK 0 2 R2 ,

and

1 AI1 1 R2 BK1 1 R2
2 CI1 2 R2 DK1 2 R2

Finite Difference Discretization for each region


Use two nodes at the interface one for region 1 (I1) and one for
region 2 (I2)
1

I1-1

(I1,I2) I2+1

R = R3

R=1

h R = R2

Using centraldifferencing, for interior nodes


2 i

ai i 1 i 21
ai i 1 i 1 2 Ri i 0
h
2h
for 2 i I1-1 ai Ri 1 i 1h
2h1r12

w0 k1
2

with

for I 2 1 i N-1

Ri 1 i 1h
ai Ri 1 cRi R2 ,

2h2 r12

with Ri 1 i 2 h
w0 k 2
2

N-2 N-1 N

Boundary condition: Nodes i = 1 and i = N


Specified temperature at the base i 1
For i 1,
1 1
Tip is insulated i N
For i N
4 N 1 N 2 3 N 0

Condition at the interface: Interface Nodes, i = I1 ,I2


(I1 ,I2 are at the same point)

For a perfectinterface:

I I
1

(Temperature continuous)

I I
1

(heatflux continuous)

3 I1 I1 2 4 I1 1
2h
3 I 2 I 2 2 4 I 2 1
2h

3 I1 I1 2 4 I1 1
2h

3 I 2 I 2 2 4 I 2 1
2h

Condition at the interface: Interface Nodes (i = I1 ,I2)

For an imperfectinterface:
I1 H c I1 I 2 0 (contactresistance)

3 I1 I1 2 4 I1 1

2h
I1 I2

3 I1 I1 2 4 I1 1
2h

H c I1 I 2 0
(heat flux continuous)

3 I 2 I 2 2 4 I 2 1
2h

Another Approach:
Multi-region Problems - Transformation
R
R3

R2

1
1
0

R 1 1 R2 1 and R R3 2 R3 R2
For Region I
d
1
d

dR R2 1 d 1

For Region II
d
1
d

dR
R3 R2 d 2

Multi-region Problems Transformation

1
1 1
1 1 1 R2 11 0
2
R2 1
For

0 1 1

2
2
2
2 R3 2 R3 R2 2 0
2
R3 R2
For

0 2 1

1 and 2 are independent variables


1 and 2 are dependent variables

Multi-region Problems Final

For

0 1

1
1
1 1 R2 11 0
2
R2 1
1

2
2
2 R3 R3 R2 2 0
2
R3 R2
with

1 (0) 1,

2 (0) 0,

Multi-region Problems Final


For a perfectinterface:

1 (1) 2 (1)
1
1
1 (1)
2 (1)
R2 1
R3 R2
For an imperfect interface:
1
1 (1) H c 1 (1) 2 (1) 0
R2 1
1
1
1 (1)
2 (1)
R2 1
R3 R2

Você também pode gostar