Numerical modeling example:

advertisement
Numerical modeling example
A simple steel reheat furnace model – pg. 99-116
Hot steel slab
Rolling mill
Reheat furnace
Final product
The implicit solution
Same equations with a minor change
The slab …
Dimensions:
• 10 m long
• 1 m wide
• 0.3 m thick
0 .3 m
10 m
Steel Properties:
• k = 35 W/m-K
• CP = 473.3 J/kg-K
• r = 7820 kg/m3
1 .0 m
q = h (1 4 0 0 - T )
q=0
• Model heat transfer through the 0.3 m dimension
• “Convective” heat transfer based on a furnace gas temperature of 1400 K
• Heat transfer symmetry on both sides of the slab; h = 200 W/m2-K
• Centreline of the slab has a zero gradient boundary condition (q = 0)
Some computational considerations:
• We want to cover the slab region 0 < x < 0.15 m
• With x = 0.01 m we will require 15 cells
No stability problems with this method.
Time steps, t, and spatial steps,  x, can be
arbitrarily chosen by the user.
Precision of the solution can be affected by the gird
size (time and/or space) and this can be checked.
Same problem formulation and set up:
Three different types of cells (implicit form):
1.Boundary next to the hot combustion
gases – radiation modeled as a convective
process. One cell only.
2.An array of interior cells. Many cells.
3.The centre plane boundary condition –
plane of symmetry with q = 0. One cell
only.
Cell adjacent to furnace gases:
P
E
q = hA(T - TP)
Accumulation within cell P =
Input to cell P =
Output from cell P =

x
r C p TPn 1 - r C p TPn
t

h T - TPn 1


k
TPn 1 - TEn 1
x

TP evaluated at time step n+1

TP and TE evaluated at time step n+1
Generation within cell P = 0
Accumulation = Input – Output + Generation

x
k
r C p TPn 1 - TPn = h T - TPn 1 TPn 1 - TEn 1
t
x

 



General interior cells:
W
P
E
 x
 x
x
r C p TPn 1 - r C p TPn
t

Accumulation within cell P =

k
n 1
n 1
T
T
W
P
Input to cell P = x


TW and TP evaluated at time step n+1

k
TPn 1 - TEn 1
Output from cell P =
x

TP and TE evaluated at time step n+1
Generation in cell P = 0

x
k
k
r C p TPn 1 - TPn =
TWn 1 - TPn 1 TPn 1 - TEn 1
t
x
x






Centreline Cell:
W
P
q=0
 x
 x
x
n 1
n
Accumulation within cell P = t r C p TP - r C p TP

Input to cell P =

k
TWn 1 - TPn 1
x

TW and TP evaluated at time step n+1
Output from cell P = 0
Generation in cell P = 0

x
k
r C p TPn 1 - TPn =
TWn 1 - TPn 1 - 0
t
x





The set of equations involve 15 cells with cell 1 adjacent to the furnace gases
through to cell 15 on the centre symmetry plane of the slab
x
k
r C p T1n 1 - T1n = h T - T1n 1 T1n 1 - T2n 1
t
x

Equation for cell 1:
or,
-




 n 1
k t
k t
h t
1  h t 
 T1 T2n 1 = T1n 
T
2
2


r
C

x
r
C

x




r
C

x
r
C

x
p
p
p
p


x
k
k
r C p Tin 1 - Tin =
Tin-11 - Tin 1 Tin 1 - Tin11
t
x
x

Equations for cell 2 – 14:
or,
 
k t
n 1
i -1
T
r C p x 
2



-


2 k t  n 1
k t

 1
T
Tin11 = Tin
i
2
2

r C p x  
r C p x 

x
k
r C p T15n 1 - T15n =
T14n 1 - T15n 1
t
x
Equation for cell 15:
or,

k t
r C p x 
2

n 1
14
T


k t
 1 
2



r
C

x
p


 n 1
 T = Tn
15
 15


Leads to a set of linear equations:
A x
A =
d 1
c
 2
0

0
0

0
0

0
0

0

0
0

0
0

 0
