ÀÚµ¿·Î±×ÀÎ
ÄÁÅÙÃ÷ | contents
ÀϹݰԽÃÆÇ
Q&A°Ô½ÃÆÇ
°øÇÐ S/W
½ºÅ͵ð | study
´ÜÀ§È¯»ê
³óµµ°è»ê
ÀϹÝÈ­ÇÐ
È­°øÀϹÝ
È­°ø½Ç¹«

   
  newton's method ÇÏ°í thermodynamic °ü·Ã¹®Á¦1
  ±Û¾´ÀÌ : ²ûÂïÇѾÆÀÌ   °íÀ¯ID : mgood2     ³¯Â¥ : 11-01-23 06:48     Á¶È¸ : 3763    
   problem3.JPG (14.8K), Down : 0, 2011-01-23 06:48:53

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 ÀÔ´Ï´Ù.
 

 


²ûÂïÇѾÆÀÌ mgood2   11-01-24 09:24
ÈÞ Ç®¾ú½À´Ï´Ù. Ȥ½Ã³ª ±Ã±ÝÇϽźÐÀ» À§ÇØ

% problem 2. newton's method to determine the equilibrium temperature.
T = 200 + 100*rand;



[K1, K2, K3] = function_constants( T );
[dK1, dK2, dK3] = derivative_constants( T );

k=0;
tol=1e-6;

while abs(x1*K1 + x2*K2 + x3*K3 - 1) > tol && k < 20;
 
    T = T - (x1*K1 + x2*K2 + x3*K3 - 1)/(x1*dK1 + x2*dK2 + x3*dK3);

 [K1, K2, K3] = function_constants( T );
[dK1, dK2, dK3] = derivative_constants( T );
k = k + 1;
   

end
T
x1*K1
x2*K2
x3*K3

------------------------------------------------------------------------
[K1, K2, K3] = function_constants( T );
[dK1, dK2, dK3] = derivative_constants( T );
 ÀÌ°ÍÀº Á¦°¡ µû·Î ¸¸µé¾î¼­ »ç¿ëÇß½À´Ï´Ù. ¹®Á¦¿¡¼­ ÁÖ¾îÁø °Íµé ³ÖÀº °Í »ÓÀ̱¸¿ä
   

Copyright 1999.07.10-Now ChemEng.co.kr & 3D System Engineering. (mail : ykjang@naver.com, call 010-4456-8090)