Optional inputs

In addition to the mandatory inputs required for the various flash calculations, three additional inputs may also be present to control the calculation or for requesting additional data in the output. These are:-

  • included/excluded solids

  • optional properties

  • output units

In this example, let's assume the chemistry model file contains H2O, NACL, CO2 and BENZENE as inflows and is using the MSE thermodynamic framework.

include or exclude solid species from precipitating

OLI flash computations by default account for the formation of all solid species in the chemistry model. However, users can choose a subset of solid species in the computation by specifying them in the params.excludedSolids or params.includedSolids array. Example input and description are given below.

Note: Solids must be specified using the fully qualified tag. This is returned as the trueName when using the Chemistry Information API.

"excludedSolids": [
            "NAOH.2H2O",
            "NAOH.4H2O",
            "NACLPPT"
        ]

params

type

description

excludedSolids

[string]

list of excluded solid species in the flash computation

includedSolids

[string]

list of included solid species in flash computation, if an empty array is specified, all solids will be excluded

params.excludedSolids and params.includedSolids cannot be specified at the same time.

Optional properties

After the equilibrium solution is obtained, the user has the option to specify a number of optional properties to be computed along with this output. These can be turned on or off using a Boolean flag (true/false) in the params.optionalProperties object. Example input and description is given below

{
    "params": {
        ...<snip>...
        "optionalProperties": {
            "electricalConductivity": true,
            "viscosity": true,
            "selfDiffusivity": true,
            "heatCapacity": true,
            "thermalConductivity": true,
            "surfaceTension": true,
            "interfacialTension": true,
            "prescalingTendencies": true
        }
    }
}

params.optionalProperties

type

desc

electricalConductivity

bool

Electrical conductivity of the liquid phase

viscosity

bool

Viscosity for any liquid or gas phases

selfDiffusivityAndMobility

bool

Self diffusivity and mobility for any liquid or gas phases

heatCapacity

bool

Heat capacity for any phases

thermalConductivity

bool

Thermal conductivity for any phases

surfaceTension

bool

Surface tension for any liquid phases

interfacialTension

bool

Interfacial tension between liquid1 and liquid2 phases

volumeStdConditions

bool

liquid1, liquid2, and vapor phase volume at standard conditions

prescalingTendenciesEstimated

bool

prescaling tendencies of solids using the estimated method

prescalingIndexEstimated

bool

prescaling indices of solids using the estimated method

prescalingTendenciesRigorous

bool

prescaling tendencies of solids using the rigorous method

prescalingIndexRigorous

bool

prescaling indices of solids using the rigorous method

scalingTendencies

bool

scaling tendencies of solids

scalingIndex

bool

scaling indices of solids

hardness

bool

hardness of liquid1 phase

ionicStrengthXBased

bool

x-based ionic strength of any liquid phases

ionicStrengthMBased

bool

m-based ionic strength of any liquid phases

totalDissolvedSolids

bool

total dissolved solids in the liquid1 phase

vaporToInflowMoleFraction

bool

vapor to inflow mole fraction

partialPressure

bool

vapor phase partial pressures of all species

vaporDiffusivityMatrix

bool

vapor diffusivity matrix

entropyStream

bool

entropy of stream for all phases

entropySpecies

bool

entropy of each species for all phases

entropyStreamStandardState

bool

entropy of stream at standard state for all phases

entropySpeciesStandardState

bool

entropy of each species at standard state for all phases

gibbsEnergyStream

bool

Gibbs free energy of stream for all phases

gibbsEnergySpecies

bool

Gibbs free energy of each species for all phases

gibbsEnergyStreamStandardState

bool

Gibbs free energy of stream at standard state for all phases

gibbsEnergySpeciesStandardState

bool

Gibbs free energy of each species at standard state for all phases

activityCoefficientsMBased

bool

m-based activity coefficients of each species for all liquid phases

activityCoefficientsXBased

bool

x-based activity coefficients of each species for all liquid phases

fugacityCoefficients

bool

fugacity coefficients of each species for liquid2 and vapor phases

vaporFugacity

bool

fugacities of each species for vapor phase

kValuesXBased

