💧
OLI API
  • Welcome to the OLI API documentation
  • Basic workflow
  • Authentication
    • Bearer Token
    • API Keys
      • Generate a Key
      • List All Keys
      • Delete a Key
  • Generating chemistry model files
    • ChemBuilder API
      • Getting Started with ChemBuilder
        • Set Thermodynamic Framework
        • Include Private Databanks
        • Include Inflows
          • Include Assays
          • Include Pseudocomponent
        • Choose Phases
        • Specify Model Name
        • Choose Redox
        • Choose Solids
        • Add Kinetics
      • ChemBuilder Query
        • Species Query
        • Redox Query
        • Solid Phase Query
        • Databank Query
        • Kinetics Query
        • Query Output Results
      • Supporting Information for ChemBuilder
        • Add Comment
        • "enabled" Keyword
        • ChemBuilder Errors
    • Chemistry Wizard
  • Uploading chemistry model files
  • Get list of uploaded files
  • Quickstart example: Python
  • Known issues and Limitations
  • OLI ENGINE API
    • Main methods
      • API call blueprint
      • Chemistry information
      • Isothermal flash
      • Isenthalpic flash
      • Bubble point flash
      • Dew point flash
      • Vapor amount flash
      • Vapor fraction flash
      • Isochoric flash
      • set pH flash
      • Precipitation point flash
      • Autoclave
      • Custom flash
      • Corrosion contact surfaces
      • Corrosion rates
      • Water analysis
  • Additional methods
    • Flash history - Chemistry model
    • Result - by jobId
    • delete file
    • cancel run
  • Inflows input
  • Optional inputs
  • Kinetic calculation inputs
  • Kinetic calculation outputs
  • Input units
  • User defined output unit set
  • Survey calculation
  • Stream output
  • Error/Warning output
  • Definition of terms
  • OLI Process API
    • Uploading a Process API package
      • Creating a Process API package
    • Get list of all uploaded ProcessAPI packages
    • Get input specs for Process API package
    • Get output specs for ProcessAPI package
    • Run a Process API calculation
    • Get calculation status and results
  • Deleting a process package
  • Undelete a process package
  • Process API input specification
    • "data" object
      • "flowsheet" object
        • "chemical-info" object
        • "general-info" object
        • "properties" object
        • "units_set_info" object
  • OLI ScaleChem API
    • Uploading chemistry model files for ScaleChem API
    • Get list of uploaded ScaleChem model files
    • Main methods
      • Brine analysis
      • Gas analysis
      • Oil analysis
      • Mixer calculation
      • Scale scenario
Powered by GitBook
On this page
  • JSON input (example)
  • Units in batch systems
  • Units in flowing systems
  • Unit consistency between inflows and total amount
  • Normalize option (optional)
  • Survey Calculation

Was this helpful?

Inflows input

This page explains the params.inflows object that is required as an input for most flash calculations.

JSON input (example)

    "params": {
        ...<snip>...
        "inflows": {
            "unit": "mol",
            "values": {
                "H2O": 50.0,
                "BENZENE": 10.0,
                "CH4": 20.0,
                "NAOH": 35.0
            },
            "totalAmount": {
                "value": 3402.68,
                "unit": "g"
            }
        }
        ...<snip>...
    }

params.inflows

type

description

unit

string

unit for inflows

values

object

the amount of each inflow specified as "inflow_name": number. Species with zero amount need not be specified.

totalAmount

optional total stream amount

params.inflows.totalAmount is optional. However, when it's specified and conflicts with the summation of inflows, the totalAmount takes priority, and params.inflows.values are normalized proportionally.

Units in batch systems

unit types

units

moles

mol, nmol, kgmol, nanomol, lbmol, micromol, µmol, mmol, (mol/100)

mole fraction

mol/mol, mole %, ppm (mole)

mass

mg, kg, nanog, lb, µg, microg, ng, g, tonne, (g/100)

mass fraction

g/g, mass %, ppm (mass)

params.inflows.unit can be specified from any units as listed in the above table.

Units in flowing systems

Unit types of moles and mass can be specified in flowing system by dividing a time unit, i.e. "mol/hr". Available time units are "s", "min", "hr", "day", "yr".

Unit consistency between inflows and total amount

Unit for params.inflows.totalAmount needs to be consistent with inflows as explained below:

params.inflows.unit

params.inflows.totalAmount.unit

moles or mass in batch system

Optional. If specified, it can be any moles or mass units in batch system. And params.inflows will be scaled to match the total amount.

moles or mass in flowing system

Optional. If specified, it can be any moles or mass units in flowing system. And params.inflows will be scaled to match the total amount.

mole fraction or mass fraction

Optional. If specified, it can be any moles or mass units in batch or flowing system. If not specified, a total amount of 100 mole in batch system will be assumed.

Normalize option (optional)

    "params": {
        ...<snip>...
        "inflows": {
            "unit": "mole %",
            "values": {
                "H2O": 50.0,
                "BENZENE": 10.0,
                "CH4": 20.0,
                "NAOH": 35.0
            },
            "normalize": {
                "option": "prorate"
            }
        }
        ...<snip>...
    }    
    "params": {
        ...<snip>...
        "inflows": {
            "unit": "mole %",
            "values": {
                "H2O": 50.0,
                "BENZENE": 10.0,
                "CH4": 20.0,
                "NAOH": 35.0
            },
            "normalize": {
                "option": "makeup",
                "makeupComponent": "CH4"
            }
        }
        ...<snip>...
    }   

When specified from mole fraction units, inflow values will be normalized if they don't add up to 100%. Different normalization options could be specified as below:

params.inflows.normalize.option
description

"prorate"

All specified inflow values will be prorated

"makeup"

One inflow component will be added or removed for normalization. params.inflows.normalize.option.makeupComponent specifies the inflow name.

"prorate" option is used by default if params.inflows.normalize object is not specified.

Survey Calculation

supported params.surveyInputs[{}].field

"/params/inflows/values/<InflowName>"

"/params/inflows/totalAmount/value"

When specific inflow value(s) is changed in the survey calculation and the total amount is given, the total amount will not be modified in survey input unless it's specified. In other words, the survey calculation will only overwrite the specified value field(s) to construct a series of JSON inputs to perform single-point calculations.

Previouscancel runNextOptional inputs

Last updated 1 year ago

Was this helpful?

Survey calculation is supported for the variables below. Please refer to for explained input schema.

Survey calculation
valueObject