3.66667

3.7 | 4 ratings Rate this file 10 Downloads (last 30 days) File Size: 15.78 KB File ID: #15169
image thumbnail

Binary VLE Computations using Wilson's Model

by Housam Binous

 

01 Jun 2007 (Updated 04 Jun 2007)

computes VLE diagram for any binary mixture

| Watch this File

File Information
Description

One must input to a dialog box Antoine's constants, Wilson binary interaction parameters and liquid molar volume of any binary mixture of his choice. The program computes and plots activity coefficients, relative volatility and VLE diagram.

Required Products Optimization Toolbox
MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
01 Jun 2007 Duane Hanselman

No need to download. Here is the code, including its help text and embedded comments:

global PAR y x G1 G2 PS1 PS2
title1='Antoine''s Equation and Wilson''s Model Parameters ';
ind1={'A1 (7.11714)','A2 (6.95465)','B1 (1210.595)',...
           'B2 (1170.966)','C1 (229.664)','C2 (226.232)',...
           'A12 (116.1171)','A21 (-506.8519)','V1 (74.05)','V2 (80.67)'};
setpar={'7.11714','6.95465','1210.595','1170.966',...
             '229.664','226.232',...
     '116.1171','-506.8519','74.05','80.67'};
options.resize='on';
prompt=ind1;
def=setpar;
dlgTitle=title1;
lineNo=1;
M=inputdlg(prompt,dlgTitle,lineNo,def,options);
PAR=str2num(char(M));
disp('vle parameters:')
disp(' ')
disp(PAR);
options = optimset('display','off');
for i=1:101
    xe(i)=(i-1)*0.01;
    x=xe(i);
    Te(i)=fsolve(@EQUIL,70,options);
    ye(i)=y;
    G1e(i)=G1;
    G2e(i)=G2;
    PS1e(i)=PS1;
    PS2e(i)=PS2;
end
figure(1)
plot(xe,Te,'r')
hold on
plot(ye,Te,'g')
axis tight
figure(2)
plot(xe,G1e,'r')
hold on
plot(xe,G2e,'g')
axis tight
figure(3)
plot(xe,G1e.*PS1e./(G2e.*PS2e),'b')
axis tight
data=[xe; ye; Te; G1e; G2e; G1e.*PS1e./(G2e.*PS2e)]'

01 Jun 2007 Jos x@y.z

This submission contains no help or explanation whatsover, it has no code comments, and it clutters the workspace with variables, thereby possibly overwriting existing.

Also I think it should be 'C1 (229.665)' not 'C1 (229.664)', but who cares ...

01 Jul 2010 GERMÁN

Dear
I want to do the graphic pxy, how I can do it?

thank

13 Feb 2012 Deidra

could be clearer on what the V1 and V2, A21 and A12 parameters are, but he gave me a prompt email response about these. otherwise easy code to use.

06 Mar 2012 Santiago Galvis

what are the unit of the constants?
i mean, I need a Acetone-water Txy at p=1 atm and p=760 mmhg
What can I do ?

06 Mar 2012 Santiago Galvis

what are the units of the constants?
i mean, I need a Acetone-water Txy at p=1 atm and p=760 mmhg
What can I do ?

07 Mar 2012 Santiago Galvis  
07 Mar 2012 Santiago Galvis  
Please login to add a comment or rating.
Updates
04 Jun 2007

added comments to explain the code

Tag Activity for this File
Tag Applied By Date/Time
chemistry Housam Binous 22 Oct 2008 09:14:14
physics Housam Binous 22 Oct 2008 09:14:14
vle diagram Housam Binous 22 Oct 2008 09:14:14
wilsons model Housam Binous 22 Oct 2008 09:14:14
relative volatility Housam Binous 22 Oct 2008 09:14:14

Contact us at files@mathworks.com