bool

x-based K-values for all equilibrium reactions

kValuesMBased

bool

x-based M-values for all equilibrium reactions

materialBalanceGroup

bool

material balance group compositions for all phases

params.optionalProperties.volumeStdConditions calculate liquid1, liquid2, and vapor phase volume at default standard conditions, which can be specified in here.

params.optionalProperties.scalingInductionTime calculates induction time for scaling solids. Additional inputs are needed for this calculation and explained here. This property is only supported for MSE and MSE-SRK thermodynamic properties.

Scaling Induction Time

Induction time is estimated based on the supersaturation level of the scaling solid. Therefore, such solids need to be excluded to calculate their induction times, as specified below.

{
    "params": {
        ...<snip>...
        "inductionTimeExcludedSolids": [
            "ARAGONITEPPT",
            "BACO3PPT",
            "BASO4PPT",
            ...<snip>...
        ]
    }
}

Standard conditions

Standard conditions can be specified to calculate the optional property params.optionalProperties.volumeStdConditions.

{
    "params": {
        ...<snip>...
        "standardConditions": [
            {
                "phase": "oil",
                "temperature": {
                    "unit": "°C",
                    "value": 15.5556
                },
                "pressure": {
                    "unit": "atm",
                    "value": 1.0
                }
            },
            {
                "phase": "gas",
                ...<snip>...
            },
            {
                "phase": "aqueous",
                ...<snip>...
            }
        ]
    }
}

params.standardConditions[i]

type

description

phase

string

name of the phase, which can be oil, aqueous, or gas

temperature

standard condition temperature

pressure

standard condition temperature

phase

default temperature in °C

default pressure in atm

oil

15.5556

1.0

gas

16.8500

1.48038

aqueous

25.0

1.0

Output units

Users can optionally specify units of the output values in the Stream output. More details are explained in User-defined output unit set.

params.unitSetInfo is optional. OLIEngine default units will be used if this object is not specified.

Molecular conversion

There are two types of speciation information in the stream output: true concentration and molecular concentration. While the true concentration reflects the speciation of the real species which is unique, the molecular concentration is one of many representations for the true species in molecular/inflow forms. Users have the option to specify three weighting methods for this molecular conversion:

{
    "params": {
        ...<snip>...
        "molecularConversion": {
            "option": "userSpecified",
            "weightFactors": {
                "NAOH": 50.0,
                "CACO3": 10.0
            }
        }
    }    
}
molecularConversion.optiondescription

automatic

no weightage preference

inflowRateBased

weightage is proportional to input inflow values

userSpecified

user-specified weight factors for any inflows

molecularConversion.weightFactors object is only specified when molecularConversion.option is "userSpecified". The weight factor of each inflow is specified as "inflow_name": number, in the range from 0.0 to 100.0

params.molecularConversion object is optional. By default, "inflowRateBased" option is used.

JSON input (sample)

Below is the sample JSON input covering all three options using isothermal flash as an example.

{
    "method": "oliengine.isothermalFlash",
    "params": {
        "temperature": {
            "value": 40.0,
            "unit": "°C"
        },
        "pressure": {
            "value": 1.5,
            "unit": "atm"
        },
        "inflows": {
            "unit": "mol",
            "values": {
                "H2O": 50.0,
                "BENZENE": 10.0,
                "CH4": 20.0,
                "NAOH": 35.0
            },
            "totalAmount":
            {
                "value": 3402.68,
                "unit": "g"
            }
        },
        "excludedSolids": [
            "NAOH.2H2O",
            "NAOH.4H2O"
        ],
        "optionalProperties": {
            "electricalConductivity": true,
            "viscosity": true,
            "selfDiffusivity": true,
            "heatCapacity": true,
            "thermalConductivity": true,
            "surfaceTension": true,
            "interfacialTension": true,
            "prescalingTendencies": true
        },
        "unitSetInfo": {
            "inflows": "mol",
            "total": "g",
            "liq1_phs_comp": "mol/mol",
            ...<snip>...
            "hardness": "mg/L of Mg+2 and Ca+2",
            "tic": "mol C/L"
        }
}

Last updated