=b
e1
0
0
0
0
0
0
0
0
0
0
0
0
d2
e2
0
0
0
0
0
0
0
0
0
0
0
c3
d3
e3
0
0
0
0
0
0
0
0
0
0
0
c4
d4
e4
0
0
0
0
0
0
0
0
0
0
0
c5
d5
e5
0
0
0
0
0
0
0
0
0
0
0
c6
d6
e6
0
0
0
0
0
0
0
0
0
0
0
c7
d7
e7
0
0
0
0
0
0
0
0
0
0
0
c8
d8
e8
0
0
0
0
0
0
0
0
0
0
0
c9
d9
e9
0
0
0
0
0
0
0
0
0
0
0
c10
d 10
e10
0
0
0
0
0
0
0
0
0
0
0
c11
d 11
e11
0
0
0
0
0
0
0
0
0
0
0
c12
d 12
e12
0
0
0
0
0
0
0
0
0
0
0
c13
d 13
e13
0
0
0
0
0
0
0
0
0
0
0
c14
d 14
0
0
0
0
0
0
0
0
0
0
0
0
c15
A tridiagonal matrix
0
0 
0

0
0

0
0

0
0

0

0
0

0
e14 

d 15 
A x
x =
T1n 1 
 n 1 
T2 
  
 n 1 
T14 
T n 1 
 15 
The vector of unknowns
=b
b =
 n h t T 
T1  r C x 
p


n
T2






n


T14


n
T
15


The vector of knowns
(usually true for linear problems)
d 1
c
 2
0

0
0

0
0

0
0

0

0
0

0
0

 0
e1
0
0
0
0
0
0
0
0
0
0
0
0
d2
e2
0
0
0
0
0
0
0
0
0
0
0
c3
d3
e3
0
0
0
0
0
0
0
0
0
0
0
c4
d4
e4
0
0
0
0
0
0
0
0
0
0
0
c5
d5
e5
0
0
0
0
0
0
0
0
0
0
0
c6
d6
e6
0
0
0
0
0
0
0
0
0
0
0
c7
d7
e7
0
0
0
0
0
0
0
0
0
0
0
c8
d8
e8
0
0
0
0
0
0
0
0
0
0
0
c9
d9
e9
0
0
0
0
0
0
0
0
0
0
0
c10
d 10
e10
0
0
0
0
0
0
0
0
0
0
0
c11
d 11
e11
0
0
0
0
0
0
0
0
0
0
0
c12
d 12
e12
0
0
0
0
0
0
0
0
0
0
0
c13
d 13
e13
0
0
0
0
0
0
0
0
0
0
0
c14
d 14
0
0
0
0
0
0
0
0
0
0
0
0
c15
0
0 
0

0
0

0
0

0
0

0

0
0

0
e14 

d 15 
Diagonal elements of [A],

h t
k t
d 1 = 1 

 r C p x r C x 2
p


2 k t
d i = 1 
2



r
C

x
p

d 15
ci = -
ei = -
k t
, for i = 2 - - - 15
2
r Cp x 
k t
r C p x 
2

 for i = 2 - - - 14



k t
= 1 
2



r
C

x
p

Elements “banding” the diagonal coefficients in [A],
, for i = 1 - - - 14








For ease of writing a computer code, define dimensionless groups:
Fourier number
Fo =
k t
r C p x 2
h x 
k
h t
 Bi  Fo =
r C p x
Biot number, Bi =
Diagonal elements of [A]:


h t
k t
 = 1  Bi * Fo  Fo
d1 = 1 

2
 r C p x r C x  
p



2 k t 

di = 1 
= 1  2 * Fo , for i = 2 - - - 14
2 

r C p x  

d15

k t
= 1 
2



r
C

x
p


 = 1  Fo


Banding elements of [A]:
ci = ei = -
k t
= - Fo , for i = 2 - - - 15
r Cp x 2
k t
r C p x 
2
= - Fo , for i = 1 - - - 14
Spreadsheet solution
VBA (Excel add-in) format:
Solver based on
Tridiagonal Matrix
Algorithm
'Invoke TDMA to evaluate current temperatures
'
Delta(1) = D(1)
Y(1) = B(1) / Delta(1)
For I = 2 To Number_of_Cells
Delta(I) = D(I) - C(I) * E(I - 1) / Y(I - 1)
Y(I) = (B(I) - C(I) * Y(I - 1)) / Delta(I)
Next I
X(Number_of_Cells) = Y(Number_of_Cells)
For II = 2 To Number_of_Cells
I = Number_of_Cells - II + 1
X(I) = Y(I) - E(I) * X(I + 1) / Delta(I)
Next II
'
'Output from TDMA procedure is the solution vector X(I)
Consider the system of equations:
[A] x = b
With 5 equations and 5 unknowns:
a 1,2 a 1,2 a 1,3 a 1,4 a 1,5   x 1   b1 
a
    
