Problem 2: A liquid containing three components is in equilibrium with the vapor at total pressure of 1 atm. If the temperature-dependence of the vapor-liquid equilibrium constants, Ki, at 1 atm can be represented by ln Ki = Ai + BiT + CiT2 where the constants Ai, Bi, and Ci are given below and T is the temperature (¢ªF), determine the equilibrium temperature (bubble point) and vapor composition corresponding to the liquid composition, xi, given below.
xi Ai Bi Ci
0.1104 -2.99279 2.2270x10-2 -1.8669x10-5
0.2829 -5.90449 2.9968x10-2 -2.7439x10-5
0.6067 -8.72046 3.7367x10-2 -3.5124x10-5
Use Newton's method with an initial guess for T in the range 200¢ªF < T < 300¢ªF.
À̹®Á¦¸¦ matlab(c++¾ð¾î»ç¿ë)À̶ó´Â ÇÁ·Î±×·¥À» ÀÌ¿ëÇÏ¿© Ç®¾î¾ßÇϴµ¥;
¸î ¹®Á¦ Áú¹® Á» ÇÒ²²¿ä
3¹°ÁúÀÇ vapor-liquid equilibrium constants °¡ ´Ù °°¾ÆÁö´Â Temperature¸¦ ã´Â °Å ¸Â¿ä?
matlab¸¦ óÀ½½áº¸´Âµ¥´Ù°¡ thermodymic ÄÁ¼Áµµ ´Ù ±î¸Ô¾î¼. Á¤¸» Èûµå³×¿ä
¶Ç´Ù¸¥ ¹®Á¦´Â
Problem 3: The Wilson equation is quite accurate for estimating activity coefficients. For a binary system, the activity coefficients g1 and g2 are given as functions of compositions according to
»çÁø ÷ºÎ
where xi is the mole fraction of component i, and A and B are the Wilson parameters. The activity coefficients for a methanol-benzene azeotrope with x1=0.61 (where subscript 1 refers to methanol) are g1=1.2936 and g2=2.0619. Determine the constants A and B for this system using Newton¡¯s method.
Á¦°¡ A°ª°ú B°ªÀÌ
0.5961
0.2702
³ª¿Ô´Âµ¥ ¸Â´Â °ÍÀΰ¡¿ä?
matlab¿¡´Ù°¡´Â ÀÌ·¸°Ô ³Ö¾ú½À´Ï´Ù.
% problem 2. newton's method to determine the activity coefficients.
x = rand(2,1);
a = x(1,1);
b = x(2,1);
f = [ -log(1.2936) + -log(0.61 + a * 0.39) + 0.39*((a/(0.61 + a*0.39)) - (b/(b*0.61 + 0.39))); -log(2.0619) + -log(b*0.61 + 0.39) + 0.61*((a/(0.61 + a*0.39)) - (b/(b*0.61 + 0.39)));];
j= [ -(1521*a)/(10000*((39*a)/100 + 61/100)^2), (2379*b)/(10000*((61*b)/100 + 39/100)^2) - 39/(100*((61*b)/100 + 39/100));
61/(100*((39*a)/100 + 61/100)) - (2379*a)/(10000*((39*a)/100 + 61/100)^2), (3721*b)/(10000*((61*b)/100 + 39/100)^2) - 61/(50*((61*b)/100 + 39/100))];
k = 0;
tol =1e-6;
while norm(f) > tol && k < 20 %If fuction(x) < 0 and
% counter = 20 then terminate
% updating x by using newton's method
x = x - j\f;
a = x(1,1);
b = x(2,1);
f = [ -log(1.2936) + -log(0.61 + a * 0.39) + 0.39*((a/(0.61 + a*0.39)) - (b/(b*0.61 + 0.39))); -log(2.0619) + -log(b*0.61 + 0.39) + 0.61*((a/(0.61 + a*0.39)) - (b/(b*0.61 + 0.39)));];
j= [ -(1521*a)/(10000*((39*a)/100 + 61/100)^2), (2379*b)/(10000*((61*b)/100 + 39/100)^2) - 39/(100*((61*b)/100 + 39/100));
61/(100*((39*a)/100 + 61/100)) - (2379*a)/(10000*((39*a)/100 + 61/100)^2), (3721*b)/(10000*((61*b)/100 + 39/100)^2) - 61/(50*((61*b)/100 + 39/100))];
k = k + 1;
end
x
----------------------------------------------
j´Â jacobianÀ̱¸¿ä
x = x - j\f; j\ÀÌ°ÍÀº inv(j) * f ÀÔ´Ï´Ù.