💧
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
  • set pH
  • Request payload
  • Response (status = PROCESSED)
  • Survey Calculation

Was this helpful?

  1. OLI ENGINE API
  2. Main methods

set pH flash

This function calculates the equilibrium solution at a specified pH by varying inflows of acid and/or base titrant(s).

set pH

POST https://api.olisystems.com/engine/flash/{dbs_file_id}/setph

fix the pH of the aqueous phase by varying acid/base amount

Headers

Name
Type
Description

Authorization

string

Bearer {access_token}

Content-Type

string

application/json

{
	"code": 200,
	"data": {
		"file_id": "dee854a6-59db-487d-ad08-a20dee691133",
		"jobId": "f6b3375e-cd0f-4ace-a5ee-71e047b76754",
		"resultsLink": "https://devapi.olisystems.com/result/flash/f6b3375e-cd0f-4ace-a5ee-71e047b76754?context=engine",
		"status": "IN PROGRESS"
	},
	"message": "Process execution started Successfully",
	"status": "SUCCESS"
}

Request payload

{
    "params": {
        "temperature": {
            "value": 30.0,
            "unit": "°C"
        },
        "pressure": {
            "value": 1.5,
            "unit": "atm"
        },
        "targetPH": {
            "value": 8.0,
            "unit": ""
        },
        "pHAcidTitrant": "HCL",
        "pHBaseTitrant": "NAOH",
        "inflows": {
            "unit": "mol",
            "values": {
                "H2O": 50.0,
                "CO2": 10.0,
                "NACL": 20.0,
                "BENZENE": 10.0,
                "HCL": 0.0,
                "NAOH": 0.0
            }
        }
    }
}

params

type

description

temperature

pressure

targetPH

value

specified target pH of the solution

pHAcidTitrant

string

inflow species name for pH acid titrant

pHBaseTitrant

string

inflow species name for pH base titrant

One or both of params.pHAcidTitrant and params.pHBaseTitrant need to be specified. If only one titrant is to be specified, it is the same to specify it as params.pHAcidTitrant or params.pHBaseTitrant regardless of the chemical nature of the solvent.

Response (status = PROCESSED)

{
    "code": 200,
    "data": {
        "result": {
            "addedTitrants": [
                {
                    "name": "NAOH",
                    "titrantType": "Base",
                    "unit": "mol",
                    "value": 9.998955177015539
                }
            ],
            ...<snip>...
        }
    }, 
    "message": "Results returned successfully", 
    "status": "PROCESSED"
}

type

description

titrantType

string

titrant type, i.e. "Acid" or "Base". This field will be missing if only one titrant is specified.

name

string

inflow name of the titrant

value

number

added titrant amount

unit

string

unit of added titrant amount

Survey Calculation

supported params.surveyInputs[{}].field

"/params/temperature/value"

"/params/pressure/value"

"/params/targetPH/value"

PreviousIsochoric flashNextPrecipitation point flash

Last updated 3 years ago

Was this helpful?

specified or initial guess temperature with

specified or initial guess pressure with

in addition to the inputs shown above some optional properties may also be specified. They can be viewed

The output of this calculation is the which is common result output for all OLI's flash calculations or an . In addition to this output the result also contains the amounts of added titrants and can be conveniently retrieved from the data.result.addedTitrants array

data.result.addedTitrants

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

here
stream output
error
Survey calculation
valueObject
unit
valueObject
unit
[ { } ]