Sie sind auf Seite 1von 8

1/17/2018 Activity Coefficient of Binary System using UNIQUAC Method - File Exchange - MATLAB Central

Activity Coefficient of Binary System using UNIQUAC Method 0 Ratings


version 1.0 (44.2 KB) by Samidha Banka 5 Downloads 
This is a simple calculator - Activity Coefficient of Binary System using UNIQUAC Method Updated 04 Jan 2018
View License

Add to Watchlist Download


File Exchange
Overview Functions

This is a calculator to compute Activity Coefficient of each component in a Binary System using UNIQUAC Method. The user will have to enter all
the parameters and in results, they will receive all other parameters and values of logarithmic combinatorial and residual activity coefficients and
final activity coefficient.

Comments and Ratings (0)


Rate this Submission 1 2 3 4 5 (Rating not required)

Comment on this submission

Updates
4 Jan 2018 1.0 N/A

Requires
MATLAB

MATLAB Release
MATLAB 9.3 (R2017b)

Tags Add Tags


activity coefficient thermodynamics uniquac

Cancel Save

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

https://www.mathworks.com/matlabcentral/fileexchange/65586-activity-coefficient-of-binary-system-using-uniquac-method 1/8
1/17/2018 Activity Coefficient of Binary System using UNIQUAC Method - File Exchange - MATLAB Central

Win prizes and improve your MATLAB skills


 Play today

