Invntr
Source

All instruments

vle_flash

Vapour-liquid equilibrium of an ideal mixture (Raoult's law, Antoine vapour pressures given as inputs per component): bubble and dew pressure at a temperature, bubble and dew temperature at a pressure, isothermal flash by Rachford-Rice at both, relative volatility; P-x-y and T-x-y csv for a binary.

Field
Chemistry
Version
0.1.0
Runs as
Compiled (Rust)
Typical run
0.05 s

Compiled from source: run sh packs/install.sh once before admitting it.

Known answers it must pass

Admission replayvle_flash 0.1.0 · files 475164b2c2b9…33bc
  1. r0001pure component, log10 Antoine in kPa and K (A=4, B=600, C=0) at 100 kPa: closed form T = B/(A - log10 P) = 300 K exactly, bubble = dew (rel 10⁻⁹: bisection to neighbouring floats)passed

    bubble_temperature_K300 ± 3 × 10⁻⁷300lockedunder 0.01 % of the tolerance used
    dew_temperature_K300 ± 3 × 10⁻⁷300lockedunder 0.01 % of the tolerance used
    boiling_range_K0 ± 10⁻⁹0lockedunder 0.01 % of the tolerance used
    pure_boiling_temperature_K.0= 300, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  2. r0002pure component, log10 Antoine in mmHg and degC (A=7, B=1500, C=200) at 101.325 kPa = 760 mmHg (exact by definition): closed form T = B/(A - log10 760) - C + 273.15 = 437.299579924097 K (rel 10⁻⁹)passed

    bubble_temperature_K437.3 ± 4.4 × 10⁻⁷437.3lockedunder 0.01 % of the tolerance used
    dew_temperature_K437.3 ± 4.4 × 10⁻⁷437.3lockedunder 0.01 % of the tolerance used
    boiling_range_K0 ± 10⁻⁹0lockedunder 0.01 % of the tolerance used
  3. r0003binary at 300 K with Psat = 100 and 10 kPa by construction (10^(4-600/300), 10^(4-900/300)), z = [0.4, 0.6]: Raoult P_bubble = 46 kPa, y₁ = 40/46 = 20/23; P_dew = 1/(0.4/100 + 0.6/10) = 15.625 kPa, x₁ = 0.0625; α = 10 (closed forms, rel 10⁻⁹)passed

    psat_kPa.0= 100, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    psat_kPa.1= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    bubble_pressure_kPa46 ± 4.6 × 10⁻⁸46lockedunder 0.01 % of the tolerance used
    y_at_bubble_pressure.0= 0.869565, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    dew_pressure_kPa15.625 ± 1.6 × 10⁻⁸15.625lockedunder 0.01 % of the tolerance used
    x_at_dew_pressure.0= 0.0625, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    relative_volatility.0= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  4. r0004binary flash at 300 K, 25 kPa (K = 4 and 0.4): lever-rule closed form x₁ = (1 - K₂)/(K₁ - K₂) = 1/6, y₁ = 2/3, b = (z₁ - x₁)/(y₁ - x₁) = 7/15; z = (1 - b) x + b y (rel 10⁻⁹; balance abs 10⁻¹²)passed

    phase= two-phasetwo-phaselockedexact match
    vapor_fraction0.466667 ± 4.7 × 10⁻¹⁰0.466667lockedunder 0.01 % of the tolerance used
    x.0= 0.166667, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    y.0= 0.666667, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    k_values.0= 4, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    material_balance_residual0 ± 10⁻¹²5.55112 × 10⁻¹⁷lockedunder 0.01 % of the tolerance used
  5. r0005binary flash at its own bubble pressure (300 K, 46 kPa from the closed form above): vapour fraction 0, incipient vapour y₁ = 20/23 (abs 10⁻⁹ on b, rel 10⁻⁹ on y₁)passed

    vapor_fraction0 ± 10⁻⁹0lockedunder 0.01 % of the tolerance used
    y.0= 0.869565, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  6. r0006binary flash at its own dew pressure (300 K, 15.625 kPa from the closed form above): vapour fraction 1, incipient liquid x₁ = 0.0625 (abs 10⁻⁹ on b, rel 10⁻⁹ on x₁)passed

    vapor_fraction1 ± 10⁻⁹1lockedunder 0.01 % of the tolerance used
    x.0= 0.0625, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  7. r0007binary at 50 kPa with equal B (constant α = 10^(A₁-A₂) = 10), z = [0.5, 0.5]: closed forms T_bubble = B/log10((x₁ 10^A₁ + x₂ 10^A₂)/P) = 600/log10(110), T_dew = -B/log10(P (y₁ 10^-A₁ + y₂ 10^-A₂)) = -600/log10(0.0275), y₁ = 10/11, x₁ = 1/11 (rel 10⁻⁹)passed

    bubble_temperature_K293.917 ± 2.9 × 10⁻⁷293.917lockedunder 0.01 % of the tolerance used
    dew_temperature_K384.451 ± 3.8 × 10⁻⁷384.451lockedunder 0.01 % of the tolerance used
    y_at_bubble_temperature.0= 0.909091, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    x_at_dew_temperature.0= 0.090909, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    relative_volatility_at_bubble.0= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    relative_volatility_at_dew.0= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  8. r0008ternary Rachford-Rice, exact by construction: Psat = 100, 10, 1 kPa at 300 K, P = 10 kPa (K = 10, 1, 0.1); x = (0.05, 0.45, 0.5), y = K x = (0.5, 0.45, 0.05), b = 0.25 give z = (1-b) x + b y = (0.1625, 0.45, 0.3875); RR is monotonic so b is unique (rel 10⁻⁹)passed

    phase= two-phasetwo-phaselockedexact match
    vapor_fraction0.25 ± 2.5 × 10⁻¹⁰0.25lockedunder 0.01 % of the tolerance used
    x.0= 0.05, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    x.2= 0.5, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    y.0= 0.5, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    y.2= 0.05, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    material_balance_residual0 ± 10⁻¹²4.16334 × 10⁻¹⁷lockedunder 0.01 % of the tolerance used
8 of 8 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.

Inputs

NameUnitDefaultMeaning
componentsOne object per component: {name, A, B, C, T_min, T_max}, with log P = A - B / (T + C) in the convention set by antoine_log, antoine_pressure_unit and antoine_temperature_unit. T_min and T_max (optional) are the validity range of the fit, in the Antoine temperature unit. Coefficients are the caller's data: nothing is tabulated in the instrument.
z1Overall mole fractions, one per component in the same order, summing to 1 (within 10⁻⁶, then normalised). May be left out for a single component.
temperature_KKTemperature. Alone: bubble and dew pressure. With pressure_kPa: also the isothermal flash.
pressure_kPakPaAbsolute pressure (1 atm = 101.325 kPa). Alone: bubble and dew temperature. With temperature_K: also the isothermal flash.
antoine_loglog10log10 for log10(P) = A - B/(T + C), ln for ln(P) = A - B/(T + C).
antoine_pressure_unitmmHgPressure unit the coefficients were fitted in. mmHg is taken as 1/760 atm (the torr; the conventional mmHg differs by 1.4 × 10⁻⁷ relative).
antoine_temperature_unitCTemperature unit the coefficients were fitted in: C for degrees Celsius, K for kelvin.
reference_component1Position (1-based) of the component relative volatilities are taken against: alpha_i = Psat_i / Psat_ref. Default: the last component.
curve_points141Points on the binary P-x-y and T-x-y curves.

Readings

NameUnitMeaning
modeat temperature, at pressure, or flash at T and P
namescomponent names, in input order
n_components1
z1
psat_kPakPapure vapour pressures at temperature_K
bubble_pressure_kPakPasum x_i Psat_i, with x = z
y_at_bubble_pressure1
dew_pressure_kPakPa1 / sum (y_i / Psat_i), with y = z
x_at_dew_pressure1
relative_volatility1Psat_i / Psat_ref at relative_volatility_at_K
relative_volatility_at_KK
bubble_temperature_KK
y_at_bubble_temperature1
dew_temperature_KK
x_at_dew_temperature1
boiling_range_KKdew minus bubble temperature
pure_boiling_temperature_KK
relative_volatility_at_bubble1
relative_volatility_at_dew1
k_values1K_i = Psat_i(T) / P
phasetwo-phase, bubble point, dew point, subcooled liquid, superheated vapour, or saturated (pure component on its boiling line: vapour fraction null)
vapor_fraction1Rachford-Rice vapour fraction b (molar)
x1liquid mole fractions; null for a superheated vapour
y1vapour mole fractions; null for a subcooled liquid
material_balance_residual1max_i |z_i - (1 - b) x_i - b y_i|
sum_x1
sum_y1
componentsper component: z, psat_kPa, boiling_temperature_K, relative_volatility, k_value, x, y
antoine_in_rangetrue when every computed temperature is inside the given Antoine ranges; null when no range was given
warningstemperatures outside a given Antoine range
filescomponents.csv; pxy.csv (binary, at T); txy.csv (binary, at P)

Try the call

Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.

Terminal
MCP call