Beruflich Dokumente
Kultur Dokumente
L0s=2.1;
F02s=x*sqrt(L0s);
tspan=[0:100:1800];
[t,X]=ode45('Assignment',tspan,[L0s;F02s]);
plot(t,X(:,1),'red')
ylabel('L(m)')
xlabel('time(s)')
title('plot of L vs t, for F1=20kg/s when t=1800s')
figure
plot(t,X(:,2))
ylabel('outlet fowrate F2(kg/s)')
xlabel('time, t(s)')
plot of L vs t, for F1=20kg/s when t=1800s
4
3.8
3.6
3.4
3.2
L(m)
2.8
2.6
2.4
2.2
2
0 200 400 600 800 1000 1200 1400 1600 1800
time(s)
title(' Plot of F2 Vs t, for F1=20kg/s when t=1800s')
Plot of F2 Vs t, for F1=20kg/s when t=1800s
20
19
outlet fowrate F2(kg/s)
18
17
16
15
14
0 200 400 600 800 1000 1200 1400 1600 1800
time, t(s)
QUESTION 1B
% NAME: Muhammad Misbahu
% REG. NUMBER: U11CE1112
% COURSE : CHEN 503
% ASSIGNMENT
% QUESTION ONE
function dLF2dt = homecool(t,X);
% Parameters
A=1; rho=1000; F1=8; x=10;
% Splitting
L=X(1);
F2=X(2);
% THE MODEL
% Total continuity equation
dMdt=(F1-F2);
% Variation of L with time
F2=x*sqrt(L);
dLdt=(F1-F2)/rho*A;
% Variation of F2 with time
dF2dt=(F1-F2)*(x^2)/(2*F2*rho*A);
% Output
dLF2dt=[dLdt;dF2dt]
1.8
1.6
L(m)
1.4
1.2
0.8
14
13
outlet fowrate F2(kg/s)
12
11
10
7
0 200 400 600 800 1000 1200 1400 1600 1800
time, t(s)