a
a
a
a
2,2
2,3
2,4
2,5   x 2 
 2,1
b 2 
a 3,1 a 3,2 a 3,3 a 3,4 a 3,5   x 3  =  b 3 

    
a 4,1 a 4,2 a 4,3 a 4,4 a 4,5   x 4  b 4 
a 5,1 a 5,2 a 5,3 a 5,4 a 5,5   x 5   b 5 
 
 
 

 
 



A
x
b
Decompose the original problem,
[A] x = b
To one of the form:
[L] [U] x = b
0
 l1,1
l
 2,1 l 2,2
Where [L] = l
3,1 l3, 2

l 4,1 l 4,2
l5,1 l5,2

0
0
0
0
l3,3
0
l 4, 3
l 4, 4
l5,3
l5,4
0 
0 
0 

0 
l5,5 
Lower triangular matrix
1 u1, 2
0 1

and [U] = 0 0

0 0
0 0
u1,3
u1, 4
u 2,3
1
u 2, 4
u 3, 4
0
0
1
0
u1,5 
u 2,5 
u 3, 5 

u 4,5 
1 
Upper triangular matrix
 Need to find matrices [L] and [U] whose product equals original [A] matrix
With [A] x = b
Let
0
 l1,1
l
 2,1 l 2,2
[L] = l
3,1 l3, 2

l 4,1 l 4,2
l5,1 l5,2

0
0
0
0
l3,3
0
l 4, 3
l 4, 4
l5,3
l5,4
and [L] [U] x = b
[U] x = y then [L] y = b
0 
0 
0 

0 
l5,5 
And b is known
Solve for y by forward substitution in the system
[L] y = b
i.e.
y1 = l1,1 b1
etc.
With a solution for y from [L] y = b
Then solve for x from [U] x = y
[U] =
1 u1, 2
0 1

0 0

0 0
0 0
u1,3
u1, 4
u 2,3
1
u 2, 4
u 3, 4
0
0
1
0
u1,5 
u 2,5 
u 3, 5 

u 4,5 
1 
and y known
Solve for x by backward substitution in the system
[U] x = y
i.e.
x5 = y5
etc.
And x is the solution to the original problem!!
A simpler case arises when the coefficient matrix [A] is tridiagonal:
i.e. if [A] =
 d1
c
 2
0

0
 0
e1
0
0
d2
e2
0
c3
d3
e3
0
c4
d4
0
0
c5
0
0 
0

e4 
d 5 
[L] =
0
1 = d1

c e
2 = d2 - 2 1
 c2
1


c3
 0

 0
0


 0
0

0
0
0
0
3 = d3 -
c 3e 2
2
0
c4
4 = d4 -
0
c5


0



0



0

c5e 4 

5 = d5  4 
0
c 4e3
3
b1
δ1
b 2  y1c 2
δ2
b3  y 2c3
δ3
b 4  y 3c 4
δ4
b5  y 4c5
δ5
y1 =
y2 =
y3 =
y4 =
y5 =
where
δ1 = d 1
c 2 e1
δ1
ce
where δ 3 = d 3  3 2
δ2
c e
where δ 4 = d 4  4 3
δ3
c e
where δ 5 = d 5  5 4
δ4
where δ 2 = d 2 
[U] =
1 e1  1
0
1

0
0

0
0
0
0
0
0
e2  2
1
0
e3  3
0
0
1
0
x 5 = y5
With backward
substitution solution
x 4 = y4 
x 5e 4
δ4
x 3 = y3 
x 4e3
δ3
x 2 = y2 
x 3e 2
δ2
x 1 = y1 
x 2 e1
δ1

0 
0 

e4  4 
1 
0
'Invoke TDMA to evaluate current temperatures
‘Forward Substitution Code
Delta(1) = D(1)
Y(1) = B(1) / Delta(1)
For I = 2 To Number_of_Cells
Delta(I) = D(I) - C(I) * E(I - 1) / Y(I - 1)
Y(I) = (B(I) - C(I) * Y(I - 1)) / Delta(I)
Next I
‘Backward Substitution Code
X(Number_of_Cells) = Y(Number_of_Cells)
For II = 2 To Number_of_Cells
I = Number_of_Cells - II + 1
X(I) = Y(I) - E(I) * X(I + 1) / Delta(I)
Next II
'
'Output from TDMA procedure is the solution vector X(I)
Download