Mahi
Mahi
PROCESS
DESIGN
ASSIGNMEN
T
UNIVERSITY OF GONDAR
INSTITUTE OF ChEg6083
TECHNOLOGY
DEPARTMENT OF
CHEMICAL By:Mahlet Biadgilign
ENGINEERING
Given:
A perfectly stirred, constant-volume tank has two input streams whose temperature and flow rate
can vary with time.
Solution:
We now perform a mass balance to describe how the liquid level or volume changes in the tank.
The mass balance will involve the inlet and outlet streams.
1
ρ: Density of the liquid (constant).
Cp: Specific heat capacity of the liquid (constant).
Assumptions
𝑑𝑉
𝜌
𝑑𝑡 = ⱳ1 + ⱳ 2 − 𝜔..............................................................................................(6)
The dynamic model for the liquid volume in the tank is equation 7.
b. General Energy Balance
2
Assumptions for the Energy Balance
Perfectly Mixed: The tank is perfectly stirred, so the temperature of the liquid inside
the tank is uniform at any given time (T).
Constant Properties:
o The density (ρ) and specific heat capacity (Cp ) of the liquid are constant and
do not vary with temperature or time.
No Phase Change:The liquid remains in a single phase (no evaporation, condensation,
or chemical reaction).
Heat Transfer Neglected:
o There is no heat transfer to or from the tank walls or surroundings
unless explicitly included (e.g., no heat loss to the ambient).
Time-Dependent Temperature:
o The temperature in the tank (T) changes with time depending on the inflows
and outflows of energy.
Energy Inflow Sources:
o Energy enters the tank only via the two inlet streams, each bringing in energy at
a rate proportional to their temperature (T1, T2) and flow rates (ω1,m2).
Energy Outflow Sources:
o Energy exits the tank with the liquid leaving at the outlet flow rate m) at the tank's
temperature (T).
dU dH..............
Kinetic anergy and potential energy is negligible; i.e. dE = = (8)
dt dt dt
Solution
𝑑𝐸 (𝑢 + 𝑘𝑒 + 𝑝𝑒)
=𝑑
𝑑𝑡 = Σ 𝐸˙system in − 𝐸˙system out ± 𝑄 + 𝑊 … … . (9)
𝑑𝑡
𝑑𝐸 𝑑𝐻
=
𝑑𝑡 = Σ 𝐸˙system in − 𝐸˙system out … … . (10)
𝑑𝑡
3
Hence: -𝐻 = 𝑚𝑐𝑝∆𝑇
Substitute in to equation 10
𝑑(𝑚𝑐𝑝∆𝑇)
= Σ 𝑚˙ 𝑐𝑝∆𝑇system in − 𝑚˙ 𝑐𝑝∆𝑇system out … … . (11)
𝑑𝑡
Hence: - m=𝜌 ∗ 𝑉
Substitute in to equation 11
𝑑(𝜌 ∗ 𝑉 𝑐𝑝∆𝑇)
= Σ 𝑤 ∗ 𝑐𝑝 ∗ ∆𝑇 𝑠𝑦𝑠𝑡𝑒𝑚 𝑖𝑛 − 𝜌 ∗ 𝑉˙ ∗ 𝑐𝑝 ∗ ∆𝑇system out … … . (12)
𝑑𝑡
Hence: 𝑚˙ =ⱳ
Substitute in to equation 12
𝑑(𝜌 ∗ 𝑉 𝑐𝑝∆𝑇)
= Σⱳ ∗ 𝑐𝑝 ∗ ∆𝑇𝑠𝑦𝑠𝑡𝑒𝑚 𝑖𝑛 − 𝜌 ∗ ⱳ ∗ 𝑐𝑝 ∗ ∆𝑇system out … … . (13)
𝑑𝑡
Based on assumption 2 we can cancel out 𝑐𝑝 the equation be coming
𝑑𝜌(𝑉 ∗ ∆𝑇)
= Σⱳ ∗ ∆𝑇𝑠𝑦𝑠𝑡𝑒𝑚 𝑖𝑛 − ⱳ ∗ ∆𝑇system out … … . (14)
𝑑𝑡
Hence: ∆𝑇 = 𝑇 − 𝑇reference
Substitute in to equation 14 and rearrange it
𝑑(𝜌𝑉 ∗ 𝑇)
𝑑𝑡 = 𝑤1 ∗ 𝑇1 + 𝑤2 ∗ 𝑇2 − 𝑤 ∗ 𝑇 … … . (15)
𝑉𝑑𝑇 𝑑𝑉
𝜌 + 𝑇𝜌 = 𝑤1 ∗ 𝑇1 + 𝑤2 ∗ 𝑇2 − 𝑤 ∗ 𝑇 … … . (16)
𝑑𝑡 𝑑𝑡
From mass balance we have dVfrom equation 7 and we have to substitute into to equation 16 and
dt
rearrange it
ρVdΤ
+T*(w1+𝑤2 − 𝑤) = 𝑤1 ∗ 𝑇1 + 𝑤2 ∗ 𝑇2 − 𝑤 ∗ 𝑇 … … . (16)
dt
4
rearrange it
𝜌VdΤ = 𝑤1 ∗ 𝑇1 + 𝑤2 ∗ 𝑇2 − 𝑤 ∗ 𝑇 − T ∗ (w1 + 𝑤2 − 𝑤)
dt
𝜌V dΤ
= 𝑤1(𝑇1 − 𝑇) + 𝑤2(𝑇2 − 𝑇)
dt
We get
𝜌𝑑𝑇 𝑤1 𝑤2
𝑑𝑡 = (𝑇1 − 𝑇) + (𝑇2 − 𝑇)...........(17)
𝑉 𝑉
a. Mass balance
𝒅𝑽
𝜌 = ⱳ𝟏 + ⱳ 𝟐 − ⱳ
𝒅𝒕
b. Energy balance
𝑑𝑇 𝑤1 𝑤2
= (𝑇1 − 𝑇) + (𝑇 2 − 𝑇 )
𝑑𝑡 𝜌𝑉 𝜌𝑉
Q2. Often liquid surge tanks (Particularly those containing hydrocarbons) will have a
gas “blanket” of nitrogen or Carbone dioxide to prevent the accumulation of exclusive
vapors above the liquid as depicted below.
5
Develop the modeling equation with gas pressure and liquid volume as the state variables.
let qfand q represents the inlet and out let gas molar flow rates Ff and F the liquid volumetric
flow rates. And Vl the liquid volume, V the constant (total) volume and p the gas pressure.
Assumptions
6
Step I: General Mass Balance
𝑑𝑉𝑙
𝜌 = 𝜌𝐹f − 𝐹𝜌....................................................................................................(6)
𝑑𝑡
For the gas phase, we track the molar accumulation of gas, considering the inflow (𝑞f) and
outflow (q) of gas:
OR 𝑛g Pvg
= RΤ
7
The general Mole balance equation is:
𝑅𝑎𝑡𝑒 𝑜𝑓 𝑎𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑜𝑓 𝑚𝑜𝑙𝑒 = 𝑚𝑜𝑙𝑒 𝑖𝑛𝑓𝑙𝑜𝑤 𝑟𝑎𝑡𝑒 − 𝑚𝑜𝑙𝑒 𝑜𝑢𝑡𝑓𝑙𝑜𝑤 𝑟𝑎𝑡 … (1)
The rate of molein the tank for the gas phase is: 𝑞f
The rate of mole out the tank for the gas phase is: 𝑞
pvg
d( )
The rate of mole accumulation is: g) RT
… … … … … … … … … … … . … … … . . (2)
d(n dt
pvg =
𝑑( ) dt
RΤ
= 𝑞f − 𝑞....................................................(3)
𝑑𝑡
Since R and T are constants
1
(𝑣g𝑑𝑝 + 𝑝𝑑𝑣g) = 𝑞f − 𝑞........................................................(4)
𝑅𝑇𝑑𝑡
𝑑𝑣 𝑑𝑣l 𝑑𝑣g
= +
𝑑𝑡 𝑑𝑡 𝑑𝑡
𝑑𝑣l 𝑑𝑣g
0= +
𝑑𝑡 𝑑𝑡
𝑑𝑣g 𝑑𝑣l
= − … … … … … (6)
𝑑𝑡 𝑑𝑡
1
((𝑉 − 𝑣l)𝑑𝑝 − 𝑝𝑑𝑣l) = 𝑞f − 𝑞
𝑅𝑇𝑑𝑡
After rearrangement
8
(𝑉 − 𝑣l) 𝑑𝑝 𝑃 𝑑𝑣l
𝑅𝑇 𝑑𝑡 𝑅𝑇 𝑑𝑡 = 𝑞f − 𝑞......................(7)
(V–v l ) dp P
∗ dt − RΤ ∗ (𝐹f − 𝐹) = 𝑞 f− 𝑞........................(8)
RΤ
After rearrangement
𝑑𝑝 𝑃 ∗ (𝐹f − 𝐹 𝑅𝑇(𝑞f − 𝑞)
= )+
𝑑𝑡 𝑉 − 𝑣l 𝑉 − 𝑣l
The system is now described by the following two coupled differential equations:
𝒅𝑽𝒍
= 𝐹f − 𝐹
𝒅𝒕
𝑑𝑝 𝑃 ∗ (𝐹f − 𝐹 𝑅𝑇(𝑞f − 𝑞)
= )+
𝑑𝑡 𝑉 − 𝑣l 𝑉 − 𝑣l
Q3. Develop adynamic model for PFR shown in the figure below. It is assumed that a first
order liquid phase reaction occurs in the reactor.
k
𝐴→𝐵
9
Solution
Assumptions:
Consider a small differential volume element of the reactor, Δzas shown in the given diagram.
For species A, the mass balance over this element can be expressed as:
10
𝑅𝑎𝑡𝑒 𝑜𝑓 𝑎𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑜𝑓 𝐴
= 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑖𝑛𝑓𝑙𝑜𝑤 𝑜𝑓 𝐴 − 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑜𝑢𝑡𝑓𝑙𝑜𝑤 𝑜𝑓 𝐴
− 𝑅𝑎𝑡𝑒 𝑜𝑓 𝑐𝑜𝑛𝑠𝑢𝑚𝑝𝑡𝑖𝑜𝑛 𝑜𝑓 𝐴 … … … … … … … … … … (1)
Mathematically:
&𝑁A
= 𝑛˙𝐴|ιn− 𝑛˙𝐴|˙ out − 𝑟A. 𝑉..........................(1)
&𝑡
&𝑁A &(𝐶A. 𝑉)
=
&𝑡 &𝑡
Since the reactor has a constant cross-sectional area Ac , the volume of the
element is V=Ac*ΔzThus:
&(𝐶A. 𝑉) &(𝐶A ∗ 𝐴C ∗ ∆𝑍) 𝐴C ∗ ∆𝑍 ∗ &𝐶A
&𝐶A
= = … … . . (3)
&𝑡 &𝑡 = 𝐴C ∗ ∆𝑍 ∗ &𝑡
&𝑡
2. Rate of Inflow: The molar flow rate of A entering the element is:
𝑛˙𝐴|in = ∆𝑍 ∗ 𝐴C ∗ 𝐶A........................(4)
3. Rate of Outflow: The molar flow rate of A leaving the element is:
𝑛˙𝐴|out = ∆𝑍 ∗ 𝐴C ∗ 𝐶A|Z+∆z..............................(5)
Thus
11
𝑛˙𝐴|out ≈ ∆𝑍 ∗ 𝐴C ∗ (𝐶A|Z + &𝐶A
∆ 𝑍 )… … … (7)
&𝑍
Now, substitute the above expressions into the mass balance equation:
𝐴C ∗ ∆𝑍 ∗ &𝐶A &𝐶A
= (𝑉 ∗ 𝐴C ∗ 𝐶A|Z) − (𝑉 ∗ 𝐴C ∗ (𝐶A|Z + ∆𝑍)) − ( −𝑘𝐶A ∗ (𝐴𝑐 ∗ 𝛥𝑧 ))
&𝑡 &𝑍
Simplify:
&𝐶A &𝐶A
𝐴C ∗ ∆𝑍 ∗ =− ∆𝑍 + 𝑘𝐶A ∗ (𝐴𝑐 ∗ 𝛥𝑧 ))...............................(9)
&𝑡 &𝑍
𝑑𝑖𝑣𝑖𝑑𝑒𝑑 𝑏𝑦 𝐴C ∗ ∆𝑍 we get
&𝐶A &𝐶A
+ = −𝑘𝐶A … … … (10)
&𝑡 &𝑍𝐴C
12
The dynamic model for the PFR is:
13
&𝐶A &𝐶A
= − 𝑘𝐶A
&𝑡 &𝑍𝐴C
Q4. Completely enclosed stirred tank heating process is used to heat an incoming stream
whose flow rate varies.
The heating rate from this coil and the volume are both constant.
Develop a mathematical model that describes the exit temperature if heat losses to the
ambient occur and if the ambient temperature (Ta)and the incoming streams temperature (Ti)
both can vary.
Given
The problem involves deriving a mathematical model for a stirred-tank heating
process that accounts for variable flowrate, heat losses to the ambient, and
14
variations in the incoming stream temperature (Ti) and ambient temperature (Ta
).
Solution
Assumptions:
1. The tank is well-mixed, so the temperature inside the tank (T) is uniform.
2. Constant volume of the tank.
3. Heat losses to the ambient are proportional to the temperature difference between
the tank (T) and the ambient (Ta).
4. The heating rate from the coil (Q) is constant.
5. Variations in density (ρ), specific heat capacity (Cp), and flowrate (w) are negligible.
6. No Phase Change:
The liquid remains in a single phase (no evaporation, condensation, or chemical reaction).
7. Time-Dependent Temperature:
The temperature in the tank (T) changes with time depending on the inflows and outflows
of energy.
dE dU dH
8. Kinetic anergy and potential energy is negligible; i.e. = =
dt dt dt
i. Mass Balance:
The liquid flowrate w entering the tank equals the flowrate exiting the tank (steady-state flow):
𝑀˙ in = 𝑀˙ out = 𝑤 … … (1)
ii. energy Balance:
15
𝑅𝒂𝒕𝒆 𝒐𝒇 𝒆𝒏𝒆𝒓𝒈𝒚 𝒊𝒏 − 𝑹𝒂𝒕𝒆 𝒐𝒇 𝒆𝒏𝒆𝒓𝒈𝒚 𝒐𝒖𝒕 + 𝑹𝒂𝒕𝒆 𝒐𝒇 𝒆𝒏𝒆𝒓𝒈𝒚 𝒂𝒅𝒅𝒆𝒅 𝒃𝒚 𝒉𝒆𝒂𝒕𝒊𝒏𝒈
− 𝑹𝒂𝒕𝒆 𝒐𝒇 𝒆𝒏𝒆𝒓𝒈𝒚 𝒍𝒐𝒔𝒕 𝒕𝒐 𝒕𝒉𝒆 𝒂𝒎𝒃𝒊𝒆𝒏𝒕 … … . . (𝟏)
To express
𝑑𝐸 ( )
= 𝑑 𝑢 + 𝑘𝑒 + 𝑝𝑒
𝑑𝑡 = Σ 𝐸˙system in − Σ 𝐸˙system out ± 𝑄 − 𝐸˙lost … … . (2)
𝑑𝑡
This term represents the rate of change of internal energy inside the tank due
to temperature changes over time.
ρ: Density of the liquid (kg/m³).
V: Volume of the tank (m³).
Cp: Specific heat capacity of the liquid (J/(kg·°C)).
dΤ
: Time rate of change of the tank temperature (°C/s)
dt
b. Rate of Energy In
𝐸˙system in = 𝐰 ∗ 𝐂𝐩 ∗ 𝐓𝐢 … … . (𝟒)
16
𝐸˙system out = 𝐰 ∗ 𝐂𝐩 ∗ 𝐓 … … . (𝟒)
17
Energy leaves the tank through the outflow of liquid at the tank temperature T.
w: Mass flowrate of the outgoing liquid (kg/s).
Cp : Specific heat capacity (J/(kg·°C)).
T: Tank temperature (°C).
This term decreases the tank's energy, as heat is carried away by the exiting liquid.
d. Rate of Energy Added by Heating (Q):
Energy is added to the tank from the heating coil.
Q: Heat input rate from the coil (W or J/s).
This term always adds energy to the tank, raising its temperature.
e. Rate of Energy Lost to Ambient
𝑬˙ 𝒍𝒐𝒔𝒕 = 𝐔 ∗ 𝐀 ∗ (𝐓 − 𝐓𝐚).............(𝟓)
Energy is lost to the surroundings due to heat transfer from the tank to the ambient.
U: Overall heat transfer coefficient (W/(m²·°C)).
A: Heat transfer area of the tank (m²).
T: Tank temperature (°C).
Ta : Ambient temperature (°C).
This term decreases the tank's energy, as heat flows out when T >Ta.
𝑑𝑇
𝑉𝜌𝐶p ∗ = (𝐰 ∗ 𝐂𝐩 ∗ 𝐓𝐢) − (𝐰 ∗ 𝐂𝐩 ∗ 𝐓) + 𝐐 − (𝐔 ∗ 𝐀 ∗ (𝐓 − 𝐓𝐚))
𝑑𝑡
𝑑𝑇 (𝒘 ∗ 𝑻𝒊) (𝐰 ∗ 𝐓 ) 𝐐 (𝐔 ∗ 𝐀 ∗ (𝐓 − 𝐓𝐚))
= − + − … … . (6)
𝑑𝑡 𝑉𝜌 𝑉𝜌 𝑉𝜌𝐶p 𝑉𝜌𝐶p
18
The governing equation for the tank temperature T is:
𝑑𝑇 (𝒘 ∗ 𝑻𝒊) (𝐰 ∗ 𝐓 ) 𝐐 (𝐔 ∗ 𝐀 ∗ (𝐓 − 𝐓𝐚))
= − + −
𝑑𝑡 𝑉𝜌 𝑉𝜌 𝑉𝜌𝐶p 𝑉𝜌𝐶p
Q5. Write a MATLAB code to draw the following pictures using both for and while
loops.
Pattern 1 Pattern 2
∗∗∗∗∗∗ ∗∗∗∗∗∗
∗∗∗∗∗ ∗∗∗∗∗
∗∗∗∗ ∗∗∗∗
∗∗∗ ∗∗∗
∗∗ ∗∗
∗ ∗
19
Note book
I. The fprintf function is used for all outputs.
II. The \n in fprintf ensures a new line after each
row. MATLAB code
Pattern For loop While loop
Pattern 1 n=6; Nmax=6;
for i=n:-1:1 n=0;
for k=1:i while (n<6)
fprintf('*') n=n+1;
end fprintf('\ k=0;
n') end while(k<Nmax-m)
k=k+1;
fprintf('*')
end
fprintf('\n')
end
20
Pattern For loop While loop
Pattern 2 n=6; Nmax=6;
for i=n:-1:1 n=0;
for j= 1:n-1 while (n<6)
fprintf(' ') n=n+1;
end m=0;
for k= 1:i while m<(n-1)
fprintf('*') m=m+1;
end fprintf('\ fprintf(' ')
n') end end
k=0;
while(k<Nmax-m)
k=k+1;
fprintf('*')
end
fprintf('\n')
end
21