You are on page 1of 2

1 PROCESS ENGINEERING COMPUTING (PPE-309L)

Name Muhammad Faizan Asif


Reg # 2015-PE-14
Subject Process engineering
Computing (PPE-309L)
Submitted To Dr Yasir Qayyum Gill
Date 20 December 2017
Open Book Assignment 1st

Question
To study the liquid level response, a tank with a cross-sectional
area (A) of 2m2 is filled with water until the height (h) is 1.5m. At
t=0, a value below the tank is opened and the outlet flow rate is Fo.
At the same time, 0.1m3/min of water (Fi) enters the tank. If the
outlet flow rate is a linear function of the liquid level:
Fo=α x h (α is constant =0.2m2/min)
Plot the height of the liquid in the tank as a function of time (t), say
from t=0 to t=60 min and the determine the height of the liquid at
t=10 min
Mass balance Yields
A.dh/dt= Fi - Fo
Solution:
This is simple differential equation. Equation given in the question
is a linear with degree 1 so, first of all extract the data:
Data
Area = A= 2m2
Height=h= 1.5m
α =constant 0.22(m2/min)
Fi=inlet feed= 0.1 (m3/min)

Equation we can solve


𝑑ℎ 𝐹𝑖 − 𝑎 ∗ ℎ
=
𝑑𝑡 𝐴
Matlab Code:
Function File:
function R=Openbook(t,h)
%Alpha is Constant m^2/min')
Alpha=0.2;

MUHAMMAD FAIZAN ASIF 2015-PE-14


2 PROCESS ENGINEERING COMPUTING (PPE-309L)
%'Cross-sectional area m^2')
A=2;
%'flow inlet m^3/min')
Fi=0.1;
F=Alpha.*h;
R=(Fi-F)/A;
end
Function Call file:
clc
clear
h=1.5;%given
t=[0 60];%Intervel given
[h,t]=ode45(@Openbook,t,h);
plot(h,t)
xlabel('time (min)')
ylabel('Height(m)')
disp('Height at 10 miutes')
h10=interp1(h,t,10,'linear')%interpolation

Results:

Figure: Height vs Time Relation


Results shows:

MUHAMMAD FAIZAN ASIF 2015-PE-14