summaryrefslogtreecommitdiff
path: root/1379/CH10/EX10.1.1/example10_1.sce
blob: 3a3ff7d1eeae68a27275e9ac2d4653579a0553a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28


//example 10.1
clc; funcprot(0);
clf()
//exapple 10.1 
// Initialization of Variable
t=[0 0.5 1 2 3 4 5 6 7 8 9 10];//time
h=[1.10 1.03 .96 .82 .68 .54 .42 .35 .31 .28 .27 .27];
Cl=[0 0 0 0 0 0 0 0 0 0 0];
m=0.05;
V=1/1000;//volume
//calculations
Co=m/V;//concentration at t=0
v(1)=(h(1)-h(2))/(t(2)-t(1));
Cl(1)=Co;
for i=2:11
  
        v(i)=(h(i-1)-h(i+1))/(t(i+1)-t(i-1));//slope or settling velocity
        Cl(i)=Co*h(1)/(h(i)+v(i)*t(i));

    
end
plot(t,h,'r--d');
clf();
plot(Cl,v,'r->');
xtitle("Concentration vs Settling veocity" , "Concentration(kg/m^3)" , "Settling velocity (m/h)");