Skip to main content
Docs

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

    Tools · Fluids & Thermodynamics

    VLE / Flash

    Multicomponent vapor–liquid phase equilibrium with a cubic equation of state and UNIFAC or NRTL activity coefficients — flashes, bubble and dew points, and Txy or Pxy diagrams.

    Updated October 1, 2026

    On this page

    Prices, workflows, and method papersOpen in the app

    VLE / Flash computes vapor–liquid phase equilibrium for mixtures of up to eight components: how a feed splits between vapor and liquid, the bubble and dew points, and Txy or Pxy diagrams for binaries. For gas-phase chemical equilibrium, use Cantera instead. It runs on CPU with the open-source thermo and chemicals libraries.

    How it works

    It uses a gamma–phi model: an activity-coefficient model for the liquid and a cubic equation of state for the vapor.

    • eos: peng-robinson (default) or srk, built from each component's critical temperature, critical pressure, and acentric factor.
    • activity_model: unifac (default) or nrtl. NRTL uses ChemSep interaction parameters unless you supply binary_params, fitted values of τᵢⱼ = a + b/T and α, usually from VLE Parameter Regression. Pairs you don't supply fall back to ChemSep.
    modeNeedsFinds
    tp_flashtemperature_k, pressure_paPhase split and compositions
    ph_flashpressure_pa, enthalpy_j_molTemperature and phase split
    bubble_t / dew_tpressure_paBubble or dew temperature
    bubble_p / dew_ptemperature_kBubble or dew pressure
    txypressure_paIsobaric diagram for a binary
    pxytemperature_kIsothermal diagram for a binary

    Inputs

    • components: up to 8, each with a name and mole fraction z (the fractions must sum to 1). Names (or CAS numbers) are looked up in the chemicals database; for anything it doesn't know, give tc_k, pc_pa, and omega together. A component table can come from an earlier step, such as Group-Contribution Properties estimates.
    • mode and the conditions it needs, from the table above.
    • diagram_points: grid size for txy and pxy (default 21, up to 51).
    • binary_params (NRTL only): rows of component_i, component_j, tau_a, tau_b, and alpha, for both directions of each pair.

    Outputs

    FileContents
    result.jsonThe equilibrium result: conditions, phase fractions, and the model used
    compositions.csvphase, component, z, x, y: the overall, liquid, and vapor compositions
    diagram.csvThe Txy or Pxy diagram (diagram modes only)

    Not covered

    • Chemical equilibrium (use Cantera) and process flowsheets.
    • PC-SAFT and other non-cubic equations of state.

    VLE Thermodynamic Consistency Checker to audit measured data, VLE Parameter Regression to fit NRTL parameters to it, and CoolProp for pure-fluid 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 / Flash vle-flash

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

    Payload

    Payload fields
    FieldTypeDescription
    moderequiredstring

    One of: "tp_flash", "ph_flash", "bubble_t", "bubble_p", "dew_t", "dew_p", "txy", "pxy"

    eosstring

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

    activity_modelstring

    One of: "unifac", "nrtl"

    temperature_knumber

    Limits: > 0

    pressure_panumber

    Limits: > 0

    enthalpy_j_molnumber
    diagram_pointsinteger

    Limits: ≥ 2, ≤ 51

    components[]requiredobject[]

    Limits: min items 1, max items 8

    components.namerequiredstring

    Limits: min length 1

    components.zrequirednumber

    Limits: > 0

    components.tc_knumber

    Limits: > 0

    components.pc_panumber

    Limits: > 0

    components.omeganumber
    binary_paramstableValue

    Example

    from cognichem_client import CogniChem
    
    client = CogniChem.from_env()  # reads COGNICHEM_API_KEY
    payload = {
        "mode": "tp_flash",
        "eos": "peng-robinson",
        "activity_model": "unifac",
        "temperature_k": 353.15,
        "pressure_pa": 101325,
        "components": [
            {
                "name": "ethanol",
                "z": 0.5,
                "tc_k": 513.9,
                "pc_pa": 6148000,
                "omega": 0.645,
            },
            {
                "name": "water",
                "z": 0.5,
                "tc_k": 647.1,
                "pc_pa": 22064000,
                "omega": 0.344,
            },
        ],
    }
    
    estimate = client.jobs.estimate(job_type="vle-flash", payload=payload, resource="cpu")
    print(f"Reserves ${estimate.cost:.2f}")
    
    job = client.jobs.submit(
        job_name="my-vle-flash-run",
        job_type="vle-flash",
        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