Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE SOLVE USING MATLAB ONLY,

ID: 701450 • Letter: S

Question

SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE

SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE

SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE

SOLVE USING MATLAB ONLY, PROVIDE ANSWER AS MATLAB CODE

The activity coefficients of chloroform and 1,4 dioxane in a binary liquid mixture of chloroform (1)/1,4 dioxane (2) at 50°C can be estimated from Margules equations: where 1 is the activity coefficient of chloroform, 2 is the activity coefficient of 1,4 dioxane, x1 is the mole fraction of chloroform, x2 is the mole fraction of 1,4 dioxane (x2-1-x), and A12 and A21 are the Margules parameters for this binary system. These two parameters are usually obtained from vapor-liquid equilibrium data. Determine the mole fraction of chloroform in the mixture such that = From vapor-liquid equilibrium experiment, the following data are obtained: 0.1248 0.086 0.1757 0.120 0.2000 0.133 0.0932 0.064 0.3615 -0.212 X1 0.2626 GE/RT 0.4750 0.248 0.5555 0.252 0.6718 -0.245 GE/RT where GE/RT is the dimensionless excess Gibbs free energy. To obtain A12 and A21, the following relatiorn can be applied RTxI2

Explanation / Answer

To estimate the value of x1 where gamma1=gamma2, we require thw values of Margulus constants. So in order to estimate the values, the given data for excess energy at different mole fractions is used for regression.

than fsolve is used to find the value of molef fraction where both the activity coefficients are same

The MATLAB code is given below

y=[-0.064 -0.086 -0.120 -0.133 -0.171 -0.212 -0.248 -0.252 -0.245]';
x1=[0.0932 0.1248 0.1757 0.2 0.2626 0.3615 0.4750 0.5555 0.6718]';
x2=1-x1;
A=[x1.^2.*x2 x2.^2.*x1];
sol=Ay;
A21=sol(1);
A12=sol(2);

x1sol=fsolve(@(x) (1-x)^2*(A12+2*(A21-A12)*x)-x^2*(A21+2*(A12-A21)*(1-x)) ,0.5)
x2sol=1-x1sol

% here
% y=G/(R*T)

end of code

The value of x1 is found to be 0.5666 and the value of x2 is 0.4334