Vapor fraction flash

This function calculates the mixture temperature or pressure at a fixed vapor phase mole fraction with respect to inflows i.e. (vapor phase moles/inflow moles)

vapor fraction

POST https://api.olisystems.com/engine/flash/{dbs_file_id}/vapor-fraction

run a fix vapor fraction calculation by varying temperature or pressure

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"
        },
        "vaporMolFrac": {
            "value": 15.0,
            "unit": "mole %"
        },
        "calculatedVariable": "pressure",
        "inflows": {
            "unit": "mol",
            "values": {
                "H2O": 50.0,
                "CO2": 10.0,
                "NACL": 20.0,
                "BENZENE": 10.0
            }
        }
    }
}

params

type

description

temperature

valueObject

pressure

valueObject

vaporMolFrac

valueObject

calculatedVariable

string

variable to be calculated, i.e. "temperature" or "pressure"

inflows

object

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

If kinetic reactions are defined in the chemistry model, kinetic calculation inputs are required to be specified. A detailed description can be found here.

Response (status = PROCESSED)

{
    "code": 200,
    "data": {
        "result": {
            "calculatedVariables": [
                {
                    "name": "temperature",
                    "unit": "°C",
                    "value": 47.055412429605155
                }
            ],
            ...<snip>...
        }
    }, 
    "message": "Results returned successfully", 
    "status": "PROCESSED"
}

The output of this calculation is the stream output which is common result output for all OLI's flash calculations or an error. In addition to this output the result also contains the solution temperature/pressure which can be conveniently retrieved from the data.result.calculatedVariable array

type

description

name

string

name of the calculated variable, i.e. temperature or pressure as specified in JSON input params.calculatedVariable

value

number

value of the calculated variable

unit

string

unit of the calculated variable, which is the same as specified in the input initial guess, i.e. params.temperature.unit/params.pressure.unit in input

Survey Calculation

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

supported params.surveyInputs[{}].field

"/params/temperature/value"

"/params/pressure/value"

"/params/vaporMolFrac/value"

Last updated