💧
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
  • Request payload
  • External streams
  • Inlet specification
  • Saturator option (optional)
  • Additional input
  • Response (status = PROCESSED)
  • Survey Calculation

Was this helpful?

  1. OLI ScaleChem API
  2. Main methods

Mixer calculation

This function performs a mixer calculation to combine external streams and flash at an isothermal condition.

Request payload

{
    "method": "scalechem.mixerCalculation",
    "params": {
        "name": "mixer",
        "chemistryModel": "mixerChemistry",
        "externalStreams": [...<snip>...],
        "inletInputs": [...<snip>...],
        "temperature": {
            "unit": "°C",
            "value": 50
        },
        "pressure": {
            "unit": "bar",
            "value": 1.1
        }
    }
}

params

type

description

name

string

name of output stream

chemistryModel

string

externalStreams

array of objects

inletInputs

array of objects

temperature

pressure

inheritOptions

boolean

External streams

External streams can be calculated by three types of inputs at isothermal conditions: 1) ionic species composition, 2) inflow species composition, 3) mixer calculation to combine calculated external stream.

{
    "method": "scalechem.mixerCalculation",
    "params": {
        ...<snip>...
        "externalStreams": [
            {
                "name": "brine example",
                "chemistryModel": "brineChemistry",
                "waterAnalysisInputs": [...<snip>...]
            },
            {
                "name": "another stream",
                ...<snip>...
            },
            ...<snip>...
        ]
    }
}

{
    "method": "scalechem.mixerCalculation",
    "params": {
        ...<snip>...
        "externalStreams": [
            {
                "name": "inflow example",
                "chemistryModel": "inflowChemistry",
                "inflows": {...<snip>...},
                "temperature": {
                    "value": 50.0,
                    "unit": "°C"
                },
                "pressure": {
                    "value": 1.5,
                    "unit": "atm"
                },
                "saturateWithH2O": "gas"
            },
            {
                "name": "another stream",
                ...<snip>...
            },
            ...<snip>...
        ]
    }
}
{
    "method": "scalechem.mixerCalculation",
    "params": {
        ...<snip>...
        "externalStreams": [
            {
                "name": "example stream 1",
                ...<snip>...
            },
            {
                "name": "example stream 2",
                ...<snip>...
            },
            {
                "name": "mixer example",
                "chemistryModel": "externalMixerChemistry",
                "inletInputs": [
                    {
                        "streamName": "example stream 1",
                        "streamType": "brine",
                        "totalAmount": {
                            "value": 1,
                            "unit": "bbl/day"
                        }
                    },
                    {
                        "streamName": "example stream 2",
                        ...<snip>...
                    }
                ],
                "temperature": {
                    "value": 50.0,
                    "unit": "°C"
                },
                "pressure": {
                    "value": 1.5,
                    "unit": "atm"
                }
            },
            {
                "name": "another stream",
                ...<snip>...
            },
            ...<snip>...
        ]
    }
}

Common external stream inputs

params.externalStreams[{}]

type

description

name

string

external stream name

chemistryModel

string

optional, chemistry model file (dbs) name for external stream

"chemistryModel" input is optional. The chemistry model file of the mixer calculation will be used if this input is missing.

External stream from ionic input

External stream from inflow input

params.externalStreams[{}]

type

description

inflows

object

temperature

pressure

saturateWithH2O

string

optional, could be specified as "gas" or "oil", which will add H2O to the system to saturate the corresponding phase with water

External stream from mixer calculation

params.externalStreams[{}]

type

description

inletInputs

array of objects

temperature

pressure

External streams are calculated in the order of the input array. Any mixer calculation specified in external streams can combine external streams that are already calculated.

Any mixer calculation in external streams can be treated as an inlet for followed mixer calculations. In other words, mixer calculations can be specified cascadingly in external streams.

Inlet specification

{
    "method": "scalechem.mixerCalculation",
    "params": {
        ...<snip>...
        "inletInputs": [
            {
                "streamName": "external stream 1",
                "streamType": "brine",
                "totalAmount": {
                    "value": 1.0, 
                    "unit": "bbl/day"
                }
            },
            {
                "streamName": "external stream 2",
                ...<snip>...
            },
            ...<snip>...
        ]
    }
}

params.inletInputs[{}]

type

description

streamName

string

streamType

string

stream type, this determines target phases to be combined in mixer

totalAmount

inlet stream flow rate with unit explained below

automaticFlowRate

boolean

optional, when speciefied as true, total flow rate specified in the external stream will be used, then "totalAmount" is not needed

Inlet stream types

params.inletInputs[{}].streamType

phases to be combined

phase property to be used in calculating flow rate

brine

liquid-1

liquid-1

oil

vapor, liquid-2

liquid-2

gas

vapor, liquid-2

vapor

whole fluid

liquid-1, liquid-2, vapor

all phases

params.inletInputs[{}].streamType

params.inletInputs[{}].totalAmount.unit numerators

brine, whole fluid

bbl, L, ml, cm3, m3, E3m3, E6m3, ft3, Mft3, MMft3, gal, MMgal

oil

std bbl, std m3, std L, bbl, m3, L

gas

std MMft3, std Mft3, std ft3, std E3m3, std m3, std L, MMft3, Mft3, ft3, E3m3, m3, L

params.inletInputs[{}].totalAmount.unit is flow rate unit with volumetric units as shown above divide by a time unit, i.e. bbl/day. Available time units are s, min, hr, day, yr.

Saturator option (optional)

This option can be specified to saturate one or more solid species by varying the inflow species.

{
    "method": "scalechem.mixerCalculation",
    "params": {
        ...<snip>...
        "saturatorOptions": [
            {
                "mineralToSaturate": "BASO4PPT",
                "inflowToVary": "BASO4"
            },
            ...<snip>...
        ]
    }
}

params.saturatorOptions[{}]

type

description

mineralToSaturate

string

inflowToVary

string

Additional input

Response (status = PROCESSED)

{
    "code": 200,
    "result": {
       "external stream 1": {...<snip>...},
       "external stream 2": {...<snip>...},
       ...<snip>...,
       "mixer outlet stream": {...<snip>...}
    },
    "message": "Results returned successfully", 
    "status": "PROCESSED"
}

Survey Calculation

supported params.surveyInputs[{}].field

"/params/temperature/value"

"/params/pressure/value"

"/params/inletInputs/i/totalAmount/value" where i is the index (0 based) of the params.inletInputs array of objects

PreviousOil analysisNextScale scenario

Last updated 1 year ago

Was this helpful?

for mixer calculation

specified temperature with

specified pressure with

Optional, option to apply "" and "" to calculation objects in "externalStreams". Default is false

All inputs are specified as an array of objects in "waterAnalysisInputs", which are explained incalculation.

specified temperature with

specified pressure with

name, type, and flow rate for combining stream, as explained in

specified temperature with

specified pressure with

name of the to be combined in mixer

"automaticFlowRate" can only be specified true when the corresponding external stream is calculated in .

solid species to be saturated, using "trueName" for species with solid phase. See .

varying inflow species, using "baseName" for inflows. See .

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

The "result" contains all for each external stream and the final mixer outlet stream by their names specified in the input.

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

here
stream outputs
Survey calculation
valueObject
unit
valueObject
unit
inflow input
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
chemistry information
chemistry information
inputs for external streams
flow rate specifications for mixer inlet streams
inlet specification
external stream
optionalProperties
unitSetInfo
flowing system
chemistry model file (dbs) name
water analysis