Beruflich Dokumente
Kultur Dokumente
= ' where q
i
=heat flux in the direction of the i dimension
[cal/cm
2
.s]
i
T
k q
i
= ' di mana q
i
= fluks haba pada arah dimensi i [cal/sm
2
[5 marks/markah]
.s]
6/-
50.0
52.34
43.0
56.11
0 0
33.89
33.3
- 6 - [EKC 245]
[b] A 4 cm long thin rod is insulated at all point except at its ends. At time t =0,
the temperature of the whole rod is 30
o
C and the boundary conditions are
fixed for all times at T(0) =120
o
C and T(10) =45
o
C. Given x = 1 cm, t =1
s and k =0.944 cm
2
/s. Calculate the temperature distribution at t =1s using
the simple implicit method. The Laplacian difference equations for the system
is given as
Satu rod halus yang panjangnya 4 sm ditebat pada semua titik kecuali pada
kedua-dua hujungnya. Pada masa t = 0, suhu seluruh rod tersebut ialah 30
o
C
dan keadaan sempadan dikekal pada T(0) = 120
o
C dan T(10) = 45
o
C. Diberi
x = 1 sm, t = 1 s dan k = 0.944 sm
2
/s. Kirakan taburan suhu pada t = 1s
menggunakan kaedah implisit mudah. Persamaan Laplace bagi sistem
tersebut diberi sebagai
l
i
l
i
l
i
l
i
T T T T = + +
+
+
+ +
1
1
1 1
1
) 2 1 ( where = k t/(x)
2
[10 marks/markah]
- oooOooo -
- 7 - [EKC 245]
Appendix
Matrix of Polynomial Regression
(
(
(
i i
i i
i o
i i i
i i i
i i
y x
y x
y
a
a
a
x x x
x x x
x x n
2
2
1
4 3 2
3 2
2
Matrix of Multiple Linear Regression
(
(
(
i i
i i
i
i i i i
i i i i
i i
y x
y x
y
a
a
a
x x x x
x x x x
x x n
2
1
2
1
0
2
2 2 1 2
2 1
2
1 1
2 1
Differentiation Formulas
Forward finite-divided-difference
First derivative
h
x f x f
x f
i i
i
) ( ) (
) (
1 '
=
+
O(h)
h
x f x f x f
x f
i i i
i
2
) ( 3 ) ( 4 ) (
) (
1 2 '
+
=
+ +
O(h
2
)
Second derivative
2
1 2 "
) ( ) ( 2 ) (
) (
h
x f x f x f
x f
i i i
i
+
=
+ +
O(h)
2
1 2 3 "
) ( 2 ) ( 5 ) ( 4 ) (
) (
h
x f x f x f x f
x f
i i i i
i
+ +
=
+ + +
O(h
2
)
Backward finite-divided-difference
First derivative
h
x f x f
x f
i
i
) ( ) (
) (
1 1 '
= O(h)
h
x f x f x f
x f
i i i
i
2
) ( ) ( 4 ) ( 3
) (
2 1 '
+
= O(h
2
)
Second derivative
2
2 1 "
) ( ) ( 2 ) (
) (
h
x f x f x f
x f
i i i
i
+
= O(h)
2
3 2 1 "
) ( ) ( 4 ) ( 5 ) ( 2
) (
h
x f x f x f x f
x f
i i i i
i
+
= O(h
2
)
2/-
- 8 - [EKC 245]
Centred finite-divided-difference
First derivative
h
x f x f
x f
i i
i
2
) ( ) (
) (
1 1 ' +
= O(h
2
)
h
x f x f x f x f
x f
i i i i
i
12
) ( ) ( 8 ) ( 8 ) (
) (
2 1 1 2 ' + +
+ +
= O(h
4
)
Second derivative
2
1 1 "
) ( ) ( 2 ) (
) (
h
x f x f x f
x f
i i i
i
+
+
= O(h
2
)
2
2 1 1 2 "
12
) ( ) ( 16 ) ( 30 ) ( 16 ) (
) (
h
x f x f x f x f x f
x f
i i i i i
i
+ +
+ +
= O(h
4
)
Derivatives of unequally spaced data
) )( (
2
) (
) )( (
2
) (
) )( (
2
) ( ) ( '
1 1 1
1
1
1 1
1 1
1 1 1
1
1
i i i i
i i
i
i i i i
x i
i
i i i i
i i
i
x x x x
x x x
x f
x x x x
x x x
x f
x x x x
x x x
x f x f
+
+
=
+ +
+
+
+
+
+
Integration Formulas
Trapezoidal Rule
2
) ( ) (
) (
b f a f
b a I
+
=
n
x f x f x f
a b I
n
i
n i o
2
) ( ) ( 2 ) (
) (
1
1
=
+ +
=
Simpsons 1/3 Rule
6
) ( ) ( 4 ) (
) (
2 1
x f x f x f
a b I
o
+ +
n
x f x f x f x f
a b I
n
i
n
j
n j i o
3
) ( ) ( 2 ) ( 4 ) (
) (
1
5 , 3 , 1
2
6 , 4 , 2
=
+ + +
- 9 - [EKC 245]
Useful Formula
ODE solver
Eulers method
y
i+1
=y
i
+y
i
h
4
th
y
order Runge-Kutta
i+1
=y
i
6
1
+ (k
1
+2k
2
+2k
3
+k
4
where k
)h
1
k
=f (x, y)
2
= f (x
i
2
1
+ h, y
i
2
1
+ k
1
k
h)
3
= f (x
i
2
1
+ h, y
i
2
1
+ k
2
k
h)
4
=f (x
i
+ h, y
i
+k
3
h)
Finite difference methods
Laplacian difference equations
T
i+1,j
+T
i-1,j
+T
i,j+1
+T
i,j-1
- 4 T
i,j
=0
Explicit method:
t
T T
t
T
l
i
l
i
+1
;
2
1 1
2
2
2
x
T T T
x
T
l
i
l
i
l
i
+
=
+
Simple implicit method:
t
T T
t
T
l
i
l
i
+1
;
2
1
1
1 1
1
2
2
) (
2
x
T T T
x
T
l
i
l
i
l
i
+ +
+
The Crank Nicolson Method
t
T T
t
T
l
i
l
i
+1
;
(
+
+
+ +
+ +
2
1
1
1 1
1
2
1 1
2
2
) (
2
) (
2
2
1
x
T T T
x
T T T
x
T
l
i
l
i
l
i
l
i
l
i
l
i
Overrelaxation
old
j i
new
j i
new
j i
T T T
, , ,
) 1 ( + =