💧
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
  • corrosion rates
  • Request payload
  • Corrosion parameters
  • Response (status = "PROCESSED")
  • Survey Calculation

Was this helpful?

  1. OLI ENGINE API
  2. Main methods

Corrosion rates

This function calculates the corrosion rates of a given metal contact surface under a specified solution condition.

This calculation is currently only supported for the AQ thermodynamic framework

corrosion rates

POST https://api.olisystems.com/engine/flash/{dbs_file_id}/corrosion-rates

calculate the corrosion rate

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://api.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": 40.0,
            "unit": "°C"
        },
        "pressure": {
            "value": 1.5,
            "unit": "atm"
        },
        "calculationType": "isothermal",
        "inflows": {
            "unit": "mol",
            "values": {
                "H2O": 50.0,
                "NACL": 0.01,
                "HNO3": 1,
                "FEEL": 0.0
            },
            "totalAmount":
            {
                "value": 51.01,
                "unit": "mol"
            }
        },
        "corrosionParameters":
        {
            "contactSurface": "Carbon steel G10100 (generic)",
            "flowType": "static"
        }
}

params

type

description

temperature

pressure

calculationType

string

single point flash calculation type of solution, e.g. isothermal

params.calculationType currently only supports the "isothermal" type.

Corrosion parameters

params.corrosionParameters

type

description

contactSurface

string

flowType

string

flow configuration

Options for flowType

params.corrosionParameters.flowType

description

static

mimics static flow

pipeFlow

mimics pipe flow

rotatingDisk

several parallel disks that are rotating

rotatingCylinder

several parallel cylinders that are rotating

completeAgitation

liquid phase is completely agitated and no mass transfer limitations apply

definedShearStress

define the stress of applied force over material

approximateMultiPhaseFlow

mimics an approximate multi-phase flow

Additional corrosion parameters may be required for different flow types, which are explained as below

Additional parameters if flowType is pipeFlow

{
    "params": {
        ...<snip>...,
        "corrosionParameters":
        {
            "contactSurface": "Carbon steel G10100 (generic)",
            "flowType": "pipeFlow",
            "pipeDiameter": {
                "value": 0.05,
                "unit": "m"
            },
            "pipeFlowVelocity": {
                "value": 6.0,
                "unit": "ft/s"
            }
        },
        ...<snip>...
}

params.corrosionParameters

type

description

pipeDiameter

pipeFlowVelocity

Additional parameters if flowType is rotatingDisk

{
    "params": {
        ...<snip>...,
        "corrosionParameters":
        {
            "contactSurface": "Carbon steel G10100 (generic)",
            "flowType": "rotatingDisk",
            "diskDiameter": {
                "value": 0.6,
                "unit": "in"
            },
            "diskRotationSpeed": {
                "value": 15.0,
                "unit": "cycle/s"
            }
        },
        ...<snip>...
}

params.corrosionParameters

type

description

diskDiameter

diskRotationSpeed

Additional parameters if flowType is rotatingCylinder

{
    "params": {
        ...<snip>...,
        "corrosionParameters":
        {
            "contactSurface": "Carbon steel G10100 (generic)",
            "flowType": "rotatingCylinder",
            "rotorDiameter": {
                "value": 5,
                "unit": "mm"
            },
            "rotorRotation": {
                "value": 1000,
                "unit": "cycle/min"
            }
        },
        ...<snip>...
}

params.corrosionParameters

type

description

rotorDiameter

rotorRotation

Additional parameters if flowType is definedShearStress

{
    "params": {
        ...<snip>...,
        "corrosionParameters":
        {
            "contactSurface": "Carbon steel G10100 (generic)",
            "flowType": "definedShearStress",
            "shearStress": {
                "value": 0.01,
                "unit": "kPa"
            }
        },
        ...<snip>...
}

params.corrosionParameters

type

description

shearStress

Additional parameters if flowType is approximateMultiPhaseFlow

{
    "params": {
        ...<snip>...,
        "corrosionParameters":
        {
            "contactSurface": "Carbon steel G10100 (generic)",
            "flowType": "approximateMultiPhaseFlow",
            "pipeDiameter": {
                "value": 10.0,
                "unit": "cm"
            },
            "liquidFlowInPipe": {
                "value": 0.2,
                "unit": "m3/s"
            },
            "gasFlowInPipe": {
                "value": 0.1,
                "unit": "m3/s"
            },
            "pipeRoughness": {
                "value": 0.15,
                "unit": "cm"
            },
            "viscAbs2ndLiq": {
                "value": 15.0,
                "unit": "cP"
            },
            "waterCutAtPointOfDispersionInversion": 0.7,
            "maxRelViscosityOfDispersionAtInversion": 10.0
        },
        ...<snip>...
}

params.corrosionParameters

type

description

pipeDiameter

liquidFlowInPipe

gasFlowInPipe

pipeRoughness

viscAbs2ndLiq

waterCutAtPointOfDispersionInversion

number

water cut at point of dispersion inversion

maxRelViscosityOfDispersionAtInversion

number

max relative viscosity of dispersion at inversion

Response (status = "PROCESSED")

{
    "code": 200,
    "data": {
        "result": {
           ...<snip>...
            "corrosionOutputs": {
                "corrosionPotential": {
                    "value": -0.2751504098799078,
                    "unit": "V (SHE)"
                },
                "repassivationPotential": {
                    "value": -0.4851063187462839,
                    "unit": "V (SHE)"
                },
                "corrosionRateGPerMsqDay": {
                    "value": 382.2467320945027,
                    "unit": "g/m3-day"
                },
                "corrosionRateMmPerYear": {
                    "value": 17.728088591422296,
                    "unit": "mm/yr"
                },
                "corrosionRateMilPerYear": {
                    "value": 697.9562437567834,
                    "unit": "mil/yr"
                },
                "corrosionCurrentDensity": {
                    "value": 15.288766842782513,
                    "unit": "A/sq-m"
                },
                "maximumPitCurrentDensity": {
                    "value": 23.87887042448192,
                    "unit": "A/sq-m"
                }
            }
        }
    }, 
    "message": "Results returned successfully", 
    "status": "PROCESSED"
}

data.result.corrosionOutputs

type

description

corrosionPotential

corrosion potential

repassivationPotential

repassivation potential

corrosionRateGPerMsqDay

corrosion rate in gram per cubic meter day

corrosionRateMmPerYear

corrosion rate in mm per year

corrosionRateMilPerYear

corrosion rate in mil per year

corrosionCurrentDensity

corrosion current density

maximumPitCurrentDensity

maximum pit current density

All output units are fixed to what is shown in this example

Survey Calculation

supported params.surveyInputs[{}].field

"/params/temperature/value"

"/params/pressure/value"

PreviousCorrosion contact surfacesNextWater analysis

Last updated 7 months ago

Was this helpful?

specified or initial guess temperature with

specified or initial guess pressure with

contact surface metal name, which can be retrieved from

pipe diameter and

pipe flow velocity and

disk diameter and

disk rotation speed and

rotor diameter and

rotor rotation speed and

shear stress and

pipe diameter and

liquid flow in pipe and

gas flow in pipe and

pipe roughness and

absolute viscosity of 2nd liquid and

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 the corrosion output information can be conveniently retrieved from the data.result.corrosionOutputs array

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
Corrosion contact surfaces
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
unit
valueObject
valueObject
valueObject
valueObject
valueObject
valueObject
valueObject