Custom flash
This function calculates equilibrium condition with any number of fixed and freed system parameters.
custom
POST
https://api.olisystems.com/engine/flash/{dbs_file_id}/custom
run a custom equilibrium calculation
Headers
Authorization
string
Bearer {access_token}
Content-Type
string
application/json
Request payload
params
type
description
fixedVars
array of objects
list of objects to describe fixed flash output variables
freedVars
array of objects
list of objects to describe freed flash input variables
The sizes of the object arrays, params.fixedVars and params.freedVars must be equal
Here is a description of the type and name attributes for the params.fixedVars array
params.fixedVars[index_number].type
params.fixedVars[index_number].name
property
volume, enthalpy, pH
liquid1PhaseComposition
species name of liquid phase
liquid2PhaseComposition
species name of liquid phase
vaporPhaseComposition
species name of vapor phase
solid
species name of solid phase
species name can be retrieved from chemistry information call under result.species(trueName), respectively.
Here is a description of the unit attribute for the params.fixedVars array
params.fixedVars[index_number].type or .name
params.fixedVars[index_number].unit
liquid1PhaseComposition, liquid2PhaseComposition, vaporPhaseComposition
mol/mol, mole %, ppm (mole)
solid
mol, kgmol, lbmol, mmol, µmol, (mol/100)
volume
L, ml, cm3, m3, E3m3, E6m3, ft3, Mft3, MMft3, gal, MMgal, bbl
enthalpy
cal, E3cal, E6cal, J, kJ, MJ, Btu, MMBtu
This section explains the available flash input variables can be freed for this calculation
params.freedVars[index_number].type
params.freedVars[index_number].name
params.freedVars[index_number].unit
state
temperature
°C, K, °F, R
state
pressure
atm, bar, barg, mbar, Pa, kPa, MPa, mmHg, Torr, inHg, psia, psig, inH2O, kg/cm2
inflow
inflow name
mol, kgmol, lbmol, mmol, µmol, (mol/100)
in addition to the inputs shown above some optional properties may also be specified. They can be viewed here
JSON output (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 values of the free variables which can be conveniently retrieved from the result.calculatedVariables array
name
string
name of calculated variable
value
number
value of calculated variable
unit
string
unit of the calculated variable
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/fixedVars/i/value" where i is the index (0 based) of params.fixedVars to be surveyed
"/params/freedVars/i/value" where i is the index (0 based) of params.freedVars to be surveyed
Last updated