Professional Documents
Culture Documents
Chemical Process and Material Balance-07092015 - 2
Chemical Process and Material Balance-07092015 - 2
koefisien koefisien
m = 0 slab
m = 1 cylinder
m = 2 sphere
Input initial condition:
𝜕 2 𝐶𝐴 𝜕𝐶𝐴
𝐷𝐴 . − 𝑘. 𝐶𝐴 . 𝐶𝐵 = 𝑣𝑍 .
𝜕𝑦 2 𝜕𝑧
Reaction:
TDB + SO3 product ; A + B product
r = k.CA.CB
Boundary condition:
Pada z = 0 CA = CA0 dan CB = 0
𝜕𝐶𝐴 𝜕𝐶𝐵
Pada y = 0 = 0 dan =0
𝜕𝑦 𝜕𝑦
𝜕𝐶 𝑟 𝜕𝐶𝐵 𝑁𝐵 −𝑟𝐵 .𝛿
Pada y = 𝛿 𝜕𝑦𝐴 = − 𝐷𝐴 . 𝛿 dan =−
𝐴 𝜕𝑦 𝐷𝐵
Hanifrahmawan Sudibyo, S.T., M.Eng.
𝜕2𝑇 ℎ 𝜌. 𝐶𝑃 𝜕𝑇 1 𝜕𝑇
Partial differential equation: − 4. . 𝑇 − 𝑇𝑈 = . = .
𝜕𝑧 2 𝑘. 𝐷 𝑘 𝜕𝑡 𝛼 𝜕𝑡
𝝏𝟐 𝑻 𝜶. 𝒉 𝝏𝑻
𝜶. 𝟐 − 𝟒. . 𝑻 − 𝑻𝑼 =
𝝏𝒛 𝒌. 𝑫 𝝏𝒕
• When t = 0, T = Tu = 30oC
• When t = t,
1). At z = 0, T = 400oC
𝜕𝑇
2). Case 1 : At z = L, 𝜕𝑧 = 0
𝜕𝑇 ℎ
Case 2 : At z = L, 𝜕𝑧 = − 𝑘 . 𝑇𝐿 − 𝑇𝑈
𝜕2𝑇 𝛼. ℎ 𝜕𝑇 𝜕𝑇 3. 𝑇𝑁+1 − 4. 𝑇𝑁 + 𝑇𝑁−1
𝛼. 2 − 4. . 𝑇 − 𝑇𝑈 = =
𝜕𝑧 𝑘. 𝐷 𝜕𝑡 𝜕𝑧 2. ∆𝑧
𝑇𝑖+1 − 2. 𝑇𝑖 + 𝑇𝑖−1 𝛼. ℎ 𝑑𝑇
𝛼 − 4. . (𝑇 − 𝑇 ) =
∆𝑧 2 𝑘. 𝐷 𝑖 𝑈
𝑑𝑡
And then insert the boundary condition at z =L to the equation above.
However, you need to redefine the boundary condition into matrice
form.
𝜕𝑇 3. 𝑇𝑁+1 − 4. 𝑇𝑁 + 𝑇𝑁−1
At z = L, =0 0=
2. ∆𝑧
𝜕𝑧
𝜕𝑇 ℎ
At z = L, = − . 𝑇𝐿 − 𝑇𝑈 4. 𝑇𝑁 − 𝑇𝑁−1
𝜕𝑧 𝑘 𝑇𝑁+1 =
3
2. ℎ. ∆𝑧 4. 𝑇𝑁 − 𝑇𝑁−1
𝑇𝑁+1 =− . 𝑇𝑁 − 𝑇𝑈 +
3. 𝑘 3
Z=0 Z=L
i=1 i=N
2 3 …
𝜕𝑇 ℎ
At z = L ( i=N ), = − . 𝑇𝐿 − 𝑇𝑈
𝜕𝑧 𝑘
2. ℎ. ∆𝑧 4. 𝑇𝑁 − 𝑇𝑁−1
𝑇𝑁+1 =− . 𝑇𝑁 − 𝑇𝑈 +
3. 𝑘 3
Main program: solve ordinary differential equation using
ode15s or ode 45
Subroutine (t as i.v. and T as d.v.) :
Inputting the differential equation BASED ON the defined
boundary condition.
4. 𝑇𝑁 − 𝑇𝑁−1
𝑇𝑁+1 =
The differential equation will have 3 forms: 3
𝑑𝑇
o 1st form: for i = 0 T = Ts =0 2. ℎ. ∆𝑧 4. 𝑇𝑁 − 𝑇𝑁−1
𝑑𝑡 𝑇𝑁+1 = − . 𝑇𝑁 − 𝑇𝑈 +
3. 𝑘 3
𝑇𝑖+1 − 2. 𝑇𝑖 + 𝑇𝑖−1 𝛼. ℎ 𝑑𝑇
o 2nd form: for i = N 𝛼 − 4. . (𝑇 − 𝑇 ) =
∆𝑧 2 𝑘. 𝐷 𝑖 𝑈
𝑑𝑡
𝑇𝑖+1 − 2. 𝑇𝑖 + 𝑇𝑖−1 𝛼. ℎ 𝑑𝑇
𝛼 − 4. . (𝑇 − 𝑇 ) =
∆𝑧 2 𝑘. 𝐷 𝑖 𝑈
𝑑𝑡
Hanifrahmawan Sudibyo, S.T., M.Eng.
Partial differential equation:
𝑇𝑖,𝑗+1 − 2𝑇𝑖,𝑗 + 𝑇𝑖,𝑗−1 𝑇𝑖+1,𝑗 − 2𝑇𝑖,𝑗 + 𝑇𝑖−1,𝑗 𝑇𝑖+1,𝑗 − 𝑇𝑖−1,𝑗 𝑣𝑍 𝑇𝑖,𝑗+1 − 𝑇𝑖,𝑗−1 1 𝑑𝑇
+ + − =
∆𝑧 2 ∆𝑟 2 2∆𝑟 𝛼 2∆𝑧 𝛼 𝑑𝑡
r=0 i=0
j = Nz
j=0
Z=01 2 … Z=L
The reshape will create new matrix with the number of row
equal to Nr x Nz and have only ONE COLUMN.
𝑇𝑖,𝑗+1 − 2𝑇𝑖,𝑗 + 𝑇𝑖,𝑗−1 𝑇𝑖+1,𝑗 − 2𝑇𝑖,𝑗 + 𝑇𝑖−1,𝑗 1 𝑇𝑖+1,𝑗 − 𝑇𝑖−1,𝑗 𝑣𝑍 𝑇𝑖,𝑗+1 − 𝑇𝑖,𝑗−1 1 𝑑𝑇
+ + − =
∆𝑧 2 ∆𝑟 2 𝑟 2∆𝑟 𝛼 2∆𝑧 𝛼 𝑑𝑡
𝑇𝑖+1,𝑗 − 𝑇𝑖,𝑗
For i = 1 and j = 2 to Nz-1 : =0
∆𝑟
For i = Nr and j = 1 to Nz :
For i = 1 and j = 1 to Nz :