Skip to main content
Docs

Search guides and API endpoints, for example “Idempotency-Key” or “submit job”.

    Tools · Fluids & Thermodynamics

    VLE Parameter Regression

    Fit binary NRTL interaction parameters to measured vapor–liquid equilibrium data, ready to use in VLE / Flash.

    Updated October 1, 2026

    On this page

    Prices, workflows, and method papersOpen in the app

    VLE Parameter Regression fits binary NRTL interaction parameters to your measured vapor–liquid equilibrium data, so VLE / Flash can calculate with fitted parameters instead of tabulated or missing ones. Its params table is VLE / Flash's binary_params input, so the two chain directly in a workflow. It runs on CPU.

    How it works

    The model is the same as VLE / Flash's: an NRTL liquid with τᵢⱼ = aᵢⱼ + bᵢⱼ/T and a single symmetric α, plus a Peng–Robinson or SRK vapor. Feeding the fitted parameters back into VLE / Flash reproduces the fit.

    • What's fitted. Any of a12, a21, b12, b21, and alpha. The default fits b12 and b21 with α fixed at 0.3. Parameters you don't fit stay at initial_guess (0 by default) or alpha.
    • Objective. Bounded least squares on bubble-point residuals: temperature for isobaric data or pressure for isothermal data (residual_basis: auto decides), plus y₁ where the row has it.
    • Bounds. aᵢⱼ between −100 and 100, bᵢⱼ between −20,000 and 20,000 K, and α between 0.001 and 1.
    • Uncertainty. Asymptotic standard errors at the solution, or none when there are too few points.

    Warnings flag failed points, missing y₁, a solver that didn't converge, and poor fits (RMSE above 5 K or 10 % of P), which usually mean wrong units or the wrong components.

    Inputs

    • components: exactly two, by name or smiles, with optional tc_k, pc_pa, and omega.
    • data: up to 200 rows of temperature_k, pressure_pa, x1, and optional y1, with at least one more row than the number of fitted parameters (and at least 3). Units are in the column names; convert other units first, or run the data through the VLE Thermodynamic Consistency Checker, which converts them and emits this exact table.
    • eos, residual_basis, fit_parameters, alpha, and initial_guess.

    Outputs

    FileContents
    params.csvOne row per direction: component_i, component_j, tau_a, tau_b, alpha (VLE / Flash's binary_params)
    params.jsonThe fitted parameters as NRTL matrices, fit statistics, solver status, and warnings
    residuals.csvMeasured and calculated values and residuals per point, with ok or failed
    result.jsonA summary: basis, parameters, standard errors, and RMSE

    Not covered

    • Liquid–liquid equilibrium, ternary or larger systems, and UNIFAC group parameters.
    • Cubic-equation-of-state kᵢⱼ: VLE / Flash builds its vapor from critical properties alone, so a fitted kᵢⱼ wouldn't change its results.

    VLE Thermodynamic Consistency Checker, VLE / Flash, and Group-Contribution Properties for critical properties.

    Run it from the API

    Submit with Submit a job and the job_type below. Price it first with Estimate job reservation cost: submitting reserves that amount from your wallet, and the charge settles at the actual runtime.

    VLE Parameter Regression vle-regress

    Job type
    vle-regress
    Hardware
    cpu (default)
    Typical runtime
    5 min on CPU

    Payload

    Payload fields
    FieldTypeDescription
    componentsrequiredtableValue
    datarequiredtableValue
    eosstring

    One of: "peng-robinson", "srk"

    residual_basisstring

    One of: "auto", "temperature", "pressure"

    fit_parameters[]string[]

    One of: "a12", "a21", "b12", "b21", "alpha"Limits: min items 1, max items 5

    alphanumber

    Limits: > 0, ≤ 1

    initial_guessobject
    initial_guess.a12number
    initial_guess.a21number
    initial_guess.b12number
    initial_guess.b21number

    Example

    from cognichem_client import CogniChem
    
    client = CogniChem.from_env()  # reads COGNICHEM_API_KEY
    payload = {
        "components": [
            {
                "name": "ethanol",
                "tc_k": 513.9,
                "pc_pa": 6148000,
                "omega": 0.645,
            },
            {
                "name": "water",
                "tc_k": 647.1,
                "pc_pa": 22064000,
                "omega": 0.344,
            },
        ],
        "eos": "peng-robinson",
        "residual_basis": "temperature",
        "fit_parameters": ["b12", "b21"],
        "alpha": 0.2937,
        "data": [
            {
                "temperature_k": 363.615,
                "pressure_pa": 101325,
                "x1": 0.05,
                "y1": 0.31983,
            },
            {
                "temperature_k": 359.325,
                "pressure_pa": 101325,
                "x1": 0.1,
                "y1": 0.44341,
            },
            {
                "temperature_k": 355.668,
                "pressure_pa": 101325,
                "x1": 0.2,
                "y1": 0.54359,
            },
            {
                "temperature_k": 354.109,
                "pressure_pa": 101325,
                "x1": 0.3,
                "y1": 0.59014,
            },
            {
                "temperature_k": 353.14,
                "pressure_pa": 101325,
                "x1": 0.4,
                "y1": 0.62517,
            },
            "… 6 more",
        ],
    }
    
    estimate = client.jobs.estimate(job_type="vle-regress", payload=payload, resource="cpu")
    print(f"Reserves ${estimate.cost:.2f}")
    
    job = client.jobs.submit(
        job_name="my-vle-regress-run",
        job_type="vle-regress",
        payload=payload,
        resource="cpu",
    )
    status = client.jobs.wait(job.process_id)
    if status.status == "completed":
        client.jobs.result(job.process_id, save_path=".")

    Sample data from the job catalog; long values are shortened here. Each job_name must be unique among your jobs.

    Workflow inputs

    • Table (list) · optionalCSV, JSON
    • Table (list) · optionalCSV, JSON

    Workflow outputs

    • ArchiveZIP
    • TableCSV
    • TableCSV