Act_Prop_Water1/ function varargout = Act_Prop_Water1(vara


% ACT_PROP_WATER1 MATLAB code for Act_Pro
% ACT_PROP_WATER1, by itself, create
Act_Prop_Water1(varargin) % singleton*.
%
% H = ACT_PROP_WATER1 returns the ha
propwater() % the existing singleton*.
%
% ACT_PROP_WATER1('CALLBACK',hObject
% function named CALLBACK in ACT_PRO
%
% ACT_PROP_WATER1('Property','Value'
% existing singleton*. Starting fro
% applied to the GUI before Act_Prop
% unrecognized property name or inva
% stop. All inputs are passed to Ac
%
% *See GUI Options on GUIDE's Tools
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the respo

% Last Modified by GUIDE v2.5 04-Jan-2018

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfil
'gui_Singleton', gui_
'gui_OpeningFcn', @Act
'gui_OutputFcn', @Act
'gui_LayoutFcn', [] ,
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(var
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before Act_Prop_Water


function Act_Prop_Water1_OpeningFcn(hObje
% This function has no output args, see O
% hObject handle to figure
% eventdata reserved - to be defined in
% handles structure with handles and u
% varargin command line arguments to Ac

% Choose default command line output for


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);

% UIWAIT makes Act_Prop_Water1 wait for u


% uiwait(handles.figure1);

% --- Outputs from this function are retu


function varargout = Act_Prop_Water1_Outp
% varargout cell array for returning out
% hObject handle to figure
% eventdata reserved - to be defined in
% handles structure with handles and u

% Get default command line output from ha


varargout{1} = handles.output;

function xb_Callback(hObject, eventdata,


% hObject handle to xb (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co

https://www.mathworks.com/matlabcentral/fileexchange/65586-activity-coefficient-of-binary-system-using-uniquac-method 2/8
1/17/2018 Activity Coefficient of Binary System using UNIQUAC Method - File Exchange - MATLAB Central
% str2double(get(hObject,'String')

% --- Executes during object creation, af


function xb_CreateFcn(hObject, eventdata,
% hObject handle to xb (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function r_1_Callback(hObject, eventdata,


% hObject handle to r_1 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function r_1_CreateFcn(hObject, eventdata
% hObject handle to r_1 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function r_2_Callback(hObject, eventdata,


% hObject handle to r_2 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function r_2_CreateFcn(hObject, eventdata
% hObject handle to r_2 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function q_1_Callback(hObject, eventdata,


% hObject handle to q_1 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function q_1_CreateFcn(hObject, eventdata
% hObject handle to q_1 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function q_2_Callback(hObject, eventdata,


% hObject handle to q_2 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function q_2_CreateFcn(hObject, eventdata
% hObject handle to q_2 (see GCBO)

https://www.mathworks.com/matlabcentral/fileexchange/65586-activity-coefficient-of-binary-system-using-uniquac-method 3/8
1/17/2018 Activity Coefficient of Binary System using UNIQUAC Method - File Exchange - MATLAB Central
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function a21_Callback(hObject, eventdata,


% hObject handle to a21 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function a21_CreateFcn(hObject, eventdata
% hObject handle to a21 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function a12_Callback(hObject, eventdata,


% hObject handle to a12 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function a12_CreateFcn(hObject, eventdata
% hObject handle to a12 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function phi1_Callback(hObject, eventdata


% hObject handle to phi1 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function phi1_CreateFcn(hObject, eventdat
% hObject handle to phi1 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function phi2_Callback(hObject, eventdata


% hObject handle to phi2 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function phi2_CreateFcn(hObject, eventdat
% hObject handle to phi2 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'

https://www.mathworks.com/matlabcentral/fileexchange/65586-activity-coefficient-of-binary-system-using-uniquac-method 4/8
1/17/2018 Activity Coefficient of Binary System using UNIQUAC Method - File Exchange - MATLAB Central
end

function the1_Callback(hObject, eventdata


% hObject handle to the1 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function the1_CreateFcn(hObject, eventdat
% hObject handle to the1 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function the2_Callback(hObject, eventdata


% hObject handle to the2 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function the2_CreateFcn(hObject, eventdat
% hObject handle to the2 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function l1_Callback(hObject, eventdata,


% hObject handle to l1 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function l1_CreateFcn(hObject, eventdata,
% hObject handle to l1 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function l2_Callback(hObject, eventdata,


% hObject handle to l2 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function l2_CreateFcn(hObject, eventdata,
% hObject handle to l2 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function ln_gam1c_Callback(hObject, event


% hObject handle to ln_gam1c (see GCBO

https://www.mathworks.com/matlabcentral/fileexchange/65586-activity-coefficient-of-binary-system-using-uniquac-method 5/8
1/17/2018 Activity Coefficient of Binary System using UNIQUAC Method - File Exchange - MATLAB Central
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function ln_gam1c_CreateFcn(hObject, even
% hObject handle to ln_gam1c (see GCBO
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function ln_gam2c_Callback(hObject, event


% hObject handle to ln_gam2c (see GCBO
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function ln_gam2c_CreateFcn(hObject, even
% hObject handle to ln_gam2c (see GCBO
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function ln_gam1r_Callback(hObject, event


% hObject handle to ln_gam1r (see GCBO
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function ln_gam1r_CreateFcn(hObject, even
% hObject handle to ln_gam1r (see GCBO
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function ln_gam2r_Callback(hObject, event


% hObject handle to ln_gam2r (see GCBO
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function ln_gam2r_CreateFcn(hObject, even
% hObject handle to ln_gam2r (see GCBO
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function gam1_Callback(hObject, eventdata


% hObject handle to gam1 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

https://www.mathworks.com/matlabcentral/fileexchange/65586-activity-coefficient-of-binary-system-using-uniquac-method 6/8
1/17/2018 Activity Coefficient of Binary System using UNIQUAC Method - File Exchange - MATLAB Central

% --- Executes during object creation, af


function gam1_CreateFcn(hObject, eventdat
% hObject handle to gam1 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function gam2_Callback(hObject, eventdata


% hObject handle to gam2 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function gam2_CreateFcn(hObject, eventdat
% hObject handle to gam2 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function tau1_Callback(hObject, eventdata


% hObject handle to tau1 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function tau1_CreateFcn(hObject, eventdat
% hObject handle to tau1 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function tau2_Callback(hObject, eventdata


% hObject handle to tau2 (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function tau2_CreateFcn(hObject, eventdat
% hObject handle to tau2 (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function xa_Callback(hObject, eventdata,


% hObject handle to xa (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function xa_CreateFcn(hObject, eventdata,
% hObject handle to xa (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

https://www.mathworks.com/matlabcentral/fileexchange/65586-activity-coefficient-of-binary-system-using-uniquac-method 7/8
1/17/2018 Activity Coefficient of Binary System using UNIQUAC Method - File Exchange - MATLAB Central

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

function t_Callback(hObject, eventdata, h


% hObject handle to t (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u

% Hints: get(hObject,'String') returns co


% str2double(get(hObject,'String')

% --- Executes during object creation, af


function t_CreateFcn(hObject, eventdata,
% hObject handle to t (see GCBO)
% eventdata reserved - to be defined in
% handles empty - handles not created

% Hint: edit controls usually have a whit


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'Backgroun
set(hObject,'BackgroundColor','white'
end

% --- Executes on button press in ok.


function ok_Callback(hObject, eventdata,
% hObject handle to ok (see GCBO)
% eventdata reserved - to be defined in
% handles structure with handles and u
xa = str2double(get(handles.xa,'string'))
xb = str2double(get(handles.xb,'string'))
sum = xa+xb;
if sum ~=1
errordlg('Sum of mole fraction should
return;
end
r_1 = str2double(get(handles.r_1,'string'
r_2 = str2double(get(handles.r_2,'string'
q_1 = str2double(get(handles.q_1,'string'
q_2 = str2double(get(handles.q_2,'string'
a21 = str2double(get(handles.a21,'string'
a12 = str2double(get(handles.a12,'string'
t = str2double(get(handles.t,'string'));
[phi1,phi2,the1,the2,l1,l2,tau21,tau12,ln
set(handles.phi1,'string',phi1);
set(handles.phi2,'string',phi2);
set(handles.the1,'string',the1);
set(handles.the2,'string',the2);
set(handles.l1,'string',l1);
set(handles.l2,'string',l2);
set(handles.tau1,'string',tau21);
set(handles.tau2,'string',tau12);
set(handles.ln_gam1c,'string',ln_gam1c);
set(handles.ln_gam2c,'string',ln_gam2c);
set(handles.ln_gam1r,'string',ln_gam1r);
set(handles.ln_gam2r,'string',ln_gam2r);
set(handles.gam1,'string',gam1);
set(handles.gam2,'string',gam2);

mathworks.com
© 1994-2018 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarks for a list of additional trademarks. Other
product or brand names may be trademarks or registered trademarks of their respective holders.

https://www.mathworks.com/matlabcentral/fileexchange/65586-activity-coefficient-of-binary-system-using-uniquac-method 8/8

Das könnte Ihnen auch gefallen