summaryrefslogtreecommitdiff
path: root/858/CH7/EX7.15/example_15.sce
blob: 270a27e25dc3bac77cd9c893d018a8ac2e7e711b (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
29
30
31
32
33
34
clc
//example 7.15
//to find the rate equation
t = [0;5;10;15;20;25]
C_A = [25;18.2;13.2;9.6;7;5.1]

//integral method of rate determination
s = 0;
for i = 2:6
    k(i) = (1/t(i))*log(25/C_A(i))
    //disp (k(i),"k values for various conc.")
    s = s+k(i)
end

printf("average value of k = %f",s/5)
disp ("ra =- 0.06367*CA","since its a first order reaction,")

subplot(221) 
plot(t,C_A)
xlabel("time")
ylabel("concentration")
title("integral method")

//differential method of rate determination
ra = [-1.16;-0.83;-0.60;-0.43];
C_A = [18.2;13.2;9.6;7];

subplot(222) 
plot(ra,C_A)
xlabel("Concentration")
ylabel("-ra")
title("differential method")

printf("\n\nrate from differential method = -0.064*CA")