Unifac Ejercicio Wolfram
August 9, 2022 | Author: Anonymous | Category: N/A
Short Description
Download Unifac Ejercicio Wolfram...
Description
UNIVERSIDAD NACIONAL UNIVERSIDAD NACIONAL AUT UTONOMA ´ ONOMA DE DE MEXICO ´ FACULTAD DE FACULTAD DE ESTUDIOS ESTUDIOS SUPERIORES SUPERIORES
Tarea: Determinaci´on Determinaci ´ del diagrama P-X-Y con los coeficientes de actividad usando el me etodo ´ todo UNIFAC
Alumnos: Alumnos: Materia: Termodin Materia: Termodin´aamica ´ mica qu qu´´ıımica mica Profesor:
Problema Para el sistema binario dietilamina (1)/n-heptano a 308.15K encontrar γ 1 y y γ γ 2 para todas las composiciones de la mezcla y graficar el diagrama P-x-y. Se programo en Wolfram Mathematica. Grupo CH 3 CH 2 CH 2 N H
n° 1 15
1 v2 K RK QK vK K 1 0.9011 0.848 2 2 2 0.6744 0.540 1 5 33 1.2070 0.936 1 33 0
De tabla H tabla H 1 grupo CH 1 ”CH 2 ” CH 3 CH 2 ”CN H ” CH 3 N H C H2 N H C H3 1N H
n° 1 15
C
De tabla H tabla H 2 a mk gr grupo 1 15 ”CH 2 ” 0.00 255.77 ”CN H ” 65.33 0.00
n = 3;(∗Numerodegruposf uncionales ∗)
(1)
n
r 1 =
vk, 1 ∗ Rk = 3, 3 ,6836; k =1 n
r 2 =
vk, 2 ∗ Rk = 5, 5 ,1742;
k =1
1
(2)
n
q1 =
vk, 1 ∗ Qk = 3, 3 ,172;
(3)
k =1 n
q2 =
vk, 2 ∗ Qk = 4, 4 ,396;
k =1
e1,1 =
v 1,1 ∗ Q1 = 0, 0,534678; q1
(4)
v 2,1 ∗ Q2 e2,1 = = 0, 0,17024; q1 e3,1 =
v 3,1 ∗ Q3 = 0, 0,295082; q1
e1,2 =
v 1,2 ∗ Q1 = 0, 0,385805; q2
e2,2 =
v 2,2 ∗ Q2 = 0, 0,614195; q2
e3,2 =
v 3,2 ∗ Q3 = 0; q2
a1,1 = a a3,3 = 0; = a1,2 = a = a2,1 = a = a2,2 = = a
(5)
a1,3 = a = a2,3 = 255, 255,7; a3,1 = a = a3,2 = 65, 65 ,33; τ1,1 = τ = τ1,2 = τ = τ2,1 = τ = τ2,2 = τ = τ3,3 = Exp
a1,1 = 1; T
−
(6)
a1,3 = 0, 0,436141; T −a , 31 τ3,1 = τ = τ3,2 = Exp = 0 0,,808959; T
−
τ1,3 = τ = τ2,3 = Exp
n
(* (*β βi,k =
em,i ∗ τm,k *)
(7)
m=1
β1,1 = e = e1,1 ∗ τ1,1 + e2,1 ∗ τ2,1 + e3,1 ∗ τ3,1 = 0, 0 ,943624; β1,2 = e = e1,1 ∗ τ1,2 + e2,1 ∗ τ2,2 + e3,1 ∗ τ3,2 = 0, 0 ,943624; β1,3 = e 0 ,602525; = e1,1 ∗ τ1,3 + e2,1 ∗ τ2,3 + e3,1 ∗ τ3,3 = 0, β2,1 = e = e1,2 ∗ τ1,1 + e2,2 ∗ τ2,1 + e3,2 ∗ τ3,1 = 1; β2,2 = e = e1,2 ∗ τ1,2 + e2,2 ∗ τ2,2 + e3,2 ∗ τ3,2 = 1; β2,3 = e = e1,2 ∗ τ1,3 + e2,2 ∗ τ2,3 + e3,2 ∗ τ3,3 = 0, 0 ,436141; x1 = 0 0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1 ;
(8)
x2 = 1 0,9 0,8 0,7 0,6 0,5 0,4 0,3 0,2 0,1 0 ; nc = 2;(*N de componentes en la mezcla*) ◦
θk = (* (*θ θ1 = θ2 =
i xi ∗ qi ∗ eki
i xi ∗ qi
*)
nc i =1 xi ∗ qi ∗ e1,i ; nc ∗ i =1 xi qi nc i =1 xi ∗ qi ∗ e2,i ; nc i =1 xi ∗ qi
2
(9) (10)
θ3 =
nc i =1 xi ∗ qi ∗ e3,i ; nc i =1 xi ∗ qi n
(* (*ssk =
θm τm,k *)
(11)
m=1 n
s1 =
θm ∗ τm,1 ;
m=1 n
s2 =
θm ∗ τm,2 ;
m=1 n
s3 =
θm ∗ τm,3 ;
m=1
(* J i = J 1 = J 2 = Li = (* (*L L1 = L2 =
r i *) n j =1 =1 r j ∗ xj
r 1 ; nc j = =1 1 r j ∗ xj
r 2 ; nc j = =1 1 r j ∗ xj
qi
n
*)
∗
(13)
j =1 =1 qj qj q1 ; nc j =1 =1 qj ∗ xj
(12)
q2 ; nc q ∗ xj j j =1 =1 n
Si = (* (*S
θl τl,i *)
(14)
m=1 n
S1 =
θl ∗ τl, 1 ;
l =1 n
S2 =
θl ∗ τl, 2 ; l =1
Log g [ J i ] − 5 ∗ qi ∗ (*Log γ i,C = 1 − J i + Lo
ln lnγ γ 1C 1C = 1 − J 1 +Log[ J 1 ] − 5 ∗ q1 ∗
n
= qi ∗ 1 − (*Log γ ii,R ,R = q n
γ 1R ln lnγ 1R = q = q1 ∗ 1 −
k =1
β1,k θk ∗ sk
n
γ 2R ln lnγ 2R = q = q2 ∗ 1 −
θk ∗
k =1
k =1
β2,k sk
−
−
J J 1 − i +Log i Li Li
*)
J J 1 − 1 +Log 1 L1 L1
; (* = Log Log γ 1,C *)
J 2 J +Log 2 L2 L2
; (* = Log Log γ 2,C *)
ln lnγ γ 2C 2C = 1 − J 2 +Log [ J 2 ] − 5 ∗ q2 ∗ 1 −
βi,k θk ∗ sk
βi,k − ek,i ∗ Log sk
ek, 1 ∗ Log
ek, 2 ∗ Log
3
β1,k sk
β2,k sk
(15)
*)
; (* = Log Log γ 1,R *)
; (* = Log Log γ 2,R *)
(16)
(*Log [γ i ] = Log γ ii,R i,C *) ,R +Log γ i,C
(17)
lnγ lnγ 1 = lnγ lnγ 1C+lnγ 1 C+lnγ 1R; 1R; lnγ lnγ 2 = lnγ lnγ 2C+lnγ 2 C+lnγ 2R; 2R;
x1 0 0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1
γ 1 = Exp[lnγ Exp[lnγ 1]
(18)
γ 2 = Exp[lnγ Exp[lnγ 2]
(19)
γ 1 1,35158 1,28704 1,22926 1,17799 1,13304 1,09434 1,06189 1,03585 1,01648 1,00429 1
x2 1 0,9 0,8 0,7 0,6 0,5 0,4 0,3 0,2 0,1 0
γ 2 1 1,0026 1,01079 1,02528 1,04702 1,07728 1,11772 1,1706 1,2389 1,32711 1,44094
A1 = 16, 16 ,0545; B1 = 2595, 2595,01; C 1 = − 53 53,,15; A2 = 15, 15 ,8737; B2 = 2911, 2911,32; C 2 = − 56 56,,51; B1
−
P 1 = Exp A1
T + + C 1 = 357, 357,091
P 2 = Exp A2 −
B2 = 74, 74,0185 T + + C 2
x1 0 0 0..1 20 00 00 0 0. 0.30 3000 00 0. 0.40 4000 00 0. 0.50 5000 00 0. 0.60 6000 00 0. 0.70 7000 00 0. 0.80 8000 00 0. 0.90 9000 00 1.0000
y1 0 0 0..4 50 97 46 6 0.70 0.7038 38 0.77 0.7768 68 0.83 0.8305 05 0.87 0.8730 30 0.90 0.9088 88 0.94 0.9406 06 0.97 0.9705 05 1.0000
(20)
P 1 = Pvap gamma1 = Pvap1 1. ∗ x1. ∗ gamma 1;
(21)
P 2 = Pvap = Pvap2 2. ∗ x2. ∗ gamma gamma2 2;
(22)
y 1 = P = P 1./ (P 1 + P 2);
(23)
y 2 = P = P 2./ (P 1 + P 2);
(24)
γ 1 1.3516 1 1..2 28 27 90 3 1.17 1.1780 80 1.13 1.1330 30 1.09 1.0943 43 1.06 1.0619 19 1.03 1.0358 58 1.01 1.0165 65 1.00 1.0043 43 1.0000
P 1 0
4 85 7..9 75 99 10 5 126. 126.19 1949 49 161. 161.83 8394 94 195. 195.38 3895 95 227. 227.51 5148 48 258. 258.92 9249 49 290. 290.38 3807 07 322. 322.76 7606 06 357.0910
4
x1 y1 γ 1 P 1 1.0000 1.0000 1.0000 74.0185 0 0..9 80 00 00 0 0.70 0.7000 00 0.60 0.6000 00 0.50 0.5000 00 0.40 0.4000 00 0.30 0.3000 00 0.20 0.2000 00 0.10 0.1000 00 0
0 0..5 49 02 54 4 0. 0.29 2962 62 0. 0.22 2232 32 0. 0.16 1695 95 0. 0.12 1270 70 0. 0.09 0912 12 0. 0.05 0594 94 0. 0.02 0295 95 0
1 1..0 00 12 06 8 1. 1.02 0253 53 1. 1.04 0470 70 1. 1.07 0773 73 1. 1.11 1177 77 1. 1.17 1706 06 1. 1.23 2389 89 1. 1.32 3271 71 1.4409
6 56 9..7 88 59 39 7 53 53.1 .122 228 8 46 46.4 .499 993 3 39 39.8 .869 693 3 33 33.0 .092 928 8 25 25.9 .993 938 8 18 18.3 .340 403 3 9. 9.82 8231 31 0
Progra Pro grama ma Matla Matlab b gra grafica fica a =[ [ 0 , 1 .3 . 3 51 5 1 58 58 , 1 , 1 ] , [ 0 . 1 , 1 . 28 28 7 0 04 4, 0.9 , 1.0026] , [ 0 . 2 , 1 . 22 22 9 2 26 6 , 0 . 8 , 1 . 0 10 10 7 9 ] , [ 0 . 3 , 1 . 17 17 7 9 99 9 , 0 . 7 , 1 . 0 25 25 2 8 ] , [ 0 . 4 , 1 . 13 13 3 0 04 4 , 0 . 6 , 1 . 0 47 47 0 2 ] , [ 0 . 5 , 1 . 09 09 4 3 34 4 , 0 . 5 , 1 . 0 77 77 2 8 ] , [ 0 . 6 , 1 . 06 06 1 8 89 9 , 0 . 4 , 1 . 1 17 17 7 2 ] , [ 0 . 7 , 1 . 03 03 5 8 85 5, 0.3 , 1.1706] , [ 0 . 8 , 1 . 01 01 6 4 48 8, 0.2 , 1.2389] , [ 0 . 9 , 1 . 00 00 4 2 29 9 , 0 . 1 , 1 . 3 27 27 1 1 ] , [ 1 , 1 , 0 , 1 .4 . 4 40 4 0 94 94 ] ]; x 1= 1=a ( : , 1 ) ; gamma1=a ( : , 2 ) ; x 2= 2=a ( : , 3 ) ; gamma2=a ( : , 4 ) ; Pvap1=357.091;%mmhg Pvap2=74.0185;%mmhg P1 P1=Pvap1 =Pvap1 . x1 . gam gamma1; ma1; P2 P2=Pvap2 =Pvap2 . x2 . gam gamma2; ma2;
y1 y1= = P1 y2 y2= =P P1 2 .. // (( P1+ P1+ P1+ +P2 P2 ); ); dat os =[x1 , y1 , gamma1, P1, x2 ,y2 ,ga ,gam mma2, P2] p l o t ( x 1 , P1 , y 1 , P1 , x1 , P 2 , y 1 , P2 ) ; g r i d m in in or or ; a x i s s q u a re re ; t i t l e ( ’ D iiaa g grr aam m a P−x −y ’ ) ; ´ x −y ’ ) ; yl ab el ( ’P en [mmHg] ’ ) ; xl abe l ( ’Composi ’Composici ci on
Codigo Codig o Wolfr olfram am Mathematic Mathematica a
5
METODO UNIFAC Para el sistema binario dietilamina (1)/n-heptano 1 2 K Rk Qk v k v k CH3
1
0.9011 0.848
2
2
CH2
2
0.6744 0.540
1
5
CH2 NH 33 1.2070 0.936
1
0
DE TABLA H1 1 '' CH2 '' =
CH3
CH2
CH1 C
15 '' C CN NH '''' = CH3 NH CH2 NH CH1 NH EN TABLA H2 SE ENCUENTRAN LAS INTERACCIONES ENTRE GRUPOS FUNCIONALES 1 15 1 CH2 0.00 255.77 15 CNH 65.33
= 0.9011; R = 0.6744; R = 1.207; Q = 0.848; Q = 0.540; Q = 0.936; v = 2; v = 1; v = 1; v = 2; v = 5; v = 0; n = 3 3; ;(*Num Numero ero de r = = v * R ;
0.00
R1 2
3
1
2
3
1,1
2,1
3,1
1,2
2,2
3,2
n
1
k,1
k
=
k 1 n
r2
= v * R ; k,2
k
=
k 1 n
q1
= v * Q ; k,1
k
=
k 1
q2
n
= = v * Q ; k,2
=
k
k 1
=
e1,1
* Q
v1,1
q1
1
;
*)
grupos grupos fun funcion cionale ales s
Printed by Wolfram Mathematica Student Edition
2
UNIFAC2.nb
=
e2,1
=
e3,1
* Q
v2,1
2
;
q1
* Q
v3,1
3
;
q1
* Q
v1,2 e1,2
1
;
= q v * Q = q v * Q = 2
2,2
e2,2
2
;
2
3,2
e3,2
3
;
q2
= a a = a a = a τ = τ
= a = a = a = 0; (*K*) = 255.7; = 65.33; -a = τ = τ = τ = Exp
a1,1
1,2
1,3
2,3
3,1
3,2
1,1
1,2
2,1
2,2
1,1
2,1
2,2
τ = τ = Exp 1,3
2,3
a1,3
308.15 exponencial
τ = τ = Exp 3,1
3,3
3,2
-a
3,1
308.15 exponencial
3,3
308.15 exponencial
;
; ;
(*β =∑ = e *τ *) β = e * τ + e * τ + e * τ ; β = e * τ + e * τ + e * τ ; β = e * τ + e * τ + e * τ ; β = e * τ + e * τ + e * τ ; β = e * τ + e * τ + e * τ ; β = e * τ + e * τ + e * τ ; x = 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 (***********************************) x = 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 (***********************************) nc = 2; (*N° de co comp mpon onent entes es en la me mezc zcla la*) * * ∑ (*θ = ∑ * *) ∑ x * q * e ; θ = = ∑ = x * q ∑ = x * q * e ; θ = ∑ = x * q ∑ = x * q * e i,k
n m 1 m,i
m,k
1,1
1,1
1,1
2,1
2,1
3,1
3,1
1,2
1,1
1,2
2,1
2,2
3,1
3,2
1,3
1,1
1,3
2,1
2,3
3,1
3,3
2,1
1,2
1,1
2,2
2,1
3,2
3,1
2,2
1,2
1,2
2,2
2,2
3,2
3,2
2,3
1,2
1,3
2,2
2,3
3,2
3,3
1
0.9 1 ;
2
0.1 0 ;
k
i xi
qi eki
i xi
nc i 1
1
qi
i
nc i 1
nc i 1
i
i
i
1,i
i
i
2,i
2
nc i 1
nc i 1
i
i
i
i
3,i
θ = 3
;
∑ = x * q (*s =∑ = θ τ *) s = θ * τ ; nc i 1
i
i
n m 1 m m,k
k
n
1
m
m,1
=
m 1
Printed by Wolfram Mathematica Student Edition
UNIFAC2.nb UNIF AC2.nb
n
s2
= = θ * τ
m,2;
m
=
m 1 n
s3
= = θ * τ
m,3;
m
=
m 1
(*J = ∑ = J1
J2
=
*)
ri
i
n r j 1 j
*x
j
r1
∑ = r * x nc j 1
=
j
j
r2
∑ = r * x (*L = ∑ = * *) nc j 1
=
j
;
j
qi
i
L1
;
n q j 1 j
qj
q1
∑ = q * x nc j 1
L2
j
;
j
q2
= ∑ = q * x ; (*S =∑ = θ τ *) S = = θ * τ ; nc j 1
j
j
n m 1 l l,i
i
n
1
l
l,1
=
l 1 n
S2
= θ * τ l
l,2;
=
l 1
(*Log[γ ]=1-J +Log[J ]-5*q *1- +Log *) i,C
i
i
logaritmo
Li
logaritmo
γ = 1 - J + Log[J ] - 5 * q * 1 -
ln 1C
1
1
1
logaritmo
γ = 1 - J + Log[J ] - 5 * q * 1 -
ln 2C
2
2
Ji
Ji
i
2
logaritmo
J1 L1 J2 L2
Li
logaritmo
J1
+ Log ;(*=Log[γ ]*) L1 logaritmo
1,C
logaritmo
J2
+ Log ;(*=Log[γ ]*) L2 logaritmo
2,C
logaritmo
(*Log[γ ]=q *1-∑ = θ * β -e *Log β *) i,R
n k 1
i
logaritmo
n
γ = q * 1 - θ *
ln 1R
1
k
=
k 1
i,k
i,k
k
β
1,k
sk
sk
k,i
sk
logaritmo
- e * Log k,1
β
1,k
sk logaritmo
;(*=Log[γ ]*) 1,R
logaritmo
3
n
γ = q * 1 - θ *
ln 2R
2
k
=
k 1
β
2,k
sk
- e * Log k,2
β
2,k
sk logaritmo
;(*=Log[γ ]*) 2,R
logaritmo
(*Log[γ ]=Log[γ ]+Log[γ ]*) i
logaritmo
i,R
i,C
logaritmo
logaritmo
γ = ln γ1C + lnγ1R; lnγ2 = ln γ2C + lnγ2R; γ = Exp[lnγ1] ln 1
1
exponencial
γ = Exp[lnγ2] 2
exponencial
Printed by Wolfram Mathematica Student Edition
4
UNIFAC2.nb
x1 x2 1 0 1 1. .35158 1 0.1 0.1 1.28 1.2870 704 4 0.9 0.9
γ
γ
0. 0.2 2 0. 0.3 3 0. 0.4 4 0. 0.5 5 0. 0.6 6 0.7 0.7
1. 1.01 01079 079 1. 1.02 02528 528 1. 1.04 04702 702 1. 1.07 07728 728 1. 1.11 11772 772 1.17 1.1706 06
1.229 1.22926 26 1.177 1.17799 99 1.133 1.13304 04 1.094 1.09434 34 1.061 1.06189 89 1.03 1.0358 585 5
0. 0.8 8 0. 0.7 7 0. 0.6 6 0. 0.5 5 0. 0.4 4 0.3 0.3
2
1 1.00 1.0026 26
0.8 0.8 1.01 1.0164 648 8 0.2 0.2 1.23 1.2389 89 0. 0.9 9 1.004 1.00429 29 0. 0.1 1 1. 1.32 32711 711 1 1 0 1.44094
Printed by Wolfram Mathematica Student Edition
View more...
Comments