Escolar Documentos
Profissional Documentos
Cultura Documentos
T=273.15-91;
p=95*10^5;
R=8.3145*10^6;
V=(R*T)/p
V=
159.4196
Coeficiente do metano a e b
>> %Calculo do volume molar do gas ideal
T=182;
p=95*10^5;
R=8.3145*10^6;
Vo=(R*T)/p;
B=-130.0;
C=5000.0;
V(1)=Vo*(1+B/Vo+C/Vo^2);
tol=10^(-12);
for n=1:20
V(n+1)=Vo*(1+B/V(n)+C/V(n)^2);
K(n)=abs((V(n+1)-V(n))/V(n+1));
if K(n)<tol;
break
end
end
DMrelativo=abs(((V(n+1)-Vo)/Vo)*100);
Va=66.9434;
DMrelativoa=abs(((V(n+1)-Va)/Va)*100);
%saida de resultados
K
n'
Resultado=[V]'
Resp=[Vo DMrelativo DMrelativoa]'
%fim do programa
K=
Columns 1 through 16
Columns 17 through 32
Columns 33 through 48
Columns 49 through 64
Columns 65 through 80
Columns 81 through 96
0.4548
n=
20
2.2795
0.9533
3.4427
Resultado =
60.6779
34.3374
231.7187
84.7567
25.8395
550.7510
124.3154
44.2514
98.0616
30.9442
321.8555
102.6388
33.1389
259.6525
91.3508
28.0472
433.4351
115.7525
39.8358
141.3555
52.6553
53.2799
51.1945
58.6856
37.6886
170.5558
65.2557
28.9924
392.5625
111.7070
37.7405
169.7715
64.9484
29.2651
381.6431
110.4977
37.1164
179.5075
68.6477
26.6457
503.9080
121.3311
42.7207
110.9634
37.3565
175.6851
67.2251
27.4909
459.8853
118.0266
41.0142
127.8655
46.0542
85.1602
25.9490
544.0873
123.9196
44.0491
99.6569
31.6941
298.7957
98.9060
31.3388
309.4660
100.6910
32.1893
284.6377
96.3684
30.1699
347.9211
106.3501
34.9949
217.9059
81.0320
25.0358
602.8395
127.1300
45.6825
87.6370
26.7014
500.8521
121.1187
42.6113
111.9621
37.8723
167.7948
64.1664
30.0095
353.6311
107.1003
35.3758
210.3482
78.8446
24.7696
621.4051
128.0272
46.1358
84.6285
25.8055
552.8381
124.4375
Resp =
159.2883
66.9434
21.3436
n'
DMR=erro'
Resultado=[Vo V]'
%fim do programa
ans =
1.7092e-015
n=
DMR =
1.7092e-013
Resultado =
1.0e+004 *
1.9160
1.9156
1.9156
1.9156
1.9156
1.7176
1.7176
1.7176
1.7176
1.7176
1.6808
0.0047
-0.0039
0.0090
-0.0012
0.0258
0.0008
-0.0305
0.0028
-0.0079
0.0054
-0.0032
0.0106
-0.0007
0.0426
0.0013
-0.0198
0.0033
-0.0064
0.0062
-0.0025
0.0129
ans =
8.1589e-015
n=
DMR =
8.1589e-013
Resultado =
1.0e+004 *
0.0019
0.0019
0.0019
0.0019
1.7176
1.7176
1.7176
1.7176
1.7176
1.7176
1.6808
0.0047
-0.0039
0.0090
-0.0012
0.0258
Vo=(R*T)/Pv;
V(1)=((R*T)/Pv+b-(a*(Vo-b)/(Pv*Vo*(Vo+b))));
N=20;
tol=10^(-12);
for n=1:N
V(n+1)=((R*T)/Pv+b-(a*(V(n)-b)/(Pv*V(n)*(V(n)+b))));
N=20
K(n)=abs((V(n+1)-V(n))/V(n+1));
if K(n)<tol;
break
end
end
erro=K(n)*100;
K=[K]'
N'
DMR=erro'
V=[Vo V]'
%fim do programa
N=
20
N=
20
K=
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
3.0629
2.2141
1.4345
8.7918
1.0446
29.4060
1.0278
11.8275
1.3587
2.4491
2.7134
1.2979
16.6748
1.0159
32.5483
1.0641
6.9835
1.5159
2.0321
3.4670
1.1959
N=
20
DMR =
1.4241e-012
V=
1.0e+004 *
1.9160
1.9159
1.9159
1.9159
1.9156
1.7176
1.7176
1.7176
1.7176
1.7176
1.6808
0.0047
-0.0039
0.0090
-0.0012
0.0258
0.0008
-0.0305
0.0028
-0.0079
0.0054
-0.0032
0.0106
-0.0007
0.0426
0.0013
-0.0198
0.0033
-0.0064
0.0062
-0.0025
0.0129
>> %Elaborar o programa para calcular o volume molar por peng robison do
metanol
T=75+273.15;
A=16.5725;
B=3626.55;
C=-34.29;
Pv=exp(A-(B)/(T+C));
Tc=512.6;
Pc=8090*10^3;
R=8.3145*10^3;
w=0.556;
Tr=T/Tc;
alfa=(1+(0.37464+1.54226*w-0.26992*w^2)*(1-Tr^0.5))^2;
a=0.45724*R^2*Tc^2*alfa/Pc;
b=0.07780*R*Tc/Pc;
%xxxxxxxxxxxxxxx
Vo=(R*T)/Pv;
V(1)=(((R*T/Pv)+b)-(a*(Vo-b)/(Pv*(Vo*(Vo+b)+b*(Vo-b)))));
N=30;
tol=10^(-12);
for n=1:N
V(n+1)=(((R*T/Pv)+b)-(a*(V(n)-b)/(Pv*(V(n)*(V(n)+b)+b*(V(n)-b)))));
K(n)=abs((V(n+1)-V(n))/V(n+1));
if K(n)<tol;
break
end
end
erro=K(n)*100;
N'
K=[K]'
DMR=erro'
V=[Vo V]'
%fim do programa
N=
30
K=
Columns 1 through 16
Columns 17 through 30
DMR =
1.0159 32.5483
1.7469e-012
4000
Diagrama de Pv
3500
3000
2500
P(bar)
2000
1500
1000
500
0
-500
-1000
200
400
600
1400
1600
1800
2000
200
400
600
1400
1600
1800
2000
-3
x 10
Fator de compressibilidade Z
2.5
2
1.5
1
0.5
0
-0.5
-1
Pc =
80
20
Diagrama de Pv
0
-20
P(bar)
-40
-60
-80
-100
-120
-140
-160
200
400
600
800
1000
1200
V(cm3/mol)
1400
1600
1800
2000
400
600
800
1000
1200
V(cm3/mol)
1400
1600
1800
2000
-5
x 10
Fator de compressibilidade Z
-2
-4
-6
-8
-10
-12
200
Pc =
80