Phase equilibria and SLLE¶
A phase-equilibrium calculation combines three requirements: equality of chemical potentials between coexisting phases, conservation of each component, and stability against an alternative assemblage with lower Gibbs energy. Satisfying only the first requirement can produce a metastable candidate.
Equilibrium as a constrained minimum¶
At specified T/P, an admissible set of phases minimizes
subject to
For a component that can transfer between two phases, stationarity gives \(\mu_i^{\alpha}=\mu_i^{\beta}\). The model for each phase must include a consistent reference. A pure-solid candidate has fixed composition and its own Gibbs energy; it cannot be supplied by a liquid activity coefficient alone.
For phase p, the mole fraction is \(\beta_p=n^p/n^{\mathrm{feed}}\). For nonreactive mixtures it satisfies the molar lever rule \(\mathbf z=\sum_p\beta_p\mathbf x^p\). Phase mass fractions instead include mean molar masses:
The two fraction conventions must not be interchanged in a material balance.
Vapour–liquid equilibrium¶
Fugacity equality is the general condition, \(f_i^L=f_i^V\). An EoS can supply both phases through \(x_i\phi_i^LP=y_i\phi_i^VP\). The activity-based convenience routines use the modified Raoult law
with ideal vapour, no Poynting correction and supplied pure saturation pressures. At fixed liquid composition and temperature,
The activity model supplies gamma; it does not generate the saturation-pressure correlation. Its validity interval and units must be checked separately. See the VLE recipe and notebook 05.
Liquid–liquid equilibrium and stability¶
For two liquids using the same pure-liquid standard states, coexistence requires equal activities:
For a binary, a common tangent to the Gibbs mixing curve identifies equal chemical potentials in the two phases. The stable mixture follows the lower convex envelope of that curve. A homogeneous state above a supporting tangent can lower its energy by splitting.
A local curvature test identifies spinodal instability, but a locally convex state can still be globally metastable. A more general test is the reduced tangent-plane distance relative to a reference liquid z:
A negative TPD at any admissible trial composition w establishes instability of z. Finding no negative value in a finite numerical search provides evidence at its configured resolution and tolerances. Boundary feeds also require respecting which components are actually available.
Solid–liquid equilibrium¶
For a pure solid s, neglecting the heat-capacity difference between solid and liquid and treating the fusion enthalpy as constant,
Equality with the liquid chemical potential gives the Schröder–van Laar relation
The solid is pure, with no solid-solution or cocrystal mixing energy. Multiple roots or competing liquids/solids require a coupled stability calculation. The solubility recipe and notebook 07 make this distinction explicit.
Binary and ternary SLLE¶
For C components and Π phases without reactions, the Gibbs phase rule is \(F=C-\Pi+2\). At fixed pressure, a binary S+L₁+L₂ equilibrium has F=0: its temperature and phase compositions form an invariant. A three-phase binary assemblage has more phase amounts than independent component balances, so its amounts need not be uniquely determined. An equally stable two-phase representation of a feed can occur at the invariant.
For a ternary at fixed T/P, the three coexisting phase compositions are fixed, while feeds inside their tie triangle change the phase amounts. These amounts must satisfy all three component balances. A solid corner and two liquid corners can be close together geometrically; a physically thin triangle should be magnified for inspection rather than artificially widened.
Tutorial 10 calculates a binary invariant. Tutorial 11 solves a ternary liquid/solid flash and tie triangle. Tutorial 12 repeats the workflow with actual COSMO-RS inputs. All use measured benzene fusion data and explicitly stated solid assumptions.
Coordinates in the neutral-mixture HELD tutorials¶
ReducedHELD requires an explicit ReducedChart describing charges, conserved
amounts, molar masses and standard potentials. Its general formulation can
eliminate reaction directions and an electrolyte charge coordinate. For a
neutral mixture with no reactions, however, ReducedChart.build returns the
identity matrix:
All species amounts are retained. The zero charges vector is a vector of
electrical charges, not an initial composition. No nu or ln_K is supplied
in these tutorials, so no reaction equilibrium is introduced. Zero relative
standard potentials match the pure-liquid activity convention, while the pure
solid's potential is supplied separately from fusion data.
The solver internally normalizes amounts by total mass for optimization, then returns phase species mole amounts on the input feed basis. This normalization is distinct from eliminating chemical coordinates, and from EoS reduced variables such as reduced temperature. Molar masses must use one consistent unit; the tutorials use g/mol. The commented COSMO-RS walkthrough prints the binary and ternary identity matrices and checks the molar lever rule.
What the numerical algorithms establish¶
CEM approximates the Gibbs surface on a composition grid and constructs a convex representation, with optional polishing. TPD searches for destabilizing compositions. ReducedHELD searches admissible liquid/solid assemblages and reports convergence and configured certification diagnostics. Their guarantees reflect the model, search strategy, resolution and numerical tolerances.
Inspect balances, chemical-potential equality and solid saturation independently of solver flags. Compare with experimental data to assess physical accuracy. For implementation entry points see API and units and capabilities.