Mixer calculation

This function performs a mixer calculation to combine external streams and flash at an isothermal condition.

Request payload

{
    "method": "scalechem.mixerCalculation",
    "params": {
        "name": "mixer",
        "chemistryModel": "mixerChemistry",
        "externalStreams": [...<snip>...],
        "inletInputs": [...<snip>...],
        "temperature": {
            "unit": "°C",
            "value": 50
        },
        "pressure": {
            "unit": "bar",
            "value": 1.1
        }
    }
}

params

type

description

name

string

name of output stream

chemistryModel

string

chemistry model file (dbs) name for mixer calculation

externalStreams

array of objects

inletInputs

array of objects

temperature

specified temperature with unit

pressure

specified pressure with unit

inheritOptions

boolean

Optional, option to apply "optionalProperties" and "unitSetInfo" to calculation objects in "externalStreams". Default is false

External streams

External streams can be calculated by three types of inputs at isothermal conditions: 1) ionic species composition, 2) inflow species composition, 3) mixer calculation to combine calculated external stream.

{
    "method": "scalechem.mixerCalculation",
    "params": {
        ...<snip>...
        "externalStreams": [
            {
                "name": "brine example",
                "chemistryModel": "brineChemistry",
                "waterAnalysisInputs": [...<snip>...]
            },
            {
                "name": "another stream",
                ...<snip>...
            },
            ...<snip>...
        ]
    }
}

Common external stream inputs

params.externalStreams[{}]

type

description

name

string

external stream name

chemistryModel

string

optional, chemistry model file (dbs) name for external stream

"chemistryModel" input is optional. The chemistry model file of the mixer calculation will be used if this input is missing.

External stream from ionic input

All inputs are specified as an array of objects in "waterAnalysisInputs", which are explained in water analysis calculation.

External stream from inflow input

params.externalStreams[{}]

type

description

inflows

object

temperature

specified temperature with unit

pressure

specified pressure with unit

saturateWithH2O

string

optional, could be specified as "gas" or "oil", which will add H2O to the system to saturate the corresponding phase with water

External stream from mixer calculation

params.externalStreams[{}]

type

description

inletInputs

array of objects

name, type, and flow rate for combining stream, as explained in inlet specification

temperature

specified temperature with unit

pressure

specified pressure with unit

External streams are calculated in the order of the input array. Any mixer calculation specified in external streams can combine external streams that are already calculated.

Any mixer calculation in external streams can be treated as an inlet for followed mixer calculations. In other words, mixer calculations can be specified cascadingly in external streams.

Inlet specification

{
    "method": "scalechem.mixerCalculation",
    "params": {
        ...<snip>...
        "inletInputs": [
            {
                "streamName": "external stream 1",
                "streamType": "brine",
                "totalAmount": {
                    "value": 1.0, 
                    "unit": "bbl/day"
                }
            },
            {
                "streamName": "external stream 2",
                ...<snip>...
            },
            ...<snip>...
        ]
    }
}

params.inletInputs[{}]

type

description

streamName

string

name of the external stream to be combined in mixer

streamType

string

stream type, this determines target phases to be combined in mixer

totalAmount

inlet stream flow rate with unit explained below

automaticFlowRate

boolean

optional, when speciefied as true, total flow rate specified in the external stream will be used, then "totalAmount" is not needed

"automaticFlowRate" can only be specified true when the corresponding external stream is calculated in flowing system.

Inlet stream types

params.inletInputs[{}].streamType

phases to be combined

phase property to be used in calculating flow rate

brine

liquid-1

liquid-1

oil

vapor, liquid-2

liquid-2

gas

vapor, liquid-2

vapor

whole fluid

liquid-1, liquid-2, vapor

all phases

params.inletInputs[{}].streamType

params.inletInputs[{}].totalAmount.unit numerators

brine, whole fluid

bbl, L, ml, cm3, m3, E3m3, E6m3, ft3, Mft3, MMft3, gal, MMgal

oil

std bbl, std m3, std L, bbl, m3, L

gas

std MMft3, std Mft3, std ft3, std E3m3, std m3, std L, MMft3, Mft3, ft3, E3m3, m3, L

params.inletInputs[{}].totalAmount.unit is flow rate unit with volumetric units as shown above divide by a time unit, i.e. bbl/day. Available time units are s, min, hr, day, yr.

Saturator option (optional)

This option can be specified to saturate one or more solid species by varying the inflow species.

{
    "method": "scalechem.mixerCalculation",
    "params": {
        ...<snip>...
        "saturatorOptions": [
            {
                "mineralToSaturate": "BASO4PPT",
                "inflowToVary": "BASO4"
            },
            ...<snip>...
        ]
    }
}

params.saturatorOptions[{}]

type

description

mineralToSaturate

string

solid species to be saturated, using "trueName" for species with solid phase. See chemistry information.

inflowToVary

string

varying inflow species, using "baseName" for inflows. See chemistry information.

Additional input

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

Response (status = PROCESSED)

{
    "code": 200,
    "result": {
       "external stream 1": {...<snip>...},
       "external stream 2": {...<snip>...},
       ...<snip>...,
       "mixer outlet stream": {...<snip>...}
    },
    "message": "Results returned successfully", 
    "status": "PROCESSED"
}

The "result" contains all stream outputs for each external stream and the final mixer outlet stream by their names specified in the 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/inletInputs/i/totalAmount/value" where i is the index (0 based) of the params.inletInputs array of objects

Last updated