P-x-y and T-x-y diagrams are generated for one mole of a binary mixture in vapor-liquid equilibrium (VLE). The P-x-y diagram is shown at a temperature of 110 °C, and the T-x-y diagram is shown at a pressure of 1.6 bar. The solid blue curve represents the liquid-phase boundary (bubble point) and the solid green curve represents the vapor-phase boundary (dew point). The bar chart displays the moles of liquid (blue) and vapor (green) in equilibrium and the mole fraction of component 1 in each phase (x1 for liquid, y1 for vapor); the relative amounts are calculated using the lever rule. Click and drag the black dot on the diagrams to change the mole fraction of component 1 and the temperature (on T-x-y diagram) or pressure (on P-x-y diagram).
The non-ideal liquid mixture is modeled using the two-parameter Margules model. The interaction between the two components can be attractive (where attractive interactions between components 1 and 2 are stronger than the average of the pure-component interactions); this results in negative deviations from Raoult's law. The interaction can be repulsive (where attractive interactions between components 1 and 2 are weaker than the average of pure-component interactions); this results in positive deviations from Raoult's law. Use sliders to change the degree of interaction by changing the Margules parameters (A12 and A21), which are used to calculate the activity coefficients. When the Margules parameters are zero, the liquid solution is ideal and the activity coefficients equal 1. When the activity coefficients deviate significantly from 1, the system has an azeotrope.
The saturation pressure of component i is calculated using the Antoine equation:
Pisat = 10(Ai − Bi/(T + Ci)),
where Pisat is saturation pressure (bar) of component i (= 1, 2), Ai, Bi, and Ci are Antoine constants, and T is temperature (°C).
The two-parameter Margules model is used to calculate the activity coefficients for a non-ideal liquid mixture of components 1 and 2. This model fits the excess Gibbs free energy:
GE/(R T) = x1 x2 (A21 x1 + A12 x2),
where GE is excess Gibbs energy, and R is the ideal gas constant.
The activity coefficients γ1, γ2 are given by:
ln γ1 = x22 (A12 + 2 (A21 − A12) x1),
ln γ2 = x12 (A21 + 2 (A12 − A21) x2),
where x1 and x2 are the liquid mole fractions of components 1 and 2 and x1 + x2 = 1, and A21 and A12 are the Margules parameters.
The modified Raoult's law is used to calculate the bubble-point and dew-point pressures using the K factors:
Ki = yi/xi = γi Pisat/P,
where yi is the vapor mole fraction and y1 + y2 = 1, and P is the total pressure (bar).
Bubble-point pressure calculation:
P = x1 γ1 P1sat + x2 γ2 P2sat.
Dew-point pressure calculation:
P = (y1/(γ1 P1sat) + y2/(γ2 P2sat))−1.
This simulation was created in the Department of Chemical and Biological Engineering at University of Colorado Boulder for LearnChemE.com by John L. Falconer using Claude AI. It is a JavaScript/HTML5 implementation of a Mathematica simulation by Rachael L. Baumann. It was prepared with financial support from the National Science Foundation (DUE 2336987 and 2336988). Address any questions or comments to LearnChemE@gmail.com.