💧
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)
  • Response (status = PROCESSED)

Was this helpful?

Survey calculation

In comparison to single-point calculation, survey calculation allows users to perform a series of calculations by varying one or more input variables.

JSON input (example)

Here two isothermal flash inputs are taken as examples to illustrate the survey calculation input.

{
    "params": {
        "temperature": {
            "value": 30.0,
            "unit": "°C"
        },
        "pressure": {
            "value": 1.5,
            "unit": "atm"
        },
        "inflows": {
            "unit": "mol",
            "values": {
                "H2O": 50.0,
                "NACL": 20.0
            }
        },
        "surveyInputs": [
            {
                "variableField": "/params/temperature/value",
                "values": [30.0, 35.0, 40.0, 45.0, 50.0]
            }
        ],
        "surveyOutputsByField": [
            {
                "field": "/solid/trueConcentration/values/NACL",
                "defaultValue": 0
            }
        ]
    }
}
{
    "params": {
        "temperature": {
            "value": 30.0,
            "unit": "°C"
        },
        "pressure": {
            "value": 1.5,
            "unit": "atm"
        },
        "inflows": {
            "unit": "mol",
            "values": {
                "H2O": 50.0,
                "NACL": 20.0
            }
        },
        "surveyInputs": [
            {
                "variableField": "/params/temperature/value",
                "values": [30.0, 30.0, 40.0, 40.0, 50.0, 50.0]
            },
            {
                "variableField": "/params/pressure/value",
                "values": [1.0, 1.5, 1.0, 1.5, 1.0, 1.5]
            }
        ]
    }
}

type

description

variableField

string

values

array of numbers

series of survey variable values for calculation

The survey calculation runs the series of input JSON by overwriting the survey variable values.

When an input variable is specified as a survey variable, e.g. "/params/temperature/value", the source input JSON field, params.temperature.value, is optional as it will be overwritten by the survey calculation inputs. However, params.temperature.unit is still required.

When multiple survey variables are specified, the values in each params.surveyInputs[{}].values array are updated simultaneously. When the arrays are specified in different sizes, the last value of the shorter array(s) will be used to run the survey calculation until the longest array is completed.

Specific stream output can be shown in an array for user's convinience.

params.surveyOutputsByField

type

description

field

string

defaultValue

number

optional, default value if specified field in stream output does not exist in specific point

Response (status = PROCESSED)

{
    "code": 200,
    "result": {
        "surveyOutputs": [
            {
                "phases": {...<snip>...},
                "phaseSummary": [...<snip>...],
                "total": {...<snip>...}
            },
            {...<snip>...},
            {...<snip>...},
            {...<snip>...}
        ]
    },
    "surveyOutputsByField": [
    {
        "field": "/solid/trueConcentration/values/NACL",
        "results": [0.0, 1.35, 1.51, 1.7],
        "presence": [true, true, true, true]
    }],
    "message": "Results returned successfully", 
    "status": "PROCESSED"
}

type

description

field

string

results

array of numbers

specific values in the stream outputs along the survey calculations

presence

array of boolean

presence of the specific output. False if the individual calculation inside the survey did not converge. Also false if the specific field does not exist in stream output, unless the "defaultValue" is provided in survey inputs.

PreviousUser defined output unit setNextStream output

Last updated 1 year ago

Was this helpful?

params.surveyInputs

to the survey variable in input schema

to the stream output of interest in the survey calculation

result.surveyOutputs list an array of objects as the full of each survey calculation result. result.surveyOutputsByField lists the specific output in one array along the survey calculations.

result.surveyOutputsByField

to the stream output of interest in the survey calculation, as specified in input

stream output
[ { } ]
JSON pointer
JSON pointer
[{}]
JSON pointer