# User defined output unit set

For all the flash computations, the user can optionally specify the unit of each output value in the [Stream output](https://devdocs.olisystems.com/stream-output-json) in the **params.unitSetInfo** section. The table below describes the supported output units.

| params.unitSetInfo   | definition                        | default unit          | units available                                                                  |
| -------------------- | --------------------------------- | --------------------- | -------------------------------------------------------------------------------- |
| liq1\_phs\_comp      | liquid 1 phase composition        | mol                   | see composition units below                                                      |
| solid\_phs\_comp     | solid phase composition output    | mol                   | see composition units below                                                      |
| vapor\_phs\_comp     | vapor phase composition output    | mol                   | see composition units below                                                      |
| liq2\_phs\_comp      | liquid 2 phase composition output | mol                   | see composition units below                                                      |
| combined\_phs\_comp  | total composition output          | mol                   | see composition units below                                                      |
| density              | density of a phase/total stream   | g/L                   | g/ml, kg/m3, g/L, kg/L, lb/ft3, lb/gal                                           |
| mass                 | mass of a phase/total stream      | g                     | g, kg, lb, mg, (g/100), metric ton                                               |
| vol                  | volume of a phase/total stream    | L                     | L, ml, cm3, m3, E3m3, E6m3, ft3, Mft3, MMft3, gal, MMgal, bbl                    |
| moles                | total moles in a  phase/stream    | mol                   | mol, kgmol, lbmol, mmol, μmol, (mol/100)                                         |
| pt                   | pressure of stream                | atm                   | atm, bar, barg, mbar, Pa, kPa, MPa, mmHg, Torr, inHg, psia, psig, inH2O, kg/cm2  |
| t                    | temperature of stream             | °C                    | K, degree\_Fahrenheit, °C, °F, degree\_Celsius, R                                |
| enthalpy             | enthalpy of a phase/stream        | cal                   | cal, E3cal, E6cal, J, kJ, MJ, Btu, MMBtu                                         |
| visabs               | Absolute viscosity                | cP                    | cP, Poise, Pa-s                                                                  |
| i                    | Ionic strength, x-based           | mol/mol               | mol/mol                                                                          |
| im                   | Ionic strength, m-based           | mol/kg                | mol/kg                                                                           |
| econd                | Specific electric conductivity    | µmho/cm               | mho/m, mho/cm, µmho/m, µmho/cm                                                   |
| econdm               | Molar electric conductivity       | m2/ohm-mol            | m2/ohm-mol, cm2/ohm-mol                                                          |
| fug                  | Fugacity                          | atm                   | atm, bar, barg, mbar, Pa, kPa, MPa, mmHg, Torr, inHg, psia, psig, inH2O, kg/cm2  |
| mob                  | Mobilities                        | cm2/s-volt            | cm2/s-volt, m2/s-volt                                                            |
| dif                  | Self diffusivity                  | m2/s                  | m2/s                                                                             |
| alkalinity           | Alkalinity                        | mg HCO3/L             | eq/L, meq/L, mg HCO3/L, mg CO3/L, mol HCO3/L, mol CO3/L, mg CaCO3/L, mol CaCO3/L |
| tds                  | Total dissolved solids            | mg/L                  | mg/L                                                                             |
| cp                   | Heat capacity                     | cal/g K               | J/kg K, J/g K, cal/g K, Btu/lb R                                                 |
| entr                 | Entropy                           | cal/K                 | J/K, cal/K, Btu/R                                                                |
| thermalcond          | Thermal conductivity              | cal/hr m °C           | Btu/hr ft °F, cal/hr m °C, cal/s m °C, J/s m K                                   |
| surface\_tension     | Surface tension                   | N/m                   | N/m, dyne/cm                                                                     |
| mol\_entr            | Molar entropy                     | cal/mol K             | J/mol K, cal/mol K, Btu/mol R                                                    |
| interfacial\_tension | Interfacial tension               | N/m                   | N/m, dyne/cm                                                                     |
| kinetics\_k          | K value of kinetic reaction       | mol/hr m3             | mol/hr m3                                                                        |
| kinetics\_rate       | Kinetic reaction rate             | mol/hr hr             | mol/hr hr                                                                        |
| kinetics\_extent     | Kinetic reaction extent           | mol/hr                | mol/hr                                                                           |
| hardness             | Hardness                          | mg/L of Mg+2 and Ca+2 | mg/L of Mg+2 and Ca+2                                                            |
| tic                  | Total inorganic carbon            | mol C/L               | mg C/L, g C/L, mol C/L                                                           |
| energy               | Gibbs free energy                 | cal                   | cal, E3cal, E6cal, J, kJ, MJ, Btu, MMBtu                                         |
| mol\_energy          | Molar Gibbs free energy           | cal/mol               | cal/mol, E3cal/mol, E6cal/mol, J/mol, kJ/mol, MJ/mol, Btu/mol, MMBtu/mol         |
| part\_pressure       | Partial pressure                  | atm                   | atm, bar, barg, mbar, Pa, kPa, MPa, mmHg, Torr, inHg, psia, psig, inH2O, kg/cm2  |
| molefrac             | Mole fraction                     | mol/mol               | mol/mol, mole %, ppm (mole)                                                      |
| induction\_time      | scaling induction time            | hr                    | s, min, hr, day, yr                                                              |

{% hint style="success" %}
All unit entries do not have to be specified. The ones that are not will be overridden by the default.&#x20;
{% endhint %}

#### Composition units

| unit types    | units                                      |
| ------------- | ------------------------------------------ |
| moles         | `mol, kgmol, lbmol, mmol, µmol, (mol/100)` |
| mole fraction | `mol/mol, mole %, ppm (mole)`              |
| mass          | `g, kg, lb, mg, (g/100), metric ton`       |
| mass fraction | `g/g, mass %, ppm (mass)`                  |

{% hint style="info" %}
Composition units can be specified as any units above.
{% endhint %}

### JSON input (example)

Below is an input sample containing the **params.unitSetInfo** optional object using [isothermal flash](https://devdocs.olisystems.com/group1/api-functions/isothermal) function input as an example.

```javascript
{
    "params": {
        ...<snip>...
        "unitSetInfo": {
            "liq1_phs_comp": "mol/mol",
            "solid_phs_comp": "mol/mol",
            "vapor_phs_comp": "mol/mol",
            "liq2_phs_comp": "mol/mol",
            "combined_phs_comp": "mol/mol",
            "density": "kg/m3",
            "mass": "g",
            "vol": "L",
            "moles": "mol",
            "pt": "atm",
            "t": "°C",
            "enthalpy": "J",
            "visabs": "cP",
            "i": "mol/mol",
            "im" "mol/kg",
            "econd": "µmho/cm",
            "econdm": "m2/ohm-mol",
            "fug": "atm",
            "mob": "m2/s-volt",
            "dif": "m2/s",
            "alkalinity": "mg HCO3/L",
            "tds": "mg/L",
            "current_den": "A/sq-m",
            "molefrac": "mole %",
            "cp": "cal/g K",
            "entr": "cal/K hr",
            "thermalcond": "cal/hr m °C",
            "surface_tension": "N/m",
            "part_pressure": "atm",
            "mol_entr": "cal/mol K",
            "interfacial_tension": "N/m",
            "kinetics_k": "mol/hr m3",
            "kinetics_rate": "mol/hr hr",
            "kinetics_extent": "mol",
            "hardness": "mg/L of Mg+2 and Ca+2",
            "tic": "mol C/L"
        }
}
```

Explanation of each property and available units will be documented later.
