You are on page 1of 2

Q1

function rk=f(t,v)
T= 298 % temperature in K
P=3 %pressure (-?p) in bar
A= 400 % area of the plate and frame press in cm2
Cs = 20.0 % The slurry concentration is in g/liter.
Vis= 8.937x10-4 %The viscosity of water in Pa.s.
end
timerange=[4.4 9.5 16.3 24.6 34.7 46.1 59.0 73.6 89.4 107.3];
v0=[0.498 1.00 1.501 2.00 2.498 3.002 3.506 4.004 4.502 5.009]
[t,v]=ode45(@f,timerange,v0);
plot(t,v);
ylabel('Vol(I)')
xlabel('time')
dtdv=vis*aCs/A^2*P
fprintf('\n a value by slope=%.4f\n',bmixture)
x=fzero(@(v)P*v^3-R*T*v^2+(amixture-P*bmixture^2-R*T*bmixture^2)*v-
amixture*bmixture,v); %RK equqtion
fprintf('\n resistance Rm of system=%.4f L/mol \n',x)
disp('applying feval for checking roots')
y=feval(@(v)P*v^3-R*T*v^2+(amixture-P*bmixture^2-R*T*bmixture^2)*v-
amixture*bmixture,x)
Q3
A=2 % a cross-sectional area in m2
h=1.5 % the height of a liquid level in m
a=0.2 %constan m^2/min
Fi=0.1 % water (Fi) enter the tank in m3/min
Fo=0
timerange=[0 60]
dhdt=(Fi-Fo)/A
end
timerange=[0 60];
h0=[0]
[t,v]=ode45(@f,timerange,h0);
plot(t,h);
ylabel('height')
xlabel('time')
fprintf('\n height of Tank 4f L/mol \n',x)
disp('applying feval for checking roots')
y=feval(@(v)P*v^3-R*T*v^2+(amixture-P*bmixture^2-R*T*bmixture^2)*v-
amixture*bmixture,x)

You might also like