Embed presentation
Download to read offline




![APPLICATION TO MATLAB
function P2_10A
clear, clc, format short g, format
compact
xguess = 49.5 ;
xsolv=fzero(@NLEfun,xguess);
disp(' Variable values at the solution');
disp([' Unknown value '
num2str(xsolv)]);
%- - - - - - - - - - - - - - - - - - - - - -
function fTbp = NLEfun(Tbp);
xA = .1;
PA = 10 ^ (6.85221 - (1064.63 / (Tbp +
232)));
PB = 10 ^ (6.87776 - (1171.53 /
(224.366 + Tbp)));
xB = 1 - xA;
yA = xA * PA / 760;
yB = xB * PB / 760;
fTbp = xA * PA + xB * PB - 760;](https://image.slidesharecdn.com/cafranciscomjm-filebubblepointcalculations-141123073621-conversion-gate02/85/bubble-point-calculations-5-320.jpg)


This document discusses bubble point calculations. It defines the bubble point as the temperature at which the first drop of a liquid mixture begins to vaporize due to increasing temperature or decreasing pressure. It also provides an example MATLAB code for calculating the bubble point temperature of a mixture using a non-linear equation solver.




![APPLICATION TO MATLAB
function P2_10A
clear, clc, format short g, format
compact
xguess = 49.5 ;
xsolv=fzero(@NLEfun,xguess);
disp(' Variable values at the solution');
disp([' Unknown value '
num2str(xsolv)]);
%- - - - - - - - - - - - - - - - - - - - - -
function fTbp = NLEfun(Tbp);
xA = .1;
PA = 10 ^ (6.85221 - (1064.63 / (Tbp +
232)));
PB = 10 ^ (6.87776 - (1171.53 /
(224.366 + Tbp)));
xB = 1 - xA;
yA = xA * PA / 760;
yB = xB * PB / 760;
fTbp = xA * PA + xB * PB - 760;](https://image.slidesharecdn.com/cafranciscomjm-filebubblepointcalculations-141123073621-conversion-gate02/85/bubble-point-calculations-5-320.jpg)
