Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

3.

DEW POINT TEMPARATURE


AIM: write a program to calculate liquid composition ‘x’ and dew point temperature ‘T’
for given vapour composition ‘y’ and pressure P.

THEORY: let us assume a binary system of components 1 and 2. Component 1 is the more
volatile, and the mole fraction of component 1 in the vapour phase is y and in the liquid is x.
Assume also that the system is ideal: Raoult’s and Dalton’s laws apply.

A1= 13.584, B1= - 2773.78,

A2= 14.0098, B2= - 3103.01.

y = 0.5 and pressure P = 101.325 kPa.

s s
x 1 P 1= y 1 P x 2 P 2= y 2 P

x 1+ x2 =1=
( y1
P
s
1
+
y2
P2
s
) P

1
P=

( y1
P
s
1
+
P2
y2
s
)
y1 P
x 1= s
P1
ALGORITHM

1. Guess a temperature T.
2. Calculate the vapor pressures of components 1 and 2 using equations.

3. Calculate a total pressure Pcalc using Eq.


Calc 1
P =

( y1
P
s
1
+
y2
s
P2 )
4. Compare Pcalc with the actual total pressure given, P. If it is sufficiently close to P (perhaps
using a relative convergence criterion of 10 -6), the guess T is correct. The liquid composition can
then be calculated from Eq.

y1 P
x 1= s
P1

5. If Pcalc is greater than P, the guessed temperature was too high and we must make another
guess T, that is lower. If Pcalc is too low, we must guess a higher T

Newton-Raphson Method

let us define the function f(T) = 0:

Iteration algorithm :
calc 1
f n ( T )=P −P=0= −P

( y1
s
+ s
P1 P2
y2
)
−1
f 1n ( T )= y1 y2
¿
B1 B2
A 1+ A2 +
T T 2
(e +e )

MATLAB Code:

clear;clc;
A1=13.584;
B1=-2773.78;
A2=14.0098;
B2=-3103.01;
y=0.5;
p=760; % in mm of hg
t0=input('enter initial guess temp t0: ');
maxiter=10; tolerancet=1e-6; t=t0; told=t0;
disp('T fn fn1 err')
for i= 1:maxiter
p1s=exp(A1+(B1/t));
p2s=exp(A2+(B2/t));
A=((y*(1/p1s))+((1-y)*(1/p2s)));
fn=((1/A)-p);
B=((B1*y*(1/p1s))+((1-y)*B2*(1/p2s)));
C=(B/(t*t));
fn1= ((-1/(A*A))*C);
t=t-(fn/fn1);
err=abs(t-told);
fprintf (' %f %f %f %f \n',told, fn, fn1, err);
told=t;
if(err<tolerancet)
pcal=1/((y/p1s)+((1-y)/p2s));
break;
end
end
x= (y*p)/p1s;
fprintf('dew temp %f and liquid composition %f.\n',t,x);

Output:

Sample Calculation:

RESULT:
Enter guess temperature:500
Temperature =411.235321, mole=0.407385

You might also like