The VLE Thermodynamic Consistency Checker audits experimental binary vapor–liquid equilibrium (VLE) data before you fit a model to it. It converts every row to kelvin, pascals, and mole fractions, runs the Gibbs–Duhem tests each dataset qualifies for, and flags suspect points and datasets. Its cleaned data table feeds straight into VLE Parameter Regression, and the fitted parameters into VLE / Flash.
It doesn't certify data as correct. Every result depends on the test's assumptions (the vapor model, the vapor-pressure correlation, and the excess-Gibbs-energy form), and the report lists them. There is no single overall "consistent" verdict.
How it works
Activity coefficients come from each point with a vapor composition: γᵢ = yᵢ·P·Φᵢ / (xᵢ·Pᵢˢᵃᵗ(T)).
- Vapor model.
ideal(the default) sets Φᵢ = 1, which is modified Raoult's law and assumes low pressure.virialuses second virial coefficients from the Tsonopoulos correlation; it needs critical properties and the acentric factor for both components. - Vapor pressure. A
thermocorrelation for each component, unless you give Antoine constants (log₁₀(P/Pa) = A − B/(T/K + C)). - Datasets. Rows are grouped by
dataset. A group is isothermal when its temperatures agree within 0.1 K, isobaric when its pressures agree within 0.5 %, and otherwise mixed. Both tolerances are adjustable.
| Test | Applies to | Passes by default when |
|---|---|---|
area: Herington | isobaric | D − J < 10 |
area: Redlich–Kister | isothermal | the area deviation is under 10 % |
point: Van Ness (Barker's method) | isothermal or isobaric | the mean |Δy₁| is at most 0.01 |
endpoint: pure components | any | the pure-component pressure is within 5 % of Pˢᵃᵗ |
infinite_dilution: Kojima | isothermal or isobaric | both dilute-end deviations are at most 30 % |
A dataset that doesn't qualify for a test (no vapor compositions, too few points, poor composition coverage, no pure-component rows) gets not_applicable with the reason, never a pass or a fail. Every threshold can be changed in criteria. Each row is also checked for mole fractions that don't sum to 1, duplicates, pure-component rows with y₁ ≠ x₁, vapor pressures outside the correlation's range, and Van Ness outliers (|Δy₁| above 0.02 by default).
Inputs
components: exactly two, each byname,smiles, orcas. Addtc_k,pc_pa, andomegafor the virial model, orantoine_a,antoine_b, andantoine_cto override the vapor pressure.data: 3 to 500 rows (up to 50 datasets) with a temperature, a pressure, and x₁, plus optional y₁,dataset, and uncertainties. Temperatures can be in K, °C, or °F; pressures in Pa, kPa, MPa, bar, atm, mmHg, torr, or psia; compositions as fractions or percentages. Unknown columns are rejected.tests,vapor_model,classification,criteria, andpoint_test_order(Legendre order 1–5, orauto).emit_policy: what the chainabledata.csvkeeps:all(default),drop_flagged_points, ordrop_failed_datasets.
Tables can be rows, CSV or JSON text, an uploaded file, or an artifact from an earlier step.
Outputs
| File | Contents |
|---|---|
data.csv | temperature_k, pressure_pa, x1, y1: the VLE Parameter Regression input, filtered by emit_policy |
diagnostics.csv | One row per point: normalized values, Pˢᵃᵗ, activity coefficients, Gᴱ/RT, Van Ness residuals, and flags |
summary.csv | One row per dataset and test: eligibility, statistic, threshold, and pass, fail, or not_applicable |
report.json | Component and vapor-pressure sources, unit conversions, criteria, warnings, and the assumptions behind each result |
In a workflow, connect data (not diagnostics) to VLE Parameter Regression.
Not covered
- Ternary and larger systems, liquid–liquid equilibria, and electrolytes.
- Polar or associating virial terms, the Poynting correction, and cubic equation-of-state vapor models.
- Bundled licensed datasets such as DECHEMA or DDB. Bring your own data.