**Non-Ideal Vapor-Liquid Equilibrium (VLE) Modeled by Margules Equation**

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 1200 mmHg. The solid blue curve represents the liquid-phase boundary (bubble point) and the solid green curve represents the vapor-phase boundary (dew point) in the P-x-y and T-x-y diagrams. The bar chart displays the amounts (moles) of liquid (blue) and vapor (green) in equilibrium and the mole fraction of component 1 in each phase (x

_{1}for liquid, y_{1}for vapor); the relative amounts are calculated using the lever rule. 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 interactive 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. Sliders change the degree of interaction by changing the Margules parameters (A

_{12}and A_{21}), which are used to calculate the activity coefficents. When the Margules parameters are zero, the liquid is ideal (Raoult's law) and the activity coefficients are 1. When the activity coefficients deviate significantly from one, the system has an azeotrope.