Você está na página 1de 29

%Calculo do volume molar do gas ideal

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

0.7671 0.8518 1.7339 2.2801 0.9531 3.4303 1.8093 0.5487


2.1690 0.9039 2.1358 2.0972 0.8724 1.8424 2.2570 0.9353

Columns 17 through 32

2.7445 1.9057 0.7182 1.6845 0.0117 0.0407 0.1276 0.5571


0.7790 1.6137 1.2508 0.9261 2.5142 1.9599 0.7777 1.6139

Columns 33 through 48

1.2193 0.9233 2.4539 1.9771 0.7932 1.6149 1.5763 0.9471


3.1532 1.8401 0.6150 1.9704 0.7874 1.6134 1.4454 0.9402

Columns 49 through 64

2.8965 1.8777 0.6792 1.7764 0.4592 2.2818 0.9523 3.3906


1.8132 0.5580 2.1443 0.8939 2.0210 2.1560 0.8987 2.0734

Columns 65 through 80

2.1281 0.8869 1.9536 2.1942 0.9133 2.2715 2.0390 0.8394


1.6891 2.2366 0.9585 3.7419 1.7829 0.4787 2.2821 0.9467

Columns 81 through 96

3.1352 1.8424 0.6194 1.9563 0.7743 1.6150 1.1382 0.9151


2.3019 2.0275 0.8318 1.6679 2.1831 0.9601 3.8537 1.7750

Columns 97 through 100

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

>> %Elaborar o programa para calcular o volume molar por redlich/k 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;
R=8.3145*10^(-3;
%Constantes de redlich
a=0.42748*R^2*Tc^2.5/Pc;
b=0.08664*R*Tc/Pc;
%xxxxxxxxxxx
Vo=(R*T)/Pv;
V(1)=(Vo+b)-a*(Vo-b)/(T^0.5*Pv*Vo*(Vo+b));
N=20;
tol=10^(-12);
for n=1:N;
V(n+1)=((Vo+b)-a*(V(n)-b)/(T^0.5*Pv*V(n)*(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;
K(n)

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

>> %Elaborar o programa para calcular o volume molar por suave k 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;
R=8.3145*10^(-3);
w=0.556;
Tr=T/Tc;
alfa=(1+(0.37464+1.54225*w-0.26993*w^2)*(1-Tr^0.5))^2;
a=0.42748*R^2*Tc^2*alfa/Pc;
b=0.08664*R*Tc/Pc;
%xxxxxxxxxxxxxxx

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

>> %fim do programa

>> %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

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

Columns 17 through 30

11.8275 1.3587 2.4491 2.7134 1.2979 16.6748


1.0641 6.9835 1.5159 2.0321 3.4670 1.1959

DMR =

1.0159 32.5483

1.7469e-012

??? Error using ==> horzcat


CAT arguments dimensions are not consistent.

4000
Diagrama de Pv
3500
3000
2500

P(bar)

2000
1500
1000
500
0
-500
-1000

200

400

600

800 1000 1200


V(cm3/mol)

1400

1600

1800

2000

200

400

600

800 1000 1200


V(cm3/mol)

1400

1600

1800

2000

-3

x 10

Fator de compressibilidade Z

2.5
2
1.5
1
0.5
0
-0.5
-1

>> %isoterma do metanol e fator de compressibilidade para 240 a 2000


Tc=512.6;
Pc=80,9;
R=83.14;
w=0.556;
K=0.480+1.5740*w-0.4760*w^2;
b=0.08664*(R*Tc)/Pc;
for i=1:10:50;
T(i)=273.15+i;
Tr(i)=T(i)/Tc;
a=(1+K*(1-Tr(i)^0.5))^2;
%variao do volume molor;
V=50:10:2000;
aT(i)=0.42747*(R*Tc)^2*a/Pc;
Pv=(R*T(i)./(V-b)-(aT(i)./(V.*(V+b))));
end
figure(1)
plot(V,Pv)
legend('Diagrama de Pv')
xlabel('V(cm3/mol)')
ylabel('P(bar)')
% calculo dA VARIAO DE Z
Z=((Pv.*Vo)./(R*T(i)));
figure(2)
plot(V,Z)
xlabel('V(cm3/mol)')

ylabel('Fator de compressibilidade Z')

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

>> %isoterma do metanol e fator de compressibilidade para 240 a 2000


Tc=512.6;
Pc=80,9;
R=83.14;
w=0.556;
K=0.480+1.5740*w-0.4760*w^2;
b=0.08664*(R*Tc)/Pc;
for i=1:10:50;
T(i)=273.15+i;
Tr(i)=T(i)/Tc;
a=(1+K*(1-Tr(i)^0.5))^2;
%variao do volume molor;
V=200:10:2000;
aT(i)=0.42747*(R*Tc)^2*a/Pc;
Pv=(R*T(i)./(V-b)-(aT(i)./(V.*(V+b))));
end
figure(1)
plot(V,Pv)
legend('Diagrama de Pv')
xlabel('V(cm3/mol)')
ylabel('P(bar)')
% calculo dA VARIAO DE Z
Z=((Pv.*Vo)./(R*T(i)));
figure(2)
plot(V,Z)
xlabel('V(cm3/mol)')

ylabel('Fator de compressibilidade Z')

Pc =

80

Você também pode gostar