MEB Modelling Training
MEB Modelling Training
E - L + G - C = A
E - L = A G,C = 0 E= Entering
L= Leaving
G= Generated (From reaction)
C= Consumed(Reaction)
A= Accumulation
y x
h t
10.95163 1
Chart Title
11.81269 2 25
12.59182 3
13.2968 4 20
f(x) = − 0.00000000150934 x⁶ + 0.000000310435 x⁵ − 0.0000279107 x⁴ + 0.00145532 x³
13.93469 5 − 0.0482713 x² + 0.993699 x + 10.0067
14.51188 6 15
R² = 0.999999889140933
15.03415 7
15.50671 8
10
15.9343 9
16.32121 10
5
16.67129 11
16.98806 12
17.27468 13 0
0 5 10 15 20 25 30 35 40 45 50
17.53403 14
17.7687 15
17.98103 16
18.17316 17
18.34701 18
18.50431 19
18.64665 20
18.77544 21
18.89197 22
18.99741 23
19.09282 24
19.17915 25
19.25726 26
19.32794 27
19.3919 28
19.44977 29
19.50213 30
19.54951 31
19.59238 32
19.63117 33
19.66627 34
19.69803 35
19.72676 36
19.75276 37
19.77629 38
19.79758 39
19.81684 40
19.83427 41
19.85004 42
19.86431 43
19.87723 44
19.88891 45
19.89948 46
19.90905 47
x⁴ + 0.00145532 x³
40 45 50
Qin 2 m3/h
Cin 0.02 kg/m3
Qout 2 m3/h
Cout x kg/m3
Ctank x kg/m3
V0 10 m3
x0 0 kg/m3
t0 0h
Assumption
1. Concentration uniform within the tank
2. exit concentration equals to tank concenration
3. no reaction occurred
Equation
Enter - Leave + Generated - Consumed
0.04 - 2x + 0x - 0x
0.04 - 2x + 0x - 0x
0.04 - 2x + 0x - 0x
0.04 - 2x + 0x - 0x
0.004 - 0.2 x + 0x - 0x
Solving Equation
dx = 0.004 - 0.2 x
dt
dx u = 0.004 -
0.004 - 0.2 x = dt du = -0.2
dx
du = dt dx = du
-0.2 u -0.2
du = -0.2 dt
u
u = C exp( -0.2 t)
Graph pLot
y x
C t
0.006594 1
0.009024 2 Chart
0.011013 3 0.025
0.012642 4
0.013976 5
0.02
0.015068 6
0.015962 7
0.016694 8 0.015
0.017293 9
0.017784 10 0.01
0.018186 11
0.018515 12 0.005
0.018784 13
0.019004 14
0
0.019185 15 0 5 10 15 20 25 30 35 40 45
0.019333 16
0.019454 17
0.019553 18
0.019634 19
0.0197 20
0.019754 21
0.019799 22
0.019835 23
0.019865 24
0.01989 25
0.01991 26
0.019926 27
0.019939 28
0.01995 29
0.019959 30
0.019967 31
0.019973 32
0.019978 33
0.019982 34
0.019985 35
0.019988 36
0.01999 37
0.019992 38
0.019993 39
0 40
= Accumulation
= d(Vx)
dt
= (Vdx+xdV) dV = Qin - Qout
dt dt
= Vdx + xdV dV = 2- 2
dt dt dt
= 10dx dV = 0
dt dt
= dx
dt
0.2 x
C = 0.02 - 20 1
(t + 10) ^3
y x
C t
0 0
0.025 Konsentrasi dalam tangki
0.004974 1
0.008426 2 0.02
Concentration (kg/m3)
0.010897 3
0.012711 4 0.015
0.014074 5
0.015117 6
0.01
0.015929 7
0.016571 8
0.017084 9 0.005
0.0175 10
0.01784 11 0
0 5 10 15 20 25 30 35
0.018122 12
hour
0.018356 13
0.018553 14
0.01872 15
0.018862 16
0.018984 17
0.019089 18
0.01918 19
0.019259 20
0.019329 21
0.01939 22
0.019443 23
0.019491 24
0.019534 25
0.019571 26
0.019605 27
0.019636 28
0.019663 29
Const
0.06
0.001
0.059
0.004615 0.002308
Vin 2 m3/h
Vout 2 m3/h
Tin 50 C
Tout x
Ttank x
Ttank,t=0 20 C
x= 50 - 30 exp( -0.2 t)
y x
T t Tank Temperature
20 0 60
25.43808 1
29.8904 2 50
33.53565 3 40
Temperature C
36.52013 4
38.96362 5 30
40.96417 6 20
42.60209 7
43.9431 8 10
45.04103 9 0
45.93994 10 0 10 20 30 40 50 60
46.67591 11 Hour
47.27846 12
47.77179 13
48.1757 14
48.50639 15
48.77713 16
48.9988 17
49.18029 18
49.32888 19
49.45053 20
49.55013 21
49.63168 22
49.69844 23
49.75311 24
49.79786 25
49.8345 26
49.8645 27
49.88906 28
49.90917 29
49.92564 30
49.93912 31
49.95015 32
49.95919 33
49.96659 34
49.97264 35
49.9776 36
49.98166 37
49.98499 38
49.98771 39
49.98994 40
49.99176 41
49.99325 42
49.99448 43
49.99548 44
49.9963 45
49.99697 46
49.99752 47
49.99797 48
49.99834 49
50 60
Vin 3 m3/h Equation
Vout 2 m3/h
Vtank,t=0 10 m3
Cin 0.02 kg/m3
Cout x kg/m3
Ctank x kg/m3
Ctank,t=0 0 kg/m3
Tin 50 C
Tout T C
Tank T C
Ttank,t=0 20 C
x y1 y2
t x T
0 0 20 Concentrati on and Tempera
1 0.004974 27.46056
2 0.008426 32.63889 0.025
3 0.010897 36.34502
4 0.012711 39.06706
0.02
5 0.014074 41.11111
Concentration kg/m3
6 0.015117 42.67578
0.015
7 0.015929 43.89375
8 0.016571 44.85597
9 0.017084 45.62618 0.01
10 0.0175 46.25
11 0.01784 46.76061 0.005
12 0.018122 47.18257
13 0.018356 47.53431 0
14 0.018553 47.82986 0 5 10 15 20 25 30 35
30 0.019688 49.53125
20
31 0.01971 49.56472
32 0.01973 49.59508
10
33 0.019748 49.62267
34 0.019765 49.64782 0
0 0.005 0.01 0.015 0.02
10
0
35 0.019781 49.67078 0 0.005 0.01 0.015 0.02
36 0.019795 49.69179
37 0.019807 49.71105
38 0.019819 49.72873
39 0.01983 49.745
40 0.01984 49.76
41 0.019849 49.77384
42 0.019858 49.78664
43 0.019866 49.79849
44 0.019873 49.80948
ti on and Temperature
60
50
40
Temeprature C
30
20
10
0
20 25 30 35 40 45 50
time (hour)
entration Temperature
oncentration
8.45124282983 -
T =
y x
TC t (hour)
20 0 Temperature
24.7303172338558 1
40
28.2232502558287 2
30.8024813079593 3 35
32.7070219270968 4
Temperature C
34.1133616061064 5 30
35.1518226779697 6
35.9186369930824 7 25
36.4848635082532 8
20
36.9029731603081 9
37.2117112297162 10 15
37.4396877785314 11 0 5 10 15 20 25 30 35 40 45
37.6080288804543 12 Time (hour)
37.7323343265358 13
37.8241232227058 14
37.8919014393945 15
37.9419498314025 16
37.9789062705796 17
38.0061954269711 18
38.0263461252836 19
38.041225685379 20
38.0522129626039 21
38.0603261232108 22
38.0663169955341 23
38.070740740229 24
38.0740072957604 25
38.0764193664778 26
38.078200473546 27
38.0795156681485 28
38.0804868264092 29
38.0812039433785 30
38.0817334726719 31
38.0821244845774 32
38.0824132132882 33
38.0826264146442 34
38.0827838455351 35
38.0829000947274 36
38.082985934772 37
38.0830493202728 38
38.0830961250213 39
38.0831306863084 40
38.0831562068506 41
38.0831750515793 42
38.0831889667929 43
38.0831992419832 44
38.0832068293287 45
38.0832124319317 46
38.0832165689729 47
38.0832196238225 48
38.0832218795665 49
38.0832235452398 50
38.0832247751964 51
38.0832256834138 52
38.0832263540543 53
38.0832268492647 54
38.0832272149351 55
3.0325
0.30325 T = C exp( -0.3032505 t)
0.30325 20 = C
C = 2.39
0.30325 T = 2.39 exp( -0.3032505 t)
T = 28 - 7.86885246 exp( -0.30325 t)
erature
5 30 35 40 45 50 55 60
Time (hour)
Tank filled with fluid with fix initial temperature and convective heat occurred
Ttank 38.08323 C 23.08323
U 30 J/s.m2.C
A 40 m2
density 1000 kg/m3 y x
Cp 4184 J/kg.C T t(hour)
V 10 m3 38.08323 0 Temperatur
UA 1200 J/s.C 35.81879 1
40
4320000 J/h.C 33.77649 2
rho.V.Cp 41840000 J/C 31.93453 3 35
0.10325 /h 30.27327 4 30
Temperature C
28.77498 5
25
27.42367 6
26.20492 7 20
25.10573 8 15
24.11437 9 10
23.22026 10
22.41386 11 5
0 10 20 30 40
21.68657 12 Time (hour)
21.03062 13
20.43902 14
19.90546 15
19.42424 16
18.99023 17
18.59879 18
18.24575 19
17.92735 20
17.64018 21
17.38118 22
17.14759 23
16.93691 24
16.7469 25
16.57553 26
16.42098 27
16.28158 28
16.15586 29
16.04247 30
15.9402 31
15.84797 32
15.76479 33
15.68976 34
15.6221 35
15.56107 36
15.50603 37
15.45639 38
15.41162 39
15.37124 40
15.33482 41
15.30197 42
15.27235 43
15.24563 44
15.22154 45
15.1998 46
15.1802 47
15.16253 48
15.14658 49
15.1322 50
15.11923 51
15.10754 52
15.09699 53
15.08747 54
15.07889 55
15.07115 56
15.06417 57
15.05788 58
15.0522 59
15.04708 60
15.04246 61
15.0383 62
15.03454 63
15.03115 64
15.02809 65
15.02534 66
15.02285 67
15.02061 68
15.01859 69
15.01677 70
15.01512 71
15.01364 72
15.0123 73
15.01109 74
Temperature
20 30 40 50 60 70 80
Time (hour)
Batch perfectly stirred tank. No input or output flow. Chemical reaction occurred
Chemical Reaction
Mass Balance
A: E-L-C = 0
B: E-L-C = 0
C: E-L+G= 0
Energy Balance
Fluid inside Reactor
Cooling Fluid
Summary of Equation
Mass Balance
A (mol/min): Q(Ca-in - Ca) - kCaCbV = 0
B (mol/min): Q(Cb-in - Cb) - kCaCbV = 0
C (mol/min): Q(Cc-in - Cc) + kCaCbV = 0
Energy Balance
Fluid inside Reactor (J/min)
Cooling Fluid (J/min)
E= entering G= generated
L= leaving
C= consumed
Qin = Qout = Q
Generation (mol/min)
0
0
kCaCbV
UA(Tj-T) J/min
UA(T-Tj) J/min
Perfectly Stirred Tank
No Reaction
(kg/m3)
Data
Q-in 2 Q (m3/s)
Q-out1 1 Q (m3/s)
Q-out2 1 Q (m3/s)
T-in Tin K
T-out1 TK
T-out2 TK
T-tank TK
Cp-in = Cp-out1 = Cp-out2= Cp-tank
density in = density out1 = density out2
at t=0:
V0 V
T0 T0
Data
Tank 1 Tank 2
Min1 (W0) 100 kg/min Min (W1) 120 kg/min
Min2 (W4) 20 kg/min Mout (W2) 120 kg/min
Mout (W1) 120 kg/min Tin T1 K
Tin 20 C Tout T2 K
293 K M2 1000 kg
Tout T1 K T0 20 C
M1 1000 kg Tsteady-State 42.81
T0 20 C
Tsteady-State 34.17536
Tsteam-in 250 C
523 K
Cp oil 2 kJ/kg.C
Q=UA(Tstream-T)
UA 10 kJ/min.C
mass in each tank is constant
no heat exchange with the environtment
W0 100 kg/min
W4 20 kg/min
W1 120 kg/min
M1 1000 kg
dM1/dt 0 kg/min
T0 20 C
Tsteam 250 C
UA 10 kJ/min.C
Cp 2 kJ/kg.C
a 2 C/min
b 0.02 /min
c 0.12 /min
d 0.005 /min
d.Tsteam 1.25 C/min
0= 2+ 1.25 + 0.02 T3
0= 3.25 + 0.02 T3 - 0.125
3.25 = 0.125 T1 - 0.02 T3 eq1
0= 0.12 T1 - 0.12 T2 +
0= 0.12 T2 - 0.12 T3 +
Rearrange Matrix
Inverse Matrix
9.38367990391112 1.441333 1.501389
9.00833270775467 9.38368 1.441333
8.64799939944449 9.008333 9.38368
Solution
T1 = 9.38368 1.441333 1.50138878463 3.25 = 34.175
T2 = 9.008333 9.38368 1.44133323324 1.25 = 42.808
T3 = 8.647999 9.008333 9.38367990391 1.25 = 51.096
Transient Model
1.25 - 0.005 T2
T2
1.25 - 0.005 T3
T3
T2 + 0.02 T3
T2 + 0 T3
T2 - 0.125 T3
T2 - 0.105 T3
Data Adiabatic Process
Reaction: Tin =Tout=Ttank=Constant
k 0.844 L/mol.s
F-in 5 L/min
C-A1 0.7 mol/L
C-B1 0.4 mol/L
C-C1 0 mol/L
C-D1 0 mol/L
F-out 5 L/min
C-A Ca mol/L
C-B Cb mol/L
C-C Cc mol/L
C-D Cd mol/L
C-A0 0 mol/L
C-B0 0 mol/L
C-C0 0 mol/L
C-D0 0.8 mol/L
V0 40 L
Mass Balance
A: VdCa/dt = 3.5 - 5 Ca - kCaCbV
B: VdCb/dt = 2- 5 Cb - kCaCbV
C: VdCc/dt = 0- 5 Cc + kCaCbV
D: VdCd/dt = 0- 5 Cd + kCaCbV
Information
1. No-Reaction
2.Steady-State
3. Tube Exchange heat with a jacket
4. No radial or angular variation of temperature inside the tube
5. themal diffusion is not important in any direction (axial,radial, or angular)
Data
L 60 m density 900 kg/m3
R 0.2 m Cp 3000 J/kg.C
Q 4 m3/h U 60000 J/h.m2.C
T0 20 C a 0.0628
Tjacket 300 C b 9
100a 6.28
Developing Equation
Heat enter in x:
Energy Balance:
Final Equation:
T = a - b exp
T = 300 - 280 exp
T x
20.0000000000001 0
21.9469770912842 1 Tube Temperature Profile
140
120
100
eC
Tube Temperature Profile
23.8804158975897 2 140
25.8004105572408 3
120
27.7070545539713 4
29.6004407214774 5 100
Temperature C
31.4806612479366 6 80
33.3478076804974 7 60
35.2019709297358 8
40
37.0432412740822 9
38.8717083642167 10 20
40.6874612274347 11 0
0 10 20 30 40 50 60
42.4905882719808 12
44.2811772913539 13 Tube Length
46.0593154685821 14
47.8250893804666 15
49.5785850017982 16
51.3198877095426 17
53.0490822869979 18
54.7662529279222 19
56.4714832406332 20
58.1648562520792 21
59.8464544118814 22
61.5163595963482 23
63.1746531124623 24
64.8214157018389 25
66.4567275446572 26
68.0806682635646 27
69.6933169275531 28
71.2947520558091 29
72.8850516215369 30
74.4642930557549 31
76.0325532510656 32
77.5899085653998 33
79.1364348257339 34
80.6722073317826 35
82.1973008596645 36
83.7117896655433 37
85.2157474892434 38
86.7092475578399 39
88.1923625892243 40
89.665164795645 41
91.1277258872231 42
92.5801170754446 43
94.0224090766265 44
95.4546721153611 45
96.8769759279346 46
98.2893897657227 47
99.6919823985622 48
101.0848221181 49
102.467976741117 50
103.841513612831 51
105.205499610177 52
106.560001145059 53
107.90508416759 54
109.240814169297 55
110.567256186312 56
111.884474802542 57
113.192534152808 58
114.491497925969 59
115.781429368029 60
x
-0.006978 x
e Profile
e Profile
40 50 60
gth
Initial Equation
Logarithmic mean temperature difference (LMTD): Average difference temperature between hot and cold fluids along the
dTa 110
dTb 10
a 100
b 2.397895273
a/b = LMT 41.70323914
Information
1. temperature of the walls do not vary with time
2. no heat transfer by convection between the bar and the environment
Data
Tx=0 70 Accumulation is always related to time
Tx=L 30
T0 50
Control Volume
Conservation Law E-L = A
Flow of Energy
x (enter)
Energy Flow
t
Energy Accumulation
Accumulaion
Energy Balance
Temperature Profile
Initial Condition
Boundary Condition
Example 4.5
Information
1. temperature of the walls do not vary with time
2. heat transfer by convection between the bar and the environment only happened at the end of the bar without wall
Energy Balance
initial Condition
Boundary condition
Example 4.6
Information
Example 4.5 but with heat transfer by convection with environment
Convective Term:
Energy Balance
Initial Condition
Boundary Condition
Example 4.7
R 1 cm
L 5 cm
Ca 1 mol/m3
Accumulation
Energy Balance:
Initial and Boundary Condition
Example 4.8
Information
1. Solid Cylinder of copper
2. temperature of the cylinder remains constant at T0
3. copper cylinder coated with annulus made of aluminum at T1
4. constant environmental temperature
5. insulated end
6. annulus exchanges heat with environment
7. T0 > T1 > Tenv
Example 4.9
Information
1. Reaction of A --> B occurred,irreversibel, exothermic
2. It has Jacket at a constant temperature Tj
2. system operates in a steady state
3. no radial or angular profile of concentration and temperature inside reactor
4. diffusion coefficient D reactant A = diffusion coefficient D reactant B
5. invariable: D, density, Cp, k
Mass Balance:
reactant A: E-L-C=0
Product B: E-L+G=0
Energy Balance E - L + G/C = 0
steady state
Transient State
Example 4.11
ays related to time
end of the bar without wall
207
32
1 1.154589 1.154589
2 1.154589 2.309179
3 1.154589 3.463768
4 1.154589 4.618357
5 1.154589 5.772947
6 1.154589 6.927536
7 1.154589 8.082126
8 1.154589 9.236715
9 1.154589 10.3913
10 1.154589 11.54589
11 1.154589 12.70048
12 1.154589 13.85507
13 1.154589 15.00966
14 1.154589 16.16425
15 1.154589 17.31884
16 1.154589 18.47343
17 1.154589 19.62802
Numerical Method Training for Solving ODE
Example 4.1
L 60 m
R 0.2 m analytical formula
U 60000 J/h.m2.C
Q 4 m3/h
density 900 kg/m3
Cp 3000 J/kg.C
M 0.006978
8 35.25378 35.20197
9 37.10112 37.04324 80
10 38.93557 38.87171
11 40.75722 40.68746
12 42.56616 42.49059 60
13 44.36247 44.28118
14 46.14625 46.05932
40
20
0
Te
60
15 47.91759 47.82509 40
16 49.67656 49.57859
17 51.42327 51.31989
18 53.15778 53.04908 20
0
19 54.88019 54.76625
20 56.59058 56.47148
21 58.28904 58.16486
22 59.97564 59.84645
23 61.65048 61.51636
24 63.31363 63.17465
25 64.96517 64.82142
26 66.6052 66.45673
27 68.23377 68.08067
28 69.85099 69.69332
29 71.45691 71.29475
30 73.05164 72.88505
31 74.63523 74.46429
32 76.20778 76.03255
33 77.76935 77.58991
34 79.32003 79.13643
35 80.85988 80.67221
36 82.38899 82.1973
37 83.90743 83.71179
38 85.41528 85.21575
39 86.9126 86.70925
40 88.39948 88.19236
41 89.87598 89.66516
42 91.34218 91.12773
43 92.79815 92.58012
44 94.24396 94.02241
45 95.67968 95.45467
46 97.10538 96.87698
47 98.52113 98.28939
48 99.92701 99.69198
49 101.3231 101.0848
50 102.7094 102.468
51 104.086 103.8415
52 105.4531 105.2055
53 106.8106 106.56
54 108.1586 107.9051
55 109.4973 109.2408
56 110.8265 110.5673
57 112.1466 111.8845
58 113.4574 113.1925
59 114.759 114.4915
60 116.0516 115.7814
120
100
Temperature C
80
60
40
20
0 10 20 30 40 50 60
Te
60
40
20
0 10 20 30 40 50 60
x (m)
Accuracy comparation with analytical as reference
RK 4th Order
0 0.3 0.000000003
3.857E-11
0.25 0.0000000025
7.658E-11
1.141E-10 0.2 0.000000002
Euler Method
Rk 4th Order
1.51E-10
0.15 0.0000000015
1.875E-10
2.234E-10 0.1 0.000000001
2.588E-10
2.937E-10 0.05 5E-10
3.281E-10
0 0
3.621E-10 0 10 20 30 40 50 60 70
3.955E-10
x (m)
4.284E-10
4.609E-10
Euler RK 4th Order
4.93E-10
5.245E-10
5.556E-10
5.862E-10
6.163E-10
6.461E-10
6.753E-10
7.042E-10
7.326E-10
7.605E-10
7.881E-10
8.152E-10
8.419E-10
8.682E-10
8.941E-10
9.196E-10
9.447E-10
9.694E-10
9.937E-10
1.018E-09
1.041E-09
1.064E-09
1.087E-09
1.11E-09
1.132E-09
1.153E-09
1.175E-09
1.196E-09
1.216E-09
1.237E-09
1.257E-09
1.276E-09
1.296E-09
1.314E-09
1.333E-09
1.351E-09
1.369E-09
1.387E-09
1.404E-09
1.421E-09
1.438E-09
1.455E-09
1.471E-09
1.487E-09
1.502E-09
1.518E-09
1.533E-09
Euler Method
Analytial Method
RK 4th Order
0 60 70
0 60 70
Interdependent ODE
Euler Method
Mb 0.000752
Mt 0.001127
Step (h) 20
Temperature Profile
x Tb Tt K1 L1 180
0 60 170 0.08276 -0.124013 160
20 61.65521 167.5197 0.079649 -0.11935 140
40 63.24818 165.1327 0.076654 -0.114863 120
60 64.78127 162.8355 0.073773 -0.110545
Axis Title
100
80 66.25673 160.6246 0.070999 -0.106389 80
60
40
20
140
120
Axis Title
100
80
100 67.67671 158.4968 0.06833 -0.102389 60
120 69.04331 156.449 0.065761 -0.09854 40
140 70.35853 154.4782 0.063289 -0.094835 20
0
0 20 40 60 80 100 120 140
Axis Title
RK4 Method
Mb 0.000752
Mt 0.001127
Step (h) 20
x Tb Tt K1 L1 K2 L2 K3 L3 K4
0 60 170 0.08276 -0.124013 0.081205 -0.121682 0.081234 -0.121725 0.079706
20 61.62448 167.5612 0.079703 -0.119432 0.078205 -0.117187 0.078233 -0.117229 0.076762
40 63.18895 165.2125 0.076759 -0.11502 0.075316 -0.112858 0.075343 -0.112899 0.073927
60 64.69563 162.9506 0.073924 -0.110771 0.072534 -0.108689 0.07256 -0.108728 0.071196
80 66.14666 160.7722 0.071193 -0.10668 0.069855 -0.104674 0.06988 -0.104712 0.068566
100 67.54409 158.6743 0.068563 -0.102739 0.067274 -0.100808 0.067299 -0.100844 0.066033
120 68.8899 156.6538 0.066031 -0.098944 0.064789 -0.097084 0.064813 -0.097119 0.063594
140 70.18599 154.7081 0.063592 -0.095289 0.062396 -0.093498 0.062419 -0.093532 0.061245
re Profile
80 100 120 140 160
xis Title
L4
-0.120809
-0.116346
-0.112048
-0.10791
-0.103924
-0.100085
-0.096388
-